FieldAST
Defined in: schema/ast/types.ts:50
AST node representing a field definition.
Properties
Section titled “Properties”assert?
Section titled “assert?”
optionalassert:string
Defined in: schema/ast/types.ts:62
ASSERT expression
comment?
Section titled “comment?”
optionalcomment:string
Defined in: schema/ast/types.ts:70
Field comment
default?
Section titled “default?”
optionaldefault:string
Defined in: schema/ast/types.ts:58
DEFAULT value expression
flex:
boolean
Defined in: schema/ast/types.ts:56
Whether field is FLEXIBLE
name:
string
Defined in: schema/ast/types.ts:52
Field name (supports dot notation for nested fields, e.g., “address.city”)
onDelete?
Section titled “onDelete?”
optionalonDelete:"IGNORE"|"UNSET"|"CASCADE"|"REJECT"
Defined in: schema/ast/types.ts:68
ON DELETE behavior for references: IGNORE, UNSET, CASCADE, REJECT
permissions
Section titled “permissions”permissions:
PermissionsAST
Defined in: schema/ast/types.ts:72
Field-level permissions
readonly?
Section titled “readonly?”
optionalreadonly:boolean
Defined in: schema/ast/types.ts:64
Whether field is READONLY
reference?
Section titled “reference?”
optionalreference:boolean
Defined in: schema/ast/types.ts:66
Whether field is a REFERENCE
type:
string
Defined in: schema/ast/types.ts:54
Raw SurrealQL type string (e.g., “string”, “record
value?
Section titled “value?”
optionalvalue:string
Defined in: schema/ast/types.ts:60
VALUE expression (computed field)