Comments (2)
limit 0の場合にlimitの上限を変換している意図
Oracle DatabaseやSQL Serverなど他のデータベースと挙動を合わせるためです。これらのデータベースではMySQLのlimit 0
に相当する挙動が定義されていないので、Domaではlimit 0
は全件取得と同じ挙動をとるように調整されています。
limit 0を指定できるようにご検討いただけませんでしょうか
この挙動に依存しているアプリがあるかもしれないので、もし対応するにしても互換性の維持は重要視したいと考えています。
ワークアラウンドの案
limit 0
を許容したいのは空の結果セットを得たいからだと想像します。 limit
に渡す値で条件分岐して値が0
のときはSQLのWHERE句が WHERE 1 = 0
のようになるように調整していただければ期待する結果を得られると思います。
from doma.
limit 0の場合にlimitの上限を変換している意図
Oracle DatabaseやSQL Serverなど他のデータベースと挙動を合わせるためです。これらのデータベースではMySQLのlimit 0に相当する挙動が定義されていないので、Domaではlimit 0は全件取得と同じ挙動をとるように調整されています。
こちら回答いただきありがとうございます。理解いたしました。
提示いただいたワークアラウンド案での検討をしたいと思います。
from doma.
Related Issues (20)
- MySQLのSelectOptioins.countで`SELECT COUNT`に変える方法はありますか? HOT 2
- Javaを8から11に上げた時、Eclipse上での注釈処理が遅くなる HOT 13
- SelectOptionsでソートしたい HOT 4
- 2.53.3以降でDomainConverterにenumを指定するとコンパイルエラーが発生する HOT 4
- Prevent prepareIdValue if ignoreGeneratedKeys is true HOT 4
- DOMA4084 error occurs when including the Embeddable class HOT 5
- MSSQL: TOP keyword is appended in wrong place when select with DISTINCT HOT 1
- 一つ項目を抽出して、かつこの項目がNULLの場合、取得できません。 HOT 1
- ( is missing when generating insert sql into auto_increment column only table HOT 2
- Some NativeSQL set queryTimeout to fetchSize HOT 1
- Criteria Apiについて、leftJoinの条件の書き方 HOT 2
- left joinについて HOT 6
- [Security] Workflow gradle-wrapper-validation.yml is using vulnerable action gradle/wrapper-validation-action
- Missing limit, offset words when select with top level `WITH` word HOT 4
- Criteria APIにて、タプルを使ったIN述語を3項目以上で使用する方法を教えてほしい HOT 1
- Criteria APIにて、タプルを使ったIN述語を3項目以上で使用する方法を教えてほしい HOT 3
- Criteria APIでページングを実装するとき、絞り込み前の総件数を取得する方法はありますか? HOT 1
- OriginalState comparing BigDecimal by using equals HOT 1
- Doma APT module-info.java is missing `provides javax.annotation.processing.Processor` HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from doma.