Skip to content
🚀 This documentation is for unreal-orm 1.0.0 alpha which requires SurrealDB 2.0 alpha SDK. For the stable version, see npm.

FieldAST

Defined in: schema/ast/types.ts:50

AST node representing a field definition.

optional assert: string

Defined in: schema/ast/types.ts:62

ASSERT expression


optional comment: string

Defined in: schema/ast/types.ts:70

Field comment


optional default: 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”)


optional onDelete: "IGNORE" | "UNSET" | "CASCADE" | "REJECT"

Defined in: schema/ast/types.ts:68

ON DELETE behavior for references: IGNORE, UNSET, CASCADE, REJECT


permissions: PermissionsAST

Defined in: schema/ast/types.ts:72

Field-level permissions


optional readonly: boolean

Defined in: schema/ast/types.ts:64

Whether field is READONLY


optional reference: 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”, “option”)


optional value: string

Defined in: schema/ast/types.ts:60

VALUE expression (computed field)