SupportSQLiteStatement
public
interface
SupportSQLiteStatement
implements
SupportSQLiteProgram
android.arch.persistence.db.SupportSQLiteStatement
|
An interface to map the behavior of SQLiteStatement
.
Summary
Public methods |
abstract
void
|
execute()
Execute this SQL statement, if it is not a SELECT / INSERT / DELETE / UPDATE, for example
CREATE / DROP table, view, trigger, index etc.
|
abstract
long
|
executeInsert()
Execute this SQL statement and return the ID of the row inserted due to this call.
|
abstract
int
|
executeUpdateDelete()
Execute this SQL statement, if the the number of rows affected by execution of this SQL
statement is of any importance to the caller - for example, UPDATE / DELETE SQL statements.
|
abstract
long
|
simpleQueryForLong()
Execute a statement that returns a 1 by 1 table with a numeric value.
|
abstract
String
|
simpleQueryForString()
Execute a statement that returns a 1 by 1 table with a text value.
|
Inherited methods |
From interface
android.arch.persistence.db.SupportSQLiteProgram
abstract
void
|
bindBlob(int index, byte[] value)
Bind a byte array value to this statement.
|
abstract
void
|
bindDouble(int index, double value)
Bind a double value to this statement.
|
abstract
void
|
bindLong(int index, long value)
Bind a long value to this statement.
|
abstract
void
|
bindNull(int index)
Bind a NULL value to this statement.
|
abstract
void
|
bindString(int index, String value)
Bind a String value to this statement.
|
abstract
void
|
clearBindings()
Clears all existing bindings.
|
|
From interface
java.io.Closeable
|
From interface
java.lang.AutoCloseable
|
Public methods
execute
void execute ()
Execute this SQL statement, if it is not a SELECT / INSERT / DELETE / UPDATE, for example
CREATE / DROP table, view, trigger, index etc.
Throws |
SQLException |
If the SQL string is invalid for
some reason
|
executeInsert
long executeInsert ()
Execute this SQL statement and return the ID of the row inserted due to this call.
The SQL statement should be an INSERT for this to be a useful call.
Returns |
long |
the row ID of the last row inserted, if this insert is successful. -1 otherwise. |
Throws |
SQLException |
If the SQL string is invalid for
some reason
|
executeUpdateDelete
int executeUpdateDelete ()
Execute this SQL statement, if the the number of rows affected by execution of this SQL
statement is of any importance to the caller - for example, UPDATE / DELETE SQL statements.
Returns |
int |
the number of rows affected by this SQL statement execution. |
Throws |
SQLException |
If the SQL string is invalid for
some reason
|
simpleQueryForLong
long simpleQueryForLong ()
Execute a statement that returns a 1 by 1 table with a numeric value.
For example, SELECT COUNT(*) FROM table;
Returns |
long |
The result of the query. |
simpleQueryForString
String simpleQueryForString ()
Execute a statement that returns a 1 by 1 table with a text value.
For example, SELECT COUNT(*) FROM table;
Returns |
String |
The result of the query. |