walterDurin / sqlite-jdbc

Automatically exported from code.google.com/p/sqlite-jdbc
Apache License 2.0
0 stars 0 forks source link

DatabaseMetaData.getColumns does not return COLUMN_DEF #27

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
Create a table:
create table t (a datetime default CURRENT_TIMESTAMP, b text)

Then call DatabaseMetaData getColumns 
DatabaseMetaData dmd = connection.getMetaData();
ResultSet rs = dmd.getColumns(null, null, "t", null);

while (rs.next()) {
   look at 
   rs.getString("COLUMN_NAME") and 
   rs.getString("COLUMN_DEF") // FOR column 'a' this should not be null
}

What is the expected output? What do you see instead?
The JDBC spec says that COLUMN_DEF should contain a value if the column has a 
default. In the case of H2 it shows 'CURRENT_TIMESTAMP()'

What version of the product are you using? On what operating system?
Java 6, sqlite 3.7.3

Original issue reported on code.google.com by sproket...@gmail.com on 2 Jun 2012 at 12:40

GoogleCodeExporter commented 8 years ago
Moved to bitbucket issue: https://bitbucket.org/xerial/sqlite-jdbc/issue/14

Original comment by Grace.Ba...@gmail.com on 8 Sep 2012 at 2:22

GoogleCodeExporter commented 8 years ago
Fixed on by: https://bitbucket.org/xerial/sqlite-jdbc/changeset/119b69e28c1b

Original comment by Grace.Ba...@gmail.com on 9 Sep 2012 at 5:40

GoogleCodeExporter commented 8 years ago
Thanks!

Original comment by sproket...@gmail.com on 9 Sep 2012 at 9:03

GoogleCodeExporter commented 8 years ago
The change for this is done now.

Original comment by Grace.Ba...@gmail.com on 10 Sep 2012 at 8:46