Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 7DFB8200CA6 for ; Mon, 29 May 2017 09:11:59 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 7C1B5160BDF; Mon, 29 May 2017 07:11:59 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 9BEA1160BC2 for ; Mon, 29 May 2017 09:11:58 +0200 (CEST) Received: (qmail 79128 invoked by uid 500); 29 May 2017 07:11:57 -0000 Mailing-List: contact commits-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list commits@ignite.apache.org Received: (qmail 79117 invoked by uid 99); 29 May 2017 07:11:57 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 May 2017 07:11:57 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 8BC4EE110C; Mon, 29 May 2017 07:11:57 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sboikov@apache.org To: commits@ignite.apache.org Date: Mon, 29 May 2017 07:11:57 -0000 Message-Id: <745ad7e59068473881183a12f64e2669@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [01/11] ignite git commit: .NET: Remove more dead code from old LINQ CompiledQuery archived-at: Mon, 29 May 2017 07:11:59 -0000 Repository: ignite Updated Branches: refs/heads/ignite-5075 3858bb58f -> 32b43db7f .NET: Remove more dead code from old LINQ CompiledQuery Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/cfc74364 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/cfc74364 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/cfc74364 Branch: refs/heads/ignite-5075 Commit: cfc74364c27ad06d38fc2bb40fdc442327e95285 Parents: bdd43ff Author: Pavel Tupitsyn Authored: Fri May 26 11:38:06 2017 +0300 Committer: Pavel Tupitsyn Committed: Fri May 26 11:38:06 2017 +0300 ---------------------------------------------------------------------- .../Impl/CacheQueryExpressionVisitor.cs | 12 +----------- .../Impl/CacheQueryModelVisitor.cs | 13 +------------ .../dotnet/Apache.Ignite.Linq/Impl/MethodVisitor.cs | 7 +++++-- .../dotnet/Apache.Ignite.Linq/Impl/QueryData.cs | 16 +--------------- 4 files changed, 8 insertions(+), 40 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/cfc74364/modules/platforms/dotnet/Apache.Ignite.Linq/Impl/CacheQueryExpressionVisitor.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Linq/Impl/CacheQueryExpressionVisitor.cs b/modules/platforms/dotnet/Apache.Ignite.Linq/Impl/CacheQueryExpressionVisitor.cs index 2d14ec4..8fa0b5d 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Linq/Impl/CacheQueryExpressionVisitor.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Linq/Impl/CacheQueryExpressionVisitor.cs @@ -313,22 +313,12 @@ namespace Apache.Ignite.Linq.Impl ResultBuilder.AppendFormat("{0}.{1}", Aliases.GetTableAlias(expression), fieldName); } else - AppendParameter(RegisterEvaluatedParameter(expression)); + AppendParameter(ExpressionWalker.EvaluateExpression(expression)); return expression; } /// - /// Registers query parameter that is evaluated from a lambda expression argument. - /// - public object RegisterEvaluatedParameter(Expression expression) - { - _modelVisitor.ParameterExpressions.Add(expression); - - return ExpressionWalker.EvaluateExpression(expression); - } - - /// /// Gets the name of the field from a member expression. /// private static string GetFieldName(MemberExpression expression, ICacheQueryableInternal queryable) http://git-wip-us.apache.org/repos/asf/ignite/blob/cfc74364/modules/platforms/dotnet/Apache.Ignite.Linq/Impl/CacheQueryModelVisitor.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Linq/Impl/CacheQueryModelVisitor.cs b/modules/platforms/dotnet/Apache.Ignite.Linq/Impl/CacheQueryModelVisitor.cs index f74ccc7..f566caa 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Linq/Impl/CacheQueryModelVisitor.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Linq/Impl/CacheQueryModelVisitor.cs @@ -43,9 +43,6 @@ namespace Apache.Ignite.Linq.Impl private readonly List _parameters = new List(); /** */ - private readonly List _parameterExpressions = new List(); - - /** */ private readonly AliasDictionary _aliases = new AliasDictionary(); /// @@ -63,7 +60,7 @@ namespace Apache.Ignite.Linq.Impl var qryText = _builder.ToString(); - return new QueryData(qryText, _parameters, _parameterExpressions); + return new QueryData(qryText, _parameters); } /// @@ -83,14 +80,6 @@ namespace Apache.Ignite.Linq.Impl } /// - /// Gets the parameters. - /// - public IList ParameterExpressions - { - get { return _parameterExpressions; } - } - - /// /// Gets the aliases. /// public AliasDictionary Aliases http://git-wip-us.apache.org/repos/asf/ignite/blob/cfc74364/modules/platforms/dotnet/Apache.Ignite.Linq/Impl/MethodVisitor.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Linq/Impl/MethodVisitor.cs b/modules/platforms/dotnet/Apache.Ignite.Linq/Impl/MethodVisitor.cs index 578c5da..9446af3 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Linq/Impl/MethodVisitor.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Linq/Impl/MethodVisitor.cs @@ -250,7 +250,8 @@ namespace Apache.Ignite.Linq.Impl /// /// Visits the SQL like expression. /// - private static void VisitSqlLike(MethodCallExpression expression, CacheQueryExpressionVisitor visitor, string likeFormat) + private static void VisitSqlLike(MethodCallExpression expression, CacheQueryExpressionVisitor visitor, + string likeFormat) { visitor.ResultBuilder.Append("("); @@ -260,7 +261,9 @@ namespace Apache.Ignite.Linq.Impl var arg = expression.Arguments[0] as ConstantExpression; - var paramValue = arg != null ? arg.Value : visitor.RegisterEvaluatedParameter(expression.Arguments[0]); + var paramValue = arg != null + ? arg.Value + : ExpressionWalker.EvaluateExpression(expression.Arguments[0]); visitor.Parameters.Add(paramValue); } http://git-wip-us.apache.org/repos/asf/ignite/blob/cfc74364/modules/platforms/dotnet/Apache.Ignite.Linq/Impl/QueryData.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Linq/Impl/QueryData.cs b/modules/platforms/dotnet/Apache.Ignite.Linq/Impl/QueryData.cs index 5424692..81b91d2 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Linq/Impl/QueryData.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Linq/Impl/QueryData.cs @@ -33,24 +33,18 @@ namespace Apache.Ignite.Linq.Impl /** */ private readonly string _queryText; - /** */ - private readonly ICollection _parameterExpressions; - /// /// Initializes a new instance of the class. /// /// The query text. /// The parameters. - /// - public QueryData(string queryText, ICollection parameters, ICollection parameterExpressions) + public QueryData(string queryText, ICollection parameters) { Debug.Assert(queryText != null); Debug.Assert(parameters != null); - Debug.Assert(parameterExpressions != null); _queryText = queryText; _parameters = parameters; - _parameterExpressions = parameterExpressions; } /// @@ -70,14 +64,6 @@ namespace Apache.Ignite.Linq.Impl } /// - /// Gets the parameter expressions. - /// - public ICollection ParameterExpressions - { - get { return _parameterExpressions; } - } - - /// /// Returns a that represents this instance. /// ///