OptionsMapTable logic to replace the deployment hardcoded values final (#19789)

* OptionsMapTable logic to replace the deployment hardcoded values final

* Test modifiaction

* OptionsMApTable updates with STS and review commetns

* comments added and option string moved to constants file

* Reverting the options button css related change and will put in other PR

* converted optionsMapTable to custom type and references.

* Options prop changes and model updates

* Reset btn event method name fixed

* removed local booleanOptionDict var and using the existing one

* updated code with removed local vars

* Update to booleanOptionsDictionary name

* merged two variable to one

* Refactoring code and updating variables

* separated lookup and data array and refactor

* missing visibility

* reset logic revised and no other edgecases found

* variable names updated to meaningful

* vbump here to test the checks, sending new vbump PR separately
This commit is contained in:
Sai Avishkar Sreerama
2022-07-08 09:40:06 -05:00
committed by GitHub
parent 84a15ea91d
commit 89816c9ff3
11 changed files with 116 additions and 628 deletions

View File

@@ -153,112 +153,40 @@ declare module 'mssql' {
defaultDeploymentOptions: DeploymentOptions;
}
/**
* Interface containing deployment options of boolean type
*/
export interface DacDeployOptionPropertyBoolean {
value: boolean;
description: string;
displayName: string;
}
/**
* Interface containing deployment options of integer type, value property holds values from <DacFx>\Product\Source\DeploymentApi\ObjectTypes.cs enum
*/
export interface DacDeployOptionPropertyObject {
value: SchemaObjectType[];
value: number[];
description: string;
displayName: string;
}
/*
* Interface containing Deployment options from <DacFx>\Source\DeploymentApi\DacDeployOptions.cs
* These property names should match with the properties defined in <sqltoolsservice>\src\Microsoft.SqlTools.ServiceLayer\DacFx\Contracts\DeploymentOptions.cs
*/
export interface DeploymentOptions {
ignoreTableOptions: DacDeployOptionPropertyBoolean;
ignoreSemicolonBetweenStatements: DacDeployOptionPropertyBoolean;
ignoreRouteLifetime: DacDeployOptionPropertyBoolean;
ignoreRoleMembership: DacDeployOptionPropertyBoolean;
ignoreQuotedIdentifiers: DacDeployOptionPropertyBoolean;
ignorePermissions: DacDeployOptionPropertyBoolean;
ignorePartitionSchemes: DacDeployOptionPropertyBoolean;
ignoreObjectPlacementOnPartitionScheme: DacDeployOptionPropertyBoolean;
ignoreNotForReplication: DacDeployOptionPropertyBoolean;
ignoreLoginSids: DacDeployOptionPropertyBoolean;
ignoreLockHintsOnIndexes: DacDeployOptionPropertyBoolean;
ignoreKeywordCasing: DacDeployOptionPropertyBoolean;
ignoreIndexPadding: DacDeployOptionPropertyBoolean;
ignoreIndexOptions: DacDeployOptionPropertyBoolean;
ignoreIncrement: DacDeployOptionPropertyBoolean;
ignoreIdentitySeed: DacDeployOptionPropertyBoolean;
ignoreUserSettingsObjects: DacDeployOptionPropertyBoolean;
ignoreFullTextCatalogFilePath: DacDeployOptionPropertyBoolean;
ignoreWhitespace: DacDeployOptionPropertyBoolean;
ignoreWithNocheckOnForeignKeys: DacDeployOptionPropertyBoolean;
verifyCollationCompatibility: DacDeployOptionPropertyBoolean;
unmodifiableObjectWarnings: DacDeployOptionPropertyBoolean;
treatVerificationErrorsAsWarnings: DacDeployOptionPropertyBoolean;
scriptRefreshModule: DacDeployOptionPropertyBoolean;
scriptNewConstraintValidation: DacDeployOptionPropertyBoolean;
scriptFileSize: DacDeployOptionPropertyBoolean;
scriptDeployStateChecks: DacDeployOptionPropertyBoolean;
scriptDatabaseOptions: DacDeployOptionPropertyBoolean;
scriptDatabaseCompatibility: DacDeployOptionPropertyBoolean;
scriptDatabaseCollation: DacDeployOptionPropertyBoolean;
runDeploymentPlanExecutors: DacDeployOptionPropertyBoolean;
registerDataTierApplication: DacDeployOptionPropertyBoolean;
populateFilesOnFileGroups: DacDeployOptionPropertyBoolean;
noAlterStatementsToChangeClrTypes: DacDeployOptionPropertyBoolean;
includeTransactionalScripts: DacDeployOptionPropertyBoolean;
includeCompositeObjects: DacDeployOptionPropertyBoolean;
allowUnsafeRowLevelSecurityDataMovement: DacDeployOptionPropertyBoolean;
ignoreWithNocheckOnCheckConstraints: DacDeployOptionPropertyBoolean;
ignoreFillFactor: DacDeployOptionPropertyBoolean;
ignoreFileSize: DacDeployOptionPropertyBoolean;
ignoreFilegroupPlacement: DacDeployOptionPropertyBoolean;
doNotAlterReplicatedObjects: DacDeployOptionPropertyBoolean;
doNotAlterChangeDataCaptureObjects: DacDeployOptionPropertyBoolean;
disableAndReenableDdlTriggers: DacDeployOptionPropertyBoolean;
deployDatabaseInSingleUserMode: DacDeployOptionPropertyBoolean;
createNewDatabase: DacDeployOptionPropertyBoolean;
compareUsingTargetCollation: DacDeployOptionPropertyBoolean;
commentOutSetVarDeclarations: DacDeployOptionPropertyBoolean;
blockWhenDriftDetected: DacDeployOptionPropertyBoolean;
blockOnPossibleDataLoss: DacDeployOptionPropertyBoolean;
backupDatabaseBeforeChanges: DacDeployOptionPropertyBoolean;
allowIncompatiblePlatform: DacDeployOptionPropertyBoolean;
allowDropBlockingAssemblies: DacDeployOptionPropertyBoolean;
dropConstraintsNotInSource: DacDeployOptionPropertyBoolean;
dropDmlTriggersNotInSource: DacDeployOptionPropertyBoolean;
dropExtendedPropertiesNotInSource: DacDeployOptionPropertyBoolean;
dropIndexesNotInSource: DacDeployOptionPropertyBoolean;
ignoreFileAndLogFilePath: DacDeployOptionPropertyBoolean;
ignoreExtendedProperties: DacDeployOptionPropertyBoolean;
ignoreDmlTriggerState: DacDeployOptionPropertyBoolean;
ignoreDmlTriggerOrder: DacDeployOptionPropertyBoolean;
ignoreDefaultSchema: DacDeployOptionPropertyBoolean;
ignoreDdlTriggerState: DacDeployOptionPropertyBoolean;
ignoreDdlTriggerOrder: DacDeployOptionPropertyBoolean;
ignoreCryptographicProviderFilePath: DacDeployOptionPropertyBoolean;
verifyDeployment: DacDeployOptionPropertyBoolean;
ignoreComments: DacDeployOptionPropertyBoolean;
ignoreColumnCollation: DacDeployOptionPropertyBoolean;
ignoreAuthorizer: DacDeployOptionPropertyBoolean;
ignoreAnsiNulls: DacDeployOptionPropertyBoolean;
generateSmartDefaults: DacDeployOptionPropertyBoolean;
dropStatisticsNotInSource: DacDeployOptionPropertyBoolean;
dropRoleMembersNotInSource: DacDeployOptionPropertyBoolean;
dropPermissionsNotInSource: DacDeployOptionPropertyBoolean;
dropObjectsNotInSource: DacDeployOptionPropertyBoolean;
ignoreColumnOrder: DacDeployOptionPropertyBoolean;
doNotDropObjectTypes: DacDeployOptionPropertyObject;
excludeObjectTypes: DacDeployOptionPropertyObject;
ignoreTablePartitionOptions: DacDeployOptionPropertyBoolean;
doNotEvaluateSqlCmdVariables: DacDeployOptionPropertyBoolean;
disableParallelismForEnablingIndexes: DacDeployOptionPropertyBoolean;
disableIndexesForDataPhase: DacDeployOptionPropertyBoolean;
restoreSequenceCurrentValue: DacDeployOptionPropertyBoolean;
rebuildIndexesOfflineForDataPhase: DacDeployOptionPropertyBoolean;
isAlwaysEncryptedParameterizationEnabled: DacDeployOptionPropertyBoolean;
preserveIdentityLastValues: DacDeployOptionPropertyBoolean;
allowExternalLibraryPaths: DacDeployOptionPropertyBoolean;
allowExternalLanguagePaths: DacDeployOptionPropertyBoolean;
hashObjectNamesInLogs: DacDeployOptionPropertyBoolean;
doNotDropWorkloadClassifiers: DacDeployOptionPropertyBoolean;
ignoreWorkloadClassifiers: DacDeployOptionPropertyBoolean;
ignoreDatabaseWorkloadGroups: DacDeployOptionPropertyBoolean;
doNotDropDatabaseWorkloadGroups: DacDeployOptionPropertyBoolean;
// key will be the boolean option name
booleanOptionsDictionary: { [key: string]: DacDeployOptionPropertyBoolean };
}
/*
* Interface containing option value and option name
*/
export interface IOptionWithValue {
optionName: string;
checked: boolean;
}
/**