From 6d6ca3f633b7f26471938e4d8cf7a9b3dc164509 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matija=20Ko=C5=BEelj?= Date: Wed, 25 Jan 2023 12:07:36 +0100 Subject: [PATCH] Add local nuget package push to projects Add where clause rewriter to TSqlLinguist --- .../Connected.Collections.csproj | 5 ++ .../Connected.Configuration.csproj | 5 ++ src/Connected.Data/Sql/TSqlLinguist.cs | 50 +++++++++---------- .../Connected.Expressions.csproj | 5 ++ 4 files changed, 39 insertions(+), 26 deletions(-) diff --git a/src/Connected.Collections/Connected.Collections.csproj b/src/Connected.Collections/Connected.Collections.csproj index da7094a..8476b75 100644 --- a/src/Connected.Collections/Connected.Collections.csproj +++ b/src/Connected.Collections/Connected.Collections.csproj @@ -58,4 +58,9 @@ + + + + + diff --git a/src/Connected.Configuration/Connected.Configuration.csproj b/src/Connected.Configuration/Connected.Configuration.csproj index 8ee74b3..ad8184d 100644 --- a/src/Connected.Configuration/Connected.Configuration.csproj +++ b/src/Connected.Configuration/Connected.Configuration.csproj @@ -40,4 +40,9 @@ + + + + + diff --git a/src/Connected.Data/Sql/TSqlLinguist.cs b/src/Connected.Data/Sql/TSqlLinguist.cs index e1fca67..d2b48e9 100644 --- a/src/Connected.Data/Sql/TSqlLinguist.cs +++ b/src/Connected.Data/Sql/TSqlLinguist.cs @@ -9,33 +9,31 @@ namespace Connected.Data.Sql; internal sealed class TSqlLinguist : Linguist { - public TSqlLinguist(ExpressionCompilationContext context, TSqlLanguage language, Translator translator) - : base(context, language, translator) - { - } + public TSqlLinguist(ExpressionCompilationContext context, TSqlLanguage language, Translator translator) + : base(context, language, translator) + { + } - public override Expression Translate(Expression expression) - { - /* - * fix up any order-by's - */ - expression = OrderByRewriter.Rewrite(Language, expression); + public override Expression Translate(Expression expression) + { + /* + * fix up any order-by's + */ + expression = OrderByRewriter.Rewrite(Language, expression); - expression = base.Translate(expression); - /* - * convert skip/take info into RowNumber pattern - */ - expression = SkipToRowNumberRewriter.Rewrite(Language, expression); - /* - * fix up any order-by's we may have changed - */ - expression = OrderByRewriter.Rewrite(Language, expression); + expression = base.Translate(expression); + /* + * convert skip/take info into RowNumber pattern + */ + expression = SkipToRowNumberRewriter.Rewrite(Language, expression); + + expression = WhereClauseRewriter.Rewrite(Context, expression); + + return expression; + } - return expression; - } - - public override string Format(Expression expression) - { - return TSqlFormatter.Format(Context, expression, Language); - } + public override string Format(Expression expression) + { + return TSqlFormatter.Format(Context, expression, Language); + } } diff --git a/src/Connected.Expressions/Connected.Expressions.csproj b/src/Connected.Expressions/Connected.Expressions.csproj index d65774c..48609ed 100644 --- a/src/Connected.Expressions/Connected.Expressions.csproj +++ b/src/Connected.Expressions/Connected.Expressions.csproj @@ -42,4 +42,9 @@ + + + + +