MCPcopy Create free account
hub / github.com/antvis/AVA / schema

Method schema

src/interpreter/python/engine.ts:71–79  ·  view source on GitHub ↗
(signal?: AbortSignal)

Source from the content-addressed store, hash-verified

69 }
70
71 async schema(signal?: AbortSignal): Promise<Schema> {
72 if (!this.source) throw new Error('No data loaded. Please call source() first.');
73
74 const tables = z.array(tableSchema).parse(await this.metadata(SCHEMA_CODE, signal));
75 if (new Set(tables.map((table) => table.name)).size !== tables.length) {
76 throw new Error('Python source returned duplicate table names');
77 }
78 return { models: tables } as Schema;
79 }
80
81 async getDSL(query: string, dataModel: DataModel, signal?: AbortSignal): Promise<TranslationResult> {
82 if (!this.source) throw new Error('No data loaded. Please call source() first.');

Callers

nothing calls this directly

Calls 1

metadataMethod · 0.95

Tested by

no test coverage detected