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

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

Cursor.isNull

Cursor.getInt

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

Cursor.getColumnIndexOrThrow

Cursor.isNull

Cursor.getInt