Package android.database.sqlite
Class SQLiteProgram
- java.lang.Object
-
- android.database.sqlite.SQLiteClosable
-
- android.database.sqlite.SQLiteProgram
-
- All Implemented Interfaces:
Closeable,AutoCloseable
- Direct Known Subclasses:
SQLiteQuery,SQLiteStatement
public abstract class SQLiteProgram extends SQLiteClosable
A base class for compiled SQLite programs.This class is not thread-safe.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidbindAllArgsAsStrings(String[] bindArgs)Given an array of String bindArgs, this method binds all of them in one single call.voidbindBlob(int index, byte[] value)Bind a byte array value to this statement.voidbindDouble(int index, double value)Bind a double value to this statement.voidbindLong(int index, long value)Bind a long value to this statement.voidbindNull(int index)Bind a NULL value to this statement.voidbindString(int index, String value)Bind a String value to this statement.voidclearBindings()Clears all existing bindings.protected intgetConnectionFlags()protected SQLiteSessiongetSession()intgetUniqueId()Deprecated.This method is deprecated and must not be used.protected voidonAllReferencesReleased()Called when the last reference to the object was released by a call toSQLiteClosable.releaseReference()orSQLiteClosable.close().protected voidonCorruption()-
Methods inherited from class android.database.sqlite.SQLiteClosable
acquireReference, close, onAllReferencesReleasedFromContainer, releaseReference, releaseReferenceFromContainer
-
-
-
-
Method Detail
-
getSession
protected final SQLiteSession getSession()
-
getConnectionFlags
protected final int getConnectionFlags()
-
onCorruption
protected final void onCorruption()
-
getUniqueId
@Deprecated public final int getUniqueId()
Deprecated.This method is deprecated and must not be used.Unimplemented.
-
bindNull
public void bindNull(int index)
Bind a NULL value to this statement. The value remains bound untilclearBindings()is called.- Parameters:
index- The 1-based index to the parameter to bind null to
-
bindLong
public void bindLong(int index, long value)Bind a long value to this statement. The value remains bound untilclearBindings()is called. addToBindArgs- Parameters:
index- The 1-based index to the parameter to bindvalue- The value to bind
-
bindDouble
public void bindDouble(int index, double value)Bind a double value to this statement. The value remains bound untilclearBindings()is called.- Parameters:
index- The 1-based index to the parameter to bindvalue- The value to bind
-
bindString
public void bindString(int index, String value)Bind a String value to this statement. The value remains bound untilclearBindings()is called.- Parameters:
index- The 1-based index to the parameter to bindvalue- The value to bind, must not be null
-
bindBlob
public void bindBlob(int index, byte[] value)Bind a byte array value to this statement. The value remains bound untilclearBindings()is called.- Parameters:
index- The 1-based index to the parameter to bindvalue- The value to bind, must not be null
-
clearBindings
public void clearBindings()
Clears all existing bindings. Unset bindings are treated as NULL.
-
bindAllArgsAsStrings
public void bindAllArgsAsStrings(String[] bindArgs)
Given an array of String bindArgs, this method binds all of them in one single call.- Parameters:
bindArgs- the String array of bind args, none of which must be null.
-
onAllReferencesReleased
protected void onAllReferencesReleased()
Description copied from class:SQLiteClosableCalled when the last reference to the object was released by a call toSQLiteClosable.releaseReference()orSQLiteClosable.close().- Specified by:
onAllReferencesReleasedin classSQLiteClosable
-
-