This change adds a new class SQLiteContentHelper, which contains
a static method for creating an AssetFileDescriptor from
an SQLite query that returns a blob.
Internally, this uses a file descriptor for a MemoryFile.
The implementation is temporary. Ideally, the data should be copied
directly from SQLite to the MemoryFile ashmem region, using
sqlite3_blob_read().
This is part of the implementation of http://b/issue?id=1871731
This change adds a new class SQLiteContentHelper, which contains
a static method for creating an AssetFileDescriptor from
an SQLite query that returns a blob.
Internally, this uses a file descriptor for a MemoryFile.
The implementation is temporary. Ideally, the data should be copied
directly from SQLite to the MemoryFile ashmem region, using
sqlite3_blob_read().
This is part of the implementation of http://b/issue?id=1871731
- change the applyBatch to take an ArrayList rather than an []
- change Entity to be a final flass that contains ContentValues
- remove the ability to update/insert Entities by a ContentProviderOperation
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
Merge commit '9ae8873ed83035e8527526e2cc1a189caf0e8d9e'
* commit '9ae8873ed83035e8527526e2cc1a189caf0e8d9e':
Allow caller-supplied column aliases in queries even when a projection map is used.
Modified SQLiteQueryBuilder to allow caller-spplied column alias ("AS")
instead restricting to the keys of the supplied projection map. This is needed for
UNION queries where new columns may be created on the fly such as "1 AS flag"