You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by pt...@apache.org on 2019/04/05 13:24:22 UTC

[ignite] branch ignite-11525 updated (fd6c35f -> fe22875)

This is an automated email from the ASF dual-hosted git repository.

ptupitsyn pushed a change to branch ignite-11525
in repository https://gitbox.apache.org/repos/asf/ignite.git.


    from fd6c35f  Fixing examples - thin client
     new 7487e61  Fixing examples - SQL
     new fe22875  Fixing examples - SQL

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../Apache.Ignite.Examples/Sql/SqlExample.cs       | 24 +++-------------------
 1 file changed, 3 insertions(+), 21 deletions(-)


[ignite] 02/02: Fixing examples - SQL

Posted by pt...@apache.org.
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 <pt...@apache.org>
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] + ']');
         }
 
         /// <summary>


[ignite] 01/02: Fixing examples - SQL

Posted by pt...@apache.org.
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 7487e611b1e7e2ff087fcb3a837cbae21ab9a27d
Author: Pavel Tupitsyn <pt...@apache.org>
AuthorDate: Fri Apr 5 16:19:30 2019 +0300

    Fixing examples - SQL
---
 .../Apache.Ignite.Examples/Sql/SqlExample.cs       | 22 ++--------------------
 1 file changed, 2 insertions(+), 20 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 9fb7921..25d8fa1 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlExample.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlExample.cs
@@ -81,9 +81,6 @@ namespace Apache.Ignite.Examples.Sql
                 // Run SQL query with distributed join example.
                 SqlDistributedJoinQueryExample(employeeCache);
 
-                // Run SQL fields query example.
-                SqlFieldsQueryExample(employeeCache);
-
                 Console.WriteLine();
             }
 
@@ -100,13 +97,13 @@ namespace Apache.Ignite.Examples.Sql
         {
             const int zip = 94109;
 
-            var qry = cache.Query(new SqlQuery(typeof(Employee), "zip = ?", zip));
+            var qry = cache.Query(new SqlFieldsQuery("select name from Employee where zip = ?", zip));
 
             Console.WriteLine();
             Console.WriteLine(">>> Employees with zipcode {0} (SQL):", zip);
 
             foreach (var entry in qry)
-                Console.WriteLine(">>>    " + entry.Value);
+                Console.WriteLine(">>>    " + entry[0]);
         }
 
         /// <summary>
@@ -152,21 +149,6 @@ namespace Apache.Ignite.Examples.Sql
         }
 
         /// <summary>
-        /// Queries names and salaries for all employees.
-        /// </summary>
-        /// <param name="cache">Cache.</param>
-        private static void SqlFieldsQueryExample(ICache<int, Employee> cache)
-        {
-            var qry = cache.Query(new SqlFieldsQuery("select name, salary from Employee"));
-
-            Console.WriteLine();
-            Console.WriteLine(">>> Employee names and their salaries:");
-
-            foreach (var row in qry)
-                Console.WriteLine(">>>     [Name=" + row[0] + ", salary=" + row[1] + ']');
-        }
-
-        /// <summary>
         /// Populate cache with data for this example.
         /// </summary>
         /// <param name="cache">Cache.</param>