ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ptupit...@apache.org
Subject [3/5] ignite git commit: IGNITE-3956 .NET: Fix cache creation in LINQPad examples This closes #1116
Date Mon, 26 Sep 2016 17:23:03 GMT
IGNITE-3956 .NET: Fix cache creation in LINQPad examples
This closes #1116


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/350e8465
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/350e8465
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/350e8465

Branch: refs/heads/master
Commit: 350e84656686eb81f8e12d569783db9914ca5a37
Parents: a4a933e
Author: Pavel Tupitsyn <ptupitsyn@apache.org>
Authored: Mon Sep 26 19:55:27 2016 +0300
Committer: Pavel Tupitsyn <ptupitsyn@apache.org>
Committed: Mon Sep 26 19:55:27 2016 +0300

----------------------------------------------------------------------
 .../dotnet/Apache.Ignite.Core/NuGet/LINQPad/PutGetExample.linq | 2 +-
 .../dotnet/Apache.Ignite.Core/NuGet/LINQPad/QueryExample.linq  | 6 +++---
 .../dotnet/Apache.Ignite.Linq/NuGet/LINQPad/QueryExample.linq  | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/350e8465/modules/platforms/dotnet/Apache.Ignite.Core/NuGet/LINQPad/PutGetExample.linq
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/NuGet/LINQPad/PutGetExample.linq
b/modules/platforms/dotnet/Apache.Ignite.Core/NuGet/LINQPad/PutGetExample.linq
index 97d9bbe..7c77d09 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/NuGet/LINQPad/PutGetExample.linq
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/NuGet/LINQPad/PutGetExample.linq
@@ -42,7 +42,7 @@ void Main()
     using (var ignite = Ignition.Start(cfg))
     {
         // Create new cache
-        var cache = ignite.CreateCache<int, Organization>("orgs");
+        var cache = ignite.GetOrCreateCache<int, Organization>("orgs");
 
         // Put data entry to cache
         cache.Put(1, new Organization {Name = "Apache", Type="Private"});

http://git-wip-us.apache.org/repos/asf/ignite/blob/350e8465/modules/platforms/dotnet/Apache.Ignite.Core/NuGet/LINQPad/QueryExample.linq
----------------------------------------------------------------------
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 b7f7981..2a2454e 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/NuGet/LINQPad/QueryExample.linq
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/NuGet/LINQPad/QueryExample.linq
@@ -45,14 +45,14 @@ void Main()
     using (var ignite = Ignition.Start(cfg))
     {
         // Create and populate organization cache
-        var orgs = ignite.GetOrCreateCache<int, Organization>(new CacheConfiguration("orgs",

+        var orgs = ignite.GetOrCreateCache<int, Organization>(new CacheConfiguration("orgs-sql",

 			new QueryEntity(typeof(int), typeof(Organization))));
         orgs[1] = new Organization { Name = "Apache", Type = "Private", Size = 5300 };
         orgs[2] = new Organization { Name = "Microsoft", Type = "Private", Size = 110000
};
         orgs[3] = new Organization { Name = "Red Cross", Type = "Non-Profit", Size = 35000
};
 
         // Create and populate person cache
-        var persons = ignite.CreateCache<int, Person>(new CacheConfiguration("persons",
typeof(Person)));
+        var persons = ignite.GetOrCreateCache<int, Person>(new CacheConfiguration("persons-sql",
typeof(Person)));
         persons[1] = new Person { OrgId = 1, Name = "James Wilson" };
         persons[2] = new Person { OrgId = 1, Name = "Daniel Adams" };
         persons[3] = new Person { OrgId = 2, Name = "Christian Moss" };
@@ -64,7 +64,7 @@ void Main()
 		
 		// SQL query with join
 		const string orgName = "Apache";
-		persons.Query(new SqlQuery(typeof(Person), "from Person, \"orgs\".Organization where Person.OrgId
= \"orgs\".Organization._key and \"orgs\".Organization.Name = ?", orgName))
+		persons.Query(new SqlQuery(typeof(Person), "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

http://git-wip-us.apache.org/repos/asf/ignite/blob/350e8465/modules/platforms/dotnet/Apache.Ignite.Linq/NuGet/LINQPad/QueryExample.linq
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Linq/NuGet/LINQPad/QueryExample.linq b/modules/platforms/dotnet/Apache.Ignite.Linq/NuGet/LINQPad/QueryExample.linq
index 9cce4ec..6a28f1f 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Linq/NuGet/LINQPad/QueryExample.linq
+++ b/modules/platforms/dotnet/Apache.Ignite.Linq/NuGet/LINQPad/QueryExample.linq
@@ -46,14 +46,14 @@ void Main()
 	using (var ignite = Ignition.Start(cfg))
 	{
 		// Create and populate organization cache
-		var orgs = ignite.GetOrCreateCache<int, Organization>(new CacheConfiguration("orgs",
+		var orgs = ignite.GetOrCreateCache<int, Organization>(new CacheConfiguration("orgs-linq",
 			new QueryEntity(typeof(int), typeof(Organization))));
 		orgs[1] = new Organization { Name = "Apache", Type = "Private", Size = 5300 };
 		orgs[2] = new Organization { Name = "Microsoft", Type = "Private", Size = 110000 };
 		orgs[3] = new Organization { Name = "Red Cross", Type = "Non-Profit", Size = 35000 };
 
 		// Create and populate person cache
-		var persons = ignite.CreateCache<int, Person>(new CacheConfiguration("persons", typeof(Person)));
+		var persons = ignite.GetOrCreateCache<int, Person>(new CacheConfiguration("persons-linq",
typeof(Person)));
 		persons[1] = new Person { OrgId = 1, Name = "James Wilson" };
 		persons[2] = new Person { OrgId = 1, Name = "Daniel Adams" };
 		persons[3] = new Person { OrgId = 2, Name = "Christian Moss" };


Mime
View raw message