mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-18 01:25:37 -05:00
Fix for issue where bulk-adding scripts could perform a rescan after each script (#22665)
* Changed bulk script add to delay reloading file list until end of operation. * Adding style name to sqlproj typing file * vBump to 1.0.1
This commit is contained in:
@@ -117,6 +117,10 @@ export class Project implements ISqlProject {
|
||||
return this._sqlProjStyle;
|
||||
}
|
||||
|
||||
public get sqlProjStyleName(): string {
|
||||
return this.sqlProjStyle === ProjectType.SdkStyle ? 'SdkStyle' : 'LegacyStyle';
|
||||
}
|
||||
|
||||
public get isCrossPlatformCompatible(): boolean {
|
||||
return this._isCrossPlatformCompatible;
|
||||
}
|
||||
@@ -494,18 +498,23 @@ export class Project implements ISqlProject {
|
||||
|
||||
//#region SQL object scripts
|
||||
|
||||
public async addSqlObjectScript(relativePath: string): Promise<void> {
|
||||
public async addSqlObjectScript(relativePath: string, reloadAfter: boolean = true): Promise<void> {
|
||||
const result = await this.sqlProjService.addSqlObjectScript(this.projectFilePath, relativePath);
|
||||
this.throwIfFailed(result);
|
||||
|
||||
await this.readFilesInProject();
|
||||
await this.readFolders();
|
||||
if (reloadAfter) {
|
||||
await this.readFilesInProject();
|
||||
await this.readFolders();
|
||||
}
|
||||
}
|
||||
|
||||
public async addSqlObjectScripts(relativePaths: string[]): Promise<void> {
|
||||
for (const path of relativePaths) {
|
||||
await this.addSqlObjectScript(path);
|
||||
await this.addSqlObjectScript(path, false /* reloadAfter */);
|
||||
}
|
||||
|
||||
await this.readFilesInProject();
|
||||
await this.readFolders();
|
||||
}
|
||||
|
||||
public async deleteSqlObjectScript(relativePath: string): Promise<void> {
|
||||
|
||||
Reference in New Issue
Block a user