mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-16 10:58:30 -05:00
Move managed parser into its own project (test code coverage) (#774)
* Created New ManagedBatchParser project in .NetStandard * Addressing PR Comments * Resolve 'No Repository' warning. * Move batch parser tests to integrations test project * Fix SLN file
This commit is contained in:
@@ -61,6 +61,9 @@ EndProject
|
|||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.SqlTools.Hosting.Contracts", "src\Microsoft.SqlTools.Hosting.Contracts\Microsoft.SqlTools.Hosting.Contracts.csproj", "{BE04C532-C9AE-4C32-9283-F6629112228B}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.SqlTools.Hosting.Contracts", "src\Microsoft.SqlTools.Hosting.Contracts\Microsoft.SqlTools.Hosting.Contracts.csproj", "{BE04C532-C9AE-4C32-9283-F6629112228B}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.SqlTools.ServiceLayer", "src\Microsoft.SqlTools.ServiceLayer\Microsoft.SqlTools.ServiceLayer.csproj", "{835EDEB4-289B-4D6D-A9A0-609E43A87D6E}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.SqlTools.ServiceLayer", "src\Microsoft.SqlTools.ServiceLayer\Microsoft.SqlTools.ServiceLayer.csproj", "{835EDEB4-289B-4D6D-A9A0-609E43A87D6E}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{3F82F298-700A-48DF-8A69-D048DFBA782C} = {3F82F298-700A-48DF-8A69-D048DFBA782C}
|
||||||
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.SqlTools.Hosting.UnitTests", "test\Microsoft.SqlTools.Hosting.UnitTests\Microsoft.SqlTools.Hosting.UnitTests.csproj", "{BA3C9622-ABFF-45A2-91AA-CC5189083256}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.SqlTools.Hosting.UnitTests", "test\Microsoft.SqlTools.Hosting.UnitTests\Microsoft.SqlTools.Hosting.UnitTests.csproj", "{BA3C9622-ABFF-45A2-91AA-CC5189083256}"
|
||||||
EndProject
|
EndProject
|
||||||
@@ -90,6 +93,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.SqlTools.Hosting.
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TVFSample", "test\TVFSample\TVFSample.csproj", "{1FC10261-EC0D-416A-9B66-C55F0A34968C}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TVFSample", "test\TVFSample\TVFSample.csproj", "{1FC10261-EC0D-416A-9B66-C55F0A34968C}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.SqlTools.ManagedBatchParser", "src\Microsoft.SqlTools.ManagedBatchParser\Microsoft.SqlTools.ManagedBatchParser.csproj", "{3F82F298-700A-48DF-8A69-D048DFBA782C}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
@@ -217,6 +222,12 @@ Global
|
|||||||
{1FC10261-EC0D-416A-9B66-C55F0A34968C}.Integration|Any CPU.Build.0 = Release|Any CPU
|
{1FC10261-EC0D-416A-9B66-C55F0A34968C}.Integration|Any CPU.Build.0 = Release|Any CPU
|
||||||
{1FC10261-EC0D-416A-9B66-C55F0A34968C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{1FC10261-EC0D-416A-9B66-C55F0A34968C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{1FC10261-EC0D-416A-9B66-C55F0A34968C}.Release|Any CPU.Build.0 = Release|Any CPU
|
{1FC10261-EC0D-416A-9B66-C55F0A34968C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{3F82F298-700A-48DF-8A69-D048DFBA782C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{3F82F298-700A-48DF-8A69-D048DFBA782C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{3F82F298-700A-48DF-8A69-D048DFBA782C}.Integration|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{3F82F298-700A-48DF-8A69-D048DFBA782C}.Integration|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{3F82F298-700A-48DF-8A69-D048DFBA782C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{3F82F298-700A-48DF-8A69-D048DFBA782C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
@@ -244,6 +255,7 @@ Global
|
|||||||
{8EE5B06A-2EB2-4A47-812D-1D5B98D0F49A} = {AB9CA2B8-6F70-431C-8A1D-67479D8A7BE4}
|
{8EE5B06A-2EB2-4A47-812D-1D5B98D0F49A} = {AB9CA2B8-6F70-431C-8A1D-67479D8A7BE4}
|
||||||
{EF02F89F-417E-4A40-B7E6-B102EE2DF24D} = {2BBD7364-054F-4693-97CD-1C395E3E84A9}
|
{EF02F89F-417E-4A40-B7E6-B102EE2DF24D} = {2BBD7364-054F-4693-97CD-1C395E3E84A9}
|
||||||
{1FC10261-EC0D-416A-9B66-C55F0A34968C} = {AB9CA2B8-6F70-431C-8A1D-67479D8A7BE4}
|
{1FC10261-EC0D-416A-9B66-C55F0A34968C} = {AB9CA2B8-6F70-431C-8A1D-67479D8A7BE4}
|
||||||
|
{3F82F298-700A-48DF-8A69-D048DFBA782C} = {2BBD7364-054F-4693-97CD-1C395E3E84A9}
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
SolutionGuid = {B31CDF4B-2851-45E5-8C5F-BE97125D9DD8}
|
SolutionGuid = {B31CDF4B-2851-45E5-8C5F-BE97125D9DD8}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.BatchParser
|
namespace Microsoft.SqlTools.ServiceLayer.BatchParser
|
||||||
{
|
{
|
||||||
internal enum BatchParserAction
|
public enum BatchParserAction
|
||||||
{
|
{
|
||||||
Continue = 0,
|
Continue = 0,
|
||||||
Abort = 1
|
Abort = 1
|
||||||
@@ -7,7 +7,7 @@ using System;
|
|||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.BatchParser
|
namespace Microsoft.SqlTools.ServiceLayer.BatchParser
|
||||||
{
|
{
|
||||||
internal sealed class BatchParserException : Exception
|
public sealed class BatchParserException : Exception
|
||||||
{
|
{
|
||||||
const string ErrorCodeName = "ErrorCode";
|
const string ErrorCodeName = "ErrorCode";
|
||||||
const string BeginName = "Begin";
|
const string BeginName = "Begin";
|
||||||
@@ -10,6 +10,7 @@ using System.IO;
|
|||||||
using Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode;
|
using Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
using Microsoft.SqlTools.ManagedBatchParser;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.BatchParser
|
namespace Microsoft.SqlTools.ServiceLayer.BatchParser
|
||||||
{
|
{
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.BatchParser
|
namespace Microsoft.SqlTools.ServiceLayer.BatchParser
|
||||||
{
|
{
|
||||||
internal enum ErrorCode
|
public enum ErrorCode
|
||||||
{
|
{
|
||||||
ErrorCodeBase = 0,
|
ErrorCodeBase = 0,
|
||||||
|
|
||||||
@@ -11,13 +11,14 @@ using System.Diagnostics.CodeAnalysis;
|
|||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection;
|
using Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection;
|
||||||
using Microsoft.SqlTools.Utility;
|
using Microsoft.SqlTools.Utility;
|
||||||
|
using Microsoft.SqlTools.ManagedBatchParser;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode
|
namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Single batch of SQL command
|
/// Single batch of SQL command
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal class Batch
|
public class Batch
|
||||||
{
|
{
|
||||||
#region Private methods
|
#region Private methods
|
||||||
|
|
||||||
@@ -5,13 +5,14 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Data.SqlClient;
|
using System.Data.SqlClient;
|
||||||
|
using Microsoft.SqlTools.ManagedBatchParser;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode
|
namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Error totalAffectedRows for a Batch
|
/// Error totalAffectedRows for a Batch
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal class BatchErrorEventArgs : EventArgs
|
public class BatchErrorEventArgs : EventArgs
|
||||||
{
|
{
|
||||||
#region Private Fields
|
#region Private Fields
|
||||||
private string message = string.Empty;
|
private string message = string.Empty;
|
||||||
@@ -11,7 +11,7 @@ namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Event args for notification about non-error message
|
/// Event args for notification about non-error message
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal class BatchMessageEventArgs : EventArgs
|
public class BatchMessageEventArgs : EventArgs
|
||||||
{
|
{
|
||||||
private readonly string message = string.Empty;
|
private readonly string message = string.Empty;
|
||||||
private readonly string detailedMessage = string.Empty;
|
private readonly string detailedMessage = string.Empty;
|
||||||
@@ -10,7 +10,7 @@ namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class that parses queries into batches
|
/// Class that parses queries into batches
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal class BatchParser :
|
public class BatchParser :
|
||||||
ICommandHandler,
|
ICommandHandler,
|
||||||
IVariableResolver
|
IVariableResolver
|
||||||
{
|
{
|
||||||
@@ -153,7 +153,7 @@ namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode
|
|||||||
throw new NotImplementedException("The method or operation is not implemented.");
|
throw new NotImplementedException("The method or operation is not implemented.");
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void DisableVariableSubstitution()
|
public void DisableVariableSubstitution()
|
||||||
{
|
{
|
||||||
variableSubstitutionDisabled = true;
|
variableSubstitutionDisabled = true;
|
||||||
}
|
}
|
||||||
@@ -8,7 +8,7 @@ namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class associated with batch parser execution errors
|
/// Class associated with batch parser execution errors
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal class BatchParserExecutionErrorEventArgs : BatchErrorEventArgs
|
public class BatchParserExecutionErrorEventArgs : BatchErrorEventArgs
|
||||||
{
|
{
|
||||||
private readonly ScriptMessageType messageType;
|
private readonly ScriptMessageType messageType;
|
||||||
|
|
||||||
@@ -10,7 +10,7 @@ namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class associated with batch parser execution finished event
|
/// Class associated with batch parser execution finished event
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal class BatchParserExecutionFinishedEventArgs : EventArgs
|
public class BatchParserExecutionFinishedEventArgs : EventArgs
|
||||||
{
|
{
|
||||||
|
|
||||||
private readonly Batch batch = null;
|
private readonly Batch batch = null;
|
||||||
@@ -11,7 +11,7 @@ namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class associated with batch parser execution start event
|
/// Class associated with batch parser execution start event
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal class BatchParserExecutionStartEventArgs : EventArgs
|
public class BatchParserExecutionStartEventArgs : EventArgs
|
||||||
{
|
{
|
||||||
|
|
||||||
private readonly Batch batch = null;
|
private readonly Batch batch = null;
|
||||||
@@ -8,13 +8,14 @@ using System.Collections.Generic;
|
|||||||
using System.Data.SqlClient;
|
using System.Data.SqlClient;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using Microsoft.SqlTools.ManagedBatchParser;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode
|
namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class for handling SQL CMD by Batch Parser
|
/// Class for handling SQL CMD by Batch Parser
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal class BatchParserSqlCmd : BatchParser
|
public class BatchParserSqlCmd : BatchParser
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The internal variables that can be used in SqlCommand substitution.
|
/// The internal variables that can be used in SqlCommand substitution.
|
||||||
@@ -37,13 +38,13 @@ namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode
|
|||||||
// nothing
|
// nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
internal ConnectionChangedDelegate ConnectionChanged
|
public ConnectionChangedDelegate ConnectionChanged
|
||||||
{
|
{
|
||||||
get { return connectionChangedDelegate; }
|
get { return connectionChangedDelegate; }
|
||||||
set { connectionChangedDelegate = value; }
|
set { connectionChangedDelegate = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
internal ErrorActionChangedDelegate ErrorActionChanged
|
public ErrorActionChangedDelegate ErrorActionChanged
|
||||||
{
|
{
|
||||||
get { return errorActionChangedDelegate; }
|
get { return errorActionChangedDelegate; }
|
||||||
set { errorActionChangedDelegate = value; }
|
set { errorActionChangedDelegate = value; }
|
||||||
@@ -11,7 +11,7 @@ namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class associated with setting batch results
|
/// Class associated with setting batch results
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal class BatchResultSetEventArgs : EventArgs
|
public class BatchResultSetEventArgs : EventArgs
|
||||||
{
|
{
|
||||||
|
|
||||||
private readonly IDataReader dataReader = null;
|
private readonly IDataReader dataReader = null;
|
||||||
@@ -12,6 +12,7 @@ using System.Diagnostics.CodeAnalysis;
|
|||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using Microsoft.SqlTools.ManagedBatchParser;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection;
|
using Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection;
|
||||||
using Microsoft.SqlTools.Utility;
|
using Microsoft.SqlTools.Utility;
|
||||||
|
|
||||||
@@ -20,7 +21,7 @@ namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Execution engine class which executed the parsed batches
|
/// Execution engine class which executed the parsed batches
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal class ExecutionEngine : IDisposable
|
public class ExecutionEngine : IDisposable
|
||||||
{
|
{
|
||||||
|
|
||||||
#region Private fields
|
#region Private fields
|
||||||
@@ -8,7 +8,7 @@ using Microsoft.SqlTools.Utility;
|
|||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode
|
namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode
|
||||||
{
|
{
|
||||||
internal class ExecutionEngineConditions
|
public class ExecutionEngineConditions
|
||||||
{
|
{
|
||||||
|
|
||||||
#region Private fields
|
#region Private fields
|
||||||
@@ -7,7 +7,7 @@ using System;
|
|||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode
|
namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode
|
||||||
{
|
{
|
||||||
internal interface IBatchEventsHandler
|
public interface IBatchEventsHandler
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// fired when there is an error message from the server
|
/// fired when there is an error message from the server
|
||||||
@@ -10,7 +10,7 @@ using System.Data.SqlClient;
|
|||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode
|
namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode
|
||||||
{
|
{
|
||||||
internal class ScriptExecutionArgs : EventArgs
|
public class ScriptExecutionArgs : EventArgs
|
||||||
{
|
{
|
||||||
private IDbConnection connection;
|
private IDbConnection connection;
|
||||||
private IBatchEventsHandler batchEventHandlers;
|
private IBatchEventsHandler batchEventHandlers;
|
||||||
@@ -7,7 +7,7 @@ using System;
|
|||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode
|
namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode
|
||||||
{
|
{
|
||||||
internal class ScriptExecutionFinishedEventArgs : EventArgs
|
public class ScriptExecutionFinishedEventArgs : EventArgs
|
||||||
{
|
{
|
||||||
internal ScriptExecutionFinishedEventArgs(ScriptExecutionResult result)
|
internal ScriptExecutionFinishedEventArgs(ScriptExecutionResult result)
|
||||||
{
|
{
|
||||||
@@ -8,7 +8,7 @@ using System;
|
|||||||
namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode
|
namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode
|
||||||
{
|
{
|
||||||
[Flags]
|
[Flags]
|
||||||
internal enum ScriptExecutionResult
|
public enum ScriptExecutionResult
|
||||||
{
|
{
|
||||||
Success = 0x1,
|
Success = 0x1,
|
||||||
Failure = 0x2,
|
Failure = 0x2,
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode
|
namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode
|
||||||
{
|
{
|
||||||
internal enum ScriptMessageType
|
public enum ScriptMessageType
|
||||||
{
|
{
|
||||||
FatalError,
|
FatalError,
|
||||||
Error,
|
Error,
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode
|
namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode
|
||||||
{
|
{
|
||||||
[System.Flags]
|
[System.Flags]
|
||||||
internal enum ShowPlanType
|
public enum ShowPlanType
|
||||||
{
|
{
|
||||||
None = 0x0,
|
None = 0x0,
|
||||||
ActualExecutionShowPlan = 0x1,
|
ActualExecutionShowPlan = 0x1,
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode
|
namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode
|
||||||
{
|
{
|
||||||
internal struct TextSpan
|
public struct TextSpan
|
||||||
{
|
{
|
||||||
public int iEndIndex;
|
public int iEndIndex;
|
||||||
public int iEndLine;
|
public int iEndLine;
|
||||||
@@ -7,7 +7,7 @@ using System.IO;
|
|||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.BatchParser
|
namespace Microsoft.SqlTools.ServiceLayer.BatchParser
|
||||||
{
|
{
|
||||||
internal interface ICommandHandler
|
public interface ICommandHandler
|
||||||
{
|
{
|
||||||
BatchParserAction Go(TextBlock batch, int repeatCount);
|
BatchParserAction Go(TextBlock batch, int repeatCount);
|
||||||
BatchParserAction OnError(Token token, OnErrorAction action);
|
BatchParserAction OnError(Token token, OnErrorAction action);
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.BatchParser
|
namespace Microsoft.SqlTools.ServiceLayer.BatchParser
|
||||||
{
|
{
|
||||||
internal interface IVariableResolver
|
public interface IVariableResolver
|
||||||
{
|
{
|
||||||
string GetVariable(PositionStruct pos, string name);
|
string GetVariable(PositionStruct pos, string name);
|
||||||
void SetVariable(PositionStruct pos, string name, string value);
|
void SetVariable(PositionStruct pos, string name, string value);
|
||||||
@@ -8,13 +8,14 @@ using System.Collections.Generic;
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using Microsoft.SqlTools.ManagedBatchParser;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.BatchParser
|
namespace Microsoft.SqlTools.ServiceLayer.BatchParser
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Lexer class for the SMO Batch Parser
|
/// Lexer class for the SMO Batch Parser
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal sealed class Lexer : IDisposable
|
public sealed class Lexer : IDisposable
|
||||||
{
|
{
|
||||||
private LexerInput currentInput;
|
private LexerInput currentInput;
|
||||||
private bool popInputAtNextConsume;
|
private bool popInputAtNextConsume;
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.BatchParser
|
namespace Microsoft.SqlTools.ServiceLayer.BatchParser
|
||||||
{
|
{
|
||||||
internal enum LexerTokenType
|
public enum LexerTokenType
|
||||||
{
|
{
|
||||||
None,
|
None,
|
||||||
Text,
|
Text,
|
||||||
@@ -11,7 +11,7 @@ namespace Microsoft.SqlTools.ServiceLayer.BatchParser
|
|||||||
/// This class gives information about lines being parsed by
|
/// This class gives information about lines being parsed by
|
||||||
/// the Batch Parser
|
/// the Batch Parser
|
||||||
/// </summary>
|
/// </summary>
|
||||||
class LineInfo
|
public class LineInfo
|
||||||
{
|
{
|
||||||
private IEnumerable<Token> tokens;
|
private IEnumerable<Token> tokens;
|
||||||
private IEnumerable<VariableReference> variableRefs;
|
private IEnumerable<VariableReference> variableRefs;
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.BatchParser
|
namespace Microsoft.SqlTools.ServiceLayer.BatchParser
|
||||||
{
|
{
|
||||||
internal enum OnErrorAction
|
public enum OnErrorAction
|
||||||
{
|
{
|
||||||
Ignore = 0,
|
Ignore = 0,
|
||||||
Exit = 1,
|
Exit = 1,
|
||||||
@@ -10,13 +10,14 @@ using System.Globalization;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Security;
|
using System.Security;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using Microsoft.SqlTools.ManagedBatchParser;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.BatchParser
|
namespace Microsoft.SqlTools.ServiceLayer.BatchParser
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The Parser class on which the Batch Parser is based on
|
/// The Parser class on which the Batch Parser is based on
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal sealed class Parser : IDisposable
|
public sealed class Parser : IDisposable
|
||||||
{
|
{
|
||||||
private readonly ICommandHandler commandHandler;
|
private readonly ICommandHandler commandHandler;
|
||||||
private Lexer lexer;
|
private Lexer lexer;
|
||||||
@@ -224,7 +225,7 @@ namespace Microsoft.SqlTools.ServiceLayer.BatchParser
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void Parse()
|
public void Parse()
|
||||||
{
|
{
|
||||||
Accept();
|
Accept();
|
||||||
ParseLines();
|
ParseLines();
|
||||||
@@ -8,7 +8,7 @@ using System;
|
|||||||
namespace Microsoft.SqlTools.ServiceLayer.BatchParser
|
namespace Microsoft.SqlTools.ServiceLayer.BatchParser
|
||||||
{
|
{
|
||||||
[Serializable]
|
[Serializable]
|
||||||
internal struct PositionStruct
|
public struct PositionStruct
|
||||||
{
|
{
|
||||||
private readonly int line;
|
private readonly int line;
|
||||||
private readonly int column;
|
private readonly int column;
|
||||||
@@ -3,12 +3,12 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
using System.Text;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.BatchParser
|
namespace Microsoft.SqlTools.ServiceLayer.BatchParser
|
||||||
{
|
{
|
||||||
internal class TextBlock
|
public class TextBlock
|
||||||
{
|
{
|
||||||
private readonly Parser parser;
|
private readonly Parser parser;
|
||||||
private readonly IEnumerable<Token> tokens;
|
private readonly IEnumerable<Token> tokens;
|
||||||
@@ -63,6 +63,5 @@ namespace Microsoft.SqlTools.ServiceLayer.BatchParser
|
|||||||
lineInfo = new LineInfo(tokens, variableRefs);
|
lineInfo = new LineInfo(tokens, variableRefs);
|
||||||
text = sb.ToString();
|
text = sb.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.BatchParser
|
namespace Microsoft.SqlTools.ServiceLayer.BatchParser
|
||||||
{
|
{
|
||||||
internal sealed class Token
|
public sealed class Token
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Token class used by the lexer in Batch Parser
|
/// Token class used by the lexer in Batch Parser
|
||||||
@@ -8,7 +8,7 @@ namespace Microsoft.SqlTools.ServiceLayer.BatchParser
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class for reference of variables used by the lexer
|
/// Class for reference of variables used by the lexer
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal sealed class VariableReference
|
public sealed class VariableReference
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructor method for VariableReference class
|
/// Constructor method for VariableReference class
|
||||||
381
src/Microsoft.SqlTools.ManagedBatchParser/Localization/sr.cs
Normal file
381
src/Microsoft.SqlTools.ManagedBatchParser/Localization/sr.cs
Normal file
@@ -0,0 +1,381 @@
|
|||||||
|
// WARNING:
|
||||||
|
// This file was generated by the Microsoft DataWarehouse String Resource Tool 1.37.0.0
|
||||||
|
// from information in sr.strings
|
||||||
|
// DO NOT MODIFY THIS FILE'S CONTENTS, THEY WILL BE OVERWRITTEN
|
||||||
|
//
|
||||||
|
namespace Microsoft.SqlTools.ManagedBatchParser
|
||||||
|
{
|
||||||
|
using System;
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Resources;
|
||||||
|
using System.Globalization;
|
||||||
|
|
||||||
|
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
internal class SR
|
||||||
|
{
|
||||||
|
protected SR()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
public static CultureInfo Culture
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Keys.Culture;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
Keys.Culture = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static string EE_BatchSqlMessageNoProcedureInfo
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Keys.GetString(Keys.EE_BatchSqlMessageNoProcedureInfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string EE_BatchSqlMessageWithProcedureInfo
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Keys.GetString(Keys.EE_BatchSqlMessageWithProcedureInfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string EE_BatchSqlMessageNoLineInfo
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Keys.GetString(Keys.EE_BatchSqlMessageNoLineInfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string EE_BatchError_Exception
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Keys.GetString(Keys.EE_BatchError_Exception);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string EE_BatchExecutionInfo_RowsAffected
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Keys.GetString(Keys.EE_BatchExecutionInfo_RowsAffected);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string EE_ExecutionNotYetCompleteError
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Keys.GetString(Keys.EE_ExecutionNotYetCompleteError);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string EE_ScriptError_Error
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Keys.GetString(Keys.EE_ScriptError_Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string EE_ScriptError_ParsingSyntax
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Keys.GetString(Keys.EE_ScriptError_ParsingSyntax);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string EE_ScriptError_FatalError
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Keys.GetString(Keys.EE_ScriptError_FatalError);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string EE_ExecutionInfo_FinalizingLoop
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Keys.GetString(Keys.EE_ExecutionInfo_FinalizingLoop);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string EE_ExecutionInfo_QueryCancelledbyUser
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Keys.GetString(Keys.EE_ExecutionInfo_QueryCancelledbyUser);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string EE_BatchExecutionError_Halting
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Keys.GetString(Keys.EE_BatchExecutionError_Halting);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string EE_BatchExecutionError_Ignoring
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Keys.GetString(Keys.EE_BatchExecutionError_Ignoring);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string EE_ExecutionInfo_InitializingLoop
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Keys.GetString(Keys.EE_ExecutionInfo_InitializingLoop);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string EE_ExecutionError_CommandNotSupported
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Keys.GetString(Keys.EE_ExecutionError_CommandNotSupported);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string EE_ExecutionError_VariableNotFound
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Keys.GetString(Keys.EE_ExecutionError_VariableNotFound);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string BatchParserWrapperExecutionEngineError
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Keys.GetString(Keys.BatchParserWrapperExecutionEngineError);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string BatchParserWrapperExecutionError
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Keys.GetString(Keys.BatchParserWrapperExecutionError);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string BatchParserWrapperExecutionEngineBatchMessage
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Keys.GetString(Keys.BatchParserWrapperExecutionEngineBatchMessage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string BatchParserWrapperExecutionEngineBatchResultSetProcessing
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Keys.GetString(Keys.BatchParserWrapperExecutionEngineBatchResultSetProcessing);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string BatchParserWrapperExecutionEngineBatchResultSetFinished
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Keys.GetString(Keys.BatchParserWrapperExecutionEngineBatchResultSetFinished);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string BatchParserWrapperExecutionEngineBatchCancelling
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Keys.GetString(Keys.BatchParserWrapperExecutionEngineBatchCancelling);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string EE_ScriptError_Warning
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Keys.GetString(Keys.EE_ScriptError_Warning);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string TroubleshootingAssistanceMessage
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Keys.GetString(Keys.TroubleshootingAssistanceMessage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string BatchParser_CircularReference
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Keys.GetString(Keys.BatchParser_CircularReference);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string BatchParser_CommentNotTerminated
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Keys.GetString(Keys.BatchParser_CommentNotTerminated);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string BatchParser_StringNotTerminated
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Keys.GetString(Keys.BatchParser_StringNotTerminated);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string BatchParser_IncorrectSyntax
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Keys.GetString(Keys.BatchParser_IncorrectSyntax);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string BatchParser_VariableNotDefined
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Keys.GetString(Keys.BatchParser_VariableNotDefined);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
public class Keys
|
||||||
|
{
|
||||||
|
static ResourceManager resourceManager = new ResourceManager("Microsoft.SqlTools.ManagedBatchParser.Localization.SR", typeof(SR).GetTypeInfo().Assembly);
|
||||||
|
|
||||||
|
static CultureInfo _culture = null;
|
||||||
|
|
||||||
|
|
||||||
|
public const string EE_BatchSqlMessageNoProcedureInfo = "EE_BatchSqlMessageNoProcedureInfo";
|
||||||
|
|
||||||
|
|
||||||
|
public const string EE_BatchSqlMessageWithProcedureInfo = "EE_BatchSqlMessageWithProcedureInfo";
|
||||||
|
|
||||||
|
|
||||||
|
public const string EE_BatchSqlMessageNoLineInfo = "EE_BatchSqlMessageNoLineInfo";
|
||||||
|
|
||||||
|
|
||||||
|
public const string EE_BatchError_Exception = "EE_BatchError_Exception";
|
||||||
|
|
||||||
|
|
||||||
|
public const string EE_BatchExecutionInfo_RowsAffected = "EE_BatchExecutionInfo_RowsAffected";
|
||||||
|
|
||||||
|
|
||||||
|
public const string EE_ExecutionNotYetCompleteError = "EE_ExecutionNotYetCompleteError";
|
||||||
|
|
||||||
|
|
||||||
|
public const string EE_ScriptError_Error = "EE_ScriptError_Error";
|
||||||
|
|
||||||
|
|
||||||
|
public const string EE_ScriptError_ParsingSyntax = "EE_ScriptError_ParsingSyntax";
|
||||||
|
|
||||||
|
|
||||||
|
public const string EE_ScriptError_FatalError = "EE_ScriptError_FatalError";
|
||||||
|
|
||||||
|
|
||||||
|
public const string EE_ExecutionInfo_FinalizingLoop = "EE_ExecutionInfo_FinalizingLoop";
|
||||||
|
|
||||||
|
|
||||||
|
public const string EE_ExecutionInfo_QueryCancelledbyUser = "EE_ExecutionInfo_QueryCancelledbyUser";
|
||||||
|
|
||||||
|
|
||||||
|
public const string EE_BatchExecutionError_Halting = "EE_BatchExecutionError_Halting";
|
||||||
|
|
||||||
|
|
||||||
|
public const string EE_BatchExecutionError_Ignoring = "EE_BatchExecutionError_Ignoring";
|
||||||
|
|
||||||
|
|
||||||
|
public const string EE_ExecutionInfo_InitializingLoop = "EE_ExecutionInfo_InitializingLoop";
|
||||||
|
|
||||||
|
|
||||||
|
public const string EE_ExecutionError_CommandNotSupported = "EE_ExecutionError_CommandNotSupported";
|
||||||
|
|
||||||
|
|
||||||
|
public const string EE_ExecutionError_VariableNotFound = "EE_ExecutionError_VariableNotFound";
|
||||||
|
|
||||||
|
|
||||||
|
public const string BatchParserWrapperExecutionEngineError = "BatchParserWrapperExecutionEngineError";
|
||||||
|
|
||||||
|
|
||||||
|
public const string BatchParserWrapperExecutionError = "BatchParserWrapperExecutionError";
|
||||||
|
|
||||||
|
|
||||||
|
public const string BatchParserWrapperExecutionEngineBatchMessage = "BatchParserWrapperExecutionEngineBatchMessage";
|
||||||
|
|
||||||
|
|
||||||
|
public const string BatchParserWrapperExecutionEngineBatchResultSetProcessing = "BatchParserWrapperExecutionEngineBatchResultSetProcessing";
|
||||||
|
|
||||||
|
|
||||||
|
public const string BatchParserWrapperExecutionEngineBatchResultSetFinished = "BatchParserWrapperExecutionEngineBatchResultSetFinished";
|
||||||
|
|
||||||
|
|
||||||
|
public const string BatchParserWrapperExecutionEngineBatchCancelling = "BatchParserWrapperExecutionEngineBatchCancelling";
|
||||||
|
|
||||||
|
|
||||||
|
public const string EE_ScriptError_Warning = "EE_ScriptError_Warning";
|
||||||
|
|
||||||
|
|
||||||
|
public const string TroubleshootingAssistanceMessage = "TroubleshootingAssistanceMessage";
|
||||||
|
|
||||||
|
|
||||||
|
public const string BatchParser_CircularReference = "BatchParser_CircularReference";
|
||||||
|
|
||||||
|
|
||||||
|
public const string BatchParser_CommentNotTerminated = "BatchParser_CommentNotTerminated";
|
||||||
|
|
||||||
|
|
||||||
|
public const string BatchParser_StringNotTerminated = "BatchParser_StringNotTerminated";
|
||||||
|
|
||||||
|
|
||||||
|
public const string BatchParser_IncorrectSyntax = "BatchParser_IncorrectSyntax";
|
||||||
|
|
||||||
|
|
||||||
|
public const string BatchParser_VariableNotDefined = "BatchParser_VariableNotDefined";
|
||||||
|
|
||||||
|
|
||||||
|
private Keys()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
public static CultureInfo Culture
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return _culture;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_culture = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string GetString(string key)
|
||||||
|
{
|
||||||
|
return resourceManager.GetString(key, _culture);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
236
src/Microsoft.SqlTools.ManagedBatchParser/Localization/sr.resx
Normal file
236
src/Microsoft.SqlTools.ManagedBatchParser/Localization/sr.resx
Normal file
@@ -0,0 +1,236 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype=">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version=">2.0</resheader>
|
||||||
|
<resheader name="reader=">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer=">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1="><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing=">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64=">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64=">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata=">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true=">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded=">
|
||||||
|
<xsd:element name="metadata=">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly=">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data=">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader=">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<data name="EE_BatchSqlMessageNoProcedureInfo" xml:space="preserve">
|
||||||
|
<value>Msg {0}, Level {1}, State {2}, Line {3}</value>
|
||||||
|
<comment></comment>
|
||||||
|
</data>
|
||||||
|
<data name="EE_BatchSqlMessageWithProcedureInfo" xml:space="preserve">
|
||||||
|
<value>Msg {0}, Level {1}, State {2}, Procedure {3}, Line {4}</value>
|
||||||
|
<comment></comment>
|
||||||
|
</data>
|
||||||
|
<data name="EE_BatchSqlMessageNoLineInfo" xml:space="preserve">
|
||||||
|
<value>Msg {0}, Level {1}, State {2}</value>
|
||||||
|
<comment></comment>
|
||||||
|
</data>
|
||||||
|
<data name="EE_BatchError_Exception" xml:space="preserve">
|
||||||
|
<value>An error occurred while the batch was being processed. The error message is: {0}</value>
|
||||||
|
<comment></comment>
|
||||||
|
</data>
|
||||||
|
<data name="EE_BatchExecutionInfo_RowsAffected" xml:space="preserve">
|
||||||
|
<value>({0} row(s) affected)</value>
|
||||||
|
<comment></comment>
|
||||||
|
</data>
|
||||||
|
<data name="EE_ExecutionNotYetCompleteError" xml:space="preserve">
|
||||||
|
<value>The previous execution is not yet complete.</value>
|
||||||
|
<comment></comment>
|
||||||
|
</data>
|
||||||
|
<data name="EE_ScriptError_Error" xml:space="preserve">
|
||||||
|
<value>A scripting error occurred.</value>
|
||||||
|
<comment></comment>
|
||||||
|
</data>
|
||||||
|
<data name="EE_ScriptError_ParsingSyntax" xml:space="preserve">
|
||||||
|
<value>Incorrect syntax was encountered while {0} was being parsed.</value>
|
||||||
|
<comment></comment>
|
||||||
|
</data>
|
||||||
|
<data name="EE_ScriptError_FatalError" xml:space="preserve">
|
||||||
|
<value>A fatal error occurred.</value>
|
||||||
|
<comment></comment>
|
||||||
|
</data>
|
||||||
|
<data name="EE_ExecutionInfo_FinalizingLoop" xml:space="preserve">
|
||||||
|
<value>Batch execution completed {0} times...</value>
|
||||||
|
<comment></comment>
|
||||||
|
</data>
|
||||||
|
<data name="EE_ExecutionInfo_QueryCancelledbyUser" xml:space="preserve">
|
||||||
|
<value>You cancelled the query.</value>
|
||||||
|
<comment></comment>
|
||||||
|
</data>
|
||||||
|
<data name="EE_BatchExecutionError_Halting" xml:space="preserve">
|
||||||
|
<value>An error occurred while the batch was being executed.</value>
|
||||||
|
<comment></comment>
|
||||||
|
</data>
|
||||||
|
<data name="EE_BatchExecutionError_Ignoring" xml:space="preserve">
|
||||||
|
<value>An error occurred while the batch was being executed, but the error has been ignored.</value>
|
||||||
|
<comment></comment>
|
||||||
|
</data>
|
||||||
|
<data name="EE_ExecutionInfo_InitializingLoop" xml:space="preserve">
|
||||||
|
<value>Beginning execution loop</value>
|
||||||
|
<comment></comment>
|
||||||
|
</data>
|
||||||
|
<data name="EE_ExecutionError_CommandNotSupported" xml:space="preserve">
|
||||||
|
<value>Command {0} is not supported.</value>
|
||||||
|
<comment></comment>
|
||||||
|
</data>
|
||||||
|
<data name="EE_ExecutionError_VariableNotFound" xml:space="preserve">
|
||||||
|
<value>The variable {0} could not be found.</value>
|
||||||
|
<comment></comment>
|
||||||
|
</data>
|
||||||
|
<data name="BatchParserWrapperExecutionEngineError" xml:space="preserve">
|
||||||
|
<value>SQL Execution error: {0}</value>
|
||||||
|
<comment></comment>
|
||||||
|
</data>
|
||||||
|
<data name="BatchParserWrapperExecutionError" xml:space="preserve">
|
||||||
|
<value>Batch parser wrapper execution: {0} found... at line {1}: {2} Description: {3}</value>
|
||||||
|
<comment></comment>
|
||||||
|
</data>
|
||||||
|
<data name="BatchParserWrapperExecutionEngineBatchMessage" xml:space="preserve">
|
||||||
|
<value>Batch parser wrapper execution engine batch message received: Message: {0} Detailed message: {1}</value>
|
||||||
|
<comment></comment>
|
||||||
|
</data>
|
||||||
|
<data name="BatchParserWrapperExecutionEngineBatchResultSetProcessing" xml:space="preserve">
|
||||||
|
<value>Batch parser wrapper execution engine batch ResultSet processing: DataReader.FieldCount: {0} DataReader.RecordsAffected: {1}</value>
|
||||||
|
<comment></comment>
|
||||||
|
</data>
|
||||||
|
<data name="BatchParserWrapperExecutionEngineBatchResultSetFinished" xml:space="preserve">
|
||||||
|
<value>Batch parser wrapper execution engine batch ResultSet finished.</value>
|
||||||
|
<comment></comment>
|
||||||
|
</data>
|
||||||
|
<data name="BatchParserWrapperExecutionEngineBatchCancelling" xml:space="preserve">
|
||||||
|
<value>Canceling batch parser wrapper batch execution.</value>
|
||||||
|
<comment></comment>
|
||||||
|
</data>
|
||||||
|
<data name="EE_ScriptError_Warning" xml:space="preserve">
|
||||||
|
<value>Scripting warning.</value>
|
||||||
|
<comment></comment>
|
||||||
|
</data>
|
||||||
|
<data name="TroubleshootingAssistanceMessage" xml:space="preserve">
|
||||||
|
<value>For more information about this error, see the troubleshooting topics in the product documentation.</value>
|
||||||
|
<comment></comment>
|
||||||
|
</data>
|
||||||
|
<data name="BatchParser_CircularReference" xml:space="preserve">
|
||||||
|
<value>File '{0}' recursively included.</value>
|
||||||
|
<comment></comment>
|
||||||
|
</data>
|
||||||
|
<data name="BatchParser_CommentNotTerminated" xml:space="preserve">
|
||||||
|
<value>Missing end comment mark '*/'.</value>
|
||||||
|
<comment></comment>
|
||||||
|
</data>
|
||||||
|
<data name="BatchParser_StringNotTerminated" xml:space="preserve">
|
||||||
|
<value>Unclosed quotation mark after the character string.</value>
|
||||||
|
<comment></comment>
|
||||||
|
</data>
|
||||||
|
<data name="BatchParser_IncorrectSyntax" xml:space="preserve">
|
||||||
|
<value>Incorrect syntax was encountered while parsing '{0}'.</value>
|
||||||
|
<comment></comment>
|
||||||
|
</data>
|
||||||
|
<data name="BatchParser_VariableNotDefined" xml:space="preserve">
|
||||||
|
<value>Variable {0} is not defined.</value>
|
||||||
|
<comment></comment>
|
||||||
|
</data>
|
||||||
|
</root>
|
||||||
@@ -0,0 +1,84 @@
|
|||||||
|
# String resource file
|
||||||
|
#
|
||||||
|
# When processed by the String Resource Tool, this file generates
|
||||||
|
# both a .CS and a .RESX file with the same name as the file.
|
||||||
|
# The .CS file contains a class which can be used to access these
|
||||||
|
# string resources, including the ability to format in
|
||||||
|
# parameters, which are identified with the .NET {x} format
|
||||||
|
# (see String.Format help).
|
||||||
|
#
|
||||||
|
# Comments below assume the file name is SR.strings.
|
||||||
|
#
|
||||||
|
# Lines starting with a semicolon ";" are also treated as comments, but
|
||||||
|
# in a future version they will be extracted and made available in LocStudio
|
||||||
|
# Put your comments to localizers _before_ the string they apply to.
|
||||||
|
#
|
||||||
|
# SMO build specific comment
|
||||||
|
# after generating the .resx file, run srgen on it and get the .resx file
|
||||||
|
# please remember to also check that .resx in, along with the
|
||||||
|
# .strings and .cs files
|
||||||
|
|
||||||
|
[strings]
|
||||||
|
|
||||||
|
|
||||||
|
############################################################################
|
||||||
|
# DacFx Resources
|
||||||
|
|
||||||
|
EE_BatchSqlMessageNoProcedureInfo = Msg {0}, Level {1}, State {2}, Line {3}
|
||||||
|
|
||||||
|
EE_BatchSqlMessageWithProcedureInfo = Msg {0}, Level {1}, State {2}, Procedure {3}, Line {4}
|
||||||
|
|
||||||
|
EE_BatchSqlMessageNoLineInfo = Msg {0}, Level {1}, State {2}
|
||||||
|
|
||||||
|
EE_BatchError_Exception = An error occurred while the batch was being processed. The error message is: {0}
|
||||||
|
|
||||||
|
EE_BatchExecutionInfo_RowsAffected = ({0} row(s) affected)
|
||||||
|
|
||||||
|
EE_ExecutionNotYetCompleteError = The previous execution is not yet complete.
|
||||||
|
|
||||||
|
EE_ScriptError_Error = A scripting error occurred.
|
||||||
|
|
||||||
|
EE_ScriptError_ParsingSyntax = Incorrect syntax was encountered while {0} was being parsed.
|
||||||
|
|
||||||
|
EE_ScriptError_FatalError = A fatal error occurred.
|
||||||
|
|
||||||
|
EE_ExecutionInfo_FinalizingLoop = Batch execution completed {0} times...
|
||||||
|
|
||||||
|
EE_ExecutionInfo_QueryCancelledbyUser = You cancelled the query.
|
||||||
|
|
||||||
|
EE_BatchExecutionError_Halting = An error occurred while the batch was being executed.
|
||||||
|
|
||||||
|
EE_BatchExecutionError_Ignoring = An error occurred while the batch was being executed, but the error has been ignored.
|
||||||
|
|
||||||
|
EE_ExecutionInfo_InitializingLoop = Beginning execution loop
|
||||||
|
|
||||||
|
EE_ExecutionError_CommandNotSupported = Command {0} is not supported.
|
||||||
|
|
||||||
|
EE_ExecutionError_VariableNotFound = The variable {0} could not be found.
|
||||||
|
|
||||||
|
BatchParserWrapperExecutionEngineError = SQL Execution error: {0}
|
||||||
|
|
||||||
|
BatchParserWrapperExecutionError = Batch parser wrapper execution: {0} found... at line {1}: {2} Description: {3}
|
||||||
|
|
||||||
|
BatchParserWrapperExecutionEngineBatchMessage = Batch parser wrapper execution engine batch message received: Message: {0} Detailed message: {1}
|
||||||
|
|
||||||
|
BatchParserWrapperExecutionEngineBatchResultSetProcessing = Batch parser wrapper execution engine batch ResultSet processing: DataReader.FieldCount: {0} DataReader.RecordsAffected: {1}
|
||||||
|
|
||||||
|
BatchParserWrapperExecutionEngineBatchResultSetFinished = Batch parser wrapper execution engine batch ResultSet finished.
|
||||||
|
|
||||||
|
BatchParserWrapperExecutionEngineBatchCancelling = Canceling batch parser wrapper batch execution.
|
||||||
|
|
||||||
|
EE_ScriptError_Warning = Scripting warning.
|
||||||
|
|
||||||
|
TroubleshootingAssistanceMessage = For more information about this error, see the troubleshooting topics in the product documentation.
|
||||||
|
|
||||||
|
BatchParser_CircularReference = File '{0}' recursively included.
|
||||||
|
|
||||||
|
BatchParser_CommentNotTerminated = Missing end comment mark '*/'.
|
||||||
|
|
||||||
|
BatchParser_StringNotTerminated = Unclosed quotation mark after the character string.
|
||||||
|
|
||||||
|
BatchParser_IncorrectSyntax = Incorrect syntax was encountered while parsing '{0}'.
|
||||||
|
|
||||||
|
BatchParser_VariableNotDefined = Variable {0} is not defined.
|
||||||
|
|
||||||
152
src/Microsoft.SqlTools.ManagedBatchParser/Localization/sr.xlf
Normal file
152
src/Microsoft.SqlTools.ManagedBatchParser/Localization/sr.xlf
Normal file
@@ -0,0 +1,152 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
|
||||||
|
<file datatype="xml" original="sr.resx" source-language="en">
|
||||||
|
<body>
|
||||||
|
<trans-unit id="EE_BatchSqlMessageNoProcedureInfo">
|
||||||
|
<source>Msg {0}, Level {1}, State {2}, Line {3}</source>
|
||||||
|
<target state="new">Msg {0}, Level {1}, State {2}, Line {3}</target>
|
||||||
|
<note></note>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="EE_BatchSqlMessageWithProcedureInfo">
|
||||||
|
<source>Msg {0}, Level {1}, State {2}, Procedure {3}, Line {4}</source>
|
||||||
|
<target state="new">Msg {0}, Level {1}, State {2}, Procedure {3}, Line {4}</target>
|
||||||
|
<note></note>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="EE_BatchSqlMessageNoLineInfo">
|
||||||
|
<source>Msg {0}, Level {1}, State {2}</source>
|
||||||
|
<target state="new">Msg {0}, Level {1}, State {2}</target>
|
||||||
|
<note></note>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="EE_BatchError_Exception">
|
||||||
|
<source>An error occurred while the batch was being processed. The error message is: {0}</source>
|
||||||
|
<target state="new">An error occurred while the batch was being processed. The error message is: {0}</target>
|
||||||
|
<note></note>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="EE_BatchExecutionInfo_RowsAffected">
|
||||||
|
<source>({0} row(s) affected)</source>
|
||||||
|
<target state="new">({0} row(s) affected)</target>
|
||||||
|
<note></note>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="EE_ExecutionNotYetCompleteError">
|
||||||
|
<source>The previous execution is not yet complete.</source>
|
||||||
|
<target state="new">The previous execution is not yet complete.</target>
|
||||||
|
<note></note>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="EE_ScriptError_Error">
|
||||||
|
<source>A scripting error occurred.</source>
|
||||||
|
<target state="new">A scripting error occurred.</target>
|
||||||
|
<note></note>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="EE_ScriptError_ParsingSyntax">
|
||||||
|
<source>Incorrect syntax was encountered while {0} was being parsed.</source>
|
||||||
|
<target state="new">Incorrect syntax was encountered while {0} was being parsed.</target>
|
||||||
|
<note></note>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="EE_ScriptError_FatalError">
|
||||||
|
<source>A fatal error occurred.</source>
|
||||||
|
<target state="new">A fatal error occurred.</target>
|
||||||
|
<note></note>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="EE_ExecutionInfo_FinalizingLoop">
|
||||||
|
<source>Batch execution completed {0} times...</source>
|
||||||
|
<target state="new">Batch execution completed {0} times...</target>
|
||||||
|
<note></note>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="EE_ExecutionInfo_QueryCancelledbyUser">
|
||||||
|
<source>You cancelled the query.</source>
|
||||||
|
<target state="new">You cancelled the query.</target>
|
||||||
|
<note></note>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="EE_BatchExecutionError_Halting">
|
||||||
|
<source>An error occurred while the batch was being executed.</source>
|
||||||
|
<target state="new">An error occurred while the batch was being executed.</target>
|
||||||
|
<note></note>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="EE_BatchExecutionError_Ignoring">
|
||||||
|
<source>An error occurred while the batch was being executed, but the error has been ignored.</source>
|
||||||
|
<target state="new">An error occurred while the batch was being executed, but the error has been ignored.</target>
|
||||||
|
<note></note>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="EE_ExecutionInfo_InitializingLoop">
|
||||||
|
<source>Beginning execution loop</source>
|
||||||
|
<target state="new">Beginning execution loop</target>
|
||||||
|
<note></note>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="EE_ExecutionError_CommandNotSupported">
|
||||||
|
<source>Command {0} is not supported.</source>
|
||||||
|
<target state="new">Command {0} is not supported.</target>
|
||||||
|
<note></note>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="EE_ExecutionError_VariableNotFound">
|
||||||
|
<source>The variable {0} could not be found.</source>
|
||||||
|
<target state="new">The variable {0} could not be found.</target>
|
||||||
|
<note></note>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="BatchParserWrapperExecutionEngineError">
|
||||||
|
<source>SQL Execution error: {0}</source>
|
||||||
|
<target state="new">SQL Execution error: {0}</target>
|
||||||
|
<note></note>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="BatchParserWrapperExecutionError">
|
||||||
|
<source>Batch parser wrapper execution: {0} found... at line {1}: {2} Description: {3}</source>
|
||||||
|
<target state="new">Batch parser wrapper execution: {0} found... at line {1}: {2} Description: {3}</target>
|
||||||
|
<note></note>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="BatchParserWrapperExecutionEngineBatchMessage">
|
||||||
|
<source>Batch parser wrapper execution engine batch message received: Message: {0} Detailed message: {1}</source>
|
||||||
|
<target state="new">Batch parser wrapper execution engine batch message received: Message: {0} Detailed message: {1}</target>
|
||||||
|
<note></note>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="BatchParserWrapperExecutionEngineBatchResultSetProcessing">
|
||||||
|
<source>Batch parser wrapper execution engine batch ResultSet processing: DataReader.FieldCount: {0} DataReader.RecordsAffected: {1}</source>
|
||||||
|
<target state="new">Batch parser wrapper execution engine batch ResultSet processing: DataReader.FieldCount: {0} DataReader.RecordsAffected: {1}</target>
|
||||||
|
<note></note>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="BatchParserWrapperExecutionEngineBatchResultSetFinished">
|
||||||
|
<source>Batch parser wrapper execution engine batch ResultSet finished.</source>
|
||||||
|
<target state="new">Batch parser wrapper execution engine batch ResultSet finished.</target>
|
||||||
|
<note></note>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="BatchParserWrapperExecutionEngineBatchCancelling">
|
||||||
|
<source>Canceling batch parser wrapper batch execution.</source>
|
||||||
|
<target state="new">Canceling batch parser wrapper batch execution.</target>
|
||||||
|
<note></note>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="EE_ScriptError_Warning">
|
||||||
|
<source>Scripting warning.</source>
|
||||||
|
<target state="new">Scripting warning.</target>
|
||||||
|
<note></note>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="TroubleshootingAssistanceMessage">
|
||||||
|
<source>For more information about this error, see the troubleshooting topics in the product documentation.</source>
|
||||||
|
<target state="new">For more information about this error, see the troubleshooting topics in the product documentation.</target>
|
||||||
|
<note></note>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="BatchParser_CircularReference">
|
||||||
|
<source>File '{0}' recursively included.</source>
|
||||||
|
<target state="new">File '{0}' recursively included.</target>
|
||||||
|
<note></note>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="BatchParser_CommentNotTerminated">
|
||||||
|
<source>Missing end comment mark '*/'.</source>
|
||||||
|
<target state="new">Missing end comment mark '*/'.</target>
|
||||||
|
<note></note>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="BatchParser_StringNotTerminated">
|
||||||
|
<source>Unclosed quotation mark after the character string.</source>
|
||||||
|
<target state="new">Unclosed quotation mark after the character string.</target>
|
||||||
|
<note></note>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="BatchParser_IncorrectSyntax">
|
||||||
|
<source>Incorrect syntax was encountered while parsing '{0}'.</source>
|
||||||
|
<target state="new">Incorrect syntax was encountered while parsing '{0}'.</target>
|
||||||
|
<note></note>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="BatchParser_VariableNotDefined">
|
||||||
|
<source>Variable {0} is not defined.</source>
|
||||||
|
<target state="new">Variable {0} is not defined.</target>
|
||||||
|
<note></note>
|
||||||
|
</trans-unit>
|
||||||
|
</body>
|
||||||
|
</file>
|
||||||
|
</xliff>
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>netstandard2.0</TargetFramework>
|
||||||
|
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||||
|
<EnableDefaultEmbeddedResourceItems>false</EnableDefaultEmbeddedResourceItems>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Folder Include="Localization\transXliff\" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.SqlServer.SqlManagementObjects" Version="150.18040.0-preview" />
|
||||||
|
<PackageReference Include="System.Data.SqlClient" Version="4.6.0" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="Localization\sr.resx" />
|
||||||
|
<None Include="Localization\sr.strings" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Microsoft.SqlTools.Hosting\Microsoft.SqlTools.Hosting.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
//
|
||||||
|
// Copyright (c) Microsoft. All rights reserved.
|
||||||
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
|
//
|
||||||
|
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// General Information about an assembly is controlled through the following
|
||||||
|
// set of attributes. Change these attribute values to modify the information
|
||||||
|
// associated with an assembly.
|
||||||
|
[assembly: AssemblyTitle("Microsoft.SqlTools.ManagedBatchParser")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("Microsoft.SqlTools.ManagedBatchParser")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 2019")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// Setting ComVisible to false makes the types in this assembly not visible
|
||||||
|
// to COM components. If you need to access a type in this assembly from
|
||||||
|
// COM, set the ComVisible attribute to true on that type.
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||||
|
[assembly: Guid("82dd9738-2ad3-4eb3-9f80-18b594e03621")]
|
||||||
|
|
||||||
|
// Version information for an assembly consists of the following four values:
|
||||||
|
//
|
||||||
|
// Major Version
|
||||||
|
// Minor Version
|
||||||
|
// Build Number
|
||||||
|
// Revision
|
||||||
|
//
|
||||||
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||||
|
[assembly: InternalsVisibleTo("Microsoft.SqlTools.ServiceLayer.UnitTests")]
|
||||||
|
[assembly: InternalsVisibleTo("Microsoft.SqlTools.ServiceLayer.IntegrationTests")]
|
||||||
|
[assembly: InternalsVisibleTo("Microsoft.SqlTools.ServiceLayer.Test.Common")]
|
||||||
|
[assembly: InternalsVisibleTo("MicrosoftSqlToolsServiceLayer")]
|
||||||
|
[assembly: InternalsVisibleTo("Microsoft.SqlTools.ManagedBatchParser.UnitTests")]
|
||||||
@@ -16,11 +16,11 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
/// cannot rely on the registry to supply override values therefore setting overrides must be made
|
/// cannot rely on the registry to supply override values therefore setting overrides must be made
|
||||||
/// by the top-of-the-stack
|
/// by the top-of-the-stack
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal sealed class AmbientSettings
|
public sealed class AmbientSettings
|
||||||
{
|
{
|
||||||
private const string LogicalContextName = "__LocalContextConfigurationName";
|
private const string LogicalContextName = "__LocalContextConfigurationName";
|
||||||
|
|
||||||
internal enum StreamBackingStore
|
public enum StreamBackingStore
|
||||||
{
|
{
|
||||||
// MemoryStream
|
// MemoryStream
|
||||||
Memory = 0,
|
Memory = 0,
|
||||||
@@ -49,7 +49,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
internal const string DoNotSerializeQueryStoreSettingsIndex = "DoNotSerializeQueryStoreSettings";
|
internal const string DoNotSerializeQueryStoreSettingsIndex = "DoNotSerializeQueryStoreSettings";
|
||||||
internal const string AlwaysEncryptedWizardMigrationIndex = "AlwaysEncryptedWizardMigration";
|
internal const string AlwaysEncryptedWizardMigrationIndex = "AlwaysEncryptedWizardMigration";
|
||||||
|
|
||||||
internal static AmbientData _defaultSettings;
|
public static AmbientData _defaultSettings;
|
||||||
|
|
||||||
static AmbientSettings()
|
static AmbientSettings()
|
||||||
{
|
{
|
||||||
@@ -291,25 +291,25 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
set { _configuration[ImportModelDatabaseIndex].Value = value; }
|
set { _configuration[ImportModelDatabaseIndex].Value = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
internal bool SupportAlwaysEncrypted
|
public bool SupportAlwaysEncrypted
|
||||||
{
|
{
|
||||||
get { return (bool)_configuration[SupportAlwaysEncryptedIndex].Value; }
|
get { return (bool)_configuration[SupportAlwaysEncryptedIndex].Value; }
|
||||||
set { _configuration[SupportAlwaysEncryptedIndex].Value = value; }
|
set { _configuration[SupportAlwaysEncryptedIndex].Value = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
internal bool AlwaysEncryptedWizardMigration
|
public bool AlwaysEncryptedWizardMigration
|
||||||
{
|
{
|
||||||
get { return (bool)_configuration[AlwaysEncryptedWizardMigrationIndex].Value; }
|
get { return (bool)_configuration[AlwaysEncryptedWizardMigrationIndex].Value; }
|
||||||
set { _configuration[AlwaysEncryptedWizardMigrationIndex].Value = value; }
|
set { _configuration[AlwaysEncryptedWizardMigrationIndex].Value = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
internal bool SkipObjectTypeBlocking
|
public bool SkipObjectTypeBlocking
|
||||||
{
|
{
|
||||||
get { return (bool)_configuration[SkipObjectTypeBlockingIndex].Value; }
|
get { return (bool)_configuration[SkipObjectTypeBlockingIndex].Value; }
|
||||||
set { _configuration[SkipObjectTypeBlockingIndex].Value = value; }
|
set { _configuration[SkipObjectTypeBlockingIndex].Value = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
internal bool DoNotSerializeQueryStoreSettings
|
public bool DoNotSerializeQueryStoreSettings
|
||||||
{
|
{
|
||||||
get { return (bool)_configuration[DoNotSerializeQueryStoreSettingsIndex].Value; }
|
get { return (bool)_configuration[DoNotSerializeQueryStoreSettingsIndex].Value; }
|
||||||
set { _configuration[DoNotSerializeQueryStoreSettingsIndex].Value = value; }
|
set { _configuration[DoNotSerializeQueryStoreSettingsIndex].Value = value; }
|
||||||
@@ -17,7 +17,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// This class caches server information for subsequent use
|
/// This class caches server information for subsequent use
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal class CachedServerInfo
|
public class CachedServerInfo
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Singleton service instance
|
/// Singleton service instance
|
||||||
@@ -115,7 +115,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
/// Internal constructor for testing purposes. For all code use, please use the <see cref="CachedServerInfo.Instance"/>
|
/// Internal constructor for testing purposes. For all code use, please use the <see cref="CachedServerInfo.Instance"/>
|
||||||
/// default instance.
|
/// default instance.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal CachedServerInfo()
|
public CachedServerInfo()
|
||||||
{
|
{
|
||||||
_cache = new ConcurrentDictionary<CacheKey, CachedInfo>();
|
_cache = new ConcurrentDictionary<CacheKey, CachedInfo>();
|
||||||
_cacheLock = new object();
|
_cacheLock = new object();
|
||||||
@@ -175,7 +175,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
AddOrUpdateCache(builder, newState, cacheVar);
|
AddOrUpdateCache(builder, newState, cacheVar);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void AddOrUpdateCache(SqlConnectionStringBuilder builder, bool newState, CacheVariable cacheVar)
|
public void AddOrUpdateCache(SqlConnectionStringBuilder builder, bool newState, CacheVariable cacheVar)
|
||||||
{
|
{
|
||||||
Validate.IsNotNull(nameof(builder), builder);
|
Validate.IsNotNull(nameof(builder), builder);
|
||||||
Validate.IsNotNullOrWhitespaceString(nameof(builder) + ".DataSource", builder.DataSource);
|
Validate.IsNotNullOrWhitespaceString(nameof(builder) + ".DataSource", builder.DataSource);
|
||||||
@@ -15,7 +15,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
/// the objects are just data-transfer-objects initialized during construction.
|
/// the objects are just data-transfer-objects initialized during construction.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Serializable]
|
[Serializable]
|
||||||
internal class DataSchemaError
|
public class DataSchemaError
|
||||||
{
|
{
|
||||||
internal const string DefaultPrefix = "SQL";
|
internal const string DefaultPrefix = "SQL";
|
||||||
private const int MaxErrorCode = 99999;
|
private const int MaxErrorCode = 99999;
|
||||||
@@ -182,7 +182,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
get { return FormatErrorCode(Prefix, ErrorCode); }
|
get { return FormatErrorCode(Prefix, ErrorCode); }
|
||||||
}
|
}
|
||||||
|
|
||||||
internal Boolean IsBuildErrorCodeDefined
|
public Boolean IsBuildErrorCodeDefined
|
||||||
{
|
{
|
||||||
get { return (ErrorCode != UndefinedErrorCode); }
|
get { return (ErrorCode != UndefinedErrorCode); }
|
||||||
}
|
}
|
||||||
@@ -190,9 +190,9 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// true if this error is being displayed in ErrorList. More of an Accounting Mechanism to be used internally.
|
/// true if this error is being displayed in ErrorList. More of an Accounting Mechanism to be used internally.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal bool IsOnDisplay { get; set; }
|
public bool IsOnDisplay { get; set; }
|
||||||
|
|
||||||
internal static string FormatErrorCode(string prefix, int code)
|
public static string FormatErrorCode(string prefix, int code)
|
||||||
{
|
{
|
||||||
return string.Format(
|
return string.Format(
|
||||||
CultureInfo.InvariantCulture,
|
CultureInfo.InvariantCulture,
|
||||||
@@ -15,7 +15,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
/// Wraps <see cref="IDbCommand"/> objects that could be a <see cref="SqlCommand"/> or
|
/// Wraps <see cref="IDbCommand"/> objects that could be a <see cref="SqlCommand"/> or
|
||||||
/// a <see cref="ReliableSqlConnection.ReliableSqlCommand"/>, providing common methods across both.
|
/// a <see cref="ReliableSqlConnection.ReliableSqlCommand"/>, providing common methods across both.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal sealed class DbCommandWrapper
|
public sealed class DbCommandWrapper
|
||||||
{
|
{
|
||||||
private readonly IDbCommand _command;
|
private readonly IDbCommand _command;
|
||||||
private readonly bool _isReliableCommand;
|
private readonly bool _isReliableCommand;
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
||||||
{
|
{
|
||||||
internal enum ErrorSeverity
|
public enum ErrorSeverity
|
||||||
{
|
{
|
||||||
Unknown = 0,
|
Unknown = 0,
|
||||||
Error,
|
Error,
|
||||||
@@ -12,7 +12,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
/// top-of-stack API. Changes made to this context's AmbientData instance will
|
/// top-of-stack API. Changes made to this context's AmbientData instance will
|
||||||
/// flow to lower in the stack while this object is not disposed.
|
/// flow to lower in the stack while this object is not disposed.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal interface IStackSettingsContext : IDisposable
|
public interface IStackSettingsContext : IDisposable
|
||||||
{
|
{
|
||||||
AmbientSettings.AmbientData Settings { get; }
|
AmbientSettings.AmbientData Settings { get; }
|
||||||
}
|
}
|
||||||
@@ -16,7 +16,7 @@ using Microsoft.SqlServer.Management.Common;
|
|||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
||||||
{
|
{
|
||||||
internal static class ReliableConnectionHelper
|
public static class ReliableConnectionHelper
|
||||||
{
|
{
|
||||||
private const int PCU1BuildNumber = 2816;
|
private const int PCU1BuildNumber = 2816;
|
||||||
public readonly static SqlConnectionStringBuilder BuilderWithDefaultApplicationName = new SqlConnectionStringBuilder("server=(local);");
|
public readonly static SqlConnectionStringBuilder BuilderWithDefaultApplicationName = new SqlConnectionStringBuilder("server=(local);");
|
||||||
@@ -705,6 +705,13 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
public Dictionary<string, object> Options { get; set; }
|
public Dictionary<string, object> Options { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class ClusterEndpoint
|
||||||
|
{
|
||||||
|
public string ServiceName;
|
||||||
|
public string IpAddress;
|
||||||
|
public int Port;
|
||||||
|
}
|
||||||
|
|
||||||
public static bool TryGetServerVersion(string connectionString, out ServerInfo serverInfo, string azureAccountToken)
|
public static bool TryGetServerVersion(string connectionString, out ServerInfo serverInfo, string azureAccountToken)
|
||||||
{
|
{
|
||||||
serverInfo = null;
|
serverInfo = null;
|
||||||
@@ -902,7 +909,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
public string DatabaseName;
|
public string DatabaseName;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static bool TryGetConnectionStringBuilder(string connectionString, out SqlConnectionStringBuilder builder)
|
public static bool TryGetConnectionStringBuilder(string connectionString, out SqlConnectionStringBuilder builder)
|
||||||
{
|
{
|
||||||
builder = null;
|
builder = null;
|
||||||
|
|
||||||
@@ -35,9 +35,9 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
/// Provides a reliable way of opening connections to and executing commands
|
/// Provides a reliable way of opening connections to and executing commands
|
||||||
/// taking into account potential network unreliability and a requirement for connection retry.
|
/// taking into account potential network unreliability and a requirement for connection retry.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal sealed partial class ReliableSqlConnection
|
public sealed partial class ReliableSqlConnection
|
||||||
{
|
{
|
||||||
internal class ReliableSqlCommand : DbCommand
|
public class ReliableSqlCommand : DbCommand
|
||||||
{
|
{
|
||||||
private const int Dummy = 0;
|
private const int Dummy = 0;
|
||||||
private readonly SqlCommand _command;
|
private readonly SqlCommand _command;
|
||||||
@@ -230,12 +230,12 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
_command.Prepare();
|
_command.Prepare();
|
||||||
}
|
}
|
||||||
|
|
||||||
internal SqlCommand GetUnderlyingCommand()
|
public SqlCommand GetUnderlyingCommand()
|
||||||
{
|
{
|
||||||
return _command;
|
return _command;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void ValidateConnectionIsSet()
|
public void ValidateConnectionIsSet()
|
||||||
{
|
{
|
||||||
if (_connection == null)
|
if (_connection == null)
|
||||||
{
|
{
|
||||||
@@ -41,7 +41,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
/// Provides a reliable way of opening connections to and executing commands
|
/// Provides a reliable way of opening connections to and executing commands
|
||||||
/// taking into account potential network unreliability and a requirement for connection retry.
|
/// taking into account potential network unreliability and a requirement for connection retry.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal sealed partial class ReliableSqlConnection : DbConnection, IDisposable
|
public sealed partial class ReliableSqlConnection : DbConnection, IDisposable
|
||||||
{
|
{
|
||||||
private const string QueryAzureSessionId = "SELECT CONVERT(NVARCHAR(36), CONTEXT_INFO())";
|
private const string QueryAzureSessionId = "SELECT CONVERT(NVARCHAR(36), CONTEXT_INFO())";
|
||||||
|
|
||||||
@@ -493,7 +493,7 @@ SET NUMERIC_ROUNDABORT OFF;";
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Because retry loses session settings, cache session settings or reply if the settings are already cached.
|
// Because retry loses session settings, cache session settings or reply if the settings are already cached.
|
||||||
internal Tuple<string, bool>[] CacheOrReplaySessionSettings(IDbCommand originalCommand, Tuple<string, bool>[] sessionSettings)
|
public Tuple<string, bool>[] CacheOrReplaySessionSettings(IDbCommand originalCommand, Tuple<string, bool>[] sessionSettings)
|
||||||
{
|
{
|
||||||
if (sessionSettings == null)
|
if (sessionSettings == null)
|
||||||
{
|
{
|
||||||
@@ -8,7 +8,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Contains string resources used throughout ReliableConnection code.
|
/// Contains string resources used throughout ReliableConnection code.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static class Resources
|
public static class Resources
|
||||||
{
|
{
|
||||||
internal static string AmbientSettingFormat
|
internal static string AmbientSettingFormat
|
||||||
{
|
{
|
||||||
@@ -18,7 +18,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static string ConnectionPassedToIsCloudShouldBeOpen
|
public static string ConnectionPassedToIsCloudShouldBeOpen
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
@@ -26,7 +26,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static string ConnectionPropertyNotSet
|
public static string ConnectionPropertyNotSet
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
@@ -34,7 +34,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static string ExceptionCannotBeRetried
|
public static string ExceptionCannotBeRetried
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
@@ -42,7 +42,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static string ErrorParsingConnectionString
|
public static string ErrorParsingConnectionString
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
@@ -50,7 +50,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static string FailedToCacheIsCloud
|
public static string FailedToCacheIsCloud
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
@@ -58,7 +58,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static string FailedToParseConnectionString
|
public static string FailedToParseConnectionString
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
@@ -66,7 +66,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static string IgnoreOnException
|
public static string IgnoreOnException
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
@@ -74,7 +74,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static string InvalidCommandType
|
public static string InvalidCommandType
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
@@ -82,7 +82,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static string InvalidConnectionType
|
public static string InvalidConnectionType
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
@@ -106,7 +106,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static string OnlyReliableConnectionSupported
|
public static string OnlyReliableConnectionSupported
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
@@ -114,7 +114,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static string RetryOnException
|
public static string RetryOnException
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
@@ -130,7 +130,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static string UnableToAssignValue
|
public static string UnableToAssignValue
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
@@ -138,7 +138,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static string UnableToRetrieveAzureSessionId
|
public static string UnableToRetrieveAzureSessionId
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
@@ -32,13 +32,13 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
/// exception to notify the retry policy that no further retry attempts are required.
|
/// exception to notify the retry policy that no further retry attempts are required.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Serializable]
|
[Serializable]
|
||||||
internal sealed class RetryLimitExceededException : Exception
|
public sealed class RetryLimitExceededException : Exception
|
||||||
{
|
{
|
||||||
internal RetryLimitExceededException() : base()
|
public RetryLimitExceededException() : base()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
internal RetryLimitExceededException(string m, Exception e) : base(m, e)
|
public RetryLimitExceededException(string m, Exception e) : base(m, e)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9,12 +9,12 @@ using Microsoft.SqlTools.Utility;
|
|||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
||||||
{
|
{
|
||||||
internal abstract partial class RetryPolicy
|
public abstract partial class RetryPolicy
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Provides the error detection logic for temporary faults that are commonly found during data transfer.
|
/// Provides the error detection logic for temporary faults that are commonly found during data transfer.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal class DataTransferErrorDetectionStrategy : ErrorDetectionStrategyBase
|
public class DataTransferErrorDetectionStrategy : ErrorDetectionStrategyBase
|
||||||
{
|
{
|
||||||
private static readonly DataTransferErrorDetectionStrategy instance = new DataTransferErrorDetectionStrategy();
|
private static readonly DataTransferErrorDetectionStrategy instance = new DataTransferErrorDetectionStrategy();
|
||||||
|
|
||||||
@@ -8,7 +8,7 @@ using System.Data.SqlClient;
|
|||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
||||||
{
|
{
|
||||||
internal abstract partial class RetryPolicy
|
public abstract partial class RetryPolicy
|
||||||
{
|
{
|
||||||
public interface IErrorDetectionStrategy
|
public interface IErrorDetectionStrategy
|
||||||
{
|
{
|
||||||
@@ -31,7 +31,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
/// Base class with common retry logic. The core behavior for retrying non SqlExceptions is the same
|
/// Base class with common retry logic. The core behavior for retrying non SqlExceptions is the same
|
||||||
/// across retry policies
|
/// across retry policies
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal abstract class ErrorDetectionStrategyBase : IErrorDetectionStrategy
|
public abstract class ErrorDetectionStrategyBase : IErrorDetectionStrategy
|
||||||
{
|
{
|
||||||
public bool CanRetry(Exception ex)
|
public bool CanRetry(Exception ex)
|
||||||
{
|
{
|
||||||
@@ -7,13 +7,13 @@ using System.Data.SqlClient;
|
|||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
||||||
{
|
{
|
||||||
internal abstract partial class RetryPolicy
|
public abstract partial class RetryPolicy
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Provides the error detection logic for temporary faults that are commonly found in SQL Azure.
|
/// Provides the error detection logic for temporary faults that are commonly found in SQL Azure.
|
||||||
/// The same errors CAN occur on premise also, but they are not seen as often.
|
/// The same errors CAN occur on premise also, but they are not seen as often.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal sealed class NetworkConnectivityErrorDetectionStrategy : ErrorDetectionStrategyBase
|
public sealed class NetworkConnectivityErrorDetectionStrategy : ErrorDetectionStrategyBase
|
||||||
{
|
{
|
||||||
private static NetworkConnectivityErrorDetectionStrategy instance = new NetworkConnectivityErrorDetectionStrategy();
|
private static NetworkConnectivityErrorDetectionStrategy instance = new NetworkConnectivityErrorDetectionStrategy();
|
||||||
|
|
||||||
@@ -8,7 +8,7 @@ using System.Data.SqlClient;
|
|||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
||||||
{
|
{
|
||||||
internal abstract partial class RetryPolicy
|
public abstract partial class RetryPolicy
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Provides the error detection logic for temporary faults that are commonly found in SQL Azure.
|
/// Provides the error detection logic for temporary faults that are commonly found in SQL Azure.
|
||||||
@@ -18,7 +18,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
/// want to consider this as passing since the first execution that has timed out (or failed for some other temporary error)
|
/// want to consider this as passing since the first execution that has timed out (or failed for some other temporary error)
|
||||||
/// might have managed to create the object.
|
/// might have managed to create the object.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal class SqlAzureTemporaryAndIgnorableErrorDetectionStrategy : ErrorDetectionStrategyBase
|
public class SqlAzureTemporaryAndIgnorableErrorDetectionStrategy : ErrorDetectionStrategyBase
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Azure error that can be ignored
|
/// Azure error that can be ignored
|
||||||
@@ -7,7 +7,7 @@ using System.Data.SqlClient;
|
|||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
||||||
{
|
{
|
||||||
internal abstract partial class RetryPolicy
|
public abstract partial class RetryPolicy
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Provides the error detection logic for temporary faults that are commonly found in SQL Azure.
|
/// Provides the error detection logic for temporary faults that are commonly found in SQL Azure.
|
||||||
@@ -13,7 +13,7 @@ using System.Text.RegularExpressions;
|
|||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
||||||
{
|
{
|
||||||
internal abstract partial class RetryPolicy
|
public abstract partial class RetryPolicy
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Implements an object holding the decoded reason code returned from SQL Azure when encountering throttling conditions.
|
/// Implements an object holding the decoded reason code returned from SQL Azure when encountering throttling conditions.
|
||||||
@@ -36,19 +36,19 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Implements a policy defining and implementing the retry mechanism for unreliable actions.
|
/// Implements a policy defining and implementing the retry mechanism for unreliable actions.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal abstract partial class RetryPolicy
|
public abstract partial class RetryPolicy
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defines a callback delegate which will be invoked whenever a retry condition is encountered.
|
/// Defines a callback delegate which will be invoked whenever a retry condition is encountered.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="retryState">The state of current retry attempt.</param>
|
/// <param name="retryState">The state of current retry attempt.</param>
|
||||||
internal delegate void RetryCallbackDelegate(RetryState retryState);
|
public delegate void RetryCallbackDelegate(RetryState retryState);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defines a callback delegate which will be invoked whenever an error is ignored on retry.
|
/// Defines a callback delegate which will be invoked whenever an error is ignored on retry.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="retryState">The state of current retry attempt.</param>
|
/// <param name="retryState">The state of current retry attempt.</param>
|
||||||
internal delegate void IgnoreErrorCallbackDelegate(RetryState retryState);
|
public delegate void IgnoreErrorCallbackDelegate(RetryState retryState);
|
||||||
|
|
||||||
private readonly IErrorDetectionStrategy _errorDetectionStrategy;
|
private readonly IErrorDetectionStrategy _errorDetectionStrategy;
|
||||||
|
|
||||||
@@ -106,7 +106,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// This flag is currently being used for TESTING PURPOSES ONLY.
|
/// This flag is currently being used for TESTING PURPOSES ONLY.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
internal bool ShouldIgnoreOnFirstTry
|
public bool ShouldIgnoreOnFirstTry
|
||||||
{
|
{
|
||||||
get;
|
get;
|
||||||
set;
|
set;
|
||||||
@@ -292,7 +292,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
internal static int? GetErrorNumber(Exception ex)
|
public static int? GetErrorNumber(Exception ex)
|
||||||
{
|
{
|
||||||
SqlException sqlEx = ex as SqlException;
|
SqlException sqlEx = ex as SqlException;
|
||||||
if (sqlEx == null)
|
if (sqlEx == null)
|
||||||
@@ -331,7 +331,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal class FixedDelayPolicy : RetryPolicy
|
public class FixedDelayPolicy : RetryPolicy
|
||||||
{
|
{
|
||||||
private readonly int _maxRetryCount;
|
private readonly int _maxRetryCount;
|
||||||
private readonly TimeSpan _intervalBetweenRetries;
|
private readonly TimeSpan _intervalBetweenRetries;
|
||||||
@@ -367,7 +367,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal class ProgressiveRetryPolicy : RetryPolicy
|
public class ProgressiveRetryPolicy : RetryPolicy
|
||||||
{
|
{
|
||||||
private readonly int _maxRetryCount;
|
private readonly int _maxRetryCount;
|
||||||
private readonly TimeSpan _initialInterval;
|
private readonly TimeSpan _initialInterval;
|
||||||
@@ -453,7 +453,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal class TimeBasedRetryPolicy : RetryPolicy
|
public class TimeBasedRetryPolicy : RetryPolicy
|
||||||
{
|
{
|
||||||
private readonly TimeSpan _minTotalRetryTimeLimit;
|
private readonly TimeSpan _minTotalRetryTimeLimit;
|
||||||
private readonly TimeSpan _maxTotalRetryTimeLimit;
|
private readonly TimeSpan _maxTotalRetryTimeLimit;
|
||||||
@@ -533,7 +533,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
return new RetryStateEx { TotalRetryTime = TimeSpan.Zero };
|
return new RetryStateEx { TotalRetryTime = TimeSpan.Zero };
|
||||||
}
|
}
|
||||||
|
|
||||||
internal sealed class RetryStateEx : RetryState
|
public sealed class RetryStateEx : RetryState
|
||||||
{
|
{
|
||||||
public TimeSpan TotalRetryTime { get; set; }
|
public TimeSpan TotalRetryTime { get; set; }
|
||||||
}
|
}
|
||||||
@@ -61,7 +61,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Implements a collection of the RetryPolicyInfo elements holding retry policy settings.
|
/// Implements a collection of the RetryPolicyInfo elements holding retry policy settings.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal sealed class RetryPolicyFactory
|
public sealed class RetryPolicyFactory
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns a default policy that does no retries, it just invokes action exactly once.
|
/// Returns a default policy that does no retries, it just invokes action exactly once.
|
||||||
@@ -77,7 +77,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
/// Implements a strategy that ignores any transient errors.
|
/// Implements a strategy that ignores any transient errors.
|
||||||
/// Internal for testing purposes only
|
/// Internal for testing purposes only
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal sealed class TransientErrorIgnoreStrategy : RetryPolicy.IErrorDetectionStrategy
|
public sealed class TransientErrorIgnoreStrategy : RetryPolicy.IErrorDetectionStrategy
|
||||||
{
|
{
|
||||||
private static readonly TransientErrorIgnoreStrategy _instance = new TransientErrorIgnoreStrategy();
|
private static readonly TransientErrorIgnoreStrategy _instance = new TransientErrorIgnoreStrategy();
|
||||||
|
|
||||||
@@ -101,7 +101,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
/// Creates and returns a default Retry Policy for Schema based operations.
|
/// Creates and returns a default Retry Policy for Schema based operations.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>An instance of <see cref="RetryPolicy"/> class.</returns>
|
/// <returns>An instance of <see cref="RetryPolicy"/> class.</returns>
|
||||||
internal static RetryPolicy CreateDefaultSchemaCommandRetryPolicy(bool useRetry, int retriesPerPhase = RetryPolicyDefaults.DefaulSchemaRetryCount)
|
public static RetryPolicy CreateDefaultSchemaCommandRetryPolicy(bool useRetry, int retriesPerPhase = RetryPolicyDefaults.DefaulSchemaRetryCount)
|
||||||
{
|
{
|
||||||
RetryPolicy policy;
|
RetryPolicy policy;
|
||||||
|
|
||||||
@@ -128,7 +128,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>The RetryOccured event is wired to raise an RaiseAmbientRetryMessage message for a connection retry. </remarks>
|
/// <remarks>The RetryOccured event is wired to raise an RaiseAmbientRetryMessage message for a connection retry. </remarks>
|
||||||
/// <returns>An instance of <see cref="RetryPolicy"/> class.</returns>
|
/// <returns>An instance of <see cref="RetryPolicy"/> class.</returns>
|
||||||
internal static RetryPolicy CreateSchemaConnectionRetryPolicy(int retriesPerPhase)
|
public static RetryPolicy CreateSchemaConnectionRetryPolicy(int retriesPerPhase)
|
||||||
{
|
{
|
||||||
RetryPolicy policy = new RetryPolicy.ExponentialDelayRetryPolicy(
|
RetryPolicy policy = new RetryPolicy.ExponentialDelayRetryPolicy(
|
||||||
RetryPolicy.SqlAzureTemporaryErrorDetectionStrategy.Instance,
|
RetryPolicy.SqlAzureTemporaryErrorDetectionStrategy.Instance,
|
||||||
@@ -145,7 +145,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>The RetryOccured event is wired to raise an RaiseAmbientRetryMessage message for a command retry. </remarks>
|
/// <remarks>The RetryOccured event is wired to raise an RaiseAmbientRetryMessage message for a command retry. </remarks>
|
||||||
/// <returns>An instance of <see cref="RetryPolicy"/> class.</returns>
|
/// <returns>An instance of <see cref="RetryPolicy"/> class.</returns>
|
||||||
internal static RetryPolicy CreateSchemaCommandRetryPolicy(int retriesPerPhase)
|
public static RetryPolicy CreateSchemaCommandRetryPolicy(int retriesPerPhase)
|
||||||
{
|
{
|
||||||
RetryPolicy policy = new RetryPolicy.ExponentialDelayRetryPolicy(
|
RetryPolicy policy = new RetryPolicy.ExponentialDelayRetryPolicy(
|
||||||
RetryPolicy.SqlAzureTemporaryErrorDetectionStrategy.Instance,
|
RetryPolicy.SqlAzureTemporaryErrorDetectionStrategy.Instance,
|
||||||
@@ -167,7 +167,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
/// The IgnoreErrorOccurred event is wired to raise an RaiseAmbientIgnoreMessage message for ignore.
|
/// The IgnoreErrorOccurred event is wired to raise an RaiseAmbientIgnoreMessage message for ignore.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <returns>An instance of <see cref="RetryPolicy"/> class.</returns>
|
/// <returns>An instance of <see cref="RetryPolicy"/> class.</returns>
|
||||||
internal static RetryPolicy CreateDatabaseCommandRetryPolicy(params int[] ignorableErrorNumbers)
|
public static RetryPolicy CreateDatabaseCommandRetryPolicy(params int[] ignorableErrorNumbers)
|
||||||
{
|
{
|
||||||
RetryPolicy.SqlAzureTemporaryAndIgnorableErrorDetectionStrategy errorDetectionStrategy =
|
RetryPolicy.SqlAzureTemporaryAndIgnorableErrorDetectionStrategy errorDetectionStrategy =
|
||||||
new RetryPolicy.SqlAzureTemporaryAndIgnorableErrorDetectionStrategy(ignorableErrorNumbers);
|
new RetryPolicy.SqlAzureTemporaryAndIgnorableErrorDetectionStrategy(ignorableErrorNumbers);
|
||||||
@@ -196,7 +196,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
/// The IgnoreErrorOccurred event is wired to raise an RaiseAmbientIgnoreMessage message for ignore.
|
/// The IgnoreErrorOccurred event is wired to raise an RaiseAmbientIgnoreMessage message for ignore.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <returns>An instance of <see cref="RetryPolicy"/> class.</returns>
|
/// <returns>An instance of <see cref="RetryPolicy"/> class.</returns>
|
||||||
internal static RetryPolicy CreateElementCommandRetryPolicy(params int[] ignorableErrorNumbers)
|
public static RetryPolicy CreateElementCommandRetryPolicy(params int[] ignorableErrorNumbers)
|
||||||
{
|
{
|
||||||
Debug.Assert(ignorableErrorNumbers != null);
|
Debug.Assert(ignorableErrorNumbers != null);
|
||||||
|
|
||||||
@@ -226,7 +226,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
/// The IgnoreErrorOccurred event is wired to raise an RaiseAmbientIgnoreMessage message for ignore.
|
/// The IgnoreErrorOccurred event is wired to raise an RaiseAmbientIgnoreMessage message for ignore.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <returns>An instance of <see cref="RetryPolicy"/> class.</returns>
|
/// <returns>An instance of <see cref="RetryPolicy"/> class.</returns>
|
||||||
internal static RetryPolicy CreatePrimaryKeyCommandRetryPolicy()
|
public static RetryPolicy CreatePrimaryKeyCommandRetryPolicy()
|
||||||
{
|
{
|
||||||
RetryPolicy.SqlAzureTemporaryAndIgnorableErrorDetectionStrategy errorDetectionStrategy =
|
RetryPolicy.SqlAzureTemporaryAndIgnorableErrorDetectionStrategy errorDetectionStrategy =
|
||||||
new RetryPolicy.SqlAzureTemporaryAndIgnorableErrorDetectionStrategy(SqlErrorNumbers.PrimaryKeyViolationErrorNumber);
|
new RetryPolicy.SqlAzureTemporaryAndIgnorableErrorDetectionStrategy(SqlErrorNumbers.PrimaryKeyViolationErrorNumber);
|
||||||
@@ -390,7 +390,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
return retryPolicy;
|
return retryPolicy;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static void DataConnectionFailureRetry(RetryState retryState)
|
public static void DataConnectionFailureRetry(RetryState retryState)
|
||||||
{
|
{
|
||||||
Logger.Write(TraceEventType.Information, string.Format(CultureInfo.InvariantCulture,
|
Logger.Write(TraceEventType.Information, string.Format(CultureInfo.InvariantCulture,
|
||||||
"Connection retry number {0}. Delaying {1} ms before retry. Exception: {2}",
|
"Connection retry number {0}. Delaying {1} ms before retry. Exception: {2}",
|
||||||
@@ -401,7 +401,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
RetryPolicyUtils.RaiseAmbientRetryMessage(retryState, SqlSchemaModelErrorCodes.ServiceActions.ConnectionRetry);
|
RetryPolicyUtils.RaiseAmbientRetryMessage(retryState, SqlSchemaModelErrorCodes.ServiceActions.ConnectionRetry);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static void CommandFailureRetry(RetryState retryState, string commandKeyword)
|
public static void CommandFailureRetry(RetryState retryState, string commandKeyword)
|
||||||
{
|
{
|
||||||
Logger.Write(TraceEventType.Information, string.Format(
|
Logger.Write(TraceEventType.Information, string.Format(
|
||||||
CultureInfo.InvariantCulture,
|
CultureInfo.InvariantCulture,
|
||||||
@@ -414,7 +414,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
RetryPolicyUtils.RaiseAmbientRetryMessage(retryState, SqlSchemaModelErrorCodes.ServiceActions.CommandRetry);
|
RetryPolicyUtils.RaiseAmbientRetryMessage(retryState, SqlSchemaModelErrorCodes.ServiceActions.CommandRetry);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static void CommandFailureIgnore(RetryState retryState, string commandKeyword)
|
public static void CommandFailureIgnore(RetryState retryState, string commandKeyword)
|
||||||
{
|
{
|
||||||
Logger.Write(TraceEventType.Information, string.Format(
|
Logger.Write(TraceEventType.Information, string.Format(
|
||||||
CultureInfo.InvariantCulture,
|
CultureInfo.InvariantCulture,
|
||||||
@@ -426,32 +426,32 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
RetryPolicyUtils.RaiseAmbientIgnoreMessage(retryState, SqlSchemaModelErrorCodes.ServiceActions.CommandRetry);
|
RetryPolicyUtils.RaiseAmbientIgnoreMessage(retryState, SqlSchemaModelErrorCodes.ServiceActions.CommandRetry);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static void CommandFailureRetry(RetryState retryState)
|
public static void CommandFailureRetry(RetryState retryState)
|
||||||
{
|
{
|
||||||
CommandFailureRetry(retryState, "Command");
|
CommandFailureRetry(retryState, "Command");
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static void CommandFailureIgnore(RetryState retryState)
|
public static void CommandFailureIgnore(RetryState retryState)
|
||||||
{
|
{
|
||||||
CommandFailureIgnore(retryState, "Command");
|
CommandFailureIgnore(retryState, "Command");
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static void CreateDatabaseCommandFailureRetry(RetryState retryState)
|
public static void CreateDatabaseCommandFailureRetry(RetryState retryState)
|
||||||
{
|
{
|
||||||
CommandFailureRetry(retryState, "Database Command");
|
CommandFailureRetry(retryState, "Database Command");
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static void CreateDatabaseCommandFailureIgnore(RetryState retryState)
|
public static void CreateDatabaseCommandFailureIgnore(RetryState retryState)
|
||||||
{
|
{
|
||||||
CommandFailureIgnore(retryState, "Database Command");
|
CommandFailureIgnore(retryState, "Database Command");
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static void ElementCommandFailureRetry(RetryState retryState)
|
public static void ElementCommandFailureRetry(RetryState retryState)
|
||||||
{
|
{
|
||||||
CommandFailureRetry(retryState, "Element Command");
|
CommandFailureRetry(retryState, "Element Command");
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static void ElementCommandFailureIgnore(RetryState retryState)
|
public static void ElementCommandFailureIgnore(RetryState retryState)
|
||||||
{
|
{
|
||||||
CommandFailureIgnore(retryState, "Element Command");
|
CommandFailureIgnore(retryState, "Element Command");
|
||||||
}
|
}
|
||||||
@@ -12,7 +12,7 @@ using Microsoft.SqlTools.Utility;
|
|||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
||||||
{
|
{
|
||||||
internal static class RetryPolicyUtils
|
public static class RetryPolicyUtils
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Approved list of transient errors that should be retryable during Network connection stages
|
/// Approved list of transient errors that should be retryable during Network connection stages
|
||||||
@@ -257,7 +257,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="currentRetryCount">Total number of retries including the current retry</param>
|
/// <param name="currentRetryCount">Total number of retries including the current retry</param>
|
||||||
/// <returns>TimeSpan defining the length of time to delay</returns>
|
/// <returns>TimeSpan defining the length of time to delay</returns>
|
||||||
internal static TimeSpan CalcExponentialRetryDelayWithSchemaDefaults(int currentRetryCount)
|
public static TimeSpan CalcExponentialRetryDelayWithSchemaDefaults(int currentRetryCount)
|
||||||
{
|
{
|
||||||
return CalcExponentialRetryDelay(currentRetryCount,
|
return CalcExponentialRetryDelay(currentRetryCount,
|
||||||
RetryPolicyDefaults.DefaultBackoffIntervalFactor,
|
RetryPolicyDefaults.DefaultBackoffIntervalFactor,
|
||||||
@@ -277,7 +277,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
/// <param name="minInterval">Minimum interval between retries. The basis for all backoff calculations</param>
|
/// <param name="minInterval">Minimum interval between retries. The basis for all backoff calculations</param>
|
||||||
/// <param name="maxInterval">Maximum interval between retries. Backoff will not take longer than this period.</param>
|
/// <param name="maxInterval">Maximum interval between retries. Backoff will not take longer than this period.</param>
|
||||||
/// <returns>TimeSpan defining the length of time to delay</returns>
|
/// <returns>TimeSpan defining the length of time to delay</returns>
|
||||||
internal static TimeSpan CalcExponentialRetryDelay(int currentRetryCount, double intervalFactor, TimeSpan minInterval, TimeSpan maxInterval)
|
public static TimeSpan CalcExponentialRetryDelay(int currentRetryCount, double intervalFactor, TimeSpan minInterval, TimeSpan maxInterval)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -298,7 +298,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static void RaiseAmbientRetryMessage(RetryState retryState, int errorCode)
|
public static void RaiseAmbientRetryMessage(RetryState retryState, int errorCode)
|
||||||
{
|
{
|
||||||
Action<SqlServerRetryError> retryMsgHandler = AmbientSettings.ConnectionRetryMessageHandler;
|
Action<SqlServerRetryError> retryMsgHandler = AmbientSettings.ConnectionRetryMessageHandler;
|
||||||
if (retryMsgHandler != null)
|
if (retryMsgHandler != null)
|
||||||
@@ -317,7 +317,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static void RaiseAmbientIgnoreMessage(RetryState retryState, int errorCode)
|
public static void RaiseAmbientIgnoreMessage(RetryState retryState, int errorCode)
|
||||||
{
|
{
|
||||||
Action<SqlServerRetryError> retryMsgHandler = AmbientSettings.ConnectionRetryMessageHandler;
|
Action<SqlServerRetryError> retryMsgHandler = AmbientSettings.ConnectionRetryMessageHandler;
|
||||||
if (retryMsgHandler != null)
|
if (retryMsgHandler != null)
|
||||||
@@ -341,7 +341,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
/// <param name="retryState"></param>
|
/// <param name="retryState"></param>
|
||||||
/// <param name="errorCode"></param>
|
/// <param name="errorCode"></param>
|
||||||
/// <param name="azureSessionId"></param>
|
/// <param name="azureSessionId"></param>
|
||||||
internal static void RaiseSchemaAmbientRetryMessage(RetryState retryState, int errorCode, Guid azureSessionId)
|
public static void RaiseSchemaAmbientRetryMessage(RetryState retryState, int errorCode, Guid azureSessionId)
|
||||||
{
|
{
|
||||||
if (azureSessionId != Guid.Empty)
|
if (azureSessionId != Guid.Empty)
|
||||||
{
|
{
|
||||||
@@ -7,7 +7,7 @@ using System;
|
|||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
||||||
{
|
{
|
||||||
internal class RetryState
|
public class RetryState
|
||||||
{
|
{
|
||||||
private int _retryCount = 0;
|
private int _retryCount = 0;
|
||||||
private TimeSpan _delay = TimeSpan.Zero;
|
private TimeSpan _delay = TimeSpan.Zero;
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
||||||
{
|
{
|
||||||
internal static class SqlSchemaModelErrorCodes
|
public static class SqlSchemaModelErrorCodes
|
||||||
{
|
{
|
||||||
private const int ParserErrorCodeStartIndex = 46000;
|
private const int ParserErrorCodeStartIndex = 46000;
|
||||||
private const int ParserErrorCodeEndIndex = 46499;
|
private const int ParserErrorCodeEndIndex = 46499;
|
||||||
@@ -11,7 +11,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
/// Represents an error produced by SQL Server database schema provider
|
/// Represents an error produced by SQL Server database schema provider
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Serializable]
|
[Serializable]
|
||||||
internal class SqlServerError : DataSchemaError
|
public class SqlServerError : DataSchemaError
|
||||||
{
|
{
|
||||||
private const string SqlServerPrefix = "SQL";
|
private const string SqlServerPrefix = "SQL";
|
||||||
private const string DefaultHelpKeyword = "vs.teamsystem.datatools.DefaultErrorMessageHelp";
|
private const string DefaultHelpKeyword = "vs.teamsystem.datatools.DefaultErrorMessageHelp";
|
||||||
@@ -11,7 +11,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Captures extended information about a specific error and a retry
|
/// Captures extended information about a specific error and a retry
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal class SqlServerRetryError : SqlServerError
|
public class SqlServerRetryError : SqlServerError
|
||||||
{
|
{
|
||||||
private int _retryCount;
|
private int _retryCount;
|
||||||
private int _errorCode;
|
private int _errorCode;
|
||||||
@@ -3,7 +3,6 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Connection.Contracts
|
namespace Microsoft.SqlTools.ServiceLayer.Connection.Contracts
|
||||||
@@ -74,10 +73,3 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.Contracts
|
|||||||
public Dictionary<string, object> Options { get; set; }
|
public Dictionary<string, object> Options { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ClusterEndpoint
|
|
||||||
{
|
|
||||||
public string ServiceName;
|
|
||||||
public string IpAddress;
|
|
||||||
public int Port;
|
|
||||||
}
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -249,64 +249,14 @@ EditDataIncorrectTable(string tableName) = EditData queries must query the origi
|
|||||||
############################################################################
|
############################################################################
|
||||||
# DacFx Resources
|
# DacFx Resources
|
||||||
|
|
||||||
EE_BatchSqlMessageNoProcedureInfo = Msg {0}, Level {1}, State {2}, Line {3}
|
EE_ExecutionInfo_InitializingLoop = Beginning execution loop
|
||||||
|
|
||||||
EE_BatchSqlMessageWithProcedureInfo = Msg {0}, Level {1}, State {2}, Procedure {3}, Line {4}
|
|
||||||
|
|
||||||
EE_BatchSqlMessageNoLineInfo = Msg {0}, Level {1}, State {2}
|
|
||||||
|
|
||||||
EE_BatchError_Exception = An error occurred while the batch was being processed. The error message is: {0}
|
|
||||||
|
|
||||||
EE_BatchExecutionInfo_RowsAffected = ({0} row(s) affected)
|
|
||||||
|
|
||||||
EE_ExecutionNotYetCompleteError = The previous execution is not yet complete.
|
|
||||||
|
|
||||||
EE_ScriptError_Error = A scripting error occurred.
|
|
||||||
|
|
||||||
EE_ScriptError_ParsingSyntax = Incorrect syntax was encountered while {0} was being parsed.
|
|
||||||
|
|
||||||
EE_ScriptError_FatalError = A fatal error occurred.
|
|
||||||
|
|
||||||
EE_ExecutionInfo_FinalizingLoop = Batch execution completed {0} times...
|
|
||||||
|
|
||||||
EE_ExecutionInfo_QueryCancelledbyUser = You cancelled the query.
|
|
||||||
|
|
||||||
EE_BatchExecutionError_Halting = An error occurred while the batch was being executed.
|
|
||||||
|
|
||||||
EE_BatchExecutionError_Ignoring = An error occurred while the batch was being executed, but the error has been ignored.
|
EE_BatchExecutionError_Ignoring = An error occurred while the batch was being executed, but the error has been ignored.
|
||||||
|
|
||||||
EE_ExecutionInfo_InitializingLoop = Beginning execution loop
|
EE_ExecutionInfo_FinalizingLoop = Batch execution completed {0} times...
|
||||||
|
|
||||||
EE_ExecutionError_CommandNotSupported = Command {0} is not supported.
|
|
||||||
|
|
||||||
EE_ExecutionError_VariableNotFound = The variable {0} could not be found.
|
|
||||||
|
|
||||||
BatchParserWrapperExecutionEngineError = SQL Execution error: {0}
|
|
||||||
|
|
||||||
BatchParserWrapperExecutionError = Batch parser wrapper execution: {0} found... at line {1}: {2} Description: {3}
|
BatchParserWrapperExecutionError = Batch parser wrapper execution: {0} found... at line {1}: {2} Description: {3}
|
||||||
|
|
||||||
BatchParserWrapperExecutionEngineBatchMessage = Batch parser wrapper execution engine batch message received: Message: {0} Detailed message: {1}
|
|
||||||
|
|
||||||
BatchParserWrapperExecutionEngineBatchResultSetProcessing = Batch parser wrapper execution engine batch ResultSet processing: DataReader.FieldCount: {0} DataReader.RecordsAffected: {1}
|
|
||||||
|
|
||||||
BatchParserWrapperExecutionEngineBatchResultSetFinished = Batch parser wrapper execution engine batch ResultSet finished.
|
|
||||||
|
|
||||||
BatchParserWrapperExecutionEngineBatchCancelling = Canceling batch parser wrapper batch execution.
|
|
||||||
|
|
||||||
EE_ScriptError_Warning = Scripting warning.
|
|
||||||
|
|
||||||
TroubleshootingAssistanceMessage = For more information about this error, see the troubleshooting topics in the product documentation.
|
|
||||||
|
|
||||||
BatchParser_CircularReference = File '{0}' recursively included.
|
|
||||||
|
|
||||||
BatchParser_CommentNotTerminated = Missing end comment mark '*/'.
|
|
||||||
|
|
||||||
BatchParser_StringNotTerminated = Unclosed quotation mark after the character string.
|
|
||||||
|
|
||||||
BatchParser_IncorrectSyntax = Incorrect syntax was encountered while parsing '{0}'.
|
|
||||||
|
|
||||||
BatchParser_VariableNotDefined = Variable {0} is not defined.
|
|
||||||
|
|
||||||
############################################################################
|
############################################################################
|
||||||
# Workspace Service
|
# Workspace Service
|
||||||
|
|
||||||
@@ -716,125 +666,6 @@ StoredProcedureScriptParameterComment = -- TODO: Set parameter values here.
|
|||||||
ScriptingGeneralError = An error occurred while scripting the objects.
|
ScriptingGeneralError = An error occurred while scripting the objects.
|
||||||
ScriptingExecuteNotSupportedError = Scripting as Execute is only supported for Stored Procedures
|
ScriptingExecuteNotSupportedError = Scripting as Execute is only supported for Stored Procedures
|
||||||
|
|
||||||
############################################################################
|
|
||||||
# Admin Service
|
|
||||||
|
|
||||||
unavailable = Unavailable
|
|
||||||
filegroup_dialog_defaultFilegroup = Current default filegroup: {0}
|
|
||||||
filegroup_dialog_title = New Filegroup for {0}
|
|
||||||
filegroups_default = Default
|
|
||||||
filegroups_files = Files
|
|
||||||
filegroups_name = Name
|
|
||||||
filegroups_readonly = Read-Only
|
|
||||||
general_autogrowth = Autogrowth / Maxsize
|
|
||||||
general_builderText = ...
|
|
||||||
general_default = <default>
|
|
||||||
general_fileGroup = Filegroup
|
|
||||||
general_fileName = Logical Name
|
|
||||||
general_fileType = File Type
|
|
||||||
general_initialSize = Initial Size (MB)
|
|
||||||
general_newFilegroup = <new filegroup>
|
|
||||||
general_path = Path
|
|
||||||
general_physicalFileName = File Name
|
|
||||||
general_rawDevice = <raw device>
|
|
||||||
general_recoveryModel_bulkLogged = Bulk-logged
|
|
||||||
general_recoveryModel_full = Full
|
|
||||||
general_recoveryModel_simple = Simple
|
|
||||||
general_titleSearchOwner = Select Database Owner
|
|
||||||
|
|
||||||
prototype_autogrowth_disabled = None
|
|
||||||
prototype_autogrowth_restrictedGrowthByMB = By {0} MB, Limited to {1} MB
|
|
||||||
prototype_autogrowth_restrictedGrowthByPercent = By {0} percent, Limited to {1} MB
|
|
||||||
prototype_autogrowth_unrestrictedGrowthByMB = By {0} MB, Unlimited
|
|
||||||
prototype_autogrowth_unrestrictedGrowthByPercent = By {0} percent, Unlimited
|
|
||||||
prototype_autogrowth_unlimitedfilestream = Unlimited
|
|
||||||
prototype_autogrowth_limitedfilestream = Limited to {0} MB
|
|
||||||
prototype_db_category_automatic = Automatic
|
|
||||||
prototype_db_category_servicebroker = Service Broker
|
|
||||||
prototype_db_category_collation = Collation
|
|
||||||
prototype_db_category_cursor = Cursor
|
|
||||||
prototype_db_category_misc = Miscellaneous
|
|
||||||
prototype_db_category_recovery = Recovery
|
|
||||||
prototype_db_category_state = State
|
|
||||||
prototype_db_prop_ansiNullDefault = ANSI NULL Default
|
|
||||||
prototype_db_prop_ansiNulls = ANSI NULLS Enabled
|
|
||||||
prototype_db_prop_ansiPadding = ANSI Padding Enabled
|
|
||||||
prototype_db_prop_ansiWarnings = ANSI Warnings Enabled
|
|
||||||
prototype_db_prop_arithabort = Arithmetic Abort Enabled
|
|
||||||
prototype_db_prop_autoClose = Auto Close
|
|
||||||
prototype_db_prop_autoCreateStatistics = Auto Create Statistics
|
|
||||||
prototype_db_prop_autoShrink = Auto Shrink
|
|
||||||
prototype_db_prop_autoUpdateStatistics = Auto Update Statistics
|
|
||||||
prototype_db_prop_autoUpdateStatisticsAsync = Auto Update Statistics Asynchronously
|
|
||||||
prototype_db_prop_caseSensitive = Case Sensitive
|
|
||||||
prototype_db_prop_closeCursorOnCommit = Close Cursor on Commit Enabled
|
|
||||||
prototype_db_prop_collation = Collation
|
|
||||||
prototype_db_prop_concatNullYieldsNull = Concatenate Null Yields Null
|
|
||||||
prototype_db_prop_databaseCompatibilityLevel = Database Compatibility Level
|
|
||||||
prototype_db_prop_databaseState = Database State
|
|
||||||
prototype_db_prop_defaultCursor = Default Cursor
|
|
||||||
prototype_db_prop_fullTextIndexing = Full-Text Indexing Enabled
|
|
||||||
prototype_db_prop_numericRoundAbort = Numeric Round-Abort
|
|
||||||
prototype_db_prop_pageVerify = Page Verify
|
|
||||||
prototype_db_prop_quotedIdentifier = Quoted Identifiers Enabled
|
|
||||||
prototype_db_prop_readOnly = Database Read-Only
|
|
||||||
prototype_db_prop_recursiveTriggers = Recursive Triggers Enabled
|
|
||||||
prototype_db_prop_restrictAccess = Restrict Access
|
|
||||||
prototype_db_prop_selectIntoBulkCopy = Select Into/Bulk Copy
|
|
||||||
prototype_db_prop_honorBrokerPriority = Honor Broker Priority
|
|
||||||
prototype_db_prop_serviceBrokerGuid = Service Broker Identifier
|
|
||||||
prototype_db_prop_brokerEnabled = Broker Enabled
|
|
||||||
prototype_db_prop_truncateLogOnCheckpoint = Truncate Log on Checkpoint
|
|
||||||
prototype_db_prop_dbChaining = Cross-database Ownership Chaining Enabled
|
|
||||||
prototype_db_prop_trustworthy = Trustworthy
|
|
||||||
prototype_db_prop_dateCorrelationOptimization = Date Correlation Optimization Enabled
|
|
||||||
prototype_db_prop_parameterization = Parameterization
|
|
||||||
prototype_db_prop_parameterization_value_forced = Forced
|
|
||||||
prototype_db_prop_parameterization_value_simple = Simple
|
|
||||||
prototype_file_dataFile = ROWS Data
|
|
||||||
prototype_file_logFile = LOG
|
|
||||||
prototype_file_filestreamFile = FILESTREAM Data
|
|
||||||
prototype_file_noFileGroup = Not Applicable
|
|
||||||
prototype_file_defaultpathstring = <default path>
|
|
||||||
title_openConnectionsMustBeClosed = Open Connections
|
|
||||||
warning_openConnectionsMustBeClosed=To change the database properties, SQL Server must close all other connections to the database_ Are you sure you want to change the properties and close all other connections?
|
|
||||||
prototype_db_prop_databaseState_value_autoClosed = AUTO_CLOSED
|
|
||||||
prototype_db_prop_databaseState_value_emergency = EMERGENCY
|
|
||||||
prototype_db_prop_databaseState_value_inaccessible = INACCESSIBLE
|
|
||||||
prototype_db_prop_databaseState_value_normal = NORMAL
|
|
||||||
prototype_db_prop_databaseState_value_offline = OFFLINE
|
|
||||||
prototype_db_prop_databaseState_value_recovering = RECOVERING
|
|
||||||
prototype_db_prop_databaseState_value_recoveryPending = RECOVERY PENDING
|
|
||||||
prototype_db_prop_databaseState_value_restoring = RESTORING
|
|
||||||
prototype_db_prop_databaseState_value_shutdown=SHUTDOWN
|
|
||||||
prototype_db_prop_databaseState_value_standby = STANDBY
|
|
||||||
prototype_db_prop_databaseState_value_suspect = SUSPECT
|
|
||||||
prototype_db_prop_defaultCursor_value_global = GLOBAL
|
|
||||||
prototype_db_prop_defaultCursor_value_local = LOCAL
|
|
||||||
prototype_db_prop_restrictAccess_value_multiple = MULTI_USER
|
|
||||||
prototype_db_prop_restrictAccess_value_restricted = RESTRICTED_USER
|
|
||||||
prototype_db_prop_restrictAccess_value_single = SINGLE_USER
|
|
||||||
prototype_db_prop_pageVerify_value_checksum = CHECKSUM
|
|
||||||
prototype_db_prop_pageVerify_value_none = NONE
|
|
||||||
prototype_db_prop_pageVerify_value_tornPageDetection = TORN_PAGE_DETECTION
|
|
||||||
prototype_db_prop_varDecimalEnabled = VarDecimal Storage Format Enabled
|
|
||||||
compatibilityLevel_katmai = SQL Server 2008 (100)
|
|
||||||
prototype_db_prop_encryptionEnabled = Encryption Enabled
|
|
||||||
prototype_db_prop_databasescopedconfig_value_off = OFF
|
|
||||||
prototype_db_prop_databasescopedconfig_value_on = ON
|
|
||||||
prototype_db_prop_databasescopedconfig_value_primary = PRIMARY
|
|
||||||
error_db_prop_invalidleadingColumns = For the distribution policy HASH, the number of leading hash columns is optional but should be from 1 to 16 columns
|
|
||||||
compatibilityLevel_denali = SQL Server 2012 (110)
|
|
||||||
compatibilityLevel_sql14 = SQL Server 2014 (120)
|
|
||||||
compatibilityLevel_sql15 = SQL Server 2016 (130)
|
|
||||||
compatibilityLevel_sqlvNext = SQL Server vNext (140)
|
|
||||||
general_containmentType_None = None
|
|
||||||
general_containmentType_Partial = Partial
|
|
||||||
filegroups_filestreamFiles = FILESTREAM Files
|
|
||||||
prototype_file_noApplicableFileGroup = No Applicable Filegroup
|
|
||||||
NeverBackedUp = Never
|
|
||||||
Error_InvalidDirectoryName = Path {0} is not a valid directory
|
|
||||||
Error_ExistingDirectoryName = For directory {0} a file with name {1} already exists
|
|
||||||
|
|
||||||
############################################################################
|
############################################################################
|
||||||
# Backup Service
|
# Backup Service
|
||||||
@@ -895,146 +726,6 @@ StopSessionFailed(String error) = Failed to stop session: {0}
|
|||||||
SessionNotFound = Cannot find requested XEvent session
|
SessionNotFound = Cannot find requested XEvent session
|
||||||
SessionAlreadyExists(String sessionName) = An XEvent session named {0} already exists
|
SessionAlreadyExists(String sessionName) = An XEvent session named {0} already exists
|
||||||
|
|
||||||
#############################################################################
|
|
||||||
# SQL Agent
|
|
||||||
EnableAlertsTitle(String serverName) = Enable Alerts - {0}
|
|
||||||
EnableAlertDescription(String alertName) = Enable Alert '{0}'
|
|
||||||
EnablingAlert(String alertName) = Enabling Alert '{0}'
|
|
||||||
EnabledAlert(String alertName) = Enabled Alert '{0}'
|
|
||||||
|
|
||||||
DisableAlertsTitle(String serverName) = Disable Alerts - {0}
|
|
||||||
DisableAlertDescription(String alertName) = Disable Alert '{0}'
|
|
||||||
DisablingAlert(String alertName) = Disabling Alert '{0}'
|
|
||||||
DisabledAlert(String alertName) = Disabled Alert '{0}'
|
|
||||||
|
|
||||||
EnableJobsTitle(String serverName) = Enable Jobs - {0}
|
|
||||||
EnableJobDescription(String jobName) = Enable Job '{0}'
|
|
||||||
EnablingJob(String jobName) = Enabling Job '{0}'
|
|
||||||
EnabledJob(String jobName) = Enabled Job '{0}'
|
|
||||||
|
|
||||||
DisableJobsTitle(String serverName) = Disable Jobs - {0}
|
|
||||||
DisableJobDescription(String jobName) = Disable Job '{0}'
|
|
||||||
DisablingJob(String jobName) = Disabling Job '{0}'
|
|
||||||
DisabledJob(String jobName) = Disabled Job '{0}'
|
|
||||||
|
|
||||||
StartJobsTitle(String serverName) = Start Jobs - {0}
|
|
||||||
StartJobDescription(String jobName) = Start Job '{0}'
|
|
||||||
GettingStartStep(String jobName) = Job '{0}' has more than one step. Getting step to start
|
|
||||||
UserCancelledSelectStep = User canceled select step. Job will not be started
|
|
||||||
StartingJob(String jobName) = Starting Job '{0}'
|
|
||||||
StartJobWithStep(String jobName, String stepName) = Start Job '{0}' with step '{1}'
|
|
||||||
RequestPostedToTargetServers = Posted remote job execution request
|
|
||||||
|
|
||||||
ExecuteJob(string jobName) = Execute job '{0}'
|
|
||||||
JobFailed(string jobName) = Execution of job '{0}' failed. See the history log for details.
|
|
||||||
Executing = Executing
|
|
||||||
BetweenRetries = Between retries
|
|
||||||
Suspended = Suspended
|
|
||||||
PerformingCompletionAction = Performing completion action
|
|
||||||
WaitingForStepToFinish = Waiting for step to finish
|
|
||||||
WaitingForWorkerThread = Waiting for worker thread
|
|
||||||
|
|
||||||
StopJobsTitle(String serverName) = Stop Jobs - {0}
|
|
||||||
StopJobDescription(String jobName) = Stop Job '{0}'
|
|
||||||
StoppingJob(String jobName) = Stopping Job '{0}'
|
|
||||||
StoppedJob(String jobName) = Stopped Job '{0}'
|
|
||||||
|
|
||||||
; First item in database name drop down list
|
|
||||||
AllDatabases = <all databases>
|
|
||||||
; Exception thrown when agent alert has unknown severity level
|
|
||||||
UnknownSeverity(int severity) = Unknown severity: {0}
|
|
||||||
|
|
||||||
#severity types
|
|
||||||
Severity001 = 001 - Miscellaneous System Information
|
|
||||||
Severity002 = 002 - Reserved
|
|
||||||
Severity003 = 003 - Reserved
|
|
||||||
Severity004 = 004 - Reserved
|
|
||||||
Severity005 = 005 - Reserved
|
|
||||||
Severity006 = 006 - Reserved
|
|
||||||
Severity007 = 007 - Notification: Status Information
|
|
||||||
Severity008 = 008 - Notification: User Intervention Required
|
|
||||||
Severity009 = 009 - User Defined
|
|
||||||
Severity010 = 010 - Information
|
|
||||||
Severity011 = 011 - Specified Database Object Not Found
|
|
||||||
Severity012 = 012 - Unused
|
|
||||||
Severity013 = 013 - User Transaction Syntax Error
|
|
||||||
Severity014 = 014 - Insufficient Permission
|
|
||||||
Severity015 = 015 - Syntax Error in SQL Statements
|
|
||||||
Severity016 = 016 - Miscellaneous User Error
|
|
||||||
Severity017 = 017 - Insufficient Resources
|
|
||||||
Severity018 = 018 - Nonfatal Internal Error
|
|
||||||
Severity019 = 019 - Fatal Error in Resource
|
|
||||||
Severity020 = 020 - Fatal Error in Current Process
|
|
||||||
Severity021 = 021 - Fatal Error in Database Processes
|
|
||||||
Severity022 = 022 - Fatal Error: Table Integrity Suspect
|
|
||||||
Severity023 = 023 - Fatal Error: Database Integrity Suspect
|
|
||||||
Severity024 = 024 - Fatal Error: Hardware Error
|
|
||||||
Severity025 = 025 - Fatal Error
|
|
||||||
|
|
||||||
; Message box that displayed if start time is more than end time on Mon-Fri
|
|
||||||
PagerScheduleMonFri = Pager schedule end time is earlier than start time on Mon-Fri. Do you want to continue?
|
|
||||||
; Message box that displayed if start time is more than end time on Sat-Sun
|
|
||||||
PagerScheduleSatSun = Pager schedule end time is earlier than start time on Sat-Sun. Do you want to continue?
|
|
||||||
; Message box caption
|
|
||||||
PagerScheduleWarning = Pager schedule warning
|
|
||||||
|
|
||||||
; Tree node name
|
|
||||||
General = General
|
|
||||||
; Tree node name
|
|
||||||
Notifications = Notifications
|
|
||||||
; Tree node name
|
|
||||||
History = History
|
|
||||||
; Pager schedule grid column name
|
|
||||||
Day = Day
|
|
||||||
; Pager schedule grid column name
|
|
||||||
StartTime = Start Time
|
|
||||||
; Pager schedule grid column name
|
|
||||||
EndTime = End Time
|
|
||||||
; Exception thrown when column index is invalid
|
|
||||||
ColumnIndexIsInvalid = Column index is invalid.
|
|
||||||
; Exception thrown when row index is invalid
|
|
||||||
RowIndexIsInvalid = Row index is invalid.
|
|
||||||
; Name of the operator dialog in create new operator mode
|
|
||||||
NewOperatorProperties = New Operator
|
|
||||||
; Name of the operator dialog in modify operator mode
|
|
||||||
OperatorProperties(string operatorName) = {0} Properties
|
|
||||||
; Exception thrown when dialog cannot be created/intialized.
|
|
||||||
FailedToCreateInitializeAgentOperatorDialog = Unable to create/initialize Agent Operator dialog.
|
|
||||||
; Exception thrown when job server is not available
|
|
||||||
JobServerIsNotAvailable = Job server is not available.
|
|
||||||
; Exception thrown when we cannot create/initialize agent operators general page
|
|
||||||
CannotCreateInitializeGeneralPage = Cannot create/initialize General page.
|
|
||||||
; Exception thrown when we cannot create/initialize agent operators notifications page
|
|
||||||
CannotCreateInitializeNotificationsPage = Cannot create/initialize Notifications page.
|
|
||||||
; Exception thrown when we cannot create/initialize agent operators history page
|
|
||||||
CannotCreateInitializeHistoryPage = Cannot create/initialize History page.
|
|
||||||
; Exception throw when dialog cannot refresh operator
|
|
||||||
CannotResetOperator = Cannot reset operator.
|
|
||||||
|
|
||||||
; Name of label on notifications page
|
|
||||||
AlertList = Alert list:
|
|
||||||
; Name of label on notifications page
|
|
||||||
JobList = Job list:
|
|
||||||
; Name of column on notifications page
|
|
||||||
Email = E-mail
|
|
||||||
; Name of column on notifications page
|
|
||||||
Pager = Pager
|
|
||||||
; Name of column on notifications page
|
|
||||||
AlertName = Alert name
|
|
||||||
; Name of column on notifications page
|
|
||||||
JobName = Job name
|
|
||||||
; Completion Action
|
|
||||||
Always = Always
|
|
||||||
; Completion Action
|
|
||||||
Never = Never
|
|
||||||
; Completion Action
|
|
||||||
OnFailure = On failure
|
|
||||||
; Completion Action
|
|
||||||
OnSuccess = On success
|
|
||||||
; Exception thrown when we cannot modify alerts
|
|
||||||
CannotModifyAlerts = Cannot modify alerts.
|
|
||||||
; Exception thrown when we cannot create script that modify alerts
|
|
||||||
CannotCreateScriptForModifyAlerts = Cannot create script for modify alerts.
|
|
||||||
|
|
||||||
;job categories
|
;job categories
|
||||||
CategoryLocal = [Uncategorized (Local)]
|
CategoryLocal = [Uncategorized (Local)]
|
||||||
@@ -1082,3 +773,13 @@ StartTimeGreaterThanEndTime = The job schedule starting time cannot be after the
|
|||||||
EndTimeEqualToStartTime = The job schedule ending time must be after the starting time.
|
EndTimeEqualToStartTime = The job schedule ending time must be after the starting time.
|
||||||
InvalidStartDate = Start date must be on or after January 1, 1990.
|
InvalidStartDate = Start date must be on or after January 1, 1990.
|
||||||
ScheduleNameAlreadyExists(string scheduleName)=There is already a schedule named '{0}' for this job. You must specify a different name.
|
ScheduleNameAlreadyExists(string scheduleName)=There is already a schedule named '{0}' for this job. You must specify a different name.
|
||||||
|
|
||||||
|
; Exception thrown when job server is not available
|
||||||
|
JobServerIsNotAvailable = Job server is not available
|
||||||
|
|
||||||
|
############################################################################
|
||||||
|
# Admin Service
|
||||||
|
|
||||||
|
NeverBackedUp = Never
|
||||||
|
Error_InvalidDirectoryName = Path {0} is not a valid directory
|
||||||
|
Error_ExistingDirectoryName = For directory {0} a file with name {1} already exist
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -24,7 +24,7 @@
|
|||||||
<PackageReference Include="System.Data.SqlClient" Version="4.6.0" />
|
<PackageReference Include="System.Data.SqlClient" Version="4.6.0" />
|
||||||
<PackageReference Include="Microsoft.SqlServer.SqlManagementObjects" Version="$(SmoPackageVersion)" />
|
<PackageReference Include="Microsoft.SqlServer.SqlManagementObjects" Version="$(SmoPackageVersion)" />
|
||||||
<PackageReference Include="Microsoft.SqlServer.DacFx" Version="150.4240.1-preview" />
|
<PackageReference Include="Microsoft.SqlServer.DacFx" Version="150.4240.1-preview" />
|
||||||
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.5.0" />
|
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.6.0-preview3-26501-04" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="**\*.cs" />
|
<Compile Include="**\*.cs" />
|
||||||
@@ -32,18 +32,11 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="../Microsoft.SqlTools.Hosting/Microsoft.SqlTools.Hosting.csproj" />
|
<ProjectReference Include="../Microsoft.SqlTools.Hosting/Microsoft.SqlTools.Hosting.csproj" />
|
||||||
<ProjectReference Include="../Microsoft.SqlTools.Credentials/Microsoft.SqlTools.Credentials.csproj" />
|
<ProjectReference Include="../Microsoft.SqlTools.Credentials/Microsoft.SqlTools.Credentials.csproj" />
|
||||||
|
<ProjectReference Include="../Microsoft.SqlTools.ManagedBatchParser/Microsoft.SqlTools.ManagedBatchParser.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<EmbeddedResource Include="ObjectExplorer\SmoModel\TreeNodeDefinition.xml" />
|
<EmbeddedResource Include="ObjectExplorer\SmoModel\TreeNodeDefinition.xml" />
|
||||||
<EmbeddedResource Include="Localization\sr.resx" />
|
<EmbeddedResource Include="Localization\sr.resx" />
|
||||||
<None Include="Localization\sr.strings" />
|
<None Include="Localization\sr.strings" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<Compile Update="Connection\ReliableConnection\ReliableSqlCommand.cs">
|
|
||||||
<SubType>Component</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Update="Connection\ReliableConnection\ReliableSqlConnection.cs">
|
|
||||||
<SubType>Component</SubType>
|
|
||||||
</Compile>
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ using System.Runtime.InteropServices;
|
|||||||
|
|
||||||
[assembly: InternalsVisibleTo("Microsoft.SqlTools.ServiceLayer.UnitTests")]
|
[assembly: InternalsVisibleTo("Microsoft.SqlTools.ServiceLayer.UnitTests")]
|
||||||
[assembly: InternalsVisibleTo("Microsoft.SqlTools.ServiceLayer.IntegrationTests")]
|
[assembly: InternalsVisibleTo("Microsoft.SqlTools.ServiceLayer.IntegrationTests")]
|
||||||
|
[assembly: InternalsVisibleTo("Microsoft.SqlTools.ManagedBatchParser.UnitTests")]
|
||||||
[assembly: InternalsVisibleTo("Microsoft.SqlTools.ServiceLayer.Test.Common")]
|
[assembly: InternalsVisibleTo("Microsoft.SqlTools.ServiceLayer.Test.Common")]
|
||||||
|
|
||||||
// Allowing internals visible access to Moq library to help testing
|
// Allowing internals visible access to Moq library to help testing
|
||||||
|
|||||||
1479
test/CodeCoverage/package-lock.json
generated
1479
test/CodeCoverage/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -13,6 +13,10 @@
|
|||||||
"through2": "^2.0.3"
|
"through2": "^2.0.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {},
|
"devDependencies": {},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/Microsoft/sqltoolsservice.git"
|
||||||
|
},
|
||||||
"author": "Microsoft",
|
"author": "Microsoft",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ using System.Data.SqlClient;
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode;
|
using Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.BatchParser
|
namespace Microsoft.SqlTools.ManagedBatchParser.UnitTests.BatchParser
|
||||||
{
|
{
|
||||||
internal class BatchParserMockEventHandler : IBatchEventsHandler
|
internal class BatchParserMockEventHandler : IBatchEventsHandler
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ using Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode;
|
|||||||
using Moq;
|
using Moq;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.BatchParser
|
namespace Microsoft.SqlTools.ManagedBatchParser.UnitTests.BatchParser
|
||||||
{
|
{
|
||||||
public class BatchParserSqlCmdTests : IDisposable
|
public class BatchParserSqlCmdTests : IDisposable
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -11,10 +11,11 @@ using Microsoft.SqlTools.ServiceLayer.BatchParser;
|
|||||||
using Microsoft.SqlTools.ServiceLayer.Test.Common;
|
using Microsoft.SqlTools.ServiceLayer.Test.Common;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Test.Common.Baselined;
|
using Microsoft.SqlTools.ServiceLayer.Test.Common.Baselined;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
using Microsoft.SqlTools.ServiceLayer.QueryExecution;
|
|
||||||
using Microsoft.SqlTools.ServiceLayer.Utility;
|
using Microsoft.SqlTools.ServiceLayer.Utility;
|
||||||
|
using Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode;
|
||||||
|
using Microsoft.SqlTools.ServiceLayer.IntegrationTests.TSQLExecutionEngine;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.BatchParser
|
namespace Microsoft.SqlTools.ManagedBatchParser.UnitTests.BatchParser
|
||||||
{
|
{
|
||||||
public class BatchParserTests : BaselinedTest
|
public class BatchParserTests : BaselinedTest
|
||||||
{
|
{
|
||||||
@@ -53,6 +54,25 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.BatchParser
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void VerifyExecuteScript()
|
||||||
|
{
|
||||||
|
string query = "select @@version";
|
||||||
|
ExecutionEngineTest executionEngineTest = new ExecutionEngineTest();
|
||||||
|
executionEngineTest.TestInitialize();
|
||||||
|
using (ExecutionEngine engine = new ExecutionEngine())
|
||||||
|
{
|
||||||
|
engine.ExecuteScript(query);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void CanceltheBatch()
|
||||||
|
{
|
||||||
|
Batch batch = new Batch();
|
||||||
|
batch.Cancel();
|
||||||
|
}
|
||||||
|
|
||||||
private static Stream GenerateStreamFromString(string s)
|
private static Stream GenerateStreamFromString(string s)
|
||||||
{
|
{
|
||||||
MemoryStream stream = new MemoryStream();
|
MemoryStream stream = new MemoryStream();
|
||||||
|
|||||||
@@ -1,9 +1,14 @@
|
|||||||
using System;
|
//
|
||||||
|
// Copyright (c) Microsoft. All rights reserved.
|
||||||
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
|
//
|
||||||
|
|
||||||
|
using System;
|
||||||
using Microsoft.SqlTools.ServiceLayer.BatchParser;
|
using Microsoft.SqlTools.ServiceLayer.BatchParser;
|
||||||
using Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode;
|
using Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.BatchParser
|
namespace Microsoft.SqlTools.ManagedBatchParser.UnitTests.BatchParser
|
||||||
{
|
{
|
||||||
public class BatchParserWrapperTests
|
public class BatchParserWrapperTests
|
||||||
{
|
{
|
||||||
@@ -20,7 +25,7 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.BatchParser
|
|||||||
Assert.Equal(1, batch.StartLine);
|
Assert.Equal(1, batch.StartLine);
|
||||||
Assert.Equal(1, batch.StartColumn);
|
Assert.Equal(1, batch.StartColumn);
|
||||||
Assert.Equal(2, batch.EndLine);
|
Assert.Equal(2, batch.EndLine);
|
||||||
Assert.Equal(sqlScript.Length+1, batch.EndColumn);
|
Assert.Equal(sqlScript.Length + 1, batch.EndColumn);
|
||||||
Assert.Equal(1, batch.BatchExecutionCount);
|
Assert.Equal(1, batch.BatchExecutionCount);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -51,7 +56,7 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.BatchParser
|
|||||||
Assert.Equal(1, batch.StartLine);
|
Assert.Equal(1, batch.StartLine);
|
||||||
Assert.Equal(1, batch.StartColumn);
|
Assert.Equal(1, batch.StartColumn);
|
||||||
Assert.Equal(2, batch.EndLine);
|
Assert.Equal(2, batch.EndLine);
|
||||||
Assert.Equal(sqlScript.Length+1, batch.EndColumn);
|
Assert.Equal(sqlScript.Length + 1, batch.EndColumn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ using System.Text;
|
|||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using Microsoft.SqlTools.ServiceLayer.BatchParser;
|
using Microsoft.SqlTools.ServiceLayer.BatchParser;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.BatchParser
|
namespace Microsoft.SqlTools.ManagedBatchParser.UnitTests.BatchParser
|
||||||
{
|
{
|
||||||
internal class TestCommandHandler : ICommandHandler
|
internal class TestCommandHandler : ICommandHandler
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ using System.Collections.Generic;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using Microsoft.SqlTools.ServiceLayer.BatchParser;
|
using Microsoft.SqlTools.ServiceLayer.BatchParser;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.BatchParser
|
namespace Microsoft.SqlTools.ManagedBatchParser.UnitTests.BatchParser
|
||||||
{
|
{
|
||||||
internal sealed class TestVariableResolver : IVariableResolver
|
internal sealed class TestVariableResolver : IVariableResolver
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -22,11 +22,11 @@
|
|||||||
<Reference Include="Castle.Core">
|
<Reference Include="Castle.Core">
|
||||||
<HintPath>../../bin/ref/Castle.Core.dll</HintPath>
|
<HintPath>../../bin/ref/Castle.Core.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<ProjectReference Include="../../src/Microsoft.SqlTools.ServiceLayer/Microsoft.SqlTools.ServiceLayer.csproj" />
|
|
||||||
<ProjectReference Include="../../src/Microsoft.SqlTools.Hosting/Microsoft.SqlTools.Hosting.csproj" />
|
<ProjectReference Include="../../src/Microsoft.SqlTools.Hosting/Microsoft.SqlTools.Hosting.csproj" />
|
||||||
<ProjectReference Include="../../src/Microsoft.SqlTools.Credentials/Microsoft.SqlTools.Credentials.csproj" />
|
<ProjectReference Include="../../src/Microsoft.SqlTools.Credentials/Microsoft.SqlTools.Credentials.csproj" />
|
||||||
<ProjectReference Include="../Microsoft.SqlTools.ServiceLayer.Test.Common/Microsoft.SqlTools.ServiceLayer.Test.Common.csproj" />
|
<ProjectReference Include="../Microsoft.SqlTools.ServiceLayer.Test.Common/Microsoft.SqlTools.ServiceLayer.Test.Common.csproj" />
|
||||||
<ProjectReference Include="..\Microsoft.SqlTools.ServiceLayer.UnitTests\Microsoft.SqlTools.ServiceLayer.UnitTests.csproj" />
|
<ProjectReference Include="../../src/Microsoft.SqlTools.ManagedBatchParser/Microsoft.SqlTools.ManagedBatchParser.csproj" />
|
||||||
|
<ProjectReference Include="../Microsoft.SqlTools.ServiceLayer.UnitTests/Microsoft.SqlTools.ServiceLayer.UnitTests.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="System.Net.Http" Version="4.3.1" />
|
<PackageReference Include="System.Net.Http" Version="4.3.1" />
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<PackageReference Include="xunit" Version="2.2.0" />
|
<PackageReference Include="xunit" Version="2.2.0" />
|
||||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
|
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
|
||||||
<PackageReference Include="System.Data.SqlClient" Version="4.6.0" />
|
<PackageReference Include="System.Data.SqlClient" Version="4.6.0" />
|
||||||
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.5.0" />
|
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.6.0-preview3-26501-04" />
|
||||||
<PackageReference Include="Microsoft.SqlServer.SqlManagementObjects" Version="$(SmoPackageVersion)" />
|
<PackageReference Include="Microsoft.SqlServer.SqlManagementObjects" Version="$(SmoPackageVersion)" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -26,16 +26,6 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.Utility
|
|||||||
Assert.NotNull(ServiceLayerSr.QueryServiceFileWrapperNotInitialized);
|
Assert.NotNull(ServiceLayerSr.QueryServiceFileWrapperNotInitialized);
|
||||||
Assert.NotNull(ServiceLayerSr.QueryServiceColumnNull);
|
Assert.NotNull(ServiceLayerSr.QueryServiceColumnNull);
|
||||||
Assert.NotNull(ServiceLayerSr.Culture);
|
Assert.NotNull(ServiceLayerSr.Culture);
|
||||||
Assert.NotNull(ServiceLayerSr.BatchParser_CircularReference);
|
|
||||||
Assert.NotNull(ServiceLayerSr.BatchParser_CommentNotTerminated);
|
|
||||||
Assert.NotNull(ServiceLayerSr.BatchParser_IncorrectSyntax);
|
|
||||||
Assert.NotNull(ServiceLayerSr.BatchParser_StringNotTerminated);
|
|
||||||
Assert.NotNull(ServiceLayerSr.BatchParser_VariableNotDefined);
|
|
||||||
Assert.NotNull(ServiceLayerSr.BatchParserWrapperExecutionEngineBatchCancelling);
|
|
||||||
Assert.NotNull(ServiceLayerSr.BatchParserWrapperExecutionEngineBatchMessage);
|
|
||||||
Assert.NotNull(ServiceLayerSr.BatchParserWrapperExecutionEngineBatchResultSetFinished);
|
|
||||||
Assert.NotNull(ServiceLayerSr.BatchParserWrapperExecutionEngineBatchResultSetProcessing);
|
|
||||||
Assert.NotNull(ServiceLayerSr.BatchParserWrapperExecutionEngineError);
|
|
||||||
Assert.NotNull(ServiceLayerSr.BatchParserWrapperExecutionError);
|
Assert.NotNull(ServiceLayerSr.BatchParserWrapperExecutionError);
|
||||||
Assert.NotNull(ServiceLayerSr.ConnectionParamsValidateNullConnection);
|
Assert.NotNull(ServiceLayerSr.ConnectionParamsValidateNullConnection);
|
||||||
Assert.NotNull(ServiceLayerSr.ConnectionParamsValidateNullOwnerUri);
|
Assert.NotNull(ServiceLayerSr.ConnectionParamsValidateNullOwnerUri);
|
||||||
@@ -48,23 +38,6 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.Utility
|
|||||||
Assert.NotNull(ServiceLayerSr.ConnectionServiceDbErrorDefaultNotConnected(""));
|
Assert.NotNull(ServiceLayerSr.ConnectionServiceDbErrorDefaultNotConnected(""));
|
||||||
Assert.NotNull(ServiceLayerSr.ConnectionServiceListDbErrorNotConnected(""));
|
Assert.NotNull(ServiceLayerSr.ConnectionServiceListDbErrorNotConnected(""));
|
||||||
Assert.NotNull(ServiceLayerSr.ConnectionServiceListDbErrorNullOwnerUri);
|
Assert.NotNull(ServiceLayerSr.ConnectionServiceListDbErrorNullOwnerUri);
|
||||||
Assert.NotNull(ServiceLayerSr.EE_BatchError_Exception);
|
|
||||||
Assert.NotNull(ServiceLayerSr.EE_BatchExecutionError_Halting);
|
|
||||||
Assert.NotNull(ServiceLayerSr.EE_BatchExecutionError_Ignoring);
|
|
||||||
Assert.NotNull(ServiceLayerSr.EE_BatchExecutionInfo_RowsAffected);
|
|
||||||
Assert.NotNull(ServiceLayerSr.EE_BatchSqlMessageNoLineInfo);
|
|
||||||
Assert.NotNull(ServiceLayerSr.EE_BatchSqlMessageNoProcedureInfo);
|
|
||||||
Assert.NotNull(ServiceLayerSr.EE_BatchSqlMessageWithProcedureInfo);
|
|
||||||
Assert.NotNull(ServiceLayerSr.EE_ExecutionError_CommandNotSupported);
|
|
||||||
Assert.NotNull(ServiceLayerSr.EE_ExecutionError_VariableNotFound);
|
|
||||||
Assert.NotNull(ServiceLayerSr.EE_ExecutionInfo_FinalizingLoop);
|
|
||||||
Assert.NotNull(ServiceLayerSr.EE_ExecutionInfo_InitializingLoop);
|
|
||||||
Assert.NotNull(ServiceLayerSr.EE_ExecutionInfo_QueryCancelledbyUser);
|
|
||||||
Assert.NotNull(ServiceLayerSr.EE_ExecutionNotYetCompleteError);
|
|
||||||
Assert.NotNull(ServiceLayerSr.EE_ScriptError_Error);
|
|
||||||
Assert.NotNull(ServiceLayerSr.EE_ScriptError_FatalError);
|
|
||||||
Assert.NotNull(ServiceLayerSr.EE_ScriptError_ParsingSyntax);
|
|
||||||
Assert.NotNull(ServiceLayerSr.EE_ScriptError_Warning);
|
|
||||||
Assert.NotNull(ServiceLayerSr.ErrorEmptyStringReplacement);
|
Assert.NotNull(ServiceLayerSr.ErrorEmptyStringReplacement);
|
||||||
Assert.NotNull(ServiceLayerSr.PeekDefinitionAzureError(""));
|
Assert.NotNull(ServiceLayerSr.PeekDefinitionAzureError(""));
|
||||||
Assert.NotNull(ServiceLayerSr.PeekDefinitionDatabaseError);
|
Assert.NotNull(ServiceLayerSr.PeekDefinitionDatabaseError);
|
||||||
@@ -104,7 +77,6 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.Utility
|
|||||||
Assert.NotNull(ServiceLayerSr.QueryServiceSubsetBatchOutOfRange);
|
Assert.NotNull(ServiceLayerSr.QueryServiceSubsetBatchOutOfRange);
|
||||||
Assert.NotNull(ServiceLayerSr.QueryServiceSubsetResultSetOutOfRange);
|
Assert.NotNull(ServiceLayerSr.QueryServiceSubsetResultSetOutOfRange);
|
||||||
Assert.NotNull(ServiceLayerSr.TestLocalizationConstant);
|
Assert.NotNull(ServiceLayerSr.TestLocalizationConstant);
|
||||||
Assert.NotNull(ServiceLayerSr.TroubleshootingAssistanceMessage);
|
|
||||||
Assert.NotNull(ServiceLayerSr.WorkspaceServiceBufferPositionOutOfOrder(0,0,0,0));
|
Assert.NotNull(ServiceLayerSr.WorkspaceServiceBufferPositionOutOfOrder(0,0,0,0));
|
||||||
Assert.NotNull(ServiceLayerSr.WorkspaceServicePositionColumnOutOfRange(0));
|
Assert.NotNull(ServiceLayerSr.WorkspaceServicePositionColumnOutOfRange(0));
|
||||||
Assert.NotNull(ServiceLayerSr.WorkspaceServicePositionLineOutOfRange);
|
Assert.NotNull(ServiceLayerSr.WorkspaceServicePositionLineOutOfRange);
|
||||||
|
|||||||
Reference in New Issue
Block a user