getNullableLong

fun Cursor.getNullableLong(columnIndex: Int, defaultValue: Long? = null): Long?

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

Return

Contents of the column, or defaultValue if Cursor.isNull returns true for the specified column.

Parameters

columnIndex

zero-based index of the column.