Skip to content
🚀 This documentation is for unreal-orm 1.0.0 alpha which requires SurrealDB 2.0 SDK. For use with version 1.x, see here.

extractTableFromModel

extractTableFromModel(modelClass): TableAST

Defined in: schema/ast/extractor.ts:216

Extracts a TableAST from a runtime model class.

AnyModelClass

The model class to extract from

TableAST

Complete TableAST (indexes populated separately)

const tableAST = extractTableFromModel(User);
// { name: "user", type: "NORMAL", fields: [...], ... }