java.lang.Object | |||
↳ | android.database.AbstractCursor | ||
↳ | android.database.AbstractWindowedCursor | ||
↳ | android.database.sqlite.SQLiteCursor |
A Cursor implementation that exposes results from a query on a
SQLiteDatabase
.
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
android.database.AbstractWindowedCursor
| |||||||||||
From class
android.database.AbstractCursor
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Execute a query and provide access to its result set through a Cursor
interface.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Closes the Cursor, releasing all of its resources and making it completely invalid.
| |||||||||||
Deactivates the Cursor, making all calls on it fail until
requery() is called. | |||||||||||
Returns the zero-based index for the given column name, or -1 if the column doesn't exist.
| |||||||||||
Returns a string array holding the names of all of the columns in the
result set in the order in which they were listed in the result.
| |||||||||||
Returns the numbers of rows in the cursor.
| |||||||||||
This function is called every time the cursor is successfully scrolled
to a new position, giving the subclass a chance to update any state it
may have.
| |||||||||||
Register an observer that is called when changes happen to the contents
of the this cursors data set, for example, when the data set is changed via
requery() , deactivate() , or close() . | |||||||||||
Performs the query that created the cursor again, refreshing its
contents.
| |||||||||||
Changes the selection arguments.
| |||||||||||
Set a new cursor window to cursor, usually set a remote cursor window
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Release the native resources, if they haven't been released yet.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class android.database.AbstractWindowedCursor
| |||||||||||
From class android.database.AbstractCursor
| |||||||||||
From class java.lang.Object
| |||||||||||
From interface android.database.CrossProcessCursor
| |||||||||||
From interface android.database.Cursor
|
Execute a query and provide access to its result set through a Cursor
interface. For a query such as: 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. This constructor
has package scope.
db | a reference to a Database object that is already constructed and opened |
---|---|
editTable | the name of the table used for this query |
query | the rest of the query terms cursor is finalized |
Closes the Cursor, releasing all of its resources and making it completely invalid.
Unlike deactivate()
a call to requery()
will not make the Cursor valid
again.
Returns the zero-based index for the given column name, or -1 if the column doesn't exist.
If you expect the column to exist use getColumnIndexOrThrow(String)
instead, which
will make the error more clear.
columnName | the name of the target column. |
---|
Returns a string array holding the names of all of the columns in the result set in the order in which they were listed in the result.
Returns the numbers of rows in the cursor.
This function is called every time the cursor is successfully scrolled to a new position, giving the subclass a chance to update any state it may have. If it returns false the move function will also do so and the cursor will scroll to the beforeFirst position.
oldPosition | the position that we're moving from |
---|---|
newPosition | the position that we're moving to |
Register an observer that is called when changes happen to the contents
of the this cursors data set, for example, when the data set is changed via
requery()
, deactivate()
, or close()
.
observer | the object that gets notified when the cursors data set changes. |
---|
Performs the query that created the cursor again, refreshing its
contents. This may be done at any time, including after a call to deactivate()
.
Changes the selection arguments. The new values take effect after a call to requery().
Set a new cursor window to cursor, usually set a remote cursor window
window | cursor window |
---|
Release the native resources, if they haven't been released yet.