[ignite] 02/02: Fixing examples - sql

2019-04-05 Thread ptupitsyn
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

commit 3b5e0dc6ac56ccb7d2259fc18d79f8687f9053c3
Author: Pavel Tupitsyn 
AuthorDate: Fri Apr 5 17:01:18 2019 +0300

Fixing examples - sql
---
 .../dotnet/examples/Apache.Ignite.Examples/Sql/SqlExample.cs| 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlExample.cs 
b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlExample.cs
index 2c08335..680c469 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlExample.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlExample.cs
@@ -133,8 +133,8 @@ namespace Apache.Ignite.Examples.Sql
 {
 const string orgName = "Apache";
 
-var qry = cache.Query(new SqlQuery("Employee",
-"from Employee, 
\"dotnet_cache_query_organization\".Organization " +
+var qry = cache.Query(new SqlFieldsQuery(
+"select name from from Employee, 
\"dotnet_cache_query_organization\".Organization " +
 "where Employee.organizationId = Organization._key and 
Organization.name = ?", orgName)
 {
 EnableDistributedJoins = true,
@@ -145,7 +145,7 @@ namespace Apache.Ignite.Examples.Sql
 Console.WriteLine(">>> Employees working for " + orgName + ":");
 
 foreach (var entry in qry)
-Console.WriteLine(">>> " + entry.Value);
+Console.WriteLine(">>> " + entry[0]);
 }
 
 /// 



[ignite] 02/02: Fixing examples - SQL

2019-04-05 Thread ptupitsyn
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

commit fe2287595d7d0a2c3f27cdd6bab94f9fc290268e
Author: Pavel Tupitsyn 
AuthorDate: Fri Apr 5 16:21:43 2019 +0300

Fixing examples - SQL
---
 .../dotnet/examples/Apache.Ignite.Examples/Sql/SqlExample.cs| 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlExample.cs 
b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlExample.cs
index 25d8fa1..f163c54 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlExample.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlExample.cs
@@ -97,13 +97,13 @@ namespace Apache.Ignite.Examples.Sql
 {
 const int zip = 94109;
 
-var qry = cache.Query(new SqlFieldsQuery("select name from 
Employee where zip = ?", zip));
+var qry = cache.Query(new SqlFieldsQuery("select name, salary from 
Employee where zip = ?", zip));
 
 Console.WriteLine();
 Console.WriteLine(">>> Employees with zipcode {0} (SQL):", zip);
 
-foreach (var entry in qry)
-Console.WriteLine(">>>" + entry[0]);
+foreach (var row in qry)
+Console.WriteLine(">>> [Name=" + row[0] + ", salary=" + 
row[1] + ']');
 }
 
 ///