Each field in UpdateParams has a colType. The type drives how the value is stored at create, how it's projected on read, and how it's validated.
Column types
- string — stored as-is. The default.
- number — coerced numeric; a non-numeric value is rejected with 400.
- boolean — coerced; honours a
default. - date — ISO string.
- guid — a server-generated UUID. Client values are ignored for id-class fields.
- autoincrement — an org-scoped counter; produces a number.
- formula — computed from a
{field}template, e.g."{title}-{score}"; recomputed on update. - encrypted — stored as AES-256 ciphertext and never returned on any read (write-only).
- s3 / file — the record stores an S3 key; the content lives in S3 and is fetched per view.
- enum — validated against
enumValues; an out-of-set value is rejected with 400.
"UpdateParams": [
{ "name": "id", "colType": "guid" },
{ "name": "seq_no", "colType": "autoincrement" },
{ "name": "label", "colType": "formula", "formula": "{title}-{score}" },
{ "name": "secret", "colType": "encrypted" },
{ "name": "status", "colType": "enum", "enumValues": ["pending", "shipped", "refunded"] }
] Encrypted fields are write-only
A field with colType: "encrypted" is stored as ciphertext and stripped from every read and create response — regardless of any view. Use it for secrets you must store but never echo back.
Validation rules
Per-field validation metadata is enforced identically on create and update — the rejection codes are the same for every entity because they run in the same generic runtime.
- `validate: true` — field is required; missing → 400.
- `minlength: N` — shorter than N (including empty) → 400.
- `maxlength: N` — longer than N → 400; exactly N passes.
- `colType` — wrong type (e.g. non-numeric number) → 400.
- `default: <v>` — filled in when the field is absent on create.
- `enumValues: [...]` — value out of the set → 400.
- lookups — an unresolvable foreign key → 400.
Uniqueness
Cross-record uniqueness isn't a field rule — it's a UniqueIndexes declaration enforced transactionally. A duplicate value returns 409. See Indexes.