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.

extractTableFromModel

extractTableFromModel(modelClass): TableAST

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

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: [...], ... }