OptionsMapTable changes for SC deployment options (#19808)

* OptionsMapTable changes for SC deployment options

* OptionsMapTable updates from STS

* SC comments addressing

* converted OptionsMapTable into custom type and updates references

* BooleanOptionsMap changes all updates

* Deployment options tab refactoing

* Prop name updated to booleanOptionsDictionary and references

* Updated lookup map by merging nameprop map

* updated comments

* SC options table updates based on SQLDB comments

* Addressing the comments except the reset logic
This commit is contained in:
Sai Avishkar Sreerama
2022-07-08 09:41:11 -05:00
committed by GitHub
parent 89816c9ff3
commit eec944ff7d
5 changed files with 90 additions and 418 deletions

View File

@@ -8,7 +8,6 @@ import * as vscode from 'vscode';
import * as mssql from 'mssql';
import * as loc from '../localizedConstants';
import { SchemaCompareMainWindow } from '../schemaCompareMainWindow';
import { isNullOrUndefined } from 'util';
import { SchemaCompareOptionsModel } from '../models/schemaCompareOptionsModel';
import { TelemetryReporter, TelemetryViews } from '../telemetry';
@@ -25,7 +24,6 @@ export class SchemaCompareOptionsDialog {
private optionsTable: azdata.TableComponent;
private objectsTable: azdata.TableComponent;
private disposableListeners: vscode.Disposable[] = [];
private optionsChanged: boolean = false;
private optionsModel: SchemaCompareOptionsModel;
@@ -63,8 +61,10 @@ export class SchemaCompareOptionsDialog {
}
protected execute(): void {
// Update the model deploymentoptions with the updated table component values
this.optionsModel.setDeploymentOptions();
this.optionsModel.setObjectTypeOptions();
// Set the publish deploymentoptions with the updated table component values
this.schemaComparison.setDeploymentOptions(this.optionsModel.deploymentOptions);
const yesItem: vscode.MessageItem = {
@@ -100,8 +100,8 @@ export class SchemaCompareOptionsDialog {
this.optionsModel.deploymentOptions = result.defaultDeploymentOptions;
this.optionsChanged = true;
// This will update the Map table with default values
this.optionsModel.InitializeUpdateOptionsMapTable();
// reset optionsvalueNameLookup with fresh deployment options
this.optionsModel.setOptionsToValueNameLookup();
await this.updateOptionsTable();
this.optionsFlexBuilder.removeItem(this.optionsTable);
@@ -136,19 +136,24 @@ export class SchemaCompareOptionsDialog {
this.optionsTable = view.modelBuilder.table().component();
await this.updateOptionsTable();
// Get the description of the selected option
this.disposableListeners.push(this.optionsTable.onRowSelected(async () => {
let row = this.optionsTable.selectedRows[0];
let label = this.optionsModel.optionsLabels[row];
// selectedRows[0] contains selected row number
const row = this.optionsTable.selectedRows[0];
// data[row][1] contains the option display name
const displayName = this.optionsTable?.data[row!][1];
await this.descriptionText.updateProperties({
value: this.optionsModel.getDescription(label)
value: this.optionsModel.getOptionDescription(displayName)
});
}));
// Update deploy options value on checkbox onchange
this.disposableListeners.push(this.optionsTable.onCellAction((rowState) => {
let checkboxState = <azdata.ICheckboxCellActionEventArgs>rowState;
const checkboxState = <azdata.ICheckboxCellActionEventArgs>rowState;
if (checkboxState && checkboxState.row !== undefined) {
let label = this.optionsModel.optionsLabels[checkboxState.row];
this.optionsModel.optionsLookup[label] = checkboxState.checked;
// data[row][1] contains the option display name
const displayName = this.optionsTable?.data[checkboxState.row][1];
this.optionsModel.setOptionValue(displayName, checkboxState.checked);
this.optionsChanged = true;
}
}));

View File

@@ -91,84 +91,6 @@ export const save: string = localize('schemaCompare.saveFile', "Save");
export function getConnectionString(caller: string): string { return localize('schemaCompare.GetConnectionString', "Do you want to connect to {0}?", caller); }
export const selectConnection: string = localize('schemaCompare.selectConnection', "Select connection");
// options
export const IgnoreTableOptions: string = localize('SchemaCompare.IgnoreTableOptions', "Ignore Table Options");
export const IgnoreSemicolonBetweenStatements: string = localize('SchemaCompare.IgnoreSemicolonBetweenStatements', "Ignore Semicolon Between Statements");
export const IgnoreRouteLifetime: string = localize('SchemaCompare.IgnoreRouteLifetime', "Ignore Route Lifetime");
export const IgnoreRoleMembership: string = localize('SchemaCompare.IgnoreRoleMembership', "Ignore Role Membership");
export const IgnoreQuotedIdentifiers: string = localize('SchemaCompare.IgnoreQuotedIdentifiers', "Ignore Quoted Identifiers");
export const IgnorePermissions: string = localize('SchemaCompare.IgnorePermissions', "Ignore Permissions");
export const IgnorePartitionSchemes: string = localize('SchemaCompare.IgnorePartitionSchemes', "Ignore Partition Schemes");
export const IgnoreObjectPlacementOnPartitionScheme: string = localize('SchemaCompare.IgnoreObjectPlacementOnPartitionScheme', "Ignore Object Placement On Partition Scheme");
export const IgnoreNotForReplication: string = localize('SchemaCompare.IgnoreNotForReplication', "Ignore Not For Replication");
export const IgnoreLoginSids: string = localize('SchemaCompare.IgnoreLoginSids', "Ignore Login Sids");
export const IgnoreLockHintsOnIndexes: string = localize('SchemaCompare.IgnoreLockHintsOnIndexes', "Ignore Lock Hints On Indexes");
export const IgnoreKeywordCasing: string = localize('SchemaCompare.IgnoreKeywordCasing', "Ignore Keyword Casing");
export const IgnoreIndexPadding: string = localize('SchemaCompare.IgnoreIndexPadding', "Ignore Index Padding");
export const IgnoreIndexOptions: string = localize('SchemaCompare.IgnoreIndexOptions', "Ignore Index Options");
export const IgnoreIncrement: string = localize('SchemaCompare.IgnoreIncrement', "Ignore Increment");
export const IgnoreIdentitySeed: string = localize('SchemaCompare.IgnoreIdentitySeed', "Ignore Identity Seed");
export const IgnoreUserSettingsObjects: string = localize('SchemaCompare.IgnoreUserSettingsObjects', "Ignore User Settings Objects");
export const IgnoreFullTextCatalogFilePath: string = localize('SchemaCompare.IgnoreFullTextCatalogFilePath', "Ignore Full Text Catalog FilePath");
export const IgnoreWhitespace: string = localize('SchemaCompare.IgnoreWhitespace', "Ignore Whitespace");
export const IgnoreWithNocheckOnForeignKeys: string = localize('SchemaCompare.IgnoreWithNocheckOnForeignKeys', "Ignore With Nocheck On ForeignKeys");
export const VerifyCollationCompatibility: string = localize('SchemaCompare.VerifyCollationCompatibility', "Verify Collation Compatibility");
export const UnmodifiableObjectWarnings: string = localize('SchemaCompare.UnmodifiableObjectWarnings', "Unmodifiable Object Warnings");
export const TreatVerificationErrorsAsWarnings: string = localize('SchemaCompare.TreatVerificationErrorsAsWarnings', "Treat Verification Errors As Warnings");
export const ScriptRefreshModule: string = localize('SchemaCompare.ScriptRefreshModule', "Script Refresh Module");
export const ScriptNewConstraintValidation: string = localize('SchemaCompare.ScriptNewConstraintValidation', "Script New Constraint Validation");
export const ScriptFileSize: string = localize('SchemaCompare.ScriptFileSize', "Script File Size");
export const ScriptDeployStateChecks: string = localize('SchemaCompare.ScriptDeployStateChecks', "Script Deploy StateChecks");
export const ScriptDatabaseOptions: string = localize('SchemaCompare.ScriptDatabaseOptions', "Script Database Options");
export const ScriptDatabaseCompatibility: string = localize('SchemaCompare.ScriptDatabaseCompatibility', "Script Database Compatibility");
export const ScriptDatabaseCollation: string = localize('SchemaCompare.ScriptDatabaseCollation', "Script Database Collation");
export const RunDeploymentPlanExecutors: string = localize('SchemaCompare.RunDeploymentPlanExecutors', "Run Deployment Plan Executors");
export const RegisterDataTierApplication: string = localize('SchemaCompare.RegisterDataTierApplication', "Register DataTier Application");
export const PopulateFilesOnFileGroups: string = localize('SchemaCompare.PopulateFilesOnFileGroups', "Populate Files On File Groups");
export const NoAlterStatementsToChangeClrTypes: string = localize('SchemaCompare.NoAlterStatementsToChangeClrTypes', "No Alter Statements To Change Clr Types");
export const IncludeTransactionalScripts: string = localize('SchemaCompare.IncludeTransactionalScripts', "Include Transactional Scripts");
export const IncludeCompositeObjects: string = localize('SchemaCompare.IncludeCompositeObjects', "Include Composite Objects");
export const AllowUnsafeRowLevelSecurityDataMovement: string = localize('SchemaCompare.AllowUnsafeRowLevelSecurityDataMovement', "Allow Unsafe Row Level Security Data Movement");
export const IgnoreWithNocheckOnCheckConstraints: string = localize('SchemaCompare.IgnoreWithNocheckOnCheckConstraints', "Ignore With No check On Check Constraints");
export const IgnoreFillFactor: string = localize('SchemaCompare.IgnoreFillFactor', "Ignore Fill Factor");
export const IgnoreFileSize: string = localize('SchemaCompare.IgnoreFileSize', "Ignore File Size");
export const IgnoreFilegroupPlacement: string = localize('SchemaCompare.IgnoreFilegroupPlacement', "Ignore Filegroup Placement");
export const DoNotAlterReplicatedObjects: string = localize('SchemaCompare.DoNotAlterReplicatedObjects', "Do Not Alter Replicated Objects");
export const DoNotAlterChangeDataCaptureObjects: string = localize('SchemaCompare.DoNotAlterChangeDataCaptureObjects', "Do Not Alter Change Data Capture Objects");
export const DisableAndReenableDdlTriggers: string = localize('SchemaCompare.DisableAndReenableDdlTriggers', "Disable And Reenable Ddl Triggers");
export const DeployDatabaseInSingleUserMode: string = localize('SchemaCompare.DeployDatabaseInSingleUserMode', "Deploy Database In Single User Mode");
export const CreateNewDatabase: string = localize('SchemaCompare.CreateNewDatabase', "Create New Database");
export const CompareUsingTargetCollation: string = localize('SchemaCompare.CompareUsingTargetCollation', "Compare Using Target Collation");
export const CommentOutSetVarDeclarations: string = localize('SchemaCompare.CommentOutSetVarDeclarations', "Comment Out Set Var Declarations");
export const BlockWhenDriftDetected: string = localize('SchemaCompare.BlockWhenDriftDetected', "Block When Drift Detected");
export const BlockOnPossibleDataLoss: string = localize('SchemaCompare.BlockOnPossibleDataLoss', "Block On Possible Data Loss");
export const BackupDatabaseBeforeChanges: string = localize('SchemaCompare.BackupDatabaseBeforeChanges', "Backup Database Before Changes");
export const AllowIncompatiblePlatform: string = localize('SchemaCompare.AllowIncompatiblePlatform', "Allow Incompatible Platform");
export const AllowDropBlockingAssemblies: string = localize('SchemaCompare.AllowDropBlockingAssemblies', "Allow Drop Blocking Assemblies");
export const DropConstraintsNotInSource: string = localize('SchemaCompare.DropConstraintsNotInSource', "Drop Constraints Not In Source");
export const DropDmlTriggersNotInSource: string = localize('SchemaCompare.DropDmlTriggersNotInSource', "Drop Dml Triggers Not In Source");
export const DropExtendedPropertiesNotInSource: string = localize('SchemaCompare.DropExtendedPropertiesNotInSource', "Drop Extended Properties Not In Source");
export const DropIndexesNotInSource: string = localize('SchemaCompare.DropIndexesNotInSource', "Drop Indexes Not In Source");
export const IgnoreFileAndLogFilePath: string = localize('SchemaCompare.IgnoreFileAndLogFilePath', "Ignore File And Log File Path");
export const IgnoreExtendedProperties: string = localize('SchemaCompare.IgnoreExtendedProperties', "Ignore Extended Properties");
export const IgnoreDmlTriggerState: string = localize('SchemaCompare.IgnoreDmlTriggerState', "Ignore Dml Trigger State");
export const IgnoreDmlTriggerOrder: string = localize('SchemaCompare.IgnoreDmlTriggerOrder', "Ignore Dml Trigger Order");
export const IgnoreDefaultSchema: string = localize('SchemaCompare.IgnoreDefaultSchema', "Ignore Default Schema");
export const IgnoreDdlTriggerState: string = localize('SchemaCompare.IgnoreDdlTriggerState', "Ignore Ddl Trigger State");
export const IgnoreDdlTriggerOrder: string = localize('SchemaCompare.IgnoreDdlTriggerOrder', "Ignore Ddl Trigger Order");
export const IgnoreCryptographicProviderFilePath: string = localize('SchemaCompare.IgnoreCryptographicProviderFilePath', "Ignore Cryptographic Provider FilePath");
export const VerifyDeployment: string = localize('SchemaCompare.VerifyDeployment', "Verify Deployment");
export const IgnoreComments: string = localize('SchemaCompare.IgnoreComments', "Ignore Comments");
export const IgnoreColumnCollation: string = localize('SchemaCompare.IgnoreColumnCollation', "Ignore Column Collation");
export const IgnoreAuthorizer: string = localize('SchemaCompare.IgnoreAuthorizer', "Ignore Authorizer");
export const IgnoreAnsiNulls: string = localize('SchemaCompare.IgnoreAnsiNulls', "Ignore AnsiNulls");
export const GenerateSmartDefaults: string = localize('SchemaCompare.GenerateSmartDefaults', "Generate SmartDefaults");
export const DropStatisticsNotInSource: string = localize('SchemaCompare.DropStatisticsNotInSource', "Drop Statistics Not In Source");
export const DropRoleMembersNotInSource: string = localize('SchemaCompare.DropRoleMembersNotInSource', "Drop Role Members Not In Source");
export const DropPermissionsNotInSource: string = localize('SchemaCompare.DropPermissionsNotInSource', "Drop Permissions Not In Source");
export const DropObjectsNotInSource: string = localize('SchemaCompare.DropObjectsNotInSource', "Drop Objects Not In Source");
export const IgnoreColumnOrder: string = localize('SchemaCompare.IgnoreColumnOrder', "Ignore Column Order");
// object types
export const Aggregates: string = localize('SchemaCompare.Aggregates', "Aggregates");
export const ApplicationRoles: string = localize('SchemaCompare.ApplicationRoles', "Application Roles");
@@ -247,6 +169,7 @@ export function cancelErrorMessage(errorMessage: string): string { return locali
export function generateScriptErrorMessage(errorMessage: string): string { return localize('schemaCompare.generateScriptErrorMessage', "Generate script failed: '{0}'", (errorMessage) ? errorMessage : 'Unknown'); }
export function applyErrorMessage(errorMessage: string): string { return localize('schemaCompare.updateErrorMessage', "Schema Compare Apply failed '{0}'", errorMessage ? errorMessage : 'Unknown'); }
export function openScmpErrorMessage(errorMessage: string): string { return localize('schemaCompare.openScmpErrorMessage', "Open scmp failed: '{0}'", (errorMessage) ? errorMessage : 'Unknown'); }
export function OptionNotFoundWarningMessage(label: string) { return localize('OptionNotFoundWarningMessage', "label: {0} does not exist in the options value name lookup", label); }
export const applyError: string = localize('schemaCompare.applyError', "There was an error updating the project");
export const dspErrorSource: string = localize('schemaCompareDialog.dspErrorSource', "The source .sqlproj file does not specify a database schema component");
export const dspErrorTarget: string = localize('schemaCompareDialog.dspErrorTarget', "The target .sqlproj file does not specify a database schema component");

View File

@@ -4,222 +4,74 @@
*--------------------------------------------------------------------------------------------*/
import * as loc from '../localizedConstants';
import * as mssql from 'mssql';
import * as vscode from 'vscode';
import { isNullOrUndefined } from 'util';
export class SchemaCompareOptionsModel {
public deploymentOptions: mssql.DeploymentOptions;
public excludedObjectTypes: mssql.SchemaObjectType[] = [];
public optionsMapTable: Map<string, mssql.DacDeployOptionPropertyBoolean>;
public optionsLookup = {};
// key is the option display name and values are checkboxValue and optionName
private optionsValueNameLookup: { [key: string]: mssql.IOptionWithValue } = {};
public excludedObjectTypes: number[] = [];
public objectsLookup = {};
//#region Schema Compare Deployment Options
constructor(public deploymentOptions: mssql.DeploymentOptions) {
this.setOptionsToValueNameLookup();
}
/*
* Initialize the options mapping table
* This will map the key:Option_DisplayName to the value:DacFx_OptionsValue
*/
public InitializeUpdateOptionsMapTable() {
this.optionsMapTable = new Map<string, mssql.DacDeployOptionPropertyBoolean>();
this.optionsMapTable.set(this.deploymentOptions?.ignoreTableOptions.displayName, this.deploymentOptions.ignoreTableOptions);
this.optionsMapTable.set(this.deploymentOptions.ignoreSemicolonBetweenStatements.displayName, this.deploymentOptions.ignoreSemicolonBetweenStatements);
this.optionsMapTable.set(this.deploymentOptions.ignoreRouteLifetime.displayName, this.deploymentOptions.ignoreRouteLifetime);
this.optionsMapTable.set(this.deploymentOptions.ignoreRoleMembership.displayName, this.deploymentOptions.ignoreRoleMembership);
this.optionsMapTable.set(this.deploymentOptions.ignoreQuotedIdentifiers.displayName, this.deploymentOptions.ignoreQuotedIdentifiers);
this.optionsMapTable.set(this.deploymentOptions.ignorePermissions.displayName, this.deploymentOptions.ignorePermissions);
this.optionsMapTable.set(this.deploymentOptions.ignorePartitionSchemes.displayName, this.deploymentOptions.ignorePartitionSchemes);
this.optionsMapTable.set(this.deploymentOptions.ignoreObjectPlacementOnPartitionScheme.displayName, this.deploymentOptions.ignoreObjectPlacementOnPartitionScheme);
this.optionsMapTable.set(this.deploymentOptions.ignoreNotForReplication.displayName, this.deploymentOptions.ignoreNotForReplication);
this.optionsMapTable.set(this.deploymentOptions.ignoreLoginSids.displayName, this.deploymentOptions.ignoreLoginSids);
this.optionsMapTable.set(this.deploymentOptions.ignoreLockHintsOnIndexes.displayName, this.deploymentOptions.ignoreLockHintsOnIndexes);
this.optionsMapTable.set(this.deploymentOptions.ignoreKeywordCasing.displayName, this.deploymentOptions.ignoreKeywordCasing);
this.optionsMapTable.set(this.deploymentOptions.ignoreIndexPadding.displayName, this.deploymentOptions.ignoreIndexPadding);
this.optionsMapTable.set(this.deploymentOptions.ignoreIndexOptions.displayName, this.deploymentOptions.ignoreIndexOptions);
this.optionsMapTable.set(this.deploymentOptions.ignoreIncrement.displayName, this.deploymentOptions.ignoreIncrement);
this.optionsMapTable.set(this.deploymentOptions.ignoreIdentitySeed.displayName, this.deploymentOptions.ignoreIdentitySeed);
this.optionsMapTable.set(this.deploymentOptions.ignoreUserSettingsObjects.displayName, this.deploymentOptions.ignoreUserSettingsObjects);
this.optionsMapTable.set(this.deploymentOptions.ignoreFullTextCatalogFilePath.displayName, this.deploymentOptions.ignoreFullTextCatalogFilePath);
this.optionsMapTable.set(this.deploymentOptions.ignoreWhitespace.displayName, this.deploymentOptions.ignoreWhitespace);
this.optionsMapTable.set(this.deploymentOptions.ignoreWithNocheckOnForeignKeys.displayName, this.deploymentOptions.ignoreWithNocheckOnForeignKeys);
this.optionsMapTable.set(this.deploymentOptions.verifyCollationCompatibility.displayName, this.deploymentOptions.verifyCollationCompatibility);
this.optionsMapTable.set(this.deploymentOptions.unmodifiableObjectWarnings.displayName, this.deploymentOptions.unmodifiableObjectWarnings);
this.optionsMapTable.set(this.deploymentOptions.treatVerificationErrorsAsWarnings.displayName, this.deploymentOptions.treatVerificationErrorsAsWarnings);
this.optionsMapTable.set(this.deploymentOptions.scriptRefreshModule.displayName, this.deploymentOptions.scriptRefreshModule);
this.optionsMapTable.set(this.deploymentOptions.scriptNewConstraintValidation.displayName, this.deploymentOptions.scriptNewConstraintValidation);
this.optionsMapTable.set(this.deploymentOptions.scriptFileSize.displayName, this.deploymentOptions.scriptFileSize);
this.optionsMapTable.set(this.deploymentOptions.scriptDeployStateChecks.displayName, this.deploymentOptions.scriptDeployStateChecks);
this.optionsMapTable.set(this.deploymentOptions.scriptDatabaseOptions.displayName, this.deploymentOptions.scriptDatabaseOptions);
this.optionsMapTable.set(this.deploymentOptions.scriptDatabaseCompatibility.displayName, this.deploymentOptions.scriptDatabaseCompatibility);
this.optionsMapTable.set(this.deploymentOptions.scriptDatabaseCollation.displayName, this.deploymentOptions.scriptDatabaseCollation);
this.optionsMapTable.set(this.deploymentOptions.runDeploymentPlanExecutors.displayName, this.deploymentOptions.runDeploymentPlanExecutors);
this.optionsMapTable.set(this.deploymentOptions.registerDataTierApplication.displayName, this.deploymentOptions.registerDataTierApplication);
this.optionsMapTable.set(this.deploymentOptions.populateFilesOnFileGroups.displayName, this.deploymentOptions.populateFilesOnFileGroups);
this.optionsMapTable.set(this.deploymentOptions.noAlterStatementsToChangeClrTypes.displayName, this.deploymentOptions.noAlterStatementsToChangeClrTypes);
this.optionsMapTable.set(this.deploymentOptions.includeTransactionalScripts.displayName, this.deploymentOptions.includeTransactionalScripts);
this.optionsMapTable.set(this.deploymentOptions.includeCompositeObjects.displayName, this.deploymentOptions.includeCompositeObjects);
this.optionsMapTable.set(this.deploymentOptions.allowUnsafeRowLevelSecurityDataMovement.displayName, this.deploymentOptions.allowUnsafeRowLevelSecurityDataMovement);
this.optionsMapTable.set(this.deploymentOptions.ignoreWithNocheckOnCheckConstraints.displayName, this.deploymentOptions.ignoreWithNocheckOnCheckConstraints);
this.optionsMapTable.set(this.deploymentOptions.ignoreFillFactor.displayName, this.deploymentOptions.ignoreFillFactor);
this.optionsMapTable.set(this.deploymentOptions.ignoreFileSize.displayName, this.deploymentOptions.ignoreFileSize);
this.optionsMapTable.set(this.deploymentOptions.ignoreFilegroupPlacement.displayName, this.deploymentOptions.ignoreFilegroupPlacement);
this.optionsMapTable.set(this.deploymentOptions.doNotAlterReplicatedObjects.displayName, this.deploymentOptions.doNotAlterReplicatedObjects);
this.optionsMapTable.set(this.deploymentOptions.doNotAlterChangeDataCaptureObjects.displayName, this.deploymentOptions.doNotAlterChangeDataCaptureObjects);
this.optionsMapTable.set(this.deploymentOptions.disableAndReenableDdlTriggers.displayName, this.deploymentOptions.disableAndReenableDdlTriggers);
this.optionsMapTable.set(this.deploymentOptions.deployDatabaseInSingleUserMode.displayName, this.deploymentOptions.deployDatabaseInSingleUserMode);
this.optionsMapTable.set(this.deploymentOptions.createNewDatabase.displayName, this.deploymentOptions.createNewDatabase);
this.optionsMapTable.set(this.deploymentOptions.compareUsingTargetCollation.displayName, this.deploymentOptions.compareUsingTargetCollation);
this.optionsMapTable.set(this.deploymentOptions.commentOutSetVarDeclarations.displayName, this.deploymentOptions.commentOutSetVarDeclarations);
this.optionsMapTable.set(this.deploymentOptions.blockWhenDriftDetected.displayName, this.deploymentOptions.blockWhenDriftDetected);
this.optionsMapTable.set(this.deploymentOptions.blockOnPossibleDataLoss.displayName, this.deploymentOptions.blockOnPossibleDataLoss);
this.optionsMapTable.set(this.deploymentOptions.backupDatabaseBeforeChanges.displayName, this.deploymentOptions.backupDatabaseBeforeChanges);
this.optionsMapTable.set(this.deploymentOptions.allowIncompatiblePlatform.displayName, this.deploymentOptions.allowIncompatiblePlatform);
this.optionsMapTable.set(this.deploymentOptions.allowDropBlockingAssemblies.displayName, this.deploymentOptions.allowDropBlockingAssemblies);
this.optionsMapTable.set(this.deploymentOptions.dropConstraintsNotInSource.displayName, this.deploymentOptions.dropConstraintsNotInSource);
this.optionsMapTable.set(this.deploymentOptions.dropDmlTriggersNotInSource.displayName, this.deploymentOptions.dropDmlTriggersNotInSource);
this.optionsMapTable.set(this.deploymentOptions.dropExtendedPropertiesNotInSource.displayName, this.deploymentOptions.dropExtendedPropertiesNotInSource);
this.optionsMapTable.set(this.deploymentOptions.dropIndexesNotInSource.displayName, this.deploymentOptions.dropIndexesNotInSource);
this.optionsMapTable.set(this.deploymentOptions.ignoreFileAndLogFilePath.displayName, this.deploymentOptions.ignoreFileAndLogFilePath);
this.optionsMapTable.set(this.deploymentOptions.ignoreExtendedProperties.displayName, this.deploymentOptions.ignoreExtendedProperties);
this.optionsMapTable.set(this.deploymentOptions.ignoreDmlTriggerState.displayName, this.deploymentOptions.ignoreDmlTriggerState);
this.optionsMapTable.set(this.deploymentOptions.ignoreDmlTriggerOrder.displayName, this.deploymentOptions.ignoreDmlTriggerOrder);
this.optionsMapTable.set(this.deploymentOptions.ignoreDefaultSchema.displayName, this.deploymentOptions.ignoreDefaultSchema);
this.optionsMapTable.set(this.deploymentOptions.ignoreDdlTriggerState.displayName, this.deploymentOptions.ignoreDdlTriggerState);
this.optionsMapTable.set(this.deploymentOptions.ignoreDdlTriggerOrder.displayName, this.deploymentOptions.ignoreDdlTriggerOrder);
this.optionsMapTable.set(this.deploymentOptions.ignoreCryptographicProviderFilePath.displayName, this.deploymentOptions.ignoreCryptographicProviderFilePath);
this.optionsMapTable.set(this.deploymentOptions.verifyDeployment.displayName, this.deploymentOptions.verifyDeployment);
this.optionsMapTable.set(this.deploymentOptions.ignoreComments.displayName, this.deploymentOptions.ignoreComments);
this.optionsMapTable.set(this.deploymentOptions.ignoreColumnCollation.displayName, this.deploymentOptions.ignoreColumnCollation);
this.optionsMapTable.set(this.deploymentOptions.ignoreAuthorizer.displayName, this.deploymentOptions.ignoreAuthorizer);
this.optionsMapTable.set(this.deploymentOptions.ignoreAnsiNulls.displayName, this.deploymentOptions.ignoreAnsiNulls);
this.optionsMapTable.set(this.deploymentOptions.generateSmartDefaults.displayName, this.deploymentOptions.generateSmartDefaults);
this.optionsMapTable.set(this.deploymentOptions.dropStatisticsNotInSource.displayName, this.deploymentOptions.dropStatisticsNotInSource);
this.optionsMapTable.set(this.deploymentOptions.dropRoleMembersNotInSource.displayName, this.deploymentOptions.dropRoleMembersNotInSource);
this.optionsMapTable.set(this.deploymentOptions.dropPermissionsNotInSource.displayName, this.deploymentOptions.dropPermissionsNotInSource);
this.optionsMapTable.set(this.deploymentOptions.dropObjectsNotInSource.displayName, this.deploymentOptions.dropObjectsNotInSource);
this.optionsMapTable.set(this.deploymentOptions.ignoreColumnOrder.displayName, this.deploymentOptions.ignoreColumnOrder);
this.optionsMapTable.set(this.deploymentOptions.ignoreTablePartitionOptions.displayName, this.deploymentOptions.ignoreTablePartitionOptions);
this.optionsMapTable.set(this.deploymentOptions.doNotEvaluateSqlCmdVariables.displayName, this.deploymentOptions.doNotEvaluateSqlCmdVariables);
this.optionsMapTable.set(this.deploymentOptions.disableParallelismForEnablingIndexes.displayName, this.deploymentOptions.disableParallelismForEnablingIndexes);
this.optionsMapTable.set(this.deploymentOptions.disableIndexesForDataPhase.displayName, this.deploymentOptions.disableIndexesForDataPhase);
this.optionsMapTable.set(this.deploymentOptions.restoreSequenceCurrentValue.displayName, this.deploymentOptions.restoreSequenceCurrentValue);
this.optionsMapTable.set(this.deploymentOptions.rebuildIndexesOfflineForDataPhase.displayName, this.deploymentOptions.rebuildIndexesOfflineForDataPhase);
this.optionsMapTable.set(this.deploymentOptions.preserveIdentityLastValues.displayName, this.deploymentOptions.preserveIdentityLastValues);
this.optionsMapTable.set(this.deploymentOptions.isAlwaysEncryptedParameterizationEnabled.displayName, this.deploymentOptions.isAlwaysEncryptedParameterizationEnabled);
this.optionsMapTable.set(this.deploymentOptions.allowExternalLibraryPaths.displayName, this.deploymentOptions.allowExternalLibraryPaths);
this.optionsMapTable.set(this.deploymentOptions.allowExternalLanguagePaths.displayName, this.deploymentOptions.allowExternalLanguagePaths);
this.optionsMapTable.set(this.deploymentOptions.hashObjectNamesInLogs.displayName, this.deploymentOptions.hashObjectNamesInLogs);
this.optionsMapTable.set(this.deploymentOptions.doNotDropWorkloadClassifiers.displayName, this.deploymentOptions.doNotDropWorkloadClassifiers);
this.optionsMapTable.set(this.deploymentOptions.ignoreWorkloadClassifiers.displayName, this.deploymentOptions.ignoreWorkloadClassifiers);
this.optionsMapTable.set(this.deploymentOptions.ignoreDatabaseWorkloadGroups.displayName, this.deploymentOptions.ignoreDatabaseWorkloadGroups);
this.optionsMapTable.set(this.deploymentOptions.doNotDropDatabaseWorkloadGroups.displayName, this.deploymentOptions.doNotDropDatabaseWorkloadGroups);
}
public optionsLabels: string[] = [];
public InitializeOptionsLabels() {
this.optionsLabels = [this.deploymentOptions.ignoreTableOptions.displayName
, this.deploymentOptions.ignoreSemicolonBetweenStatements.displayName
, this.deploymentOptions.ignoreRouteLifetime.displayName
, this.deploymentOptions.ignoreRoleMembership.displayName
, this.deploymentOptions.ignoreQuotedIdentifiers.displayName
, this.deploymentOptions.ignorePermissions.displayName
, this.deploymentOptions.ignorePartitionSchemes.displayName
, this.deploymentOptions.ignoreObjectPlacementOnPartitionScheme.displayName
, this.deploymentOptions.ignoreNotForReplication.displayName
, this.deploymentOptions.ignoreLoginSids.displayName
, this.deploymentOptions.ignoreLockHintsOnIndexes.displayName
, this.deploymentOptions.ignoreKeywordCasing.displayName
, this.deploymentOptions.ignoreIndexPadding.displayName
, this.deploymentOptions.ignoreIndexOptions.displayName
, this.deploymentOptions.ignoreIncrement.displayName
, this.deploymentOptions.ignoreIdentitySeed.displayName
, this.deploymentOptions.ignoreUserSettingsObjects.displayName
, this.deploymentOptions.ignoreFullTextCatalogFilePath.displayName
, this.deploymentOptions.ignoreWhitespace.displayName
, this.deploymentOptions.ignoreWithNocheckOnForeignKeys.displayName
, this.deploymentOptions.verifyCollationCompatibility.displayName
, this.deploymentOptions.unmodifiableObjectWarnings.displayName
, this.deploymentOptions.treatVerificationErrorsAsWarnings.displayName
, this.deploymentOptions.scriptRefreshModule.displayName
, this.deploymentOptions.scriptNewConstraintValidation.displayName
, this.deploymentOptions.scriptFileSize.displayName
, this.deploymentOptions.scriptDeployStateChecks.displayName
, this.deploymentOptions.scriptDatabaseOptions.displayName
, this.deploymentOptions.scriptDatabaseCompatibility.displayName
, this.deploymentOptions.scriptDatabaseCollation.displayName
, this.deploymentOptions.runDeploymentPlanExecutors.displayName
, this.deploymentOptions.registerDataTierApplication.displayName
, this.deploymentOptions.populateFilesOnFileGroups.displayName
, this.deploymentOptions.noAlterStatementsToChangeClrTypes.displayName
, this.deploymentOptions.includeTransactionalScripts.displayName
, this.deploymentOptions.includeCompositeObjects.displayName
, this.deploymentOptions.allowUnsafeRowLevelSecurityDataMovement.displayName
, this.deploymentOptions.ignoreWithNocheckOnCheckConstraints.displayName
, this.deploymentOptions.ignoreFillFactor.displayName
, this.deploymentOptions.ignoreFileSize.displayName
, this.deploymentOptions.ignoreFilegroupPlacement.displayName
, this.deploymentOptions.doNotAlterReplicatedObjects.displayName
, this.deploymentOptions.doNotAlterChangeDataCaptureObjects.displayName
, this.deploymentOptions.disableAndReenableDdlTriggers.displayName
, this.deploymentOptions.deployDatabaseInSingleUserMode.displayName
, this.deploymentOptions.createNewDatabase.displayName
, this.deploymentOptions.compareUsingTargetCollation.displayName
, this.deploymentOptions.commentOutSetVarDeclarations.displayName
, this.deploymentOptions.blockWhenDriftDetected.displayName
, this.deploymentOptions.blockOnPossibleDataLoss.displayName
, this.deploymentOptions.backupDatabaseBeforeChanges.displayName
, this.deploymentOptions.allowIncompatiblePlatform.displayName
, this.deploymentOptions.allowDropBlockingAssemblies.displayName
, this.deploymentOptions.dropConstraintsNotInSource.displayName
, this.deploymentOptions.dropDmlTriggersNotInSource.displayName
, this.deploymentOptions.dropExtendedPropertiesNotInSource.displayName
, this.deploymentOptions.dropIndexesNotInSource.displayName
, this.deploymentOptions.ignoreFileAndLogFilePath.displayName
, this.deploymentOptions.ignoreExtendedProperties.displayName
, this.deploymentOptions.ignoreDmlTriggerState.displayName
, this.deploymentOptions.ignoreDmlTriggerOrder.displayName
, this.deploymentOptions.ignoreDefaultSchema.displayName
, this.deploymentOptions.ignoreDdlTriggerState.displayName
, this.deploymentOptions.ignoreDdlTriggerOrder.displayName
, this.deploymentOptions.ignoreCryptographicProviderFilePath.displayName
, this.deploymentOptions.verifyDeployment.displayName
, this.deploymentOptions.ignoreComments.displayName
, this.deploymentOptions.ignoreColumnCollation.displayName
, this.deploymentOptions.ignoreAuthorizer.displayName
, this.deploymentOptions.ignoreAnsiNulls.displayName
, this.deploymentOptions.generateSmartDefaults.displayName
, this.deploymentOptions.dropStatisticsNotInSource.displayName
, this.deploymentOptions.dropRoleMembersNotInSource.displayName
, this.deploymentOptions.dropPermissionsNotInSource.displayName
, this.deploymentOptions.dropObjectsNotInSource.displayName
, this.deploymentOptions.ignoreColumnOrder.displayName
, this.deploymentOptions.ignoreTablePartitionOptions.displayName
, this.deploymentOptions.doNotEvaluateSqlCmdVariables.displayName
, this.deploymentOptions.disableParallelismForEnablingIndexes.displayName
, this.deploymentOptions.disableIndexesForDataPhase.displayName
, this.deploymentOptions.restoreSequenceCurrentValue.displayName
, this.deploymentOptions.rebuildIndexesOfflineForDataPhase.displayName
, this.deploymentOptions.preserveIdentityLastValues.displayName
, this.deploymentOptions.isAlwaysEncryptedParameterizationEnabled.displayName
, this.deploymentOptions.allowExternalLibraryPaths.displayName
, this.deploymentOptions.allowExternalLanguagePaths.displayName
, this.deploymentOptions.hashObjectNamesInLogs.displayName
, this.deploymentOptions.doNotDropWorkloadClassifiers.displayName
, this.deploymentOptions.ignoreWorkloadClassifiers.displayName
, this.deploymentOptions.ignoreDatabaseWorkloadGroups.displayName
, this.deploymentOptions.doNotDropDatabaseWorkloadGroups.displayName].sort();
}
public getOptionsData(): string[][] {
let data = [];
this.optionsLookup = {};
this.optionsLabels.forEach(l => {
let checked: boolean = this.getSchemaCompareOptionUtil(l);
data.push([checked, l]);
this.optionsLookup[l] = checked;
* Sets deployment option's checkbox values and property name to the optionsValueNameLookup map
*/
public setOptionsToValueNameLookup(): void {
Object.entries(this.deploymentOptions.booleanOptionsDictionary).forEach(option => {
const optionValue: mssql.IOptionWithValue = {
optionName: option[0],
checked: option[1].value
};
this.optionsValueNameLookup[option[1].displayName] = optionValue;
});
return data;
}
//#endregion
/*
* Initialize options data from deployment options for table component
* Returns data as [booleanValue, optionName]
*/
public getOptionsData(): any[][] {
let data: any[][] = [];
Object.entries(this.deploymentOptions.booleanOptionsDictionary).forEach(option => {
// option[1] holds checkedbox value and displayName
data.push([option[1].value, option[1].displayName]);
});
return data.sort((a, b) => a[1].localeCompare(b[1]));
}
/*
* Sets the selected option checkbox value to the deployment options
*/
public setDeploymentOptions(): void {
Object.entries(this.optionsValueNameLookup).forEach(option => {
// option[1] holds checkedbox value and optionName
this.deploymentOptions.booleanOptionsDictionary[option[1].optionName].value = option[1].checked;
});
}
/*
* Sets the checkbox value to the optionsValueNameLookup map
*/
public setOptionValue(displayName: string, checked: boolean): void {
this.optionsValueNameLookup[displayName].checked = checked;
}
/*
* Gets the description of the selected option by getting the option name from the optionsValueNameLookup
*/
public getOptionDescription(displayName: string): string {
const optionName = this.optionsValueNameLookup[displayName];
if (optionName === undefined) {
void vscode.window.showWarningMessage(loc.OptionNotFoundWarningMessage(displayName));
}
return optionName !== undefined ? this.deploymentOptions.booleanOptionsDictionary[optionName.optionName].description : '';
}
//#region Schema Compare Objects
public objectTypeLabels: string[] = [
loc.Aggregates,
@@ -305,31 +157,6 @@ export class SchemaCompareOptionsModel {
}
//#endregion
constructor(defaultOptions: mssql.DeploymentOptions) {
this.deploymentOptions = defaultOptions;
this.InitializeUpdateOptionsMapTable();
this.InitializeOptionsLabels();
}
public setDeploymentOptions() {
for (let option in this.optionsLookup) {
this.setSchemaCompareOptionUtil(option, this.optionsLookup[option]);
}
}
public setSchemaCompareOptionUtil(label: string, value: boolean) {
let optionProp = this.optionsMapTable.get(label);
optionProp.value = value;
return this.optionsMapTable.set(label, optionProp);
}
public getSchemaCompareOptionUtil(label): boolean {
return this.optionsMapTable.get(label)?.value;
}
public getDescription(label: string): string {
return this.optionsMapTable.get(label)?.description;
}
public setObjectTypeOptions() {
for (let option in this.objectsLookup) {

View File

@@ -16,7 +16,6 @@ describe('Schema Compare Options Model', () => {
should.doesNotThrow(() => model.setDeploymentOptions());
should.doesNotThrow(() => model.setObjectTypeOptions());
should(model.getSchemaCompareOptionUtil('')).equal(undefined, 'Should return undefined if an invalid option is passed in');
should(model.getSchemaCompareIncludedObjectsUtil('')).be.false('Should return false if invalid object name is passed in');
});
@@ -24,8 +23,8 @@ describe('Schema Compare Options Model', () => {
const model = new SchemaCompareOptionsModel(testUtils.getDeploymentOptions());
should(model.excludedObjectTypes.length).be.equal(0, 'There should be no excluded objects');
model.objectTypeLabels.forEach(l => {
model.setSchemaCompareIncludedObjectsUtil(l, false);
model.objectTypeLabels.forEach(label => {
model.setSchemaCompareIncludedObjectsUtil(label, false);
});
should(model.excludedObjectTypes.length).be.equal(model.objectTypeLabels.length, 'All the object types should be excluded');
@@ -33,8 +32,14 @@ describe('Schema Compare Options Model', () => {
it('Should get descriptions', function (): void {
const model = new SchemaCompareOptionsModel(testUtils.getDeploymentOptions());
model.optionsLabels.forEach(l => {
should(model.getDescription(l)).not.equal(undefined);
model.getOptionsData();
Object.entries(model.deploymentOptions.booleanOptionsDictionary).forEach(option => {
should(model.getOptionDescription(option[1].displayName)).not.equal(undefined);
});
});
it('Should return empty string for null option ', function (): void {
const model = new SchemaCompareOptionsModel(testUtils.getDeploymentOptions());
should(model.getOptionDescription('')).equal('');
});
});

View File

@@ -113,98 +113,10 @@ export function getDeploymentOptions(): mssql.DeploymentOptions {
const sampleDesc = 'Sample Description text';
const sampleName = 'Sample Display Name';
return {
ignoreTableOptions: { value: false, description: sampleDesc, displayName: sampleName },
ignoreSemicolonBetweenStatements: { value: false, description: sampleDesc, displayName: sampleName },
ignoreRouteLifetime: { value: false, description: sampleDesc, displayName: sampleName },
ignoreRoleMembership: { value: false, description: sampleDesc, displayName: sampleName },
ignoreQuotedIdentifiers: { value: false, description: sampleDesc, displayName: sampleName },
ignorePermissions: { value: false, description: sampleDesc, displayName: sampleName },
ignorePartitionSchemes: { value: false, description: sampleDesc, displayName: sampleName },
ignoreObjectPlacementOnPartitionScheme: { value: false, description: sampleDesc, displayName: sampleName },
ignoreNotForReplication: { value: false, description: sampleDesc, displayName: sampleName },
ignoreLoginSids: { value: false, description: sampleDesc, displayName: sampleName },
ignoreLockHintsOnIndexes: { value: false, description: sampleDesc, displayName: sampleName },
ignoreKeywordCasing: { value: false, description: sampleDesc, displayName: sampleName },
ignoreIndexPadding: { value: false, description: sampleDesc, displayName: sampleName },
ignoreIndexOptions: { value: false, description: sampleDesc, displayName: sampleName },
ignoreIncrement: { value: false, description: sampleDesc, displayName: sampleName },
ignoreIdentitySeed: { value: false, description: sampleDesc, displayName: sampleName },
ignoreUserSettingsObjects: { value: false, description: sampleDesc, displayName: sampleName },
ignoreFullTextCatalogFilePath: { value: false, description: sampleDesc, displayName: sampleName },
ignoreWhitespace: { value: false, description: sampleDesc, displayName: sampleName },
ignoreWithNocheckOnForeignKeys: { value: false, description: sampleDesc, displayName: sampleName },
verifyCollationCompatibility: { value: false, description: sampleDesc, displayName: sampleName },
unmodifiableObjectWarnings: { value: false, description: sampleDesc, displayName: sampleName },
treatVerificationErrorsAsWarnings: { value: false, description: sampleDesc, displayName: sampleName },
scriptRefreshModule: { value: false, description: sampleDesc, displayName: sampleName },
scriptNewConstraintValidation: { value: false, description: sampleDesc, displayName: sampleName },
scriptFileSize: { value: false, description: sampleDesc, displayName: sampleName },
scriptDeployStateChecks: { value: false, description: sampleDesc, displayName: sampleName },
scriptDatabaseOptions: { value: false, description: sampleDesc, displayName: sampleName },
scriptDatabaseCompatibility: { value: false, description: sampleDesc, displayName: sampleName },
scriptDatabaseCollation: { value: false, description: sampleDesc, displayName: sampleName },
runDeploymentPlanExecutors: { value: false, description: sampleDesc, displayName: sampleName },
registerDataTierApplication: { value: false, description: sampleDesc, displayName: sampleName },
populateFilesOnFileGroups: { value: false, description: sampleDesc, displayName: sampleName },
noAlterStatementsToChangeClrTypes: { value: false, description: sampleDesc, displayName: sampleName },
includeTransactionalScripts: { value: false, description: sampleDesc, displayName: sampleName },
includeCompositeObjects: { value: false, description: sampleDesc, displayName: sampleName },
allowUnsafeRowLevelSecurityDataMovement: { value: false, description: sampleDesc, displayName: sampleName },
ignoreWithNocheckOnCheckConstraints: { value: false, description: sampleDesc, displayName: sampleName },
ignoreFillFactor: { value: false, description: sampleDesc, displayName: sampleName },
ignoreFileSize: { value: false, description: sampleDesc, displayName: sampleName },
ignoreFilegroupPlacement: { value: false, description: sampleDesc, displayName: sampleName },
doNotAlterReplicatedObjects: { value: false, description: sampleDesc, displayName: sampleName },
doNotAlterChangeDataCaptureObjects: { value: false, description: sampleDesc, displayName: sampleName },
disableAndReenableDdlTriggers: { value: false, description: sampleDesc, displayName: sampleName },
deployDatabaseInSingleUserMode: { value: false, description: sampleDesc, displayName: sampleName },
createNewDatabase: { value: false, description: sampleDesc, displayName: sampleName },
compareUsingTargetCollation: { value: false, description: sampleDesc, displayName: sampleName },
commentOutSetVarDeclarations: { value: false, description: sampleDesc, displayName: sampleName },
blockWhenDriftDetected: { value: false, description: sampleDesc, displayName: sampleName },
blockOnPossibleDataLoss: { value: false, description: sampleDesc, displayName: sampleName },
backupDatabaseBeforeChanges: { value: false, description: sampleDesc, displayName: sampleName },
allowIncompatiblePlatform: { value: false, description: sampleDesc, displayName: sampleName },
allowDropBlockingAssemblies: { value: false, description: sampleDesc, displayName: sampleName },
dropConstraintsNotInSource: { value: false, description: sampleDesc, displayName: sampleName },
dropDmlTriggersNotInSource: { value: false, description: sampleDesc, displayName: sampleName },
dropExtendedPropertiesNotInSource: { value: false, description: sampleDesc, displayName: sampleName },
dropIndexesNotInSource: { value: false, description: sampleDesc, displayName: sampleName },
ignoreFileAndLogFilePath: { value: false, description: sampleDesc, displayName: sampleName },
ignoreExtendedProperties: { value: false, description: sampleDesc, displayName: sampleName },
ignoreDmlTriggerState: { value: false, description: sampleDesc, displayName: sampleName },
ignoreDmlTriggerOrder: { value: false, description: sampleDesc, displayName: sampleName },
ignoreDefaultSchema: { value: false, description: sampleDesc, displayName: sampleName },
ignoreDdlTriggerState: { value: false, description: sampleDesc, displayName: sampleName },
ignoreDdlTriggerOrder: { value: false, description: sampleDesc, displayName: sampleName },
ignoreCryptographicProviderFilePath: { value: false, description: sampleDesc, displayName: sampleName },
verifyDeployment: { value: false, description: sampleDesc, displayName: sampleName },
ignoreComments: { value: false, description: sampleDesc, displayName: sampleName },
ignoreColumnCollation: { value: false, description: sampleDesc, displayName: sampleName },
ignoreAuthorizer: { value: false, description: sampleDesc, displayName: sampleName },
ignoreAnsiNulls: { value: false, description: sampleDesc, displayName: sampleName },
generateSmartDefaults: { value: false, description: sampleDesc, displayName: sampleName },
dropStatisticsNotInSource: { value: false, description: sampleDesc, displayName: sampleName },
dropRoleMembersNotInSource: { value: false, description: sampleDesc, displayName: sampleName },
dropPermissionsNotInSource: { value: false, description: sampleDesc, displayName: sampleName },
dropObjectsNotInSource: { value: false, description: sampleDesc, displayName: sampleName },
ignoreColumnOrder: { value: false, description: sampleDesc, displayName: sampleName },
doNotDropObjectTypes: { value: [], description: sampleDesc, displayName: sampleName },
excludeObjectTypes: { value: [], description: sampleDesc, displayName: sampleName },
ignoreTablePartitionOptions: { value: false, description: sampleDesc, displayName: sampleName },
doNotEvaluateSqlCmdVariables: { value: false, description: sampleDesc, displayName: sampleName },
disableParallelismForEnablingIndexes: { value: false, description: sampleDesc, displayName: sampleName },
disableIndexesForDataPhase: { value: false, description: sampleDesc, displayName: sampleName },
restoreSequenceCurrentValue: { value: false, description: sampleDesc, displayName: sampleName },
rebuildIndexesOfflineForDataPhase: { value: false, description: sampleDesc, displayName: sampleName },
isAlwaysEncryptedParameterizationEnabled: { value: false, description: sampleDesc, displayName: sampleName },
preserveIdentityLastValues: { value: false, description: sampleDesc, displayName: sampleName },
allowExternalLibraryPaths: { value: false, description: sampleDesc, displayName: sampleName },
allowExternalLanguagePaths: { value: false, description: sampleDesc, displayName: sampleName },
hashObjectNamesInLogs: { value: false, description: sampleDesc, displayName: sampleName },
doNotDropWorkloadClassifiers: { value: false, description: sampleDesc, displayName: sampleName },
ignoreWorkloadClassifiers: { value: false, description: sampleDesc, displayName: sampleName },
ignoreDatabaseWorkloadGroups: { value: false, description: sampleDesc, displayName: sampleName },
doNotDropDatabaseWorkloadGroups: { value: false, description: sampleDesc, displayName: sampleName }
booleanOptionsDictionary: {
'SampleDisplayOption1': { value: false, description: sampleDesc, displayName: sampleName },
'SampleDisplayOption2': { value: false, description: sampleDesc, displayName: sampleName }
}
};
}