ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [22/50] incubator-ignite git commit: # sprint-2 - fixing comments.
Date Mon, 02 Mar 2015 16:36:14 GMT
# sprint-2 - fixing comments.


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

Branch: refs/heads/ignite-337
Commit: 3a77acf759cd30bbb7bdcb51ab8e1bcecb273639
Parents: 16105ec
Author: Dmitiry Setrakyan <dsetrakyan@gridgain.com>
Authored: Sat Feb 28 09:49:15 2015 -0800
Committer: Dmitiry Setrakyan <dsetrakyan@gridgain.com>
Committed: Sat Feb 28 09:49:15 2015 -0800

----------------------------------------------------------------------
 .../ignite/examples/datagrid/store/jdbc/CacheJdbcPersonStore.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3a77acf7/examples/src/main/java/org/apache/ignite/examples/datagrid/store/jdbc/CacheJdbcPersonStore.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/store/jdbc/CacheJdbcPersonStore.java
b/examples/src/main/java/org/apache/ignite/examples/datagrid/store/jdbc/CacheJdbcPersonStore.java
index 0473280..55ba1a7 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/store/jdbc/CacheJdbcPersonStore.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/store/jdbc/CacheJdbcPersonStore.java
@@ -131,7 +131,8 @@ public class CacheJdbcPersonStore extends CacheStoreAdapter<Long, Person>
{
 
             int updated;
 
-            // Try update first.
+            // Try update first. If it does not work, then try insert.
+            // Some databases would allow these to be done in one 'upsert' operation.
             try (PreparedStatement st = conn.prepareStatement(
                 "update PERSONS set firstName=?, lastName=? where id=?")) {
                 st.setString(1, val.getFirstName());


Mime
View raw message