ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [36/38] incubator-ignite git commit: # IGNITE-411 Fixed Oracle dialect.
Date Thu, 05 Mar 2015 15:40:20 GMT
# IGNITE-411 Fixed Oracle dialect.


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

Branch: refs/heads/sprint-2
Commit: b4b077dc58264588caeb77750986c004c23b0a46
Parents: 0af4f27
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Thu Mar 5 16:25:09 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Thu Mar 5 16:25:09 2015 +0700

----------------------------------------------------------------------
 .../parser/dialect/OracleMetadataDialect.java   | 23 ++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b4b077dc/modules/schema-load/src/main/java/org/apache/ignite/schema/parser/dialect/OracleMetadataDialect.java
----------------------------------------------------------------------
diff --git a/modules/schema-load/src/main/java/org/apache/ignite/schema/parser/dialect/OracleMetadataDialect.java
b/modules/schema-load/src/main/java/org/apache/ignite/schema/parser/dialect/OracleMetadataDialect.java
index 307d608..edfffe7 100644
--- a/modules/schema-load/src/main/java/org/apache/ignite/schema/parser/dialect/OracleMetadataDialect.java
+++ b/modules/schema-load/src/main/java/org/apache/ignite/schema/parser/dialect/OracleMetadataDialect.java
@@ -155,10 +155,20 @@ public class OracleMetadataDialect extends DatabaseMetadataDialect {
         return OTHER;
     }
 
+    /**
+     * Retrieve primary key columns.
+     *
+     * @param stmt Prepared SQL statement to execute.
+     * @param owner DB owner.
+     * @param tbl Table name.
+     * @return Primary key columns.
+     * @throws SQLException If failed to retrieve primary key columns.
+     */
     private Set<String> primaryKeys(PreparedStatement stmt, String owner, String tbl)
throws SQLException {
         Set<String> pkCols = new HashSet<>();
 
-        stmt.setString(1, tbl);
+        stmt.setString(1, owner);
+        stmt.setString(2, tbl);
 
         try (ResultSet pkRs = stmt.executeQuery()) {
             while(pkRs.next())
@@ -168,6 +178,15 @@ public class OracleMetadataDialect extends DatabaseMetadataDialect {
         return pkCols;
     }
 
+    /**
+     * Retrieve index columns.
+     *
+     * @param stmt Prepared SQL statement to execute.
+     * @param owner DB owner.
+     * @param tbl Table name.
+     * @return Index columns.
+     * @throws SQLException If failed to retrieve indexe columns.
+     */
     private Map<String, Map<String, Boolean>> indexes(PreparedStatement stmt,
String owner, String tbl)
         throws SQLException {
         Map<String, Map<String, Boolean>> idxs = new LinkedHashMap<>();
@@ -233,7 +252,7 @@ public class OracleMetadataDialect extends DatabaseMetadataDialect {
                     }
 
                     if (!owner.equals(prevSchema) || !tbl.equals(prevTbl)) {
-                        tbls.add(new DbTable(prevSchema, prevTbl, cols, null, null, null));
// TODO !!!
+                        tbls.add(table(prevSchema, prevTbl, cols, idxs));
 
                         prevSchema = owner;
                         prevTbl = tbl;


Mime
View raw message