# SupportSQLiteQuery

Artifact: [androidx.sqlite:sqlite](https://developer.android.com/jetpack/androidx/releases/sqlite) [View Source](https://cs.android.com/search?q=file:androidx/sqlite/db/SupportSQLiteQuery.android.kt+class:androidx.sqlite.db.SupportSQLiteQuery) Added in [2.0.0](https://developer.android.com/jetpack/androidx/releases/sqlite#2.0.0)

*** ** * ** ***

<br />

```
interface SupportSQLiteQuery
```

<br />

Known direct subclasses [SimpleSQLiteQuery](https://developer.android.com/reference/kotlin/androidx/sqlite/db/SimpleSQLiteQuery)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/sqlite/db/SimpleSQLiteQuery` | A basic implementation of `https://developer.android.com/reference/kotlin/androidx/sqlite/db/SupportSQLiteQuery` which receives a query and its args and binds args based on the passed in Object type. |

*** ** * ** ***

A query with typed bindings. It is better to use this API instead of `https://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html#rawQuery(java.lang.String, java.lang.String[])` because it allows binding type safe parameters.

## Summary

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/sqlite/db/SupportSQLiteQuery#bindTo(androidx.sqlite.db.SupportSQLiteProgram)(statement: https://developer.android.com/reference/kotlin/androidx/sqlite/db/SupportSQLiteProgram)` Callback to bind the query parameters to the compiled statement. |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/sqlite/db/SupportSQLiteQuery#argCount()` Is the number of arguments in this query. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/sqlite/db/SupportSQLiteQuery#sql()` The SQL query. |

## Public functions

### bindTo

Added in [2.0.0](https://developer.android.com/jetpack/androidx/releases/sqlite#2.0.0)

```
fun bindTo(statement: SupportSQLiteProgram): Unit
```

Callback to bind the query parameters to the compiled statement.

| Parameters |
|---|---|
| `statement: https://developer.android.com/reference/kotlin/androidx/sqlite/db/SupportSQLiteProgram` | The compiled statement |

## Public properties

### argCount

Added in [2.0.0](https://developer.android.com/jetpack/androidx/releases/sqlite#2.0.0)

```
val argCount: Int
```

Is the number of arguments in this query. This is equal to the number of placeholders in the query string. See: https://www.sqlite.org/c3ref/bind_blob.html for details.

### sql

Added in [2.0.0](https://developer.android.com/jetpack/androidx/releases/sqlite#2.0.0)

```
val sql: String
```

The SQL query. This query can have placeholders(?) for bind arguments.