//runtime/com.squareup.sqldelight/Query
Query
[common] abstract class Query
A listenable, typed query generated by SQLDelight.
Parameters
common
| RowType | the type that this query can map its result set to. |
Constructors
| Query | [common] fun |
Types
| Name | Summary |
|---|---|
| Listener | [common] Content interface Listener More info An interface for listening to changes in the result set of a query. |
Functions
| Name | Summary |
|---|---|
| addListener | [common] Content fun addListener(listener: Query.Listener) More info Register a listener to be notified of future changes in the result set. |
| execute | [common] Content abstract fun execute(): SqlCursor More info Execute the underlying statement. |
| executeAsList | [common] Content fun executeAsList(): List<RowType> |
| executeAsOne | [common] Content fun executeAsOne(): RowType |
| executeAsOneOrNull | [common] Content fun executeAsOneOrNull(): RowType? |
| notifyDataChanged | [common] Content fun notifyDataChanged() More info Notify listeners that their current result set is staled. |
| removeListener | [common] Content fun removeListener(listener: Query.Listener) More info Remove a listener to no longer be notified of future changes in the result set. |
Properties
| Name | Summary |
|---|---|
| mapper | [common] val mapper: (SqlCursor) -> RowTypeThe mapper this Query was created with, which can convert a row in the SQL cursor returned by execute to RowType. |