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

Method dispose

src/remote/sqlserver/engine.ts:122–132  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

120 }
121
122 async dispose(): Promise<void> {
123 const pool = this.pool;
124 this.pool = null;
125 this.sourceSchema = undefined;
126 try {
127 for (const cancel of this.cancelRequests) cancel();
128 } finally {
129 this.cancelRequests.clear();
130 await pool?.close();
131 }
132 }
133
134 private async runQuery<T = Record<string, unknown>>(query: string, signal?: AbortSignal): Promise<IResult<T>> {
135 if (!this.pool) throw new Error('No data loaded. Please call source() first.');

Callers 1

loadMethod · 0.95

Calls 1

closeMethod · 0.80

Tested by

no test coverage detected