mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-16 10:58:30 -05:00
Revert ""I have changed access modifier from Internal to Public . These classes are being refered outside. (#742)" (#747)
This reverts commit a54eff11b6.
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.BatchParser
|
namespace Microsoft.SqlTools.ServiceLayer.BatchParser
|
||||||
{
|
{
|
||||||
public enum BatchParserAction
|
internal enum BatchParserAction
|
||||||
{
|
{
|
||||||
Continue = 0,
|
Continue = 0,
|
||||||
Abort = 1
|
Abort = 1
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Single batch of SQL command
|
/// Single batch of SQL command
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class Batch
|
internal class Batch
|
||||||
{
|
{
|
||||||
#region Private methods
|
#region Private methods
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Error totalAffectedRows for a Batch
|
/// Error totalAffectedRows for a Batch
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class BatchErrorEventArgs : EventArgs
|
internal class BatchErrorEventArgs : EventArgs
|
||||||
{
|
{
|
||||||
#region Private Fields
|
#region Private Fields
|
||||||
private string message = string.Empty;
|
private string message = string.Empty;
|
||||||
|
|||||||
@@ -11,25 +11,25 @@ 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>
|
||||||
public class BatchMessageEventArgs : EventArgs
|
internal 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;
|
||||||
private readonly SqlError error;
|
private readonly SqlError error;
|
||||||
|
|
||||||
public BatchMessageEventArgs()
|
private BatchMessageEventArgs()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public BatchMessageEventArgs(string msg)
|
internal BatchMessageEventArgs(string msg)
|
||||||
: this(string.Empty, msg)
|
: this(string.Empty, msg)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public BatchMessageEventArgs(string detailedMsg, string msg) : this(detailedMsg, msg, null)
|
internal BatchMessageEventArgs(string detailedMsg, string msg) : this(detailedMsg, msg, null)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
public BatchMessageEventArgs(string detailedMsg, string msg, SqlError error)
|
internal BatchMessageEventArgs(string detailedMsg, string msg, SqlError error)
|
||||||
{
|
{
|
||||||
message = msg;
|
message = msg;
|
||||||
detailedMessage = detailedMsg;
|
detailedMessage = detailedMsg;
|
||||||
|
|||||||
@@ -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>
|
||||||
public class BatchParser :
|
internal class BatchParser :
|
||||||
ICommandHandler,
|
ICommandHandler,
|
||||||
IVariableResolver
|
IVariableResolver
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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>
|
||||||
public class BatchParserExecutionErrorEventArgs : BatchErrorEventArgs
|
internal class BatchParserExecutionErrorEventArgs : BatchErrorEventArgs
|
||||||
{
|
{
|
||||||
private readonly ScriptMessageType messageType;
|
private readonly ScriptMessageType messageType;
|
||||||
|
|
||||||
|
|||||||
@@ -10,13 +10,13 @@ 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>
|
||||||
public class BatchParserExecutionFinishedEventArgs : EventArgs
|
internal class BatchParserExecutionFinishedEventArgs : EventArgs
|
||||||
{
|
{
|
||||||
|
|
||||||
private readonly Batch batch = null;
|
private readonly Batch batch = null;
|
||||||
private readonly ScriptExecutionResult result;
|
private readonly ScriptExecutionResult result;
|
||||||
|
|
||||||
public BatchParserExecutionFinishedEventArgs()
|
private BatchParserExecutionFinishedEventArgs()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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>
|
||||||
public class BatchParserExecutionStartEventArgs : EventArgs
|
internal class BatchParserExecutionStartEventArgs : EventArgs
|
||||||
{
|
{
|
||||||
|
|
||||||
private readonly Batch batch = null;
|
private readonly Batch batch = null;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ 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>
|
||||||
public class BatchParserSqlCmd : BatchParser
|
internal 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.
|
||||||
|
|||||||
@@ -11,17 +11,17 @@ namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class associated with setting batch results
|
/// Class associated with setting batch results
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class BatchResultSetEventArgs : EventArgs
|
internal class BatchResultSetEventArgs : EventArgs
|
||||||
{
|
{
|
||||||
|
|
||||||
private readonly IDataReader dataReader = null;
|
private readonly IDataReader dataReader = null;
|
||||||
private readonly ShowPlanType expectedShowPlan = ShowPlanType.None;
|
private readonly ShowPlanType expectedShowPlan = ShowPlanType.None;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Default constructor
|
/// Default constructor
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="dataReader"></param>
|
/// <param name="dataReader"></param>
|
||||||
public BatchResultSetEventArgs(IDataReader dataReader, ShowPlanType expectedShowPlan)
|
internal BatchResultSetEventArgs(IDataReader dataReader, ShowPlanType expectedShowPlan)
|
||||||
{
|
{
|
||||||
this.dataReader = dataReader;
|
this.dataReader = dataReader;
|
||||||
this.expectedShowPlan = expectedShowPlan;
|
this.expectedShowPlan = expectedShowPlan;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ using System;
|
|||||||
namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode
|
namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode
|
||||||
{
|
{
|
||||||
[Flags]
|
[Flags]
|
||||||
public enum ScriptExecutionResult
|
internal 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
|
||||||
{
|
{
|
||||||
public enum ScriptMessageType
|
internal 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]
|
||||||
public enum ShowPlanType
|
internal 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
|
||||||
{
|
{
|
||||||
public struct TextSpan
|
internal 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
|
||||||
{
|
{
|
||||||
public interface ICommandHandler
|
internal 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
|
||||||
{
|
{
|
||||||
public interface IVariableResolver
|
internal 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);
|
||||||
|
|||||||
@@ -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>
|
||||||
public class LineInfo
|
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
|
||||||
{
|
{
|
||||||
public enum OnErrorAction
|
internal enum OnErrorAction
|
||||||
{
|
{
|
||||||
Ignore = 0,
|
Ignore = 0,
|
||||||
Exit = 1,
|
Exit = 1,
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ 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>
|
||||||
public sealed class Parser : IDisposable
|
internal sealed class Parser : IDisposable
|
||||||
{
|
{
|
||||||
private readonly ICommandHandler commandHandler;
|
private readonly ICommandHandler commandHandler;
|
||||||
private Lexer lexer;
|
private Lexer lexer;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ using System;
|
|||||||
namespace Microsoft.SqlTools.ServiceLayer.BatchParser
|
namespace Microsoft.SqlTools.ServiceLayer.BatchParser
|
||||||
{
|
{
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public struct PositionStruct
|
internal struct PositionStruct
|
||||||
{
|
{
|
||||||
private readonly int line;
|
private readonly int line;
|
||||||
private readonly int column;
|
private readonly int column;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ using System.Collections.Generic;
|
|||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.BatchParser
|
namespace Microsoft.SqlTools.ServiceLayer.BatchParser
|
||||||
{
|
{
|
||||||
public class TextBlock
|
internal class TextBlock
|
||||||
{
|
{
|
||||||
private readonly Parser parser;
|
private readonly Parser parser;
|
||||||
private readonly IEnumerable<Token> tokens;
|
private readonly IEnumerable<Token> tokens;
|
||||||
|
|||||||
@@ -5,12 +5,12 @@
|
|||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.BatchParser
|
namespace Microsoft.SqlTools.ServiceLayer.BatchParser
|
||||||
{
|
{
|
||||||
public sealed class Token
|
internal sealed class Token
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Token class used by the lexer in Batch Parser
|
/// Token class used by the lexer in Batch Parser
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Token(LexerTokenType tokenType, PositionStruct begin, PositionStruct end, string text, string filename)
|
internal Token(LexerTokenType tokenType, PositionStruct begin, PositionStruct end, string text, string filename)
|
||||||
{
|
{
|
||||||
TokenType = tokenType;
|
TokenType = tokenType;
|
||||||
Begin = begin;
|
Begin = begin;
|
||||||
|
|||||||
@@ -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>
|
||||||
public sealed class VariableReference
|
internal sealed class VariableReference
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructor method for VariableReference class
|
/// Constructor method for VariableReference class
|
||||||
|
|||||||
Reference in New Issue
Block a user