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.

parseFieldDefinition

parseFieldDefinition(ql): FieldAST

Defined in: schema/ast/parser.ts:146

Parses a DEFINE FIELD statement into a FieldAST.

string

The raw SurrealQL DEFINE FIELD statement

FieldAST

Complete FieldAST

const field = parseFieldDefinition("DEFINE FIELD email ON TABLE user TYPE string");
// { name: "email", type: "string", flex: false, ... }