OSDN Git Service

20170326
authorkuboryu <kuboryu@yahoo.co.jp>
Sun, 26 Mar 2017 06:20:57 +0000 (15:20 +0900)
committerkuboryu <kuboryu@yahoo.co.jp>
Sun, 26 Mar 2017 06:20:57 +0000 (15:20 +0900)
com/rapide_act/CmnProperty.java
com/rapide_act/RapideLoader.java
com/rapide_act/RapideUnloader.java
rapide-act-0.9_src.zip [new file with mode: 0644]

index 5782436..68c1917 100644 (file)
@@ -34,9 +34,10 @@ public class CmnProperty{
        protected static final int DB_TYPE_MYSQL = 2;
        protected static final int DB_TYPE_DB2 = 3;
        protected static final int DB_TYPE_POSTGRESQL = 4;
+       protected static final int DB_TYPE_HIRDB = 5;
        protected static final int DB_TYPE_UNKNOWN = -1;
-       protected static final String [] DB_TYPE_NAME = {"ORACLE", "SQLSERVER", "MYSQL", "DB2", "POSTGRESQL"};
-       protected static final String [] DB_SQL_QUOTED = {"\"", "\"", "`", "\"", "\""};
+       protected static final String [] DB_TYPE_NAME = {"ORACLE", "SQLSERVER", "MYSQL", "DB2", "POSTGRESQL", "HIRDB"};
+       protected static final String [] DB_SQL_QUOTED = {"\"", "\"", "`", "\"", "\"", "\""};
        protected static final int MASK_PTN_ALL = 0;
        protected static final int MASK_PTN_ALT = 1;
        protected static final int MASK_PTN_EDGE = 2;
@@ -102,6 +103,11 @@ public class CmnProperty{
                + " table_name "
                + " from information_schema.TABLES "
                + " where TABLE_TYPE = 'BASE TABLE' and TABLE_SCHEMA = current_schema() "
+               + " order by table_name",
+               "select "
+               + " table_name "
+               + " from master.sql_tables "
+               + " where TABLE_TYPE = 'BASE TABLE' and table_schema=current_user "
                + " order by table_name"
        };
        protected static final String [] TK_SQL_ARRAY = {
@@ -220,7 +226,45 @@ public class CmnProperty{
                + " on a.TABLE_SCHEMA = b.TABLE_SCHEMA "
                + "  and a.TABLE_NAME = b.TABLE_NAME "
                + " order by "
-               + "  a.table_name,b.ordinal_position"
+               + "  a.table_name,b.ordinal_position",
+               "select"
+               + " a.table_name, "
+               + " b.column_name "
+               + "from "
+               + "( "
+               + "select "
+               + " a1.table_name "
+               + "from "
+               + " master.sql_tables a1 "
+               + "where "
+               + " a1.table_schema=current_user and "
+               + " a1.table_type='BASE TABLE' "
+               + ") a "
+               + "left outer join "
+               + "( "
+               + "select "
+               + " c.table_name, "
+               + " d.column_name, "
+               + " d.column_id "
+               + "from "
+               + " master.sql_tables c, "
+               + " master.sql_columns d "
+               + "where "
+               + " c.table_schema=current_user and "
+               + " c.table_type='BASE TABLE' and "
+               + " c.table_schema=d.table_schema and "
+               + " c.table_name=d.table_name and "
+               + " d.cluster_key = 'Y' "
+               + "group by "
+               + " c.table_name, "
+               + " d.column_name, "
+               + " d.column_id "
+               + ") b "
+               + "on "
+               + " a.table_name=b.table_name "
+               + "order by "
+               + " a.table_name, "
+               + " b.column_id"
        };
        
        protected String user                                   = null;
index 67df5ad..4b641cd 100644 (file)
@@ -410,10 +410,10 @@ public class RapideLoader{
                        try{
                                CmnUtils.errorPrint(se.toString());
                                se.printStackTrace();
-                               //while (se != null) {
-                               //  System.out.println(se.getMessage());
-                               //  se = se.getNextException();
-                               //}
+                               se = se.getNextException();
+                               if(se != null) {
+                                 System.out.println(se.getMessage());
+                               }
                                dao.rollback();
                        } catch (Exception see) {}
                } catch (Exception e) {
index 914980c..0ee2599 100644 (file)
@@ -287,10 +287,10 @@ public class RapideUnloader{
                        try{
                                CmnUtils.errorPrint(se.toString());
                                se.printStackTrace();
-                               //while (se != null) {
-                               //  System.out.println(se.getMessage());
-                               //  se = se.getNextException();
-                               //}
+                               se = se.getNextException();
+                               if(se != null) {
+                                 System.out.println(se.getMessage());
+                               }
                                dao.rollback();
                        } catch (Exception see) {}
                } catch (Exception e) {                 
diff --git a/rapide-act-0.9_src.zip b/rapide-act-0.9_src.zip
new file mode 100644 (file)
index 0000000..dc4c471
Binary files /dev/null and b/rapide-act-0.9_src.zip differ