core-ktx / androidx.database / android.database.Cursor / getLongOrNull

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

Cursor.isNull

Cursor.getLong

inline fun Cursor.getLongOrNull(columnName: String): 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

Cursor.getColumnIndexOrThrow

Cursor.isNull

Cursor.getLong