@@ -48,25 +48,25 @@ export class QueryInfo {
4848 */
4949 sortedResultsInfo : Map < string , SortedResultSetInfo > ;
5050 dataset : vscode . Uri ; // guarantee the existence of a well-defined dataset dir at this point
51-
51+ queryId : number ;
5252 constructor (
5353 public program : messages . QlProgram ,
5454 public dbItem : DatabaseItem ,
5555 public queryDbscheme : string , // the dbscheme file the query expects, based on library path resolution
5656 public quickEvalPosition ?: messages . Position ,
5757 public metadata ?: cli . QueryMetadata ,
5858 ) {
59- this . compiledQueryPath = path . join ( tmpDir . name , `compiledQuery${ queryCounter } .qlo` ) ;
59+ this . queryId = queryCounter ++ ;
60+ this . compiledQueryPath = path . join ( tmpDir . name , `compiledQuery${ this . queryId } .qlo` ) ;
6061 this . resultsInfo = {
61- resultsPath : path . join ( tmpDir . name , `results${ queryCounter } .bqrs` ) ,
62- interpretedResultsPath : path . join ( tmpDir . name , `interpretedResults${ queryCounter } .sarif` )
62+ resultsPath : path . join ( tmpDir . name , `results${ this . queryId } .bqrs` ) ,
63+ interpretedResultsPath : path . join ( tmpDir . name , `interpretedResults${ this . queryId } .sarif` )
6364 } ;
6465 this . sortedResultsInfo = new Map ( ) ;
6566 if ( dbItem . contents === undefined ) {
6667 throw new Error ( 'Can\'t run query on invalid database.' ) ;
6768 }
6869 this . dataset = dbItem . contents . datasetUri ;
69- queryCounter ++ ;
7070 }
7171
7272 async run (
@@ -160,7 +160,7 @@ export class QueryInfo {
160160 }
161161
162162 const sortedResultSetInfo : SortedResultSetInfo = {
163- resultsPath : path . join ( tmpDir . name , `sortedResults${ queryCounter } -${ resultSetName } .bqrs` ) ,
163+ resultsPath : path . join ( tmpDir . name , `sortedResults${ this . queryId } -${ resultSetName } .bqrs` ) ,
164164 sortState
165165 } ;
166166
0 commit comments