ignite-sql-tests - examples GridGain
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/505e2fc7 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/505e2fc7 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/505e2fc7 Branch: refs/heads/ignite-sql-tests Commit: 505e2fc716906e9cd11cc63bb70d14e2bd36c463 Parents: de8b54c Author: S.Vladykin <[email protected]> Authored: Sun Feb 8 18:06:55 2015 +0300 Committer: S.Vladykin <[email protected]> Committed: Sun Feb 8 18:06:55 2015 +0300 ---------------------------------------------------------------------- .../ignite/examples/datagrid/CacheQueryExample.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/505e2fc7/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheQueryExample.java ---------------------------------------------------------------------- diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheQueryExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheQueryExample.java index f83a37b..d31a0c3 100644 --- a/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheQueryExample.java +++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheQueryExample.java @@ -147,8 +147,8 @@ public class CacheQueryExample { + "and lower(Organization.name) = lower(?)"; // Execute queries for find employees for different organizations. - print("Following people are 'Ignite' employees: ", - cache.query(sql(Person.class, joinSql).setArgs("Ignite")).getAll()); + print("Following people are 'GridGain' employees: ", + cache.query(sql(Person.class, joinSql).setArgs("GridGain")).getAll()); print("Following people are 'Other' employees: ", cache.query(sql(Person.class, joinSql).setArgs("Other")).getAll()); } @@ -181,13 +181,13 @@ public class CacheQueryExample { private static void sqlQueryWithAggregation() throws IgniteCheckedException { IgniteCache<CacheAffinityKey<UUID>, Person> cache = Ignition.ignite().jcache(CACHE_NAME); - // Calculate average of salary of all persons in Ignite. + // Calculate average of salary of all persons in GridGain. QueryCursor<List<?>> cursor = cache.queryFields(sql( "select avg(salary) from Person, Organization where Person.orgId = Organization.id and " - + "lower(Organization.name) = lower(?)").setArgs("Ignite")); + + "lower(Organization.name) = lower(?)").setArgs("GridGain")); // Calculate average salary for a specific organization. - print("Average salary for 'Ignite' employees: " + cursor.getAll()); + print("Average salary for 'GridGain' employees: " + cursor.getAll()); } /** @@ -242,7 +242,7 @@ public class CacheQueryExample { IgniteCache cache = Ignition.ignite().jcache(CACHE_NAME); // Organizations. - Organization org1 = new Organization("Ignite"); + Organization org1 = new Organization("GridGain"); Organization org2 = new Organization("Other"); // People.
