SQLiteProgram  |  API reference  |  Android Developers (original) (raw)


abstract class SQLiteProgram : SQLiteClosable

A base class for compiled SQLite programs.

This class is not thread-safe.

Summary

Public methods
open Unit bindAllArgsAsStrings(bindArgs: Array<String!>!) Given an array of String bindArgs, this method binds all of them in one single call.
open Unit bindBlob(index: Int, value: ByteArray!) Bind a byte array value to this statement.
open Unit bindDouble(index: Int, value: Double) Bind a double value to this statement.
open Unit bindLong(index: Int, value: Long) Bind a long value to this statement.
open Unit bindNull(index: Int) Bind a NULL value to this statement.
open Unit bindString(index: Int, value: String!) Bind a String value to this statement.
open Unit clearBindings() Clears all existing bindings.
Int getUniqueId() Unimplemented.
Protected methods
open Unit onAllReferencesReleased()
Inherited functions
From class SQLiteClosable Unit acquireReference() Acquires a reference to the object. Unit close() Releases a reference to the object, closing the object if the last reference was released. Calling this method is equivalent to calling releaseReference. Unit onAllReferencesReleasedFromContainer() Called when the last reference to the object was released by a call to releaseReferenceFromContainer(). Unit releaseReference() Releases a reference to the object, closing the object if the last reference was released. Unit releaseReferenceFromContainer() Releases a reference to the object that was owned by the container of the object, closing the object if the last reference was released.

Public methods

bindAllArgsAsStrings

open fun bindAllArgsAsStrings(bindArgs: Array<String!>!): Unit

Given an array of String bindArgs, this method binds all of them in one single call.

Parameters
bindArgs Array<String!>!: the String array of bind args, none of which must be null.

bindBlob

open fun bindBlob(
    index: Int,
    value: ByteArray!
): Unit

Bind a byte array value to this statement. The value remains bound until [clearBindings](#clearBindings%28%29) is called.

Parameters
index Int: The 1-based index to the parameter to bind
value ByteArray!: The value to bind, must not be null

bindDouble

open fun bindDouble(
    index: Int,
    value: Double
): Unit

Bind a double value to this statement. The value remains bound until [clearBindings](#clearBindings%28%29) is called.

Parameters
index Int: The 1-based index to the parameter to bind
value Double: The value to bind

bindLong

open fun bindLong(
    index: Int,
    value: Long
): Unit

Bind a long value to this statement. The value remains bound until [clearBindings](#clearBindings%28%29) is called. addToBindArgs

Parameters
index Int: The 1-based index to the parameter to bind
value Long: The value to bind

bindNull

open fun bindNull(index: Int): Unit

Bind a NULL value to this statement. The value remains bound until [clearBindings](#clearBindings%28%29) is called.

Parameters
index Int: The 1-based index to the parameter to bind null to

bindString

open fun bindString(
    index: Int,
    value: String!
): Unit

Bind a String value to this statement. The value remains bound until [clearBindings](#clearBindings%28%29) is called.

Parameters
index Int: The 1-based index to the parameter to bind
value String!: The value to bind, must not be null

clearBindings

open fun clearBindings(): Unit

Clears all existing bindings. Unset bindings are treated as NULL.

getUniqueId

fun getUniqueId(): Int

Deprecated: This method is deprecated and must not be used.

Unimplemented.

Protected methods

onAllReferencesReleased

protected open fun onAllReferencesReleased(): Unit