Skip to content
Commit ab18d1f4 authored by Owen Lin's avatar Owen Lin
Browse files

Fix SQLite limit issue.

SQLLite limit is not only used to limit the returned number of data.
It can be used to do an offset query.

For example, "SELECT * FROM table LIMIT 100, 10", will return the
data of index in the range of [100, 100 + 10).

This change set enable this kind of useage.

This is also more efficient than use "cursor.moveToPosition()".
In my experiment, I query 1000 items in batch mode, i.e.,
get 20 items out of 1000 each time.

    Time of using LIMIT clause: 626ms
    Time of useing "cursor.moveToPosition()": 2062ms
parent d1874747
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment