belongs to Maven artifact androidx.sqlite:sqlite:2.0.0-alpha1

SupportSQLiteQuery

public interface SupportSQLiteQuery

androidx.sqlite.db.SupportSQLiteQuery


A query with typed bindings. It is better to use this API instead of SQLiteDatabase.rawQuery(String, String[]) because it allows binding type safe parameters.

Summary

Public methods

abstract void bindTo(SupportSQLiteProgram statement)

Callback to bind the query parameters to the compiled statement.

abstract int getArgCount()

Returns the number of arguments in this query.

abstract String getSql()

The SQL query.

Public methods

bindTo

void bindTo (SupportSQLiteProgram statement)

Callback to bind the query parameters to the compiled statement.

Parameters
statement SupportSQLiteProgram: The compiled statement

getArgCount

int getArgCount ()

Returns 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.

Returns
int The number of arguments in the query.

getSql

String getSql ()

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

Returns
String The SQL query to compile