mirror of
https://github.com/moparisthebest/JdbcMapper
synced 2024-11-14 05:05:06 -05:00
Fix postgresql test
This commit is contained in:
parent
62cf37dd27
commit
20c933b1c9
@ -134,12 +134,12 @@ public class QueryMapperTest {
|
||||
} catch(Exception e) {
|
||||
// ignore, means the database hasn't been set up yet
|
||||
}
|
||||
if(isWrapperFor(conn, "org.apache.derby.impl.jdbc.EmbedConnection")) {
|
||||
// derby doesn't support DATETIME
|
||||
qm.executeUpdate("CREATE TABLE person (person_no NUMERIC, first_name VARCHAR(40), last_name VARCHAR(40), birth_date TIMESTAMP)");
|
||||
} else {
|
||||
if(isWrapperFor(conn, "com.microsoft.sqlserver.jdbc.SQLServerConnection")) {
|
||||
// mssql doesn't support inserting into TIMESTAMP
|
||||
qm.executeUpdate("CREATE TABLE person (person_no NUMERIC, first_name VARCHAR(40), last_name VARCHAR(40), birth_date DATETIME)");
|
||||
} else {
|
||||
// derby doesn't support DATETIME
|
||||
qm.executeUpdate("CREATE TABLE person (person_no NUMERIC, first_name VARCHAR(40), last_name VARCHAR(40), birth_date TIMESTAMP)");
|
||||
}
|
||||
qm.executeUpdate("CREATE TABLE boss (person_no NUMERIC, department VARCHAR(40))");
|
||||
qm.executeUpdate("CREATE TABLE val (val_no NUMERIC, num_val NUMERIC, str_val VARCHAR(40))");
|
||||
|
Loading…
Reference in New Issue
Block a user