FieldOptions
Defined in: define/field/types.ts:56
Defines the common options available for all field types.
These are used by the Field builder methods.
Properties
Section titled “Properties”assert?
Section titled “assert?”
optionalassert:BoundQuery<unknown[]> |Expr
Defined in: define/field/types.ts:58
A SurrealQL ASSERT clause to enforce a constraint on the field value.
comment?
Section titled “comment?”
optionalcomment:string
Defined in: define/field/types.ts:68
A comment to add to the field definition in the database schema.
default?
Section titled “default?”
optionaldefault:BoundQuery<unknown[]> |Expr
Defined in: define/field/types.ts:60
A default value for the field, specified as a SurrealQL expression BoundQuery or Expr.
permissions?
Section titled “permissions?”
optionalpermissions:FieldPermissionsOptions|BoundQuery<unknown[]> |Expr
Defined in: define/field/types.ts:66
Field-level permissions, specified as a BoundQuery/Expr object or a FieldPermissionsOptions object.
readonly?
Section titled “readonly?”
optionalreadonly:boolean
Defined in: define/field/types.ts:64
If true, the field cannot be modified after creation.
value?
Section titled “value?”
optionalvalue:BoundQuery<unknown[]> |Expr
Defined in: define/field/types.ts:62
A SurrealQL VALUE clause to compute the field’s value upon write.