Repository: ignite Updated Branches: refs/heads/ignite-2.3 b00a05c62 -> 68468d0c9
IGNITE-5224 .NET: PadLeft and PadRight support in LINQ This closes #2808 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/68468d0c Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/68468d0c Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/68468d0c Branch: refs/heads/ignite-2.3 Commit: 68468d0c93397b9fb116da3c903fde85433060b2 Parents: b00a05c Author: Alexey Popov <tank2.a...@gmail.com> Authored: Fri Oct 6 12:18:38 2017 +0300 Committer: Pavel Tupitsyn <ptupit...@apache.org> Committed: Fri Oct 13 17:25:48 2017 +0300 ---------------------------------------------------------------------- .../Cache/Query/Linq/CacheLinqTest.Strings.cs | 5 +++++ .../platforms/dotnet/Apache.Ignite.Linq/Impl/MethodVisitor.cs | 4 ++++ 2 files changed, 9 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/68468d0c/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Linq/CacheLinqTest.Strings.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Linq/CacheLinqTest.Strings.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Linq/CacheLinqTest.Strings.cs index b2bcfdd..35996b0 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Linq/CacheLinqTest.Strings.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Linq/CacheLinqTest.Strings.cs @@ -46,6 +46,11 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Linq { var strings = GetSecondPersonCache().AsCacheQueryable().Select(x => x.Value.Name); + CheckFunc(x => x.PadLeft(20), strings); + CheckFunc(x => x.PadLeft(20, 'l'), strings); + CheckFunc(x => x.PadRight(20), strings); + CheckFunc(x => x.PadRight(20, 'r'), strings); + CheckFunc(x => x.ToLower(), strings); CheckFunc(x => x.ToUpper(), strings); CheckFunc(x => x.StartsWith("Person_9"), strings); http://git-wip-us.apache.org/repos/asf/ignite/blob/68468d0c/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 054a984..84bd98f 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Linq/Impl/MethodVisitor.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Linq/Impl/MethodVisitor.cs @@ -66,6 +66,10 @@ namespace Apache.Ignite.Linq.Impl GetParameterizedTrimMethod("TrimStart", "ltrim"), GetParameterizedTrimMethod("TrimEnd", "rtrim"), GetStringMethod("Replace", "replace", typeof(string), typeof(string)), + GetStringMethod("PadLeft", "lpad", typeof (int)), + GetStringMethod("PadLeft", "lpad", typeof (int), typeof (char)), + GetStringMethod("PadRight", "rpad", typeof (int)), + GetStringMethod("PadRight", "rpad", typeof (int), typeof (char)), GetRegexMethod("Replace", "regexp_replace", typeof (string), typeof (string), typeof (string)), GetRegexMethod("Replace", "regexp_replace", typeof (string), typeof (string), typeof (string),