Class: Column<TData, TNotNull, THasDefault, TTable>
Class: Column<TData, TNotNull, THasDefault, TTable>
Section titled “Class: Column<TData, TNotNull, THasDefault, TTable>”Defined in: core/src/schema/columns.ts:66
Type Parameters
Section titled “Type Parameters”TData = unknown
TNotNull
Section titled “TNotNull”TNotNull extends boolean = true
THasDefault
Section titled “THasDefault”THasDefault extends boolean = false
TTable
Section titled “TTable”TTable extends string = string
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Column<
TData,TNotNull,THasDefault,TTable>(meta):Column<TData,TNotNull,THasDefault,TTable>
Defined in: core/src/schema/columns.ts:84
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Column<TData, TNotNull, THasDefault, TTable>
Properties
Section titled “Properties”
readonly$type:TData
Defined in: core/src/schema/columns.ts:72
$notNull
Section titled “$notNull”
readonly$notNull:TNotNull
Defined in: core/src/schema/columns.ts:73
$hasDefault
Section titled “$hasDefault”
readonly$hasDefault:THasDefault
Defined in: core/src/schema/columns.ts:74
$table
Section titled “$table”
readonly$table:TTable
Defined in: core/src/schema/columns.ts:80
Phantom type carrying the name of the table this column belongs to.
Set by table("name", { ... }) when the column is bound. Enables
left-join null propagation in projections without a runtime penalty.
readonlymeta:ColumnMeta
Defined in: core/src/schema/columns.ts:82
Methods
Section titled “Methods”notNull()
Section titled “notNull()”notNull():
Column<TData,true,THasDefault,TTable>
Defined in: core/src/schema/columns.ts:88
Returns
Section titled “Returns”Column<TData, true, THasDefault, TTable>
nullable()
Section titled “nullable()”nullable():
Column<TData,false,THasDefault,TTable>
Defined in: core/src/schema/columns.ts:97
Opt this column out of the notNull default. The row shape returned by
.select().from(t) gets T | null for this column, and
insert().values(...) treats it as optional.
Returns
Section titled “Returns”Column<TData, false, THasDefault, TTable>
encrypted()
Section titled “encrypted()”encrypted():
Column<TData,TNotNull,THasDefault,TTable>
Defined in: core/src/schema/columns.ts:107
Mark this column as end-to-end encrypted. The server stores the
envelope at rest; the client’s sync loop encrypts on push and
decrypts on pull with the caller-supplied DEK. See Envelope /
encryptField in @sh1n4ps/plasma-core and the ROADMAP for key rotation.
Returns
Section titled “Returns”Column<TData, TNotNull, THasDefault, TTable>
unique()
Section titled “unique()”unique():
Column<TData,TNotNull,THasDefault,TTable>
Defined in: core/src/schema/columns.ts:111
Returns
Section titled “Returns”Column<TData, TNotNull, THasDefault, TTable>
default()
Section titled “default()”default(
value):Column<TData,TNotNull,true,TTable>
Defined in: core/src/schema/columns.ts:115
Parameters
Section titled “Parameters”TData
Returns
Section titled “Returns”Column<TData, TNotNull, true, TTable>