can i avoid using xt-jdbc/->pg-obj?
(jdbc/execute! conn (sql/format {:insert-into :test-01
:records (map xt-jdbc/->pg-obj
[{:_id 0
:name "apple"
:price 20}
{:_id 1
:name "banana"
:price 12}])}))
how can i work with clj maps and vectors without having to convert them to pg-obj ?
(execute! conn {:insert-into :test-01
:records [{:_id 0
:name "apple"
:price 20}
{:_id 1
:name "banana"
:price 12}]})
=>
; Execution error (PSQLException) at org.postgresql.jdbc.PgPreparedStatement/setMap (PgPreparedStatement.java:504).
; No hstore extension installed.hey @itai in short, you can't avoid this step unfortunately - how it works is that there's a transit+json OID type which the server knows how to handle (and in theory someone could build an extension for regular Postgres to handle similarly!)
on the plus side though we're not implementing our own jdbc driver (well we kind of are, but it's just a wrapper, so not really) - which means the stack is really battletested
Hey everyone, just a brief announcement that I'll be giving a talk and running some demos tomorrow at 1500 UTC - details & discussion https://discuss.xtdb.com/t/webinar-this-wednesday-19th-at-1500-utc/565 (note: not a Clojure-specific event on this occasion)
are you going to record it?
Yes :)
looking forward for the link 🙂