# SQLiteQuery

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

# SQLiteQuery

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/database/sqlite/SQLiteQuery "View this page in Java")  

```
class SQLiteQuery : SQLiteProgram
```

|---|---|---|----------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                   ||||
| ↳ | [android.database.sqlite.SQLiteClosable](https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteClosable)  |||
|   | ↳ | [android.database.sqlite.SQLiteProgram](https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteProgram) ||
|   |   | ↳ | [android.database.sqlite.SQLiteQuery](https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteQuery#) |

Represents a query that reads the resulting rows into a[SQLiteQuery](https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteQuery#). This class is used by[SQLiteCursor](https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteCursor)and isn't useful itself.

This class is not thread-safe.

## Summary

|                                                                                             Public methods                                                                                             ||
|----------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------|
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [toString](https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteQuery#toString())`()` <br /> |

| Inherited functions ||
|---|---|
| From class[SQLiteClosable](https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteClosable) |------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [acquireReference](https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteClosable#acquireReference())`()` <br /> Acquires a reference to the object. <br />                                                                                                                                                                                                                                     | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [close](https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteClosable#close())`()` <br /> Releases a reference to the object, closing the object if the last reference was released. Calling this method is equivalent to calling[releaseReference](https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteClosable#releaseReference()). <br />                          | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onAllReferencesReleasedFromContainer](https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteClosable#onAllReferencesReleasedFromContainer())`()` <br /> Called when the last reference to the object was released by a call to[releaseReferenceFromContainer()](https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteClosable#releaseReferenceFromContainer()). <br /> | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [releaseReference](https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteClosable#releaseReference())`()` <br /> Releases a reference to the object, closing the object if the last reference was released. <br />                                                                                                                                                                              | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [releaseReferenceFromContainer](https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteClosable#releaseReferenceFromContainer())`()` <br /> Releases a reference to the object that was owned by the container of the object, closing the object if the last reference was released. <br />                                                                                                      | ||
| From class[SQLiteProgram](https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteProgram) |------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [bindAllArgsAsStrings](https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteProgram#bindAllArgsAsStrings(kotlin.Array))`(`bindArgs:` `[Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)<[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!>!`)` <br /> Given an array of String bindArgs, this method binds all of them in one single call. <br />                                                                                                                        | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [bindBlob](https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteProgram#bindBlob(kotlin.Int,%20kotlin.ByteArray))`(`index:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `value:` `[ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html)!`)` <br /> Bind a byte array value to this statement. The value remains bound until[clearBindings](https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteProgram#clearBindings())is called. <br /> | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [bindDouble](https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteProgram#bindDouble(kotlin.Int,%20kotlin.Double))`(`index:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `value:` `[Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)`)` <br /> Bind a double value to this statement. The value remains bound until[clearBindings](https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteProgram#clearBindings())is called. <br />            | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [bindLong](https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteProgram#bindLong(kotlin.Int,%20kotlin.Long))`(`index:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `value:` `[Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`)` <br /> Bind a long value to this statement. The value remains bound until[clearBindings](https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteProgram#clearBindings())is called. addToBindArgs <br />          | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [bindNull](https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteProgram#bindNull(kotlin.Int))`(`index:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br /> Bind a NULL value to this statement. The value remains bound until[clearBindings](https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteProgram#clearBindings())is called. <br />                                                                                                                                | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [bindString](https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteProgram#bindString(kotlin.Int,%20kotlin.String))`(`index:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `value:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`)` <br /> Bind a String value to this statement. The value remains bound until[clearBindings](https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteProgram#clearBindings())is called. <br />           | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [clearBindings](https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteProgram#clearBindings())`()` <br /> Clears all existing bindings. Unset bindings are treated as NULL. <br />                                                                                                                                                                                                                                                                                                                                                     | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)   | [getUniqueId](https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteProgram#getUniqueId())`()` <br /> Unimplemented. <br />                                                                                                                                                                                                                                                                                                                                                                                                            | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onAllReferencesReleased](https://developer.android.com/reference/kotlin/android/database/sqlite/SQLiteProgram#onAllReferencesReleased())`()` <br />                                                                                                                                                                                                                                                                                                                                                                                                          | ||

## Public methods

### toString

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

```
fun toString(): String
```

|                                                          Return                                                          ||
|----------------------------------------------------------------------------------|----------------------------------------|
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | a string representation of the object. |