Fork me on GitHub
#luminus
<
2016-06-24
>
curtis.summers02:06:20

@dilin I can help with HugSQL questions. Also, feel free to post a question as a github issue: https://github.com/layerware/hugsql/issues

roberto17:06:38

is there anyway to create a luminus project without mount?

richiardiandrea19:06:23

@curtis.summers: in HugSql I read > :query and :execute mirror the distinction between query and execute! in the clojure.java.jdbc library and fetch and execute in the clojure.jdbc library.

richiardiandrea19:06:01

but I really cannot find what is this distinction (sorry to ask, but I swear I googled a lot and even checked the src)

richiardiandrea19:06:45

from clojure.java.jdbc/execute! > Given a database connection and a vector containing SQL (or PreparedStatement) followed by optional parameters, perform a general (non-select) SQL operation.

richiardiandrea19:06:33

from query > Given a database connection and a vector containing SQL and optional parameters, perform a simple database query. The options specify how to construct the result set (and are also passed to prepare-statement as needed)

richiardiandrea19:06:48

so the former does not perform selects am I right?

curtis.summers19:06:48

@richiardiandrea: I think the general distinction is that query is expected to return a result set.

richiardiandrea19:06:22

oh ok, that's all? good 😄

richiardiandrea19:06:29

oh @curtis.summers I might have an issue, discovered just now, sorry for my newbie questions..

richiardiandrea19:06:45

but if I want to query jsonb with the ? operator

richiardiandrea19:06:00

should I escape it somehow?

richiardiandrea19:06:57

example: WHERE scan_left @> '{}' AND scan_left ? 'url'

curtis.summers20:06:00

I believe the Postgresql JDBC driver lets you put a double-question-mark ?? for escaping.

richiardiandrea20:06:39

@curtis.summers: yes it does, just confirmed it on SO

curtis.summers20:06:17

you're welcome!