diff --git a/TSQL_Parser/TSQL_Parser/Clauses/Parsers/TSQLSubqueryHelper.cs b/TSQL_Parser/TSQL_Parser/Clauses/Parsers/TSQLSubqueryHelper.cs index c1f3201..e309f0e 100644 --- a/TSQL_Parser/TSQL_Parser/Clauses/Parsers/TSQLSubqueryHelper.cs +++ b/TSQL_Parser/TSQL_Parser/Clauses/Parsers/TSQLSubqueryHelper.cs @@ -4,10 +4,10 @@ using System.Text; using System.Threading.Tasks; +using TSQL.Elements; using TSQL.Expressions; using TSQL.Expressions.Parsers; using TSQL.Statements; -using TSQL.Statements.Parsers; using TSQL.Tokens; namespace TSQL.Clauses.Parsers @@ -20,7 +20,7 @@ internal static class TSQLSubqueryHelper /// public static void ReadUntilStop( ITSQLTokenizer tokenizer, - TSQLExpression expression, + TSQLElement element, List futureKeywords, List keywords, bool lookForStatementStarts) @@ -52,19 +52,19 @@ public static void ReadUntilStop( { TSQLSubqueryHelper.RecurseParens( tokenizer, - expression, + element, ref nestedLevel); } } public static void RecurseParens( ITSQLTokenizer tokenizer, - TSQLExpression expression, + TSQLElement element, ref int nestedLevel) { if (tokenizer.Current.Type == TSQLTokenType.Character) { - expression.Tokens.Add(tokenizer.Current); + element.Tokens.Add(tokenizer.Current); TSQLCharacters character = tokenizer.Current.AsCharacter.Character; @@ -90,11 +90,11 @@ public static void RecurseParens( // not include the stop token within their token list. TSQLCaseExpression caseExpression = new TSQLCaseExpressionParser().Parse(tokenizer); - expression.Tokens.AddRange(caseExpression.Tokens); + element.Tokens.AddRange(caseExpression.Tokens); } else { - expression.Tokens.Add(tokenizer.Current); + element.Tokens.Add(tokenizer.Current); } } } diff --git a/TSQL_Parser/TSQL_Parser/Clauses/TSQLClause.cs b/TSQL_Parser/TSQL_Parser/Clauses/TSQLClause.cs index 0ec494e..4a88573 100644 --- a/TSQL_Parser/TSQL_Parser/Clauses/TSQLClause.cs +++ b/TSQL_Parser/TSQL_Parser/Clauses/TSQLClause.cs @@ -3,12 +3,11 @@ using System.Linq; using System.Text; -using TSQL.Expressions; -using TSQL.Tokens; +using TSQL.Elements; namespace TSQL.Clauses { - public abstract class TSQLClause : TSQLExpression + public abstract class TSQLClause : TSQLElement { } diff --git a/TSQL_Parser/TSQL_Parser/Clauses/TSQLHavingClause.cs b/TSQL_Parser/TSQL_Parser/Clauses/TSQLHavingClause.cs index eafcf65..1924a95 100644 --- a/TSQL_Parser/TSQL_Parser/Clauses/TSQLHavingClause.cs +++ b/TSQL_Parser/TSQL_Parser/Clauses/TSQLHavingClause.cs @@ -3,6 +3,8 @@ using System.Linq; using System.Text; +using TSQL.Elements; + namespace TSQL.Clauses { public class TSQLHavingClause : TSQLClause @@ -11,5 +13,13 @@ internal TSQLHavingClause() { } + + public List Predicates + { + get + { + return null; + } + } } } diff --git a/TSQL_Parser/TSQL_Parser/Clauses/TSQLSelectClause.cs b/TSQL_Parser/TSQL_Parser/Clauses/TSQLSelectClause.cs index c81e8fb..3d42e00 100644 --- a/TSQL_Parser/TSQL_Parser/Clauses/TSQLSelectClause.cs +++ b/TSQL_Parser/TSQL_Parser/Clauses/TSQLSelectClause.cs @@ -3,6 +3,8 @@ using System.Linq; using System.Text; +using TSQL.Elements; + namespace TSQL.Clauses { public class TSQLSelectClause : TSQLClause @@ -11,5 +13,13 @@ internal TSQLSelectClause() { } + + public List Columns + { + get + { + return null; + } + } } } diff --git a/TSQL_Parser/TSQL_Parser/Clauses/TSQLWhereClause.cs b/TSQL_Parser/TSQL_Parser/Clauses/TSQLWhereClause.cs index 627467e..bfc36a3 100644 --- a/TSQL_Parser/TSQL_Parser/Clauses/TSQLWhereClause.cs +++ b/TSQL_Parser/TSQL_Parser/Clauses/TSQLWhereClause.cs @@ -3,6 +3,8 @@ using System.Linq; using System.Text; +using TSQL.Elements; + namespace TSQL.Clauses { public class TSQLWhereClause : TSQLClause @@ -11,5 +13,13 @@ internal TSQLWhereClause() { } + + public List Predicates + { + get + { + return null; + } + } } } diff --git a/TSQL_Parser/TSQL_Parser/Expressions/Parsers/TSQLDefaultValuesExpressionParser.cs b/TSQL_Parser/TSQL_Parser/Elements/Parsers/TSQLDefaultValuesParser.cs similarity index 65% rename from TSQL_Parser/TSQL_Parser/Expressions/Parsers/TSQLDefaultValuesExpressionParser.cs rename to TSQL_Parser/TSQL_Parser/Elements/Parsers/TSQLDefaultValuesParser.cs index 29bea7f..93e5484 100644 --- a/TSQL_Parser/TSQL_Parser/Expressions/Parsers/TSQLDefaultValuesExpressionParser.cs +++ b/TSQL_Parser/TSQL_Parser/Elements/Parsers/TSQLDefaultValuesParser.cs @@ -4,17 +4,15 @@ using System.Text; using System.Threading.Tasks; -using TSQL.Clauses.Parsers; -using TSQL.Statements; using TSQL.Tokens; -namespace TSQL.Expressions.Parsers +namespace TSQL.Elements.Parsers { - internal class TSQLDefaultValuesExpressionParser + internal class TSQLDefaultValuesParser { - public TSQLDefaultValuesExpression Parse(ITSQLTokenizer tokenizer) + public TSQLDefaultValues Parse(ITSQLTokenizer tokenizer) { - TSQLDefaultValuesExpression defaultValues = new TSQLDefaultValuesExpression(); + TSQLDefaultValues defaultValues = new TSQLDefaultValues(); if (!tokenizer.Current.IsKeyword(TSQLKeywords.DEFAULT)) { diff --git a/TSQL_Parser/TSQL_Parser/Elements/Parsers/TSQLSelectColumnParser.cs b/TSQL_Parser/TSQL_Parser/Elements/Parsers/TSQLSelectColumnParser.cs new file mode 100644 index 0000000..04ae0d0 --- /dev/null +++ b/TSQL_Parser/TSQL_Parser/Elements/Parsers/TSQLSelectColumnParser.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TSQL.Elements.Parsers +{ + internal class TSQLSelectColumnParser + { + public TSQLSelectColumn Parse(ITSQLTokenizer tokenizer) + { + return null; + } + } +} diff --git a/TSQL_Parser/TSQL_Parser/Expressions/Parsers/TSQLValuesExpressionParser.cs b/TSQL_Parser/TSQL_Parser/Elements/Parsers/TSQLValuesParser.cs similarity index 64% rename from TSQL_Parser/TSQL_Parser/Expressions/Parsers/TSQLValuesExpressionParser.cs rename to TSQL_Parser/TSQL_Parser/Elements/Parsers/TSQLValuesParser.cs index 4ecbda3..a0b07fd 100644 --- a/TSQL_Parser/TSQL_Parser/Expressions/Parsers/TSQLValuesExpressionParser.cs +++ b/TSQL_Parser/TSQL_Parser/Elements/Parsers/TSQLValuesParser.cs @@ -4,24 +4,24 @@ using TSQL.Clauses.Parsers; using TSQL.Tokens; -namespace TSQL.Expressions.Parsers +namespace TSQL.Elements.Parsers { - internal class TSQLValuesExpressionParser + internal class TSQLValuesParser { - public TSQLValuesExpression Parse(ITSQLTokenizer tokenizer) + public TSQLValues Parse(ITSQLTokenizer tokenizer) { - TSQLValuesExpression valuesExpression = new TSQLValuesExpression(); + TSQLValues values = new TSQLValues(); if (!tokenizer.Current.IsKeyword(TSQLKeywords.VALUES)) { throw new InvalidOperationException("VALUES expected."); } - valuesExpression.Tokens.Add(tokenizer.Current); + values.Tokens.Add(tokenizer.Current); TSQLSubqueryHelper.ReadUntilStop( tokenizer, - valuesExpression, + values, // stop words come from usage in MERGE new List() { TSQLFutureKeywords.OUTPUT @@ -33,7 +33,7 @@ public TSQLValuesExpression Parse(ITSQLTokenizer tokenizer) // INSERT INTO ... VALUES ... SELECT lookForStatementStarts: true); - return valuesExpression; + return values; } } } \ No newline at end of file diff --git a/TSQL_Parser/TSQL_Parser/Expressions/TSQLDefaultValuesExpression.cs b/TSQL_Parser/TSQL_Parser/Elements/TSQLDefaultValues.cs similarity index 60% rename from TSQL_Parser/TSQL_Parser/Expressions/TSQLDefaultValuesExpression.cs rename to TSQL_Parser/TSQL_Parser/Elements/TSQLDefaultValues.cs index 1fa71a5..6ebe997 100644 --- a/TSQL_Parser/TSQL_Parser/Expressions/TSQLDefaultValuesExpression.cs +++ b/TSQL_Parser/TSQL_Parser/Elements/TSQLDefaultValues.cs @@ -4,9 +4,9 @@ using System.Text; using System.Threading.Tasks; -namespace TSQL.Expressions +namespace TSQL.Elements { - public class TSQLDefaultValuesExpression : TSQLExpression + public class TSQLDefaultValues : TSQLElement { } diff --git a/TSQL_Parser/TSQL_Parser/Elements/TSQLElement.cs b/TSQL_Parser/TSQL_Parser/Elements/TSQLElement.cs new file mode 100644 index 0000000..5bd725a --- /dev/null +++ b/TSQL_Parser/TSQL_Parser/Elements/TSQLElement.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +using TSQL.Tokens; + +namespace TSQL.Elements +{ + public abstract class TSQLElement + { + + private readonly List _tokens = new List(); + + public List Tokens + { + get + { + return _tokens; + } + } + + public int BeginPosition + { + get + { + return Tokens.First().BeginPosition; + } + } + + public int EndPosition + { + get + { + return Tokens.Last().EndPosition; + } + } + + public int Length + { + get + { + return EndPosition - BeginPosition + 1; + } + } + } +} diff --git a/TSQL_Parser/TSQL_Parser/Elements/TSQLPredicate.cs b/TSQL_Parser/TSQL_Parser/Elements/TSQLPredicate.cs new file mode 100644 index 0000000..68ca432 --- /dev/null +++ b/TSQL_Parser/TSQL_Parser/Elements/TSQLPredicate.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TSQL.Elements +{ + public class TSQLPredicate : TSQLElement + { + + } +} diff --git a/TSQL_Parser/TSQL_Parser/Elements/TSQLSelectColumn.cs b/TSQL_Parser/TSQL_Parser/Elements/TSQLSelectColumn.cs new file mode 100644 index 0000000..03ab5c0 --- /dev/null +++ b/TSQL_Parser/TSQL_Parser/Elements/TSQLSelectColumn.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +using TSQL.Expressions; + +namespace TSQL.Elements +{ + public class TSQLSelectColumn : TSQLElement + { + public string Alias + { + get + { + return null; + } + } + + public TSQLExpression Expression + { + get + { + return null; + } + } + } +} diff --git a/TSQL_Parser/TSQL_Parser/Elements/TSQLValues.cs b/TSQL_Parser/TSQL_Parser/Elements/TSQLValues.cs new file mode 100644 index 0000000..0cce21b --- /dev/null +++ b/TSQL_Parser/TSQL_Parser/Elements/TSQLValues.cs @@ -0,0 +1,7 @@ +namespace TSQL.Elements +{ + public class TSQLValues : TSQLElement + { + + } +} \ No newline at end of file diff --git a/TSQL_Parser/TSQL_Parser/Expressions/Parsers/TSQLCaseExpressionParser.cs b/TSQL_Parser/TSQL_Parser/Expressions/Parsers/TSQLCaseExpressionParser.cs index 7a13145..dc61984 100644 --- a/TSQL_Parser/TSQL_Parser/Expressions/Parsers/TSQLCaseExpressionParser.cs +++ b/TSQL_Parser/TSQL_Parser/Expressions/Parsers/TSQLCaseExpressionParser.cs @@ -5,7 +5,6 @@ using System.Threading.Tasks; using TSQL.Clauses.Parsers; -using TSQL.Statements; using TSQL.Tokens; namespace TSQL.Expressions.Parsers diff --git a/TSQL_Parser/TSQL_Parser/Expressions/Parsers/TSQLExpressionFactory.cs b/TSQL_Parser/TSQL_Parser/Expressions/Parsers/TSQLExpressionFactory.cs new file mode 100644 index 0000000..b5cfd50 --- /dev/null +++ b/TSQL_Parser/TSQL_Parser/Expressions/Parsers/TSQLExpressionFactory.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +using TSQL.Tokens; + +namespace TSQL.Expressions.Parsers +{ + internal class TSQLExpressionFactory + { + public TSQLExpression Parse(ITSQLTokenizer tokenizer) + { + if (tokenizer.Current.IsKeyword(TSQLKeywords.CASE)) + { + return new TSQLCaseExpressionParser().Parse(tokenizer); + } + else + { + return null; + } + } + } +} diff --git a/TSQL_Parser/TSQL_Parser/Expressions/TSQLCaseExpression.cs b/TSQL_Parser/TSQL_Parser/Expressions/TSQLCaseExpression.cs index 719e3f9..7683bc5 100644 --- a/TSQL_Parser/TSQL_Parser/Expressions/TSQLCaseExpression.cs +++ b/TSQL_Parser/TSQL_Parser/Expressions/TSQLCaseExpression.cs @@ -8,6 +8,12 @@ namespace TSQL.Expressions { public class TSQLCaseExpression : TSQLExpression { - + public override TSQLExpressionType Type + { + get + { + return TSQLExpressionType.Case; + } + } } } diff --git a/TSQL_Parser/TSQL_Parser/Expressions/TSQLColumnExpression.cs b/TSQL_Parser/TSQL_Parser/Expressions/TSQLColumnExpression.cs new file mode 100644 index 0000000..f0c2d1c --- /dev/null +++ b/TSQL_Parser/TSQL_Parser/Expressions/TSQLColumnExpression.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TSQL.Expressions +{ + public class TSQLColumnExpression : TSQLExpression + { + public override TSQLExpressionType Type + { + get + { + return TSQLExpressionType.Column; + } + } + + public string TableAlias + { + get + { + return null; + } + } + } +} diff --git a/TSQL_Parser/TSQL_Parser/Expressions/TSQLExpression.cs b/TSQL_Parser/TSQL_Parser/Expressions/TSQLExpression.cs index 4faf0fe..ec038c9 100644 --- a/TSQL_Parser/TSQL_Parser/Expressions/TSQLExpression.cs +++ b/TSQL_Parser/TSQL_Parser/Expressions/TSQLExpression.cs @@ -4,44 +4,15 @@ using System.Text; using System.Threading.Tasks; -using TSQL.Tokens; +using TSQL.Elements; namespace TSQL.Expressions { - public abstract class TSQLExpression + public abstract class TSQLExpression : TSQLElement { - private readonly List _tokens = new List(); - - public List Tokens - { - get - { - return _tokens; - } - } - - public int BeginPosition - { - get - { - return Tokens.First().BeginPosition; - } - } - - public int EndPosition - { - get - { - return Tokens.Last().EndPosition; - } - } - - public int Length + public abstract TSQLExpressionType Type { - get - { - return EndPosition - BeginPosition + 1; - } + get; } } } diff --git a/TSQL_Parser/TSQL_Parser/Expressions/TSQLExpressionType.cs b/TSQL_Parser/TSQL_Parser/Expressions/TSQLExpressionType.cs new file mode 100644 index 0000000..ada0cb8 --- /dev/null +++ b/TSQL_Parser/TSQL_Parser/Expressions/TSQLExpressionType.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TSQL.Expressions +{ + public enum TSQLExpressionType + { + Case, + Column, + Function, + Subquery, + Variable, + Multicolumn, + Operator, + Grouped + } +} diff --git a/TSQL_Parser/TSQL_Parser/Expressions/TSQLFunctionExpression.cs b/TSQL_Parser/TSQL_Parser/Expressions/TSQLFunctionExpression.cs new file mode 100644 index 0000000..ff5897d --- /dev/null +++ b/TSQL_Parser/TSQL_Parser/Expressions/TSQLFunctionExpression.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TSQL.Expressions +{ + public class TSQLFunctionExpression : TSQLExpression + { + public override TSQLExpressionType Type + { + get + { + return TSQLExpressionType.Function; + } + } + } +} diff --git a/TSQL_Parser/TSQL_Parser/Expressions/TSQLGroupedExpression.cs b/TSQL_Parser/TSQL_Parser/Expressions/TSQLGroupedExpression.cs new file mode 100644 index 0000000..d81694d --- /dev/null +++ b/TSQL_Parser/TSQL_Parser/Expressions/TSQLGroupedExpression.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TSQL.Expressions +{ + public class TSQLGroupedExpression : TSQLExpression + { + public override TSQLExpressionType Type + { + get + { + return TSQLExpressionType.Grouped; + } + } + + public TSQLExpression InnerExpression + { + get + { + return null; + } + } + } +} diff --git a/TSQL_Parser/TSQL_Parser/Expressions/TSQLMulticolumnExpression.cs b/TSQL_Parser/TSQL_Parser/Expressions/TSQLMulticolumnExpression.cs new file mode 100644 index 0000000..83fafe5 --- /dev/null +++ b/TSQL_Parser/TSQL_Parser/Expressions/TSQLMulticolumnExpression.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TSQL.Expressions +{ + public class TSQLMulticolumnExpression : TSQLExpression + { + public override TSQLExpressionType Type + { + get + { + return TSQLExpressionType.Multicolumn; + } + } + + public string TableAlias + { + get + { + return null; + } + } + } +} diff --git a/TSQL_Parser/TSQL_Parser/Expressions/TSQLOperatorExpression.cs b/TSQL_Parser/TSQL_Parser/Expressions/TSQLOperatorExpression.cs new file mode 100644 index 0000000..434abc5 --- /dev/null +++ b/TSQL_Parser/TSQL_Parser/Expressions/TSQLOperatorExpression.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +using TSQL.Tokens; + +namespace TSQL.Expressions +{ + public class TSQLOperatorExpression : TSQLExpression + { + public override TSQLExpressionType Type + { + get + { + return TSQLExpressionType.Operator; + } + } + + public TSQLExpression LeftSide + { + get + { + return null; + } + } + + public TSQLExpression RightSide + { + get + { + return null; + } + } + + public TSQLOperator Operator + { + get + { + return null; + } + } + } +} diff --git a/TSQL_Parser/TSQL_Parser/Expressions/TSQLSubqueryExpression.cs b/TSQL_Parser/TSQL_Parser/Expressions/TSQLSubqueryExpression.cs new file mode 100644 index 0000000..91beca0 --- /dev/null +++ b/TSQL_Parser/TSQL_Parser/Expressions/TSQLSubqueryExpression.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TSQL.Expressions +{ + public class TSQLSubqueryExpression : TSQLExpression + { + public override TSQLExpressionType Type + { + get + { + return TSQLExpressionType.Subquery; + } + } + } +} diff --git a/TSQL_Parser/TSQL_Parser/Expressions/TSQLValuesExpression.cs b/TSQL_Parser/TSQL_Parser/Expressions/TSQLValuesExpression.cs deleted file mode 100644 index 7d75a5a..0000000 --- a/TSQL_Parser/TSQL_Parser/Expressions/TSQLValuesExpression.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace TSQL.Expressions -{ - public class TSQLValuesExpression : TSQLExpression - { - - } -} \ No newline at end of file diff --git a/TSQL_Parser/TSQL_Parser/Expressions/TSQLVariableExpression.cs b/TSQL_Parser/TSQL_Parser/Expressions/TSQLVariableExpression.cs new file mode 100644 index 0000000..7b677f1 --- /dev/null +++ b/TSQL_Parser/TSQL_Parser/Expressions/TSQLVariableExpression.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +using TSQL.Tokens; + +namespace TSQL.Expressions +{ + public class TSQLVariableExpression : TSQLExpression + { + public override TSQLExpressionType Type + { + get + { + return TSQLExpressionType.Variable; + } + } + + public TSQLVariable Variable + { + get + { + return null; + } + } + } +} diff --git a/TSQL_Parser/TSQL_Parser/Statements/Parsers/TSQLInsertStatementParser.cs b/TSQL_Parser/TSQL_Parser/Statements/Parsers/TSQLInsertStatementParser.cs index 48c01a0..840b7f3 100644 --- a/TSQL_Parser/TSQL_Parser/Statements/Parsers/TSQLInsertStatementParser.cs +++ b/TSQL_Parser/TSQL_Parser/Statements/Parsers/TSQLInsertStatementParser.cs @@ -5,8 +5,8 @@ using TSQL.Clauses; using TSQL.Clauses.Parsers; -using TSQL.Expressions; -using TSQL.Expressions.Parsers; +using TSQL.Elements; +using TSQL.Elements.Parsers; using TSQL.Tokens; namespace TSQL.Statements.Parsers @@ -49,7 +49,7 @@ public TSQLInsertStatement Parse() if (Tokenizer.Current.IsKeyword(TSQLKeywords.VALUES)) { - TSQLValuesExpression values = new TSQLValuesExpressionParser().Parse(Tokenizer); + TSQLValues values = new TSQLValuesParser().Parse(Tokenizer); Statement.Values = values; @@ -65,7 +65,7 @@ public TSQLInsertStatement Parse() } else if (Tokenizer.Current.IsKeyword(TSQLKeywords.DEFAULT)) { - TSQLDefaultValuesExpression defaultValues = new TSQLDefaultValuesExpressionParser().Parse(Tokenizer); + TSQLDefaultValues defaultValues = new TSQLDefaultValuesParser().Parse(Tokenizer); Statement.Default = defaultValues; diff --git a/TSQL_Parser/TSQL_Parser/Statements/TSQLInsertStatement.cs b/TSQL_Parser/TSQL_Parser/Statements/TSQLInsertStatement.cs index 865790d..83b56f3 100644 --- a/TSQL_Parser/TSQL_Parser/Statements/TSQLInsertStatement.cs +++ b/TSQL_Parser/TSQL_Parser/Statements/TSQLInsertStatement.cs @@ -4,7 +4,7 @@ using System.Text; using TSQL.Clauses; -using TSQL.Expressions; +using TSQL.Elements; namespace TSQL.Statements { @@ -33,12 +33,12 @@ public override TSQLStatementType Type public TSQLOutputClause Output { get; internal set; } - public TSQLValuesExpression Values { get; internal set; } + public TSQLValues Values { get; internal set; } public TSQLSelectStatement Select { get; internal set; } public TSQLExecuteStatement Execute { get; internal set; } - public TSQLDefaultValuesExpression Default { get; internal set; } + public TSQLDefaultValues Default { get; internal set; } } } diff --git a/TSQL_Parser/TSQL_Parser/Statements/TSQLStatement.cs b/TSQL_Parser/TSQL_Parser/Statements/TSQLStatement.cs index 5c2cc53..edf80ae 100644 --- a/TSQL_Parser/TSQL_Parser/Statements/TSQLStatement.cs +++ b/TSQL_Parser/TSQL_Parser/Statements/TSQLStatement.cs @@ -3,12 +3,11 @@ using System.Linq; using System.Text; -using TSQL.Expressions; -using TSQL.Tokens; +using TSQL.Elements; namespace TSQL.Statements { - public abstract class TSQLStatement : TSQLExpression + public abstract class TSQLStatement : TSQLElement { public abstract TSQLStatementType Type { diff --git a/TSQL_Parser/TSQL_Parser/TSQL_Parser.csproj b/TSQL_Parser/TSQL_Parser/TSQL_Parser.csproj index 3dfd9e4..6ba36a7 100644 --- a/TSQL_Parser/TSQL_Parser/TSQL_Parser.csproj +++ b/TSQL_Parser/TSQL_Parser/TSQL_Parser.csproj @@ -100,13 +100,26 @@ - - - - + + + + + + + + + + + + + + + + + BufferedTextReader.cs @@ -136,6 +149,7 @@ + @@ -156,7 +170,6 @@ TSQLStatementReader.cs - diff --git a/TSQL_Parser/TSQL_Parser/TSQL_Parser_NetStandard.csproj b/TSQL_Parser/TSQL_Parser/TSQL_Parser_NetStandard.csproj index 01b840e..4c81f26 100644 --- a/TSQL_Parser/TSQL_Parser/TSQL_Parser_NetStandard.csproj +++ b/TSQL_Parser/TSQL_Parser/TSQL_Parser_NetStandard.csproj @@ -39,6 +39,7 @@ +