Package-level declarations

Functions

Link copied to clipboard
fun Cursor.asFlow(): Flow<Map<String, Any?>>

Create a Flow that returns all the data from the Cursor.

Link copied to clipboard

Create a Iterable that returns all the data from the Cursor.

Link copied to clipboard

Create a Sequence that returns all the data from the Cursor.

Link copied to clipboard
fun Cursor.getInt(columnName: String): Int
Link copied to clipboard
fun Cursor.getIntOrNull(columnName: String): Int?
Link copied to clipboard
fun Cursor.getLong(columnName: String): Long
Link copied to clipboard
fun Cursor.getLongOrNull(columnName: String): Long?
Link copied to clipboard
fun Cursor.getNullableDouble(columnIndex: Int, defaultValue: Double? = null): Double?

Same as Cursor.getDouble, but returns defaultValue when the column value is NULL.

Link copied to clipboard
fun Cursor.getNullableFloat(columnIndex: Int, defaultValue: Float? = null): Float?

Same as Cursor.getFloat, but returns defaultValue when the column value is NULL.

Link copied to clipboard
fun Cursor.getNullableInt(columnIndex: Int, defaultValue: Int? = null): Int?

Same as Cursor.getInt, but returns defaultValue when the column value is NULL.

Link copied to clipboard
fun Cursor.getNullableLong(columnIndex: Int, defaultValue: Long? = null): Long?

Same as Cursor.getLong, but returns defaultValue when the column value is NULL.

Link copied to clipboard
fun Cursor.getNullableShort(columnIndex: Int, defaultValue: Short? = null): Short?

Same as Cursor.getShort, but returns defaultValue when the column value is NULL.

Link copied to clipboard
Link copied to clipboard
fun Cursor.getString(columnName: String): String
Link copied to clipboard
fun Cursor.getStringOrNull(columnName: String): String?
Link copied to clipboard
fun <T : Any> Cursor.mapToList(cursorPredicate: (Cursor) -> T): List<T>
Link copied to clipboard
fun SQLiteDatabase.optQuery(table: String, columns: Array<String>? = null, selection: String? = null, selArgs: Array<String>? = null, groupBy: String? = null, having: String? = null, orderBy: String? = null, limit: String? = null): Cursor

Slightly more concise version of SQLiteDatabase.query that allows omission of most fields by use of named parameters.

Link copied to clipboard
inline fun <T> SQLiteDatabase.queryValue(table: String, column: String, selection: String? = null, selArgs: Array<String>? = null, groupBy: String? = null, having: String? = null, orderBy: String? = null, defaultValue: T? = null): T?

Queries for a single column value in a single row. Automatically sets a LIMIT of 1 for any query submitted