mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
* 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",
|
"name": "sql-database-projects",
|
||||||
"displayName": "SQL Database Projects",
|
"displayName": "SQL Database Projects",
|
||||||
"description": "Enables users to develop and publish database schemas for MSSQL Databases",
|
"description": "Enables users to develop and publish database schemas for MSSQL Databases",
|
||||||
"version": "1.0.0",
|
"version": "1.0.1",
|
||||||
"publisher": "Microsoft",
|
"publisher": "Microsoft",
|
||||||
"preview": false,
|
"preview": false,
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|||||||
@@ -117,6 +117,10 @@ export class Project implements ISqlProject {
|
|||||||
return this._sqlProjStyle;
|
return this._sqlProjStyle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public get sqlProjStyleName(): string {
|
||||||
|
return this.sqlProjStyle === ProjectType.SdkStyle ? 'SdkStyle' : 'LegacyStyle';
|
||||||
|
}
|
||||||
|
|
||||||
public get isCrossPlatformCompatible(): boolean {
|
public get isCrossPlatformCompatible(): boolean {
|
||||||
return this._isCrossPlatformCompatible;
|
return this._isCrossPlatformCompatible;
|
||||||
}
|
}
|
||||||
@@ -494,18 +498,23 @@ export class Project implements ISqlProject {
|
|||||||
|
|
||||||
//#region SQL object scripts
|
//#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);
|
const result = await this.sqlProjService.addSqlObjectScript(this.projectFilePath, relativePath);
|
||||||
this.throwIfFailed(result);
|
this.throwIfFailed(result);
|
||||||
|
|
||||||
await this.readFilesInProject();
|
if (reloadAfter) {
|
||||||
await this.readFolders();
|
await this.readFilesInProject();
|
||||||
|
await this.readFolders();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async addSqlObjectScripts(relativePaths: string[]): Promise<void> {
|
public async addSqlObjectScripts(relativePaths: string[]): Promise<void> {
|
||||||
for (const path of relativePaths) {
|
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> {
|
public async deleteSqlObjectScript(relativePath: string): Promise<void> {
|
||||||
|
|||||||
@@ -215,6 +215,11 @@ declare module 'sqldbproj' {
|
|||||||
*/
|
*/
|
||||||
getDatabaseDefaultCollation(): string;
|
getDatabaseDefaultCollation(): string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Type of .sqlproj file, either "SdkStyle" or "LegacyStyle"
|
||||||
|
*/
|
||||||
|
readonly sqlProjStyleName: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Path where dacpac is output to after a successful build
|
* Path where dacpac is output to after a successful build
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user