Skip to content

ColumnConfig

Defined in: packages/repo/src/types.ts:91

Per-field repository column configuration.

Desc extends DescMessage = DescMessage

K extends ColumnKey<Desc> = ColumnKey<Desc>

DB = unknown

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

Defined in: packages/repo/src/types.ts:129

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

ColumnDeserializeContext<Desc, K, DB>

ColumnFieldValue<Desc, K>


optional ignore?: boolean

Defined in: packages/repo/src/types.ts:113

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

Defined in: packages/repo/src/types.ts:104

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

Defined in: packages/repo/src/types.ts:123

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