Allows offset & limit to take Option<u64>#1410
Conversation
|
I don't quite like this API, something like https://docs.rs/sea-query/latest/sea_query/query/struct.SelectStatement.html#method.conditions would serve a more general usecase, may be something like: fn maybe<T, F>(&mut self, val: Option<T>, if_some: F)
where F: FnOnce(&mut Self, v: T)In any case I think |
|
I still think making |
|
I think the API behaviour here should be if None is passed in, it should clear the limit/offset instead of no-op. |
Yes, you're right! How could I miss that. Let me add that in. |
|
That's why I said the original intention is handled better by the |
|
Still hesitated on publishing this API? |
PR Info
New Features
QuerySelect::offset()andQuerySelect::limit()take eitherOption<64>oru64Breaking Changes
QuerySelect::offset()andQuerySelect::limit()toOptionalU64