ColumnConfig
Defined in: types.ts:28
Per-field configuration for database column behavior.
Keys in the columns record are proto field names (snake_case).
const repo = createRepository(UserSchema, { engine, columns: { uid: { name: "user_id" }, computed_score: { ignore: true }, settings: { serialize: "json" }, create_time: { timestamp: "create" }, update_time: { timestamp: "update" }, },});Properties
Section titled “Properties”ignore?
Section titled “ignore?”
optionalignore?:boolean
Defined in: types.ts:46
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).
optionalname?:string
Defined in: types.ts:37
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"serialize?
Section titled “serialize?”
optionalserialize?:"json"|"binary"
Defined in: types.ts:57
Serialize nested messages or repeated fields for storage in a single database column.
"json"— usestoJsonString/fromJsonStringfrom@bufbuild/protobuffor human-readable JSON storage."binary"— usestoBinary/fromBinaryfrom@bufbuild/protobuffor compact binary storage.
timestamp?
Section titled “timestamp?”
optionaltimestamp?:"create"|"update"
Defined in: types.ts:67
Auto-populate this google.protobuf.Timestamp field on the
specified lifecycle event using timestampNow().
"create"— set oncreateandbatchCreateonly."update"— set oncreate,batchCreate,update, andbatchUpdate.