ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject incubator-ignite git commit: # IGNITE-32: Minor tweaks for parse db metadata.
Date Tue, 27 Jan 2015 10:34:47 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-32 f757a1047 -> ef1d03b4c


# IGNITE-32: Minor tweaks for parse db metadata.


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

Branch: refs/heads/ignite-32
Commit: ef1d03b4c1c3c4bafe193fad595438782122aa48
Parents: f757a10
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Tue Jan 27 17:34:44 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Tue Jan 27 17:34:44 2015 +0700

----------------------------------------------------------------------
 .../apache/ignite/schema/model/PojoField.java   |  3 +--
 .../schema/parser/DatabaseMetadataParser.java   | 24 ++++----------------
 2 files changed, 6 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ef1d03b4/modules/schema-load/src/main/java/org/apache/ignite/schema/model/PojoField.java
----------------------------------------------------------------------
diff --git a/modules/schema-load/src/main/java/org/apache/ignite/schema/model/PojoField.java
b/modules/schema-load/src/main/java/org/apache/ignite/schema/model/PojoField.java
index b85908b..866954b 100644
--- a/modules/schema-load/src/main/java/org/apache/ignite/schema/model/PojoField.java
+++ b/modules/schema-load/src/main/java/org/apache/ignite/schema/model/PojoField.java
@@ -22,7 +22,6 @@ import javafx.collections.*;
 import org.apache.ignite.cache.query.*;
 
 import java.math.*;
-import java.net.*;
 import java.util.*;
 
 import static java.sql.Types.*;
@@ -108,7 +107,7 @@ public class PojoField {
         BigDecimal.class,
         String.class,
         java.sql.Date.class, java.sql.Time.class, java.sql.Timestamp.class,
-        java.lang.reflect.Array.class, Void.class, URL.class, Object.class};
+        Object.class};
 
     /** */
     private static final Map<String, Class<?>> classesMap = new HashMap<>();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ef1d03b4/modules/schema-load/src/main/java/org/apache/ignite/schema/parser/DatabaseMetadataParser.java
----------------------------------------------------------------------
diff --git a/modules/schema-load/src/main/java/org/apache/ignite/schema/parser/DatabaseMetadataParser.java
b/modules/schema-load/src/main/java/org/apache/ignite/schema/parser/DatabaseMetadataParser.java
index 27e1382..01f4a36 100644
--- a/modules/schema-load/src/main/java/org/apache/ignite/schema/parser/DatabaseMetadataParser.java
+++ b/modules/schema-load/src/main/java/org/apache/ignite/schema/parser/DatabaseMetadataParser.java
@@ -23,7 +23,6 @@ import org.apache.ignite.lang.*;
 import org.apache.ignite.schema.model.*;
 
 import java.math.*;
-import java.net.*;
 import java.sql.*;
 import java.util.*;
 
@@ -124,21 +123,7 @@ public class DatabaseMetadataParser {
             case TIMESTAMP:
                 return java.sql.Timestamp.class;
 
-            case BINARY:
-            case VARBINARY:
-            case LONGVARBINARY:
-            case ARRAY:
-            case BLOB:
-            case CLOB:
-            case NCLOB:
-                return java.lang.reflect.Array.class;
-
-            case NULL:
-                return Void.class;
-
-            case DATALINK:
-                return URL.class;
-
+            // BINARY, VARBINARY, LONGVARBINARY, ARRAY, BLOB, CLOB, NCLOB, NULL, DATALINK
             // OTHER, JAVA_OBJECT, DISTINCT, STRUCT, REF, ROWID, SQLXML
             default:
                 return Object.class;
@@ -276,11 +261,12 @@ public class DatabaseMetadataParser {
 
                 List<PojoDescriptor> children = new ArrayList<>();
 
+                System.out.println(schema);
+
                 try (ResultSet tbls = dbMeta.getTables(catalog, schema, "%", null)) {
                     while (tbls.next()) {
-                        String tbl = tbls.getString(3);
-
-                        children.add(parseTable(parent, dbMeta, catalog, schema, tbl));
+                        if ("TABLE".equals(tbls.getString(4)))
+                            children.add(parseTable(parent, dbMeta, catalog, schema, tbls.getString(3)));
                     }
                 }
 


Mime
View raw message