in package/src/languageServiceManager/kustoLanguageService.ts [295:316]
private set _kustoJsSchemaV2(globalState: GlobalState) {
this.__kustoJsSchemaV2 = globalState;
this._clustersSetInGlobalState.clear();
this._nonEmptyDatabaseSetInGlobalState.clear();
// create 2 Sets with cluster names and database names based on the updated Global State.
for (let i = 0; i < globalState.Clusters.Count; i++) {
const clusterSymbol = this._kustoJsSchemaV2.Clusters.getItem(i);
this._clustersSetInGlobalState.add(clusterSymbol.Name);
for (let i2 = 0; i2 < clusterSymbol.Databases.Count; i2++) {
const databaseSymbol = clusterSymbol.Databases.getItem(i2);
if (databaseSymbol.Tables.Count > 0) {
// only include database with tables
this._nonEmptyDatabaseSetInGlobalState.add(
this.createDatabaseUniqueName(clusterSymbol.Name, databaseSymbol.Name)
);
}
}
}
}