Fork me on GitHub
#sql
<
2019-03-02
>
amarjeet03:03:28

Thanks @seancorfield, appreciate it.

seancorfield03:03:07

^ @amarjeet Already fixed on master BTW 🙂

amarjeet03:03:39

Oh great :) i ll try again in sometime, thats super fast :)

amarjeet03:03:05

Thanks much 🙂

seancorfield03:03:08

(0.7.10 will be a while but if you're using clj/`deps.edn` you can rely on git for it, or else git clone and mvn install)

amarjeet03:03:15

I think, in addition to numbers, other data types will also have :default value issue, ex- boolean

amarjeet03:03:26

Data types apart from string

amarjeet04:03:21

Just CCing @seancorfield - whenever you get time to check. Thanks

seancorfield04:03:13

SQL does not have Booleans. For BIT it has b'0' and b'1'.

seancorfield04:03:36

clojure.java.jdbc does no translation of Clojure values to SQL values-in-strings.

seancorfield04:03:15

One of the things that means (and it's true for HoneySQL and other SQL/JDBC libs), is that "foo" is a Clojure string but not necessarily a SQL string. You need to say "'foo'".

seancorfield04:03:00

That's why these libs assume PreparedStatements and ? placeholders where you pass Clojure values and let the JDBC driver do the conversion.

amarjeet04:03:53

Hmm, that is something i will have to take care of. Understood.

seancorfield04:03:38

This is another reason why DDL is so problematic. In SQL, you can pretty much do anything with PreparedStatements and ? placeholders.

amarjeet04:03:01

True :) i think i will try honysql-postgres too, that shud help with some of my immediate needs