queryValue
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
Return
Value of the column in the first row of the resulting query.
Parameters
table
Table referenced in the query.
column
Name of column to query.
selection
Selection query - contents of WHERE clause - excluding WHERE itself.
selArgs
A string to replace for each '?' found in selection.
groupBy
GROUP BY clause - excluding the 'GROUP BY'. May be null to disable grouping.
having
HAVING clause, excluding the 'HAVING'. May be null.
orderBy
ORDER BY clause, excluding the 'ORDER BY'. May be null to return in default order.