This is an automated email from the ASF dual-hosted git repository. ptupitsyn pushed a commit to branch ignite-11525 in repository https://gitbox.apache.org/repos/asf/ignite.git
The following commit(s) were added to refs/heads/ignite-11525 by this push: new 7206ae6 Fix LINQPad examples 7206ae6 is described below commit 7206ae6f30b93fc8b1788994e47293cf128205ff Author: Pavel Tupitsyn <ptupit...@apache.org> AuthorDate: Fri Apr 5 17:41:07 2019 +0300 Fix LINQPad examples --- .../dotnet/Apache.Ignite.Core/NuGet/LINQPad/BinaryModeExample.linq | 5 ----- .../dotnet/Apache.Ignite.Core/NuGet/LINQPad/QueryExample.linq | 7 ++----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/NuGet/LINQPad/BinaryModeExample.linq b/modules/platforms/dotnet/Apache.Ignite.Core/NuGet/LINQPad/BinaryModeExample.linq index f72c2e1..0fe0d20 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core/NuGet/LINQPad/BinaryModeExample.linq +++ b/modules/platforms/dotnet/Apache.Ignite.Core/NuGet/LINQPad/BinaryModeExample.linq @@ -83,11 +83,6 @@ using (var ignite = Ignition.Start()) cache[1] = person.ToBuilder().SetField("Name", name + " Jr.").Build(); cache[1].ToString().Dump("Modified person with id 1:"); - // Run SQL query. - cache.Query(new SqlQuery("Person", "age < 40")) - .Select(x => x.Value.ToString()) - .Dump("Persons with age less than 40:"); - // Run SQL fields query. cache.Query(new SqlFieldsQuery("select name from Person order by name")) .Dump("All person names:"); diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/NuGet/LINQPad/QueryExample.linq b/modules/platforms/dotnet/Apache.Ignite.Core/NuGet/LINQPad/QueryExample.linq index ae48596..76bfaa0 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core/NuGet/LINQPad/QueryExample.linq +++ b/modules/platforms/dotnet/Apache.Ignite.Core/NuGet/LINQPad/QueryExample.linq @@ -57,16 +57,13 @@ void Main() persons[5] = new Person { OrgId = 3, Name = "Christopher Adams" }; // SQL query - orgs.Query(new SqlQuery(typeof(Organization), "size < ?", 100000)).Dump("Organizations with size less than 100K"); + orgs.Query(new SqlFieldsQuery("select * from Organization where size < ?", 100000)).Dump("Organizations with size less than 100K"); // SQL query with join const string orgName = "Apache"; - persons.Query(new SqlQuery(typeof(Person), "from Person, \"orgs-sql\".Organization where Person.OrgId = \"orgs-sql\".Organization._key and \"orgs-sql\".Organization.Name = ?", orgName)) + persons.Query(new SqlFieldsQuery("select Person.name from Person, \"orgs-sql\".Organization where Person.OrgId = \"orgs-sql\".Organization._key and \"orgs-sql\".Organization.Name = ?", orgName)) .Dump("Persons working for " + orgName); - // Fields query - orgs.Query(new SqlFieldsQuery("select name, size from Organization")).Dump("Fields query"); - // Full text query persons.Query(new TextQuery(typeof(Person), "Chris*")).Dump("Persons starting with 'Chris'"); }