KQLite Column
Represents a column in a KQLite database table (KQLiteTable).
This sealed class is the base for all specific column types (e.g., KQLiteTable.longColumn, KQLiteTable.textColumn). It encapsulates the properties of a database column, such as its name, data type, and constraints. Instances of this class are typically created within a KQLiteTable definition.
This class and its subclasses use a fluent API to define column constraints like KQLiteTable.primaryKey, KQLiteTable.unique, etc.
Author
MOHAMMAD AZIM ANSARI
Parameters
The name of the column as defined by the user stored in columnName. This name will be escaped to ensure it is a valid SQL identifier.
Underlying data type of the column.
Type Parameters
The Kotlin type that this column will hold (e.g., Int, String?, ByteArray).
See also
Inheritors
Functions
Creates an alias for a column using SQL AS.
Applies the auto modifier, allowing SQLite to automatically convert between date/time text representations and Julian day numbers as needed.
Applies ceiling modifier to a date/time value.
Concatenates this column with another column. This is an infix version of the CONCAT function, corresponding to the SQLite || operator.
Concatenates two or more strings or columns together. This function corresponds to the SQLite CONCAT or || operator.
Applies NNN days modifier to a date/time value.
Represents the SQL / (division) operator between a column and a literal value.
Represents the SQL / (division) operator between two columns.
Applies floor modifier to a date/time value.
Applies NNN hours modifier to a date/time value.
Applies julianday modifier to a date/time value.
Applies the localtime modifier to a date/time value, converting it from UTC to the local time zone.
Represents the SQL - (subtraction) operator between a column and a literal value.
Represents the SQL - (subtraction) operator between two columns.
Applies -YYYY-MM-DD modifier to a date/time value.
Applies NNN minutes modifier to a date/time value.
Applies NNN months modifier to a date/time value.
Adds a NOT NULL constraint to the column.
Applies the now modifier to a date/time function, representing the current UTC date and time. For local time, use localtime.
Represents the SQL + (addition) operator between a column and a literal value.
Represents the SQL + (addition) operator between two columns.
Applies +YYYY-MM-DD modifier to a date/time value.
Represents the SQL % (modulo) operator between a column and a literal value.
Represents the SQL % (modulo) operator between two columns.
Applies NNN seconds modifier to a date/time value.
Applies start of day modifier to a date/time value.
Applies start of month modifier to a date/time value.
Applies start of year modifier to a date/time value.
Applies the subsec modifier to a date/time value, enabling fractional second precision.
Applies the subsecond modifier to a date/time value, enabling fractional second precision.
Represents the SQL * (multiplication) operator between a column and a literal value.
Represents the SQL * (multiplication) operator between two columns.
Applies unixepoch modifier to a date/time value.
Applies the utc modifier to a date/time value, interpreting it as Coordinated Universal Time (UTC).
Applies weekday N modifier to a date/time value.
Applies NNN years modifier to a date/time value.