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

Method schema

src/interpreter/python/engine.ts:67–75  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

65 }
66
67 async schema(): Promise<Schema> {
68 if (!this.source) throw new Error('No data loaded. Please call source() first.');
69
70 const tables = z.array(tableSchema).parse(await this.metadata(SCHEMA_CODE));
71 if (new Set(tables.map((table) => table.name)).size !== tables.length) {
72 throw new Error('Python source returned duplicate table names');
73 }
74 return { models: tables } as Schema;
75 }
76
77 async getDSL(query: string, dataModel: DataModel): Promise<TranslationResult> {
78 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