pushtorefresh / storio

Reactive API for SQLiteDatabase and ContentResolver.
Apache License 2.0
2.55k stars 182 forks source link

Why doesn't limit() method of query builder accept integer args? #515

Closed vokilam closed 9 years ago

vokilam commented 9 years ago

Although I understand that LIMIT clause may be pretty complex, I think that it would be handy to have overloaded versions limit(int) and limit(int, int) for vast majority of cases. Are there any implications of doing so?

artem-zinnatullin commented 9 years ago

The main reason why we don't have limit(n) is that we don't want to generate any kind of SQL as part of the StorIO, because SQL is not very easy language to parse & validate.

But, I'd agree that limit(n) and limit(n, m) looks like easy, useful and valid feature!

I think we can add it in the next release, feel free to send PRs or wait until we implement it (we'll comment here if we start our work).

@nikitin-da please comment

nikitin-da commented 9 years ago

I agree, it should be nice feature, I'll implement it.

artem-zinnatullin commented 9 years ago

Cool :) Added to v1.4.0 milestone!

artem-zinnatullin commented 9 years ago

@vokilam StorIO 1.4.0 was just released and should be available in 10-20 minutes, hope you'll like it!

vokilam commented 9 years ago

Awesome!