Expand test for #73 to other databases
This verifies that it is _only_ PostgreSQL that cannot do this conversion!
This commit is contained in:
parent
e404c47d83
commit
e82094dd86
1 changed files with 10 additions and 10 deletions
|
|
@ -222,13 +222,13 @@ VALUES ('Pear', 'green', 49, 47)
|
|||
(doall (take 3 (jdbc/plan (ds) ["select * from fruit"]))))))
|
||||
|
||||
(deftest issue-73
|
||||
(when (postgres?)
|
||||
;; only postgresql cannot convert a java.util.Date to a timestamp column...
|
||||
(try
|
||||
(jdbc/execute-one! (ds) ["drop table temp_table"])
|
||||
(catch Throwable _))
|
||||
(jdbc/execute-one! (ds) ["create table temp_table (id serial primary key, deadline timestamp not null)"])
|
||||
(jdbc/execute-one! (ds) ["create table temp_table (id int not null, deadline timestamp not null)"])
|
||||
(try
|
||||
(jdbc/execute-one! (ds) ["insert into temp_table (deadline) values (?)" (java.util.Date.)])
|
||||
(jdbc/execute-one! (ds) ["insert into temp_table (id, deadline) values (?,?)" 1 (java.util.Date.)])
|
||||
(catch Throwable t
|
||||
(println "Issue #73: PostgreSQL cannot convert java.util.Date to timestamp by default?")
|
||||
(println (ex-message t))))))
|
||||
(println "Issue #73:" (db) "cannot convert java.util.Date to timestamp by default?")
|
||||
(println (ex-message t)))))
|
||||
|
|
|
|||
Loading…
Reference in a new issue