@@ -30,7 +30,9 @@ import { findResultSetNames } from "./result-set-names";
3030
3131interface ComparePair {
3232 from : CompletedLocalQueryInfo ;
33+ fromSchemas : BQRSInfo ;
3334 to : CompletedLocalQueryInfo ;
35+ toSchemas : BQRSInfo ;
3436}
3537
3638export class CompareView extends AbstractWebview <
@@ -57,7 +59,19 @@ export class CompareView extends AbstractWebview<
5759 to : CompletedLocalQueryInfo ,
5860 selectedResultSetName ?: string ,
5961 ) {
60- this . comparePair = { from, to } ;
62+ const fromSchemas = await this . cliServer . bqrsInfo (
63+ from . completedQuery . query . resultsPaths . resultsPath ,
64+ ) ;
65+ const toSchemas = await this . cliServer . bqrsInfo (
66+ to . completedQuery . query . resultsPaths . resultsPath ,
67+ ) ;
68+
69+ this . comparePair = {
70+ from,
71+ fromSchemas,
72+ to,
73+ toSchemas,
74+ } ;
6175
6276 await this . showResultsInternal ( selectedResultSetName ) ;
6377 }
@@ -78,7 +92,10 @@ export class CompareView extends AbstractWebview<
7892 currentResultSetName ,
7993 fromResultSet ,
8094 toResultSet ,
81- ] = await this . findCommonResultSetNames ( from , to , selectedResultSetName ) ;
95+ ] = await this . findCommonResultSetNames (
96+ this . comparePair ,
97+ selectedResultSetName ,
98+ ) ;
8299 if ( currentResultSetName ) {
83100 let rows : QueryCompareResult | undefined ;
84101 let message : string | undefined ;
@@ -178,23 +195,15 @@ export class CompareView extends AbstractWebview<
178195 }
179196
180197 private async findCommonResultSetNames (
181- from : CompletedLocalQueryInfo ,
182- to : CompletedLocalQueryInfo ,
198+ { from, fromSchemas, to, toSchemas } : ComparePair ,
183199 selectedResultSetName : string | undefined ,
184200 ) : Promise < [ string [ ] , string , RawResultSet , RawResultSet ] > {
185201 const {
186202 commonResultSetNames,
187203 currentResultSetDisplayName,
188- fromSchemas,
189204 fromResultSetName,
190- toSchemas,
191205 toResultSetName,
192- } = await findResultSetNames (
193- this . cliServer ,
194- from ,
195- to ,
196- selectedResultSetName ,
197- ) ;
206+ } = await findResultSetNames ( fromSchemas , toSchemas , selectedResultSetName ) ;
198207
199208 const fromResultSet = await this . getResultSet (
200209 fromSchemas ,
0 commit comments