byteArrayColumn

Defines a nullable BLOB column in the table, intended to store a ByteArray.

This function creates and registers a column with the SQL type BLOB (Binary Large Object), which is used for storing raw binary data. It is functionally equivalent to blobColumn. The column is nullable by default.

Example:

object Files : KQLiteTable("files") {
// A nullable BLOB column to store file content
val fileData = byteArrayColumn("file_data")

// A non-null column for a file hash
val fileHash = byteArrayColumn("file_hash").notNull()
}

Return

A KQLiteColumn instance representing the BLOB column, which can be further chained with constraints like notNull().

Author

MOHAMMAD AZIM ANSARI

Parameters

name

The name of the column in the database.

See also