Fork me on GitHub
#sql
<
2021-01-14
>
bartuka08:01:48

Hi guys, I am using this honeysql plugin for postgres (https://github.com/nilenso/honeysql-postgres) to create tables, and as we can see in this example https://github.com/nilenso/honeysql-postgres/blob/master/test/honeysql_postgres/postgres_test.cljc#L99 the query produced is something like ["CREATE TABLE cities (city (varchar(?))" 80] however if I use next.jdbc to execute this query, it produces an error. I noticed that earlier versions of this library produced a result like ["CREATE TABLE cities (city (varchar(80))"] and this second query works correctly on next.jdbc

bartuka08:01:08

there are any ways I can handle the first query in next.jdbc?

seancorfield17:01:17

No. DDL cannot be parameterized. That's a JDBC / SQL restriction.

👍 3
bartuka09:01:18

Interesting, thanks for the answer!