get
Returns the value of the requested column from the current row in a type-safe manner.
This operator allows for convenient, array-like access to column data using a KQLiteColumn instance. The return type
Tis inferred from the column definition, ensuring type safety at compile time.For nullable columns, the return type
Twill be nullable (e.g.,String?). For columns defined asnotNull()or as aprimaryKey(), the return type will be non-nullable (e.g.,String,Int).
Example
// Assuming 'Employee' table object with 'id' (PK) and 'name' (nullable) columns
cursor.forEach {
val id: Int = it[Employee.id] // Non-nullable Int
val name: String? = it[Employee.name] // Nullable String
}Content copied to clipboard
Return
The value of the column as type T.
Author
MOHAMMAD AZIM ANSARI
Parameters
column
The KQLiteColumn representing the column whose value is requested.
Type Parameters
T
The expected data type of the column.
Throws
if the column is not found or NULL value found for non-nullable column.