File tree Expand file tree Collapse file tree
extensions/ql-vscode/src/query-server/legacy Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ import { QueryOutputDir } from "../../run-queries-shared";
1717import { QueryServerClient } from "./query-server-client" ;
1818import {
1919 clearCacheInDatabase ,
20- trimCacheInDatabase ,
2120 compileAndRunQueryAgainstDatabaseCore ,
2221} from "./run-queries" ;
2322import { upgradeDatabaseExplicit } from "./upgrades" ;
@@ -66,7 +65,9 @@ export class LegacyQueryRunner extends QueryRunner {
6665 dbItem : DatabaseItem ,
6766 token : CancellationToken ,
6867 ) : Promise < void > {
69- await trimCacheInDatabase ( this . qs , dbItem , token ) ;
68+ // For the sake of conforming to the QueryRunner interface, delegate to clearCacheInDatabase
69+ // just for the effect of getting a legacy query server deprecation error response.
70+ await clearCacheInDatabase ( this . qs , dbItem , token ) ;
7071 }
7172
7273 public async compileAndRunQueryAgainstDatabaseCore (
Original file line number Diff line number Diff line change @@ -214,27 +214,6 @@ export async function clearCacheInDatabase(
214214 return qs . sendRequest ( messages . clearCache , params , token ) ;
215215}
216216
217- export async function trimCacheInDatabase (
218- qs : qsClient . QueryServerClient ,
219- dbItem : DatabaseItem ,
220- token : CancellationToken ,
221- ) : Promise < messages . ClearCacheResult > {
222- if ( dbItem . contents === undefined ) {
223- throw new Error ( "Can't clear the cache in an invalid database." ) ;
224- }
225-
226- const db : messages . Dataset = {
227- dbDir : dbItem . contents . datasetUri . fsPath ,
228- workingSet : "default" ,
229- } ;
230-
231- const params : messages . TrimCacheParams = {
232- db,
233- } ;
234-
235- return qs . sendRequest ( messages . trimCache , params , token ) ;
236- }
237-
238217function reportNoUpgradePath (
239218 qlProgram : messages . QlProgram ,
240219 queryDbscheme : string ,
You can’t perform that action at this time.
0 commit comments