On 29/12/06, Joe Wilson <[EMAIL PROTECTED]> wrote:
getTables() improvements:
- "String[] types" argument is now used to determine what table
  types to query.  (mandatory)

An example of the test I am after:

stat.executeUpdate(
    "create table test (id integer primary key, fn, sn);");
stat.executeUpdate("create view testView as select * from test;");
meta = conn.getMetaData();
...
+        rs = meta.getTables(null, null, null, new String[] { "table" });
+        assertTrue(rs.next());
+        assertEquals(rs.getString("TABLE_NAME"), "TEST");
+        assertFalse(rs.next());
+        rs.close();
+
+        rs = meta.getTables(null, null, null, new String[] { "view" });
+        assertTrue(rs.next());
+        assertEquals(rs.getString("TABLE_NAME"), "TESTVIEW");
+        assertFalse(rs.next());
+        rs.close();

Which is now in src/test/DBMetaDataTest. The basic idea is to exercise
the code in the driver, so if I ever go in to fix a bug I don't make
some obvious mistake (surprisingly common).

I've put something similar to your patches into the code and will have
a new version up soon.

d

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SQLiteJDBC" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups-beta.google.com/group/sqlitejdbc?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to