Skip to content

ColumnConfig

Per-field repository column configuration.

Desc extends DescMessage = DescMessage

K extends ColumnKey<Desc> = ColumnKey<Desc>

DB = unknown

optional deserialize?: (ctx) => ColumnFieldValue<Desc, K>

Transform a database value before it is assigned to the protobuf field on read.

ColumnDeserializeContext<Desc, K, DB>

ColumnFieldValue<Desc, K>


optional ignore?: boolean

When true, the field is excluded from database serialization entirely. On reads, the field will have its proto3 default value.

Useful for fields that exist in the proto schema but have no corresponding database column (e.g. computed or virtual fields).


optional name?: string

Override the database column name for this field. Defaults to the field’s JSON name (camelCase).

{ name: "user_id" } // proto field "uid" → DB column "user_id"

optional serialize?: (ctx) => DB

Transform this field’s value before it is written to the database.

This is intended for storage-level concerns such as encryption, compression, or packing a nested message into a single column. Prefer protobuf-aware codecs like toJsonString / fromJsonString over plain JSON.stringify, which can break protobuf semantics.

ColumnSerializeContext<Desc, K>

DB