mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-20 17:24:00 -05:00
Add Always Encrypted Parameterization Functionality (#953)
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
using System;
|
||||
using Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts;
|
||||
using Microsoft.SqlTools.Utility;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Microsoft.SqlTools.ServiceLayer.SqlContext
|
||||
{
|
||||
@@ -168,6 +169,11 @@ namespace Microsoft.SqlTools.ServiceLayer.SqlContext
|
||||
/// </summary>
|
||||
private bool DefaultSqlCmdMode = false;
|
||||
|
||||
/// <summary>
|
||||
/// Default value for flag to enable Always Encrypted Parameterization
|
||||
/// </summary>
|
||||
private bool DefaultAlwaysEncryptedParameterizationValue = false;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Member Variables
|
||||
@@ -653,6 +659,22 @@ namespace Microsoft.SqlTools.ServiceLayer.SqlContext
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set Always Encrypted Parameterization Mode
|
||||
/// </summary>
|
||||
[JsonProperty("alwaysEncryptedParameterization")]
|
||||
public bool IsAlwaysEncryptedParameterizationEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
return GetOptionValue<bool>("alwaysEncryptedParameterization", DefaultAlwaysEncryptedParameterizationValue);
|
||||
}
|
||||
set
|
||||
{
|
||||
SetOptionValue("alwaysEncryptedParameterization", value);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Methods
|
||||
@@ -691,6 +713,7 @@ namespace Microsoft.SqlTools.ServiceLayer.SqlContext
|
||||
AnsiWarnings = newSettings.AnsiWarnings;
|
||||
AnsiNulls = newSettings.AnsiNulls;
|
||||
IsSqlCmdMode = newSettings.IsSqlCmdMode;
|
||||
IsAlwaysEncryptedParameterizationEnabled = newSettings.IsAlwaysEncryptedParameterizationEnabled;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user