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

Method load

src/interpreter/python/engine.ts:60–69  ·  view source on GitHub ↗
(configs: DataSourceConfig | DataSourceConfig[])

Source from the content-addressed store, hash-verified

58 }
59
60 async load(configs: DataSourceConfig | DataSourceConfig[]): Promise<void> {
61 const sources = Array.isArray(configs) ? configs : [configs];
62 if (sources.length !== 1) {
63 throw new Error(`PythonEngine currently supports exactly one data source, received ${sources.length}`);
64 }
65 const config = sources[0];
66 await this.dispose();
67 this.lifetime = new AbortController();
68 this.source = sourceSchema.parse(config);
69 }
70
71 async schema(signal?: AbortSignal): Promise<Schema> {
72 if (!this.source) throw new Error('No data loaded. Please call source() first.');

Callers

nothing calls this directly

Calls 1

disposeMethod · 0.95

Tested by

no test coverage detected