trafodion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject [2/3] incubator-trafodion git commit: add sampleUtils.java change
Date Wed, 13 Dec 2017 18:08:37 GMT
add sampleUtils.java change


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

Branch: refs/heads/master
Commit: b487398bd34cfd950d679c609a6d1d86bec8eb51
Parents: 181904e
Author: gpj1987 <gpj1987@gmail.com>
Authored: Thu Nov 30 19:23:23 2017 +0800
Committer: gpj1987 <gpj1987@gmail.com>
Committed: Thu Nov 30 19:23:23 2017 +0800

----------------------------------------------------------------------
 .../src/main/samples/common/sampleUtils.java      | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/b487398b/core/conn/jdbcT4/src/main/samples/common/sampleUtils.java
----------------------------------------------------------------------
diff --git a/core/conn/jdbcT4/src/main/samples/common/sampleUtils.java b/core/conn/jdbcT4/src/main/samples/common/sampleUtils.java
index f234d28..77954fb 100755
--- a/core/conn/jdbcT4/src/main/samples/common/sampleUtils.java
+++ b/core/conn/jdbcT4/src/main/samples/common/sampleUtils.java
@@ -265,4 +265,22 @@ public class sampleUtils
                throw e;
            }
        }
+
+	public static void initialTable(Connection conn, String table) throws SQLException {
+		Statement stmt = null;
+		try {
+			stmt = conn.createStatement();
+			stmt.executeUpdate("create table " + table + " (c1 int, c2 char(20), c3 int)");
+			stmt.close();
+
+		} catch (SQLException e) {
+			Logger.global.log(Level.FINE, "InitialData failed = " + e);
+			Logger.global.log(Level.FINE, "==============\n\n");
+			try {
+				stmt.close();
+			} catch (Exception ex) {
+			}
+			throw e;
+		}
+	}
 }


Mime
View raw message