mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-13 17:22:15 -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:
@@ -2,7 +2,7 @@
|
||||
"name": "sql-database-projects",
|
||||
"displayName": "SQL Database Projects",
|
||||
"description": "Enables users to develop and publish database schemas for MSSQL Databases",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"publisher": "Microsoft",
|
||||
"preview": false,
|
||||
"engines": {
|
||||
|
||||
@@ -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> {
|
||||
|
||||
@@ -215,6 +215,11 @@ declare module 'sqldbproj' {
|
||||
*/
|
||||
getDatabaseDefaultCollation(): string;
|
||||
|
||||
/**
|
||||
* Type of .sqlproj file, either "SdkStyle" or "LegacyStyle"
|
||||
*/
|
||||
readonly sqlProjStyleName: string;
|
||||
|
||||
/**
|
||||
* Path where dacpac is output to after a successful build
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user