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 818aff8  Fixing examples - binary
818aff8 is described below

commit 818aff8cb3ef69e122e42da2268110fa49246aeb
Author: Pavel Tupitsyn <ptupit...@apache.org>
AuthorDate: Fri Apr 5 16:29:00 2019 +0300

    Fixing examples - binary
---
 .../Datagrid/BinaryModeExample.cs                    | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git 
a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/BinaryModeExample.cs
 
b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/BinaryModeExample.cs
index f0ae92d..a619984 100644
--- 
a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/BinaryModeExample.cs
+++ 
b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/BinaryModeExample.cs
@@ -75,6 +75,7 @@ namespace Apache.Ignite.Examples.Datagrid
                         {
                             KeyType = typeof(int),
                             ValueTypeName = PersonType,
+                            ValueFieldName = "valueObj",
                             Fields = new[]
                             {
                                 new QueryField(NameField, typeof(string)),
@@ -114,8 +115,8 @@ namespace Apache.Ignite.Examples.Datagrid
                 // Run SQL query example.
                 SqlQueryExample(cache);
 
-                // Run SQL query example.
-                SqlQueryExample(cache);
+                // Run SQL filter query example.
+                SqlFilterQueryExample(cache);
 
                 // Run SQL query with join example.
                 SqlJoinQueryExample(cache);
@@ -168,6 +169,21 @@ namespace Apache.Ignite.Examples.Datagrid
         }
 
         /// <summary>
+        /// Queries persons that have a specific name using SQL.
+        /// </summary>
+        /// <param name="cache">Cache.</param>
+        private static void SqlFilterQueryExample(ICache<int, IBinaryObject> 
cache)
+        {
+            var qry = cache.Query(new SqlFieldsQuery("select valueObj from 
Person where name like 'James%'"));
+
+            Console.WriteLine();
+            Console.WriteLine(">>> Persons named James:");
+
+            foreach (var entry in qry)
+                Console.WriteLine(">>>    " + entry[0]);
+        }
+
+        /// <summary>
         /// Queries persons that work for company with provided name.
         /// </summary>
         /// <param name="cache">Cache.</param>

Reply via email to