Fork me on GitHub

Facing some trouble tying to use next.jdbc with Hikari datasource

(require '[next.jdbc :as nj])

(nj/execute! datasource ["
create table address (
  id int auto_increment primary key,
  name varchar(32),
  email varchar(255)
^This blurts out the error listed below.
Execution error (PSQLException) at org.postgresql.core.v3.QueryExecutorImpl/receiveErrorResponse (
ERROR: syntax error at or near "auto_increment"
  Position: 34
Is there something wrong with the way I’m using the datasource? NOTE: This is fixed Needed to extend ReadableColumn and SettableParameter protocols.



(nj/execute! datasource ["
create table address (
  name varchar(32),
  email varchar(255)
=> [#:next.jdbc{:update-count 0}]
(nj-sql/insert! datasource :address {:name "Shubham"
                                     :email ""})
=> #:address{:name "Shubham", :email ""}
(nj-sql/query datasource ["SELECT * FROM address where name = ?" "Shubham"])
=> [#:address{:name "Shubham", :email ""}]
^this works just fine. So, that removes the question of not using datasource correctly.


Likewise, if I have a uuid column in my table, it results into a similar error Do I need to extend any protocol?


what is the timeout default for next-jdbc