Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Methods](https://developer.android.com/reference/android/database/sqlite/SQLiteProgram#pubmethods) \| [Protected Methods](https://developer.android.com/reference/android/database/sqlite/SQLiteProgram#promethods) \| [Inherited Methods](https://developer.android.com/reference/android/database/sqlite/SQLiteProgram#inhmethods)

# SQLiteProgram

*** ** * ** ***

` public abstract class SQLiteProgram `   
` ` ` extends https://developer.android.com/reference/android/database/sqlite/SQLiteClosable ` ` `

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) |||
| ↳ | [android.database.sqlite.SQLiteClosable](https://developer.android.com/reference/android/database/sqlite/SQLiteClosable) ||
|   | ↳ | android.database.sqlite.SQLiteProgram |

Known direct subclasses [SQLiteQuery](https://developer.android.com/reference/android/database/sqlite/SQLiteQuery), [SQLiteStatement](https://developer.android.com/reference/android/database/sqlite/SQLiteStatement) [SQLiteQuery](https://developer.android.com/reference/android/database/sqlite/SQLiteQuery) Represents a query that reads the resulting rows into a `https://developer.android.com/reference/android/database/sqlite/SQLiteQuery`. [SQLiteStatement](https://developer.android.com/reference/android/database/sqlite/SQLiteStatement) Represents a statement that can be executed against a database.   

*** ** * ** ***

A base class for compiled SQLite programs.

This class is not thread-safe.

<br />

## Summary

| ### Public methods ||
|---|---|
| ` void` | ` https://developer.android.com/reference/android/database/sqlite/SQLiteProgram#bindAllArgsAsStrings(java.lang.String[])(https://developer.android.com/reference/java/lang/String bindArgs) ` Given an array of String bindArgs, this method binds all of them in one single call. |
| ` void` | ` https://developer.android.com/reference/android/database/sqlite/SQLiteProgram#bindBlob(int,%20byte[])(int index, byte[] value) ` Bind a byte array value to this statement. |
| ` void` | ` https://developer.android.com/reference/android/database/sqlite/SQLiteProgram#bindDouble(int,%20double)(int index, double value) ` Bind a double value to this statement. |
| ` void` | ` https://developer.android.com/reference/android/database/sqlite/SQLiteProgram#bindLong(int,%20long)(int index, long value) ` Bind a long value to this statement. |
| ` void` | ` https://developer.android.com/reference/android/database/sqlite/SQLiteProgram#bindNull(int)(int index) ` Bind a NULL value to this statement. |
| ` void` | ` https://developer.android.com/reference/android/database/sqlite/SQLiteProgram#bindString(int,%20java.lang.String)(int index, https://developer.android.com/reference/java/lang/String value) ` Bind a String value to this statement. |
| ` void` | ` https://developer.android.com/reference/android/database/sqlite/SQLiteProgram#clearBindings()() ` Clears all existing bindings. |
| ` final int` | ` https://developer.android.com/reference/android/database/sqlite/SQLiteProgram#getUniqueId()() ` *This method was deprecated in API level 15. This method is deprecated and must not be used.* |

| ### Protected methods ||
|---|---|
| ` void` | ` https://developer.android.com/reference/android/database/sqlite/SQLiteProgram#onAllReferencesReleased()() ` Called when the last reference to the object was released by a call to `https://developer.android.com/reference/android/database/sqlite/SQLiteClosable#releaseReference()` or `https://developer.android.com/reference/android/database/sqlite/SQLiteClosable#close()`. |

### Inherited methods

From class ` https://developer.android.com/reference/android/database/sqlite/SQLiteClosable ` ` void` ` https://developer.android.com/reference/android/database/sqlite/SQLiteClosable#acquireReference()() `

Acquires a reference to the object.
` void` ` https://developer.android.com/reference/android/database/sqlite/SQLiteClosable#close()() `

Releases a reference to the object, closing the object if the last reference was released.
` abstract void` ` https://developer.android.com/reference/android/database/sqlite/SQLiteClosable#onAllReferencesReleased()() `

Called when the last reference to the object was released by a call to `https://developer.android.com/reference/android/database/sqlite/SQLiteClosable#releaseReference()` or `https://developer.android.com/reference/android/database/sqlite/SQLiteClosable#close()`.
` void` ` https://developer.android.com/reference/android/database/sqlite/SQLiteClosable#onAllReferencesReleasedFromContainer()() `

*This method was deprecated in API level 16. Do not use.*
` void` ` https://developer.android.com/reference/android/database/sqlite/SQLiteClosable#releaseReference()() `

Releases a reference to the object, closing the object if the last reference was released.
` void` ` https://developer.android.com/reference/android/database/sqlite/SQLiteClosable#releaseReferenceFromContainer()() `

*This method was deprecated in API level 16. Do not use.*
From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.
From interface ` https://developer.android.com/reference/java/io/Closeable ` ` abstract void` ` https://developer.android.com/reference/java/io/Closeable#close()() `

Closes this stream and releases any system resources associated with it.
From interface ` https://developer.android.com/reference/java/lang/AutoCloseable ` ` abstract void` ` https://developer.android.com/reference/java/lang/AutoCloseable#close()() `

Closes this resource, relinquishing any underlying resources.

## Public methods

### bindAllArgsAsStrings

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void bindAllArgsAsStrings (String[] bindArgs)
```

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

<br />

| Parameters ||
|---|---|
| `bindArgs` | `String`: the String array of bind args, none of which must be null. <br /> |

### bindBlob

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void bindBlob (int index, 
                byte[] value)
```

Bind a byte array value to this statement. The value remains bound until `https://developer.android.com/reference/android/database/sqlite/SQLiteProgram#clearBindings()` is called.

<br />

| Parameters ||
|---|---|
| `index` | `int`: The 1-based index to the parameter to bind <br /> |
| `value` | `byte`: The value to bind, must not be null <br /> |

### bindDouble

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void bindDouble (int index, 
                double value)
```

Bind a double value to this statement. The value remains bound until `https://developer.android.com/reference/android/database/sqlite/SQLiteProgram#clearBindings()` is called.

<br />

| Parameters ||
|---|---|
| `index` | `int`: The 1-based index to the parameter to bind <br /> |
| `value` | `double`: The value to bind <br /> |

### bindLong

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void bindLong (int index, 
                long value)
```

Bind a long value to this statement. The value remains bound until `https://developer.android.com/reference/android/database/sqlite/SQLiteProgram#clearBindings()` is called. addToBindArgs

<br />

| Parameters ||
|---|---|
| `index` | `int`: The 1-based index to the parameter to bind <br /> |
| `value` | `long`: The value to bind <br /> |

### bindNull

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void bindNull (int index)
```

Bind a NULL value to this statement. The value remains bound until `https://developer.android.com/reference/android/database/sqlite/SQLiteProgram#clearBindings()` is called.

<br />

| Parameters ||
|---|---|
| `index` | `int`: The 1-based index to the parameter to bind null to <br /> |

### bindString

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void bindString (int index, 
                String value)
```

Bind a String value to this statement. The value remains bound until `https://developer.android.com/reference/android/database/sqlite/SQLiteProgram#clearBindings()` is called.

<br />

| Parameters ||
|---|---|
| `index` | `int`: The 1-based index to the parameter to bind <br /> |
| `value` | `String`: The value to bind, must not be null <br /> |

### clearBindings

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void clearBindings ()
```

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

<br />

### getUniqueId

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level 15](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int getUniqueId ()
```

<br />

**This method was deprecated in API level 15.**   

This method is deprecated and must not be used.

Unimplemented.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

## Protected methods

### onAllReferencesReleased

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void onAllReferencesReleased ()
```

Called when the last reference to the object was released by a call to `https://developer.android.com/reference/android/database/sqlite/SQLiteClosable#releaseReference()` or `https://developer.android.com/reference/android/database/sqlite/SQLiteClosable#close()`.

<br />