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

Method dispose

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

Source from the content-addressed store, hash-verified

113 }
114
115 async dispose(): Promise<void> {
116 const pool = this.pool;
117 this.pool = null;
118 this.sourceSchema = undefined;
119 try {
120 for (const request of this.requests) request.cancel();
121 } finally {
122 this.requests.clear();
123 await pool?.close();
124 }
125 }
126
127 private async runQuery<T = Record<string, unknown>>(query: string): Promise<IResult<T>> {
128 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