query

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


fun query(distinct: Boolean, table: String, columns: Array<out String>?, selection: String?, selectionArgs: Array<out Any?>?, groupBy: String? = null, having: String? = null, limit: Int? = null, 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(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.