fun Cursor.getNullableInt(columnIndex: Int, defaultValue: Int? = null): Int?
Same as Cursor.getInt, but returns defaultValue when the column value is NULL.
columnIndex
- zero-based index of the column.
Return
Contents of the column, or defaultValue if Cursor.isNull
returns true for the specified column.