public class SQLiteCursor
extends android.database.AbstractWindowedCursor
SQLiteDatabase.
SQLiteCursor is not internally synchronized so code using a SQLiteCursor from multiple
threads should perform its own synchronization when using the SQLiteCursor.| Constructor and Description |
|---|
SQLiteCursor(SQLiteCursorDriver driver,
java.lang.String editTable,
SQLiteQuery query)
Execute a query and provide access to its result set through a Cursor
interface.
|
SQLiteCursor(SQLiteDatabase db,
SQLiteCursorDriver driver,
java.lang.String editTable,
SQLiteQuery query)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
deactivate() |
protected void |
finalize()
Release the native resources, if they haven't been released yet.
|
int |
getColumnIndex(java.lang.String columnName) |
java.lang.String[] |
getColumnNames() |
int |
getCount() |
SQLiteDatabase |
getDatabase()
Get the database that this cursor is associated with.
|
boolean |
onMove(int oldPosition,
int newPosition) |
boolean |
requery() |
void |
setSelectionArguments(java.lang.String[] selectionArgs)
Changes the selection arguments.
|
void |
setWindow(android.database.CursorWindow window) |
checkPosition, copyStringToBuffer, getBlob, getDouble, getFloat, getInt, getLong, getShort, getString, getType, getWindow, hasWindow, isBlob, isFloat, isLong, isNull, isStringfillWindow, getColumnCount, getColumnIndexOrThrow, getColumnName, getExtras, getNotificationUri, getPosition, getUpdatedField, getWantsAllOnMoveCalls, isAfterLast, isBeforeFirst, isClosed, isFieldUpdated, isFirst, isLast, move, moveToFirst, moveToLast, moveToNext, moveToPosition, moveToPrevious, onChange, registerContentObserver, registerDataSetObserver, respond, setExtras, setNotificationUri, unregisterContentObserver, unregisterDataSetObserver@Deprecated public SQLiteCursor(SQLiteDatabase db, SQLiteCursorDriver driver, java.lang.String editTable, SQLiteQuery query)
SQLiteCursor(SQLiteCursorDriver, String, SQLiteQuery) insteadSELECT name, birth, phone FROM
myTable WHERE ... LIMIT 1,20 ORDER BY... the column names (name, birth,
phone) would be in the projection argument and everything from
FROM onward would be in the params argument.db - a reference to a Database object that is already constructed
and opened. This param is not used any longereditTable - the name of the table used for this queryquery - the rest of the query terms
cursor is finalizedpublic SQLiteCursor(SQLiteCursorDriver driver, java.lang.String editTable, SQLiteQuery query)
SELECT name, birth, phone FROM
myTable WHERE ... LIMIT 1,20 ORDER BY... the column names (name, birth,
phone) would be in the projection argument and everything from
FROM onward would be in the params argument.editTable - the name of the table used for this queryquery - the SQLiteQuery object associated with this cursor object.public SQLiteDatabase getDatabase()
public boolean onMove(int oldPosition,
int newPosition)
onMove in interface android.database.CrossProcessCursoronMove in class android.database.AbstractCursorpublic int getCount()
getCount in interface android.database.CursorgetCount in class android.database.AbstractCursorpublic int getColumnIndex(java.lang.String columnName)
getColumnIndex in interface android.database.CursorgetColumnIndex in class android.database.AbstractCursorpublic java.lang.String[] getColumnNames()
getColumnNames in interface android.database.CursorgetColumnNames in class android.database.AbstractCursorpublic void deactivate()
deactivate in interface android.database.Cursordeactivate in class android.database.AbstractCursorpublic void close()
close in interface android.database.Cursorclose in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class android.database.AbstractCursorpublic boolean requery()
requery in interface android.database.Cursorrequery in class android.database.AbstractCursorpublic void setWindow(android.database.CursorWindow window)
setWindow in class android.database.AbstractWindowedCursorpublic void setSelectionArguments(java.lang.String[] selectionArgs)
protected void finalize()
finalize in class android.database.AbstractCursor