mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-05 09:35:40 -05:00
Update Microsoft.Data.SqlClient to v5.0.1 (#1708)
This commit is contained in:
@@ -155,12 +155,7 @@ namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode
|
||||
}
|
||||
|
||||
}
|
||||
if (fullFileName == null)
|
||||
{
|
||||
fullFileName = Path.GetFullPath(fileName);
|
||||
}
|
||||
|
||||
return fullFileName;
|
||||
return fullFileName ?? Path.GetFullPath(fileName);
|
||||
}
|
||||
catch (ArgumentException)
|
||||
{
|
||||
|
||||
@@ -128,15 +128,7 @@ namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode
|
||||
|
||||
internal Dictionary<string, string> Variables
|
||||
{
|
||||
get
|
||||
{
|
||||
if (cmdVariables == null)
|
||||
{
|
||||
cmdVariables = new Dictionary<string, string>(StringComparer.CurrentCultureIgnoreCase);
|
||||
}
|
||||
|
||||
return cmdVariables;
|
||||
}
|
||||
get => cmdVariables ??= new Dictionary<string, string>(StringComparer.CurrentCultureIgnoreCase);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -608,18 +608,10 @@ namespace Microsoft.SqlTools.ServiceLayer.BatchParser
|
||||
}
|
||||
|
||||
internal void RaiseError(ErrorCode errorCode, string message = null)
|
||||
{
|
||||
RaiseError(errorCode, LookaheadToken, message);
|
||||
}
|
||||
=> RaiseError(errorCode, LookaheadToken, message);
|
||||
|
||||
internal static void RaiseError(ErrorCode errorCode, Token token, string message = null)
|
||||
{
|
||||
if (message == null)
|
||||
{
|
||||
message = string.Format(CultureInfo.CurrentCulture, SR.BatchParser_IncorrectSyntax, token.Text);
|
||||
}
|
||||
throw new BatchParserException(errorCode, token, message);
|
||||
}
|
||||
=> throw new BatchParserException(errorCode, token, message ?? string.Format(CultureInfo.CurrentCulture, SR.BatchParser_IncorrectSyntax, token.Text));
|
||||
|
||||
internal string ResolveVariables(Token inputToken, int offset, List<VariableReference> variableRefs)
|
||||
{
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<!-- Targeting netstandard2.0 so that other things such as PS cmdlets can use this which need to support a wider range of machines -->
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<!-- Targeting both net6.0 and net472 so that other things such as PS cmdlets can use this which need to support a wider range of machines -->
|
||||
<TargetFrameworks>net6.0;net472</TargetFrameworks>
|
||||
<LangVersion>9.0</LangVersion>
|
||||
<Nullable>disable</Nullable>
|
||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||
<EnableDefaultEmbeddedResourceItems>false</EnableDefaultEmbeddedResourceItems>
|
||||
|
||||
@@ -276,10 +276,8 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
||||
Debug.Assert(conn.State == ConnectionState.Open, "connection passed to ExecuteNonQuery should be open.");
|
||||
|
||||
cmd = conn.CreateCommand();
|
||||
if (initializeCommand == null)
|
||||
{
|
||||
initializeCommand = SetCommandTimeout;
|
||||
}
|
||||
|
||||
initializeCommand ??= SetCommandTimeout;
|
||||
initializeCommand(cmd);
|
||||
|
||||
cmd.CommandText = commandText;
|
||||
@@ -331,10 +329,8 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
||||
Debug.Assert(conn.State == ConnectionState.Open, "connection passed to ExecuteScalar should be open.");
|
||||
|
||||
cmd = conn.CreateCommand();
|
||||
if (initializeCommand == null)
|
||||
{
|
||||
initializeCommand = SetCommandTimeout;
|
||||
}
|
||||
|
||||
initializeCommand ??= SetCommandTimeout;
|
||||
initializeCommand(cmd);
|
||||
|
||||
cmd.CommandText = commandText;
|
||||
@@ -384,11 +380,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
||||
{
|
||||
cmd = conn.CreateCommand();
|
||||
|
||||
if (initializeCommand == null)
|
||||
{
|
||||
initializeCommand = SetCommandTimeout;
|
||||
}
|
||||
|
||||
initializeCommand ??= SetCommandTimeout;
|
||||
initializeCommand(cmd);
|
||||
|
||||
cmd.CommandText = commandText;
|
||||
|
||||
@@ -478,10 +478,7 @@ SET NUMERIC_ROUNDABORT OFF;";
|
||||
{
|
||||
// Verify whether or not the connection is valid and is open. This code may be retried therefore
|
||||
// it is important to ensure that a connection is re-established should it have previously failed.
|
||||
if (command.Connection == null)
|
||||
{
|
||||
command.Connection = this;
|
||||
}
|
||||
command.Connection ??= this;
|
||||
|
||||
if (command.Connection.State != ConnectionState.Open)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user