Exemplo n.º 1
0
 private void connectWithJulianDayModeActivated() throws SQLException {
   close();
   final Properties info = new Properties();
   info.setProperty("julian_day", "true");
   conn = DriverManager.getConnection("jdbc:sqlite:", info);
   stat = conn.createStatement();
 }
Exemplo n.º 2
0
 @Test
 public void changeSchema() throws SQLException {
   stat.execute("create table t (c1);");
   PreparedStatement prep = conn.prepareStatement("insert into t values (?);");
   conn.createStatement().execute("create table t2 (c2);");
   prep.setInt(1, 1000);
   prep.execute();
   prep.executeUpdate();
 }
 @After
 public void tearDown() throws Exception {
   if (em != null) {
     em.close();
   }
   if (emFactory != null) {
     emFactory.close();
   }
   try {
     connection.createStatement().execute("SHUTDOWN");
   } catch (Exception ex) {
   }
 }
Exemplo n.º 4
0
 @Before
 public void connect() throws Exception {
   conn = DriverManager.getConnection("jdbc:sqlite:");
   stat = conn.createStatement();
 }