diff --git a/sdk/servicebus/service-bus/review/service-bus.api.md b/sdk/servicebus/service-bus/review/service-bus.api.md index 56af880901e9..529a6e978de1 100644 --- a/sdk/servicebus/service-bus/review/service-bus.api.md +++ b/sdk/servicebus/service-bus/review/service-bus.api.md @@ -431,8 +431,6 @@ export type SqlRuleAction = SqlRuleFilter; // @public export interface SqlRuleFilter { - compatibilityLevel?: number; - requiresPreprocessing?: boolean; sqlExpression?: string; sqlParameters?: SqlParameter[]; } diff --git a/sdk/servicebus/service-bus/src/serializers/ruleResourceSerializer.ts b/sdk/servicebus/service-bus/src/serializers/ruleResourceSerializer.ts index 089eac499eae..477408967431 100644 --- a/sdk/servicebus/service-bus/src/serializers/ruleResourceSerializer.ts +++ b/sdk/servicebus/service-bus/src/serializers/ruleResourceSerializer.ts @@ -10,7 +10,6 @@ import { } from "../util/atomXmlHelper"; import * as Constants from "../util/constants"; import { - getBooleanOrUndefined, getIntegerOrUndefined, getString, getStringOrUndefined, @@ -45,9 +44,7 @@ function getTopicFilter(value: any): SqlRuleFilter | CorrelationRuleFilter { if (value["SqlExpression"] != undefined) { result = { sqlExpression: value["SqlExpression"], - sqlParameters: getSqlParametersOrUndefined(value["Parameters"]), - compatibilityLevel: getIntegerOrUndefined(value["CompatibilityLevel"]), - requiresPreprocessing: getBooleanOrUndefined(value["RequiresPreprocessing"]) + sqlParameters: getSqlParametersOrUndefined(value["Parameters"]) }; } else { result = { @@ -74,9 +71,7 @@ function getTopicFilter(value: any): SqlRuleFilter | CorrelationRuleFilter { function getRuleAction(value: any): SqlRuleAction { return { sqlExpression: value["SqlExpression"], - sqlParameters: getSqlParametersOrUndefined(value["Parameters"]), - compatibilityLevel: getIntegerOrUndefined(value["CompatibilityLevel"]), - requiresPreprocessing: getBooleanOrUndefined(value["RequiresPreprocessing"]) + sqlParameters: getSqlParametersOrUndefined(value["Parameters"]) }; } @@ -148,17 +143,6 @@ export interface SqlRuleFilter { * SQL parameters to the expression */ sqlParameters?: SqlParameter[]; - - /** - * This property is reserved for future use. An integer value showing the - * compatibility level, currently hard-coded to 20. - */ - compatibilityLevel?: number; - - /** - * Boolean value indicating whether the SQL filter expression requires preprocessing - */ - requiresPreprocessing?: boolean; } /** @@ -177,8 +161,7 @@ export class RuleResourceSerializer implements AtomXmlSerializer { if (rule.filter == undefined) { // Defaults to creating a true filter if none specified resource.Filter = { - SqlExpression: "1=1", - CompatibilityLevel: 20 + SqlExpression: "1=1" }; resource.Filter[Constants.XML_METADATA_MARKER] = { "p4:type": "SqlFilter", @@ -189,9 +172,7 @@ export class RuleResourceSerializer implements AtomXmlSerializer { const sqlFilter: SqlRuleFilter = rule.filter as SqlRuleFilter; resource.Filter = { SqlExpression: sqlFilter.sqlExpression, - Parameters: getRawSqlParameters(sqlFilter.sqlParameters), - CompatibilityLevel: 20, - RequiresPreprocessing: getStringOrUndefined(sqlFilter.requiresPreprocessing) + Parameters: getRawSqlParameters(sqlFilter.sqlParameters) }; resource.Filter[Constants.XML_METADATA_MARKER] = { "p4:type": "SqlFilter", @@ -228,9 +209,7 @@ export class RuleResourceSerializer implements AtomXmlSerializer { } else { resource.Action = { SqlExpression: rule.action.sqlExpression, - Parameters: getRawSqlParameters(rule.action.sqlParameters), - CompatibilityLevel: 20, - RequiresPreprocessing: getStringOrUndefined(rule.action.requiresPreprocessing) + Parameters: getRawSqlParameters(rule.action.sqlParameters) }; resource.Action[Constants.XML_METADATA_MARKER] = { "p4:type": "SqlRuleAction", diff --git a/sdk/servicebus/service-bus/test/atomManagement.spec.ts b/sdk/servicebus/service-bus/test/atomManagement.spec.ts index ccd3bf28d2c5..7f0ada0c2018 100644 --- a/sdk/servicebus/service-bus/test/atomManagement.spec.ts +++ b/sdk/servicebus/service-bus/test/atomManagement.spec.ts @@ -1691,15 +1691,11 @@ describe("Atom management - Authentication", function(): void { output: { filter: { sqlExpression: "1=1", - requiresPreprocessing: undefined, - sqlParameters: undefined, - compatibilityLevel: 20 + sqlParameters: undefined }, action: { sqlExpression: undefined, - requiresPreprocessing: undefined, - sqlParameters: undefined, - compatibilityLevel: undefined + sqlParameters: undefined }, name: managementRule1 } @@ -1722,15 +1718,11 @@ describe("Atom management - Authentication", function(): void { sqlParameters: [ { key: "@intParam", value: 1, type: "int" }, { key: "@stringParam", value: "b", type: "string" } - ], - requiresPreprocessing: false, - compatibilityLevel: 20 + ] }, action: { sqlExpression: "SET a='b'", - requiresPreprocessing: false, - sqlParameters: undefined, - compatibilityLevel: 20 + sqlParameters: undefined }, name: managementRule1 } @@ -1762,9 +1754,7 @@ describe("Atom management - Authentication", function(): void { }, action: { sqlExpression: "SET sys.label='GREEN'", - requiresPreprocessing: false, - sqlParameters: undefined, - compatibilityLevel: 20 + sqlParameters: undefined }, name: managementRule1 } @@ -1802,9 +1792,7 @@ describe("Atom management - Authentication", function(): void { }, action: { sqlExpression: "SET sys.label='GREEN'", - requiresPreprocessing: false, - sqlParameters: undefined, - compatibilityLevel: 20 + sqlParameters: undefined }, name: managementRule1 } @@ -2305,15 +2293,11 @@ describe("Atom management - Authentication", function(): void { output: { filter: { sqlExpression: "stringValue = @stringParam", - sqlParameters: [{ key: "@stringParam", value: "b", type: "string" }], - requiresPreprocessing: false, - compatibilityLevel: 20 + sqlParameters: [{ key: "@stringParam", value: "b", type: "string" }] }, action: { sqlExpression: "SET a='c'", - requiresPreprocessing: false, - sqlParameters: undefined, - compatibilityLevel: 20 + sqlParameters: undefined }, name: managementRule1 @@ -2341,9 +2325,7 @@ describe("Atom management - Authentication", function(): void { }, action: { sqlExpression: "SET sys.label='RED'", - requiresPreprocessing: false, - sqlParameters: undefined, - compatibilityLevel: 20 + sqlParameters: undefined }, name: managementRule1