java.lang.Object | ||
↳ | android.database.sqlite.SQLiteClosable | |
↳ | android.database.sqlite.SQLiteProgram |
Known Direct Subclasses |
A base class for compiled SQLite programs.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
mDatabase | The database this program is compiled against. | ||||||||||
nHandle | Native linkage, do not modify. | ||||||||||
nStatement | Native linkage, do not modify. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Bind a byte array value to this statement.
| |||||||||||
Bind a double value to this statement.
| |||||||||||
Bind a long value to this statement.
| |||||||||||
Bind a NULL value to this statement.
| |||||||||||
Bind a String value to this statement.
| |||||||||||
Clears all existing bindings.
| |||||||||||
Release this program's resources, making it invalid.
| |||||||||||
Returns a unique identifier for this program.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Compiles the given SQL into a SQLite byte code program using sqlite3_prepare_v2().
| |||||||||||
Make sure that the native resource is cleaned up.
| |||||||||||
Compiles SQL into a SQLite program.
| |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class android.database.sqlite.SQLiteClosable
| |||||||||||
From class java.lang.Object
|
The database this program is compiled against.
Native linkage, do not modify. This comes from the database and should not be modified in here or in the native code.
Native linkage, do not modify. When non-0 this holds a reference to a valid sqlite3_statement object. It is only updated by the native code, but may be checked in this class when the database lock is held to determine if there is a valid native-side program or not.
Bind a byte array value to this statement. The value remains bound until clearBindings() is called.
index | The 1-based index to the parameter to bind |
---|---|
value | The value to bind |
Bind a double value to this statement. The value remains bound until clearBindings() is called.
index | The 1-based index to the parameter to bind |
---|---|
value | The value to bind |
Bind a long value to this statement. The value remains bound until clearBindings() is called.
index | The 1-based index to the parameter to bind |
---|---|
value | The value to bind |
Bind a NULL value to this statement. The value remains bound until clearBindings() is called.
index | The 1-based index to the parameter to bind null to |
---|
Bind a String value to this statement. The value remains bound until clearBindings() is called.
index | The 1-based index to the parameter to bind |
---|---|
value | The value to bind |
Clears all existing bindings. Unset bindings are treated as NULL.
Release this program's resources, making it invalid.
Returns a unique identifier for this program.
Compiles the given SQL into a SQLite byte code program using sqlite3_prepare_v2(). If this method has been called previously without a call to close and forCompilation is set to false the previous compilation will be used. Setting forceCompilation to true will always re-compile the program and should be done if you pass differing SQL strings to this method.
Note: this method acquires the database lock.
sql | the SQL string to compile |
---|---|
forceCompilation | forces the SQL to be recompiled in the event that there is an existing compiled SQL program already around |
Make sure that the native resource is cleaned up.
Compiles SQL into a SQLite program.
The database lock must be held when calling this method.
sql | The SQL to compile. |
---|