query

fun query(distinct: Boolean, @TrustedSql table: String, @TrustedSql columns: Array<out String>?, @TrustedSql selection: String?, selectionArgs: Array<out Any?>?, @TrustedSql groupBy: String? = null, @TrustedSql having: String? = null, limit: Int? = null, @TrustedSql orderBy: String? = null): Cursor(source)
fun query(@TrustedSql sql: String, selectionArgs: Array<out Any?>?): Cursor(source)


fun query(distinct: Boolean, @TrustedSql table: String, @TrustedSql columns: Array<out String>?, @TrustedSql selection: String?, selectionArgs: Array<out Any?>?, @TrustedSql groupBy: String? = null, @TrustedSql having: String? = null, limit: Int? = null, @TrustedSql orderBy: String? = null, cancellationSignal: CancellationSignal): Cursor(source)

Executes a cancellable query. If the cancellationSignal is cancelled from another thread, the query will be aborted at the earliest opportunity and an OperationCancelledException will be thrown.

Parameters

cancellationSignal

signal to cancel the query.

Throws

if the operation was cancelled.


fun query(@TrustedSql sql: String, selectionArgs: Array<out Any?>?, cancellationSignal: CancellationSignal): Cursor(source)

Executes a cancellable query. If the cancellationSignal is cancelled from another thread, the query will be aborted at the earliest opportunity and an OperationCancelledException will be thrown.

Parameters

sql

the SQL query.

selectionArgs

arguments to bind.

cancellationSignal

signal to cancel the query.

Throws

if the operation was cancelled.


fun query(query: ISQLQuery, cancellationSignal: CancellationSignal): Cursor(source)

Executes a cancellable query. If the cancellationSignal is cancelled from another thread, the query will be aborted at the earliest opportunity and an OperationCancelledException will be thrown.

Parameters

query

the query to execute.

cancellationSignal

signal to cancel the query.

Throws

if the operation was cancelled.