diff options
author | James Moger <james.moger@gmail.com> | 2011-08-15 16:44:14 -0400 |
---|---|---|
committer | James Moger <james.moger@gmail.com> | 2011-08-15 16:44:14 -0400 |
commit | 66e810aaf212c5e37b0a1702b6c33480595408ce (patch) | |
tree | 2babeea368dec0023b9a2add5b3ddc2c1aaaeea8 /tests/com/iciql/test/RuntimeQueryTest.java | |
parent | 3622ae0026718ac8466e13e8011f8db309d89106 (diff) | |
download | iciql-66e810aaf212c5e37b0a1702b6c33480595408ce.tar.gz iciql-66e810aaf212c5e37b0a1702b6c33480595408ce.zip |
Added Derby dialect. Finished HSQL dialect. Documentation.
* Improved DEFAULT value specifications.
* Fixed bug in buildObjects where the ResultSet could be closed by the
automatic create table attempt.
* DbInspector now uses the dialect's reported DATETIME class preference.
* Improved IciqlException SQLState code checks.
* Integrated LIMIT and OFFSET expression appending in dialects.
* Updated to H2 1.3.159
* Allow reopening of a memory database in the test suite.
Diffstat (limited to 'tests/com/iciql/test/RuntimeQueryTest.java')
-rw-r--r-- | tests/com/iciql/test/RuntimeQueryTest.java | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/tests/com/iciql/test/RuntimeQueryTest.java b/tests/com/iciql/test/RuntimeQueryTest.java index fa3ee1c..bf6f20d 100644 --- a/tests/com/iciql/test/RuntimeQueryTest.java +++ b/tests/com/iciql/test/RuntimeQueryTest.java @@ -34,7 +34,7 @@ public class RuntimeQueryTest { @Test
public void testRuntimeQuery() {
- Db db = IciqlSuite.openDb();
+ Db db = IciqlSuite.openNewDb();
db.insertAll(Product.getList());
Product p = new Product();
@@ -50,14 +50,15 @@ public class RuntimeQueryTest { @Test
public void testExecuteQuery() throws SQLException {
- Db db = IciqlSuite.openDb();
+ Db db = IciqlSuite.openNewDb();
db.insertAll(Product.getList());
// test plain statement
- List<Product> products = db.executeQuery(Product.class, "select * from product where unitsInStock=120");
+ List<Product> products = db.executeQuery(Product.class,
+ "select * from product where unitsInStock=120");
assertEquals(1, products.size());
assertEquals("Condiments", products.get(0).category);
-
+
// test prepared statement
products = db.executeQuery(Product.class, "select * from product where unitsInStock=?", 120);
assertEquals(1, products.size());
@@ -65,10 +66,10 @@ public class RuntimeQueryTest { db.close();
}
-
+
@Test
public void testBuildObjects() throws SQLException {
- Db db = IciqlSuite.openDb();
+ Db db = IciqlSuite.openNewDb();
db.insertAll(Product.getList());
// test plain statement
@@ -78,7 +79,7 @@ public class RuntimeQueryTest { assertEquals(1, products.size());
assertEquals("Condiments", products.get(0).category);
-
+
// test prepared statement
rs = db.executeQuery("select * from product where unitsInStock=?", 120);
products = db.buildObjects(Product.class, rs);
|