FieldOptions
Defined in: define/field/types.ts:23
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?”
optional
assert:string
Defined in: define/field/types.ts:25
A SurrealQL ASSERT
clause to enforce a constraint on the field value.
comment?
Section titled “comment?”
optional
comment:string
Defined in: define/field/types.ts:35
A comment to add to the field definition in the database schema.
default?
Section titled “default?”
optional
default:string
Defined in: define/field/types.ts:27
A default value for the field, specified as a SurrealQL expression string.
permissions?
Section titled “permissions?”
optional
permissions:string
|FieldPermissionsOptions
Defined in: define/field/types.ts:33
Field-level permissions, specified as a raw string or a FieldPermissionsOptions
object.
readonly?
Section titled “readonly?”
optional
readonly:boolean
Defined in: define/field/types.ts:31
If true, the field cannot be modified after creation.
value?
Section titled “value?”
optional
value:string
Defined in: define/field/types.ts:29
A SurrealQL VALUE
clause to compute the field’s value upon write.