Query

abstract class Query<out RowType : Any>(mapper: (SqlCursor) -> RowType) : ExecutableQuery<RowType>

A listenable, typed query generated by SQLDelight.

Parameters

RowType

the type that this query can map its result set to.

Constructors

Link copied to clipboard
constructor(mapper: (SqlCursor) -> RowType)

Types

Link copied to clipboard
fun interface Listener

An interface for listening to changes in the result set of a query.

Properties

Link copied to clipboard

Functions

Link copied to clipboard
abstract fun addListener(listener: Query.Listener)

Register a listener to be notified of future changes in the result set.

Link copied to clipboard
abstract fun <R> execute(mapper: (SqlCursor) -> QueryResult<R>): QueryResult<R>

Execute the underlying statement. The resulting cursor is passed to the given block.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract fun removeListener(listener: Query.Listener)

Remove a listener to no longer be notified of future changes in the result set.