Mercurial > hg > monetdb-java
comparison tests/Test_PStypes.java @ 391:f523727db392
Moved Java classes from packages starting with nl.cwi.monetdb.* to package org.monetdb.*
This naming complies to the Java Package Naming convention as MonetDB's main website is www.monetdb.org.
author | Martin van Dinther <martin.van.dinther@monetdbsolutions.com> |
---|---|
date | Thu, 12 Nov 2020 22:02:01 +0100 (2020-11-12) |
parents | 54137aeb1f92 |
children | bf9f6b6ecf40 |
comparison
equal
deleted
inserted
replaced
390:6199e0be3c6e | 391:f523727db392 |
---|---|
8 | 8 |
9 import java.sql.*; | 9 import java.sql.*; |
10 | 10 |
11 public class Test_PStypes { | 11 public class Test_PStypes { |
12 public static void main(String[] args) throws Exception { | 12 public static void main(String[] args) throws Exception { |
13 // Class.forName("nl.cwi.monetdb.jdbc.MonetDriver"); // not needed anymore for self registering JDBC drivers | |
14 Connection con = DriverManager.getConnection(args[0]); | 13 Connection con = DriverManager.getConnection(args[0]); |
15 Statement stmt = con.createStatement(); | 14 Statement stmt = con.createStatement(); |
16 PreparedStatement pstmt; | 15 PreparedStatement pstmt; |
17 //ResultSet rs = null; | |
18 //DatabaseMetaData dbmd = con.getMetaData(); | |
19 | 16 |
20 con.setAutoCommit(false); | 17 con.setAutoCommit(false); |
21 // >> false: auto commit was just switched off | 18 // >> false: auto commit was just switched off |
22 System.out.println("0. false\t" + con.getAutoCommit()); | 19 System.out.println("0. false\t" + con.getAutoCommit()); |
23 | 20 |
39 " CONSTRAINT htmtest_htmid_pkey PRIMARY KEY (htmid)" + | 36 " CONSTRAINT htmtest_htmid_pkey PRIMARY KEY (htmid)" + |
40 ")" | 37 ")" |
41 ); | 38 ); |
42 // index is not used, but the original bug had it too | 39 // index is not used, but the original bug had it too |
43 stmt.executeUpdate("CREATE INDEX htmid ON htmtest (htmid)"); | 40 stmt.executeUpdate("CREATE INDEX htmid ON htmtest (htmid)"); |
41 stmt.close(); | |
44 } catch (SQLException e) { | 42 } catch (SQLException e) { |
45 System.out.println(e); | 43 System.out.println(e); |
46 System.out.println("Creation of test table failed! :("); | 44 System.out.println("Creation of test table failed! :("); |
47 System.out.println("ABORTING TEST!!!"); | 45 System.out.println("ABORTING TEST!!!"); |
48 System.exit(-1); | 46 System.exit(-1); |