CursorKt

Added in 1.1.0

public final class CursorKt


Summary

Public methods

static final byte[]
getBlobOrNull(@NonNull Cursor receiver, int index)

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

static final Double
getDoubleOrNull(@NonNull Cursor receiver, int index)

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

static final Float
getFloatOrNull(@NonNull Cursor receiver, int index)

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

static final Integer
getIntOrNull(@NonNull Cursor receiver, int index)

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

static final Long
getLongOrNull(@NonNull Cursor receiver, int index)

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

static final Short
getShortOrNull(@NonNull Cursor receiver, int index)

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

static final String
getStringOrNull(@NonNull Cursor receiver, int index)

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

Public methods

getBlobOrNull

public static final byte[] getBlobOrNull(@NonNull Cursor receiver, int index)

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

public static final Double getDoubleOrNull(@NonNull Cursor receiver, int index)

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

public static final Float getFloatOrNull(@NonNull Cursor receiver, int index)

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

public static final Integer getIntOrNull(@NonNull Cursor receiver, int index)

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

public static final Long getLongOrNull(@NonNull Cursor receiver, int index)

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

public static final Short getShortOrNull(@NonNull Cursor receiver, int index)

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

public static final String getStringOrNull(@NonNull Cursor receiver, int index)

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