-
- All Implemented Interfaces:
-
androidx.sqlite.db.SupportSQLiteProgram,java.io.Closeable,java.lang.AutoCloseable
public abstract class SQLiteProgram extends SQLiteClosable implements SupportSQLiteProgram
A base class for compiled SQLite programs.
This class is not thread-safe.
-
-
Method Summary
Modifier and Type Method Description voidbindNull(int index)Bind a NULL value to this statement. voidbindLong(int index, long value)Bind a long value to this statement. voidbindDouble(int index, double value)Bind a double value to this statement. voidbindString(int index, String value)Bind a String value to this statement. voidbindBlob(int index, Array<byte> value)Bind a byte array value to this statement. voidbindObject(int index, Object value)Binds the given Object to the given SQLiteProgram using the propertyping. voidclearBindings()Clears all existing bindings. voidbindAllArgsAsStrings(Array<String> bindArgs)Given an array of String bindArgs, this method binds all of them in one single call. -
Methods inherited from class io.requery.android.database.sqlite.SQLiteClosable
acquireReference, close, releaseReference -
Methods inherited from class java.io.Closeable
close -
Methods inherited from class androidx.sqlite.db.SupportSQLiteProgram
bindBlob, bindDouble, bindLong, bindNull, bindString, clearBindings -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
bindNull
void bindNull(int index)
Bind a NULL value to this statement. The value remains bound until clearBindings is called.
- Parameters:
index- The 1-based index to the parameter to bind null to
-
bindLong
void bindLong(int index, long value)
Bind a long value to this statement. The value remains bound until clearBindings is called.addToBindArgs
- Parameters:
index- The 1-based index to the parameter to bindvalue- The value to bind
-
bindDouble
void bindDouble(int index, double value)
Bind a double value to this statement. The value remains bound until clearBindings is called.
- Parameters:
index- The 1-based index to the parameter to bindvalue- The value to bind
-
bindString
void bindString(int index, String value)
Bind a String value to this statement. The value remains bound until clearBindings is called.
- Parameters:
index- The 1-based index to the parameter to bindvalue- The value to bind, must not be null
-
bindBlob
void bindBlob(int index, Array<byte> value)
Bind a byte array value to this statement. The value remains bound until clearBindings is called.
- Parameters:
index- The 1-based index to the parameter to bindvalue- The value to bind, must not be null
-
bindObject
void bindObject(int index, Object value)
Binds the given Object to the given SQLiteProgram using the propertyping. For example, bind numbers as longs/doubles, and everything elseas a string by call toString() on it.
- Parameters:
index- the 1-based index to bind atvalue- the value to bind
-
clearBindings
void clearBindings()
Clears all existing bindings. Unset bindings are treated as NULL.
-
bindAllArgsAsStrings
void bindAllArgsAsStrings(Array<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.
-
-
-
-