get
abstract suspend fun <RowType : Any> get(sql: String, parameters: List<Any?>? = listOf(), mapper: (SqlCursor) -> RowType): RowType
Executes a read-only (SELECT) query and returns a single result.
Return
The single result of the query.
Parameters
sql
The SQL query to execute.
parameters
The parameters for the query, or an empty list if none.
mapper
A function to map the result set to the desired type.
Throws
If a database error occurs or no result is found.
If the operation is cancelled.