androidx.core.database


Classes

CursorWindowCompat

Helper for accessing features in CursorWindow

DatabaseUtilsCompat

This class is deprecated.

Use android.database.DatabaseUtils directly.

Extension functions summary

inline ByteArray?

Returns the value of the requested column as a nullable byte array.

inline Double?

Returns the value of the requested column as a nullable double.

inline Float?

Returns the value of the requested column as a nullable float.

inline Int?

Returns the value of the requested column as a nullable integer.

inline Long?

Returns the value of the requested column as a nullable long.

inline Short?

Returns the value of the requested column as a nullable short.

inline String?

Returns the value of the requested column as a nullable string.

Extension functions

getBlobOrNull

inline fun Cursor.getBlobOrNull(index: Int): ByteArray?

Returns the value of the requested column as a nullable byte array.

The result and whether this method throws an exception when the column type is not a blob type is implementation-defined.

See also
isNull
getBlob

getDoubleOrNull

inline fun Cursor.getDoubleOrNull(index: Int): Double?

Returns the value of the requested column as a nullable double.

The result and whether this method throws an exception when the column type is not a floating-point type is implementation-defined.

See also
isNull
getDouble

getFloatOrNull

inline fun Cursor.getFloatOrNull(index: Int): Float?

Returns the value of the requested column as a nullable float.

The result and whether this method throws an exception when the column type is not a floating-point type is implementation-defined.

See also
isNull
getFloat

getIntOrNull

inline fun Cursor.getIntOrNull(index: Int): Int?

Returns the value of the requested column as a nullable integer.

The result and whether this method throws an exception when the column type is not an integral type is implementation-defined.

See also
isNull
getInt

getLongOrNull

inline fun Cursor.getLongOrNull(index: Int): Long?

Returns the value of the requested column as a nullable long.

The result and whether this method throws an exception when the column type is not an integral type is implementation-defined.

See also
isNull
getLong

getShortOrNull

inline fun Cursor.getShortOrNull(index: Int): Short?

Returns the value of the requested column as a nullable short.

The result and whether this method throws an exception when the column type is not an integral type is implementation-defined.

See also
isNull
getShort

getStringOrNull

inline fun Cursor.getStringOrNull(index: Int): String?

Returns the value of the requested column as a nullable string.

The result and whether this method throws an exception when the column type is not a string type is implementation-defined.

See also
isNull
getString