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.

parseTableDefinition

parseTableDefinition(ql): Partial<TableAST>

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

Parses a DEFINE TABLE statement into a partial TableAST.

string

The raw SurrealQL DEFINE TABLE statement

Partial<TableAST>

Partial TableAST (fields, indexes, events are populated separately)

const table = parseTableDefinition("DEFINE TABLE user SCHEMAFULL");
// { name: "user", type: "NORMAL", schemafull: true, ... }