Required changes to make sql projects extension work with vscode (#22847)

* Update CreateProject api

* More updates

* Fix a few comments

* Address comments

* Remove package.json changes

* Fix error

* Fix testUtil
This commit is contained in:
Sakshi Sharma
2023-04-28 10:27:59 -07:00
committed by GitHub
parent c04b8af1d2
commit 757067b132
11 changed files with 115 additions and 40 deletions

View File

@@ -15,8 +15,8 @@ import { IconPathHelper } from '../common/iconHelper';
import { ISystemDatabaseReferenceSettings, IDacpacReferenceSettings, IProjectReferenceSettings, INugetPackageReferenceSettings } from '../models/IDatabaseReferenceSettings';
import { Deferred } from '../common/promise';
import { TelemetryActions, TelemetryReporter, TelemetryViews } from '../common/telemetry';
import { ProjectType, SystemDatabase } from 'mssql';
import { DbServerValues, ensureSetOrDefined, populateResultWithVars } from './utils';
import { ProjectType } from 'mssql';
export enum ReferenceType {
project,
@@ -160,7 +160,7 @@ export class AddDatabaseReferenceDialog {
if (this.currentReferenceType === ReferenceType.systemDb) {
const systemDbRef: ISystemDatabaseReferenceSettings = {
databaseVariableLiteralValue: <string>this.databaseNameTextbox?.value,
systemDb: getSystemDatabase(<string>this.systemDatabaseDropdown?.value),
systemDb: utils.getSystemDatabase(<string>this.systemDatabaseDropdown?.value),
suppressMissingDependenciesErrors: <boolean>this.suppressMissingDependenciesErrorsCheckbox?.checked
};
@@ -734,10 +734,6 @@ export function getSystemDbOptions(project: Project): string[] {
return [constants.master, constants.msdb];
}
export function getSystemDatabase(name: string): SystemDatabase {
return name === constants.master ? SystemDatabase.Master : SystemDatabase.MSDB;
}
export async function promptDacpacLocation(): Promise<vscode.Uri[] | undefined> {
return await vscode.window.showOpenDialog(
{