sql

All things SQL and JDBC...
bartuka 2021-01-14T08:57:48.002500Z

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

bartuka 2021-01-14T08:58:08.003200Z

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

seancorfield 2021-01-14T17:11:17.004600Z

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

👍 1
bartuka 2021-01-15T09:13:18.005500Z

Interesting, thanks for the answer!