public final class SQLiteStatement extends SQLiteProgram
This class is not thread-safe.
Modifier and Type | Method and Description |
---|---|
void |
execute()
Execute this SQL statement, if it is not a SELECT / INSERT / DELETE / UPDATE, for example
CREATE / DROP table, view, trigger, index etc.
|
long |
executeInsert()
Execute this SQL statement and return the ID of the row inserted due to this call.
|
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.
|
ParcelFileDescriptor |
simpleQueryForBlobFileDescriptor()
Executes a statement that returns a 1 by 1 table with a blob value.
|
long |
simpleQueryForLong()
Execute a statement that returns a 1 by 1 table with a numeric value.
|
String |
simpleQueryForString()
Execute a statement that returns a 1 by 1 table with a text value.
|
String |
toString()
Returns a string containing a concise, human-readable description of this
object.
|
bindAllArgsAsStrings, bindBlob, bindDouble, bindLong, bindNull, bindString, clearBindings, getConnectionFlags, getSession, getUniqueId, onAllReferencesReleased, onCorruption
acquireReference, close, onAllReferencesReleasedFromContainer, releaseReference, releaseReferenceFromContainer
public void execute()
SQLException
- If the SQL string is invalid for
some reasonpublic int executeUpdateDelete()
SQLException
- If the SQL string is invalid for
some reasonpublic long executeInsert()
SQLException
- If the SQL string is invalid for
some reasonpublic long simpleQueryForLong()
SQLiteDoneException
- if the query returns zero rowspublic String simpleQueryForString()
SQLiteDoneException
- if the query returns zero rowspublic ParcelFileDescriptor simpleQueryForBlobFileDescriptor()
null
if the value is null or could not be read for some reason.SQLiteDoneException
- if the query returns zero rowspublic String toString()
Object
getClass().getName() + '@' + Integer.toHexString(hashCode())
See Writing a useful
toString
method
if you intend implementing your own toString
method.