ContentResolver で、LIMIT句を書く場所

ContentResolver で、LIMIT句のクエリを実行する場合、Uriのパラメータ追加でなくて、
query メソッドsortOrder パラメータに書いた方が良い。

以下のように、UriappendQueryParameter を実行して 再 build するものと思っていたのだが、、、

Cursor cursor = context.getContentResolver().query(
ContactsContract.Data.CONTENT_URI
.buildUpon().appendQueryParameter("limit", "10")
.appendQueryParameter("offset", "20")
.build()

, projection
, selection
, selectionArgs
, RawContacts.CONTACT_ID + " ASC
");


これは、期待どおりに offset がうまく働かない。


query メソッドsortOrder に書いてしまう方がうまくいく。

Cursor cursor = context.getContentResolver().query(
ContactsContract.Data.CONTENT_URI
, projection
, selection
, selectionArgs
, RawContacts.CONTACT_ID + " ASC limit 10 offset 20"
);