public class SQLiteStatement extends SQLiteProgram
SQLiteDatabase
that can be reused.
The statement cannot return multiple rows, but 1x1 result sets are allowed.
Don't use SQLiteStatement constructor directly, please use
SQLiteDatabase.compileStatement(String)
SQLiteStatement is not internally synchronized so code using a SQLiteStatement from multiple
threads should perform its own synchronization when using the SQLiteStatement.mDatabase, nHandle, nStatement
Modifier and Type | Method and Description |
---|---|
void |
execute()
Execute this SQL statement, if it is not a query.
|
long |
executeInsert()
Execute this SQL statement and return the ID of the row inserted due to this call.
|
long |
executeUpdateDelete() |
long |
simpleQueryForLong()
Execute a statement that returns a 1 by 1 table with a numeric value.
|
java.lang.String |
simpleQueryForString()
Execute a statement that returns a 1 by 1 table with a text value.
|
bindBlob, bindDouble, bindLong, bindNull, bindString, clearBindings, close, compile, getUniqueId, native_bind_blob, native_bind_double, native_bind_long, native_bind_null, native_bind_string, native_compile, native_finalize, onAllReferencesReleased, onAllReferencesReleasedFromContainer
acquireReference, releaseReference, releaseReferenceFromContainer
public void execute()
android.database.SQLException
- If the SQL string is invalid for
some reasonpublic long executeInsert()
android.database.SQLException
- If the SQL string is invalid for
some reasonpublic long executeUpdateDelete()
public long simpleQueryForLong()
android.database.sqlite.SQLiteDoneException
- if the query returns zero rowspublic java.lang.String simpleQueryForString()
android.database.sqlite.SQLiteDoneException
- if the query returns zero rows