Fork me on GitHub
#sql
<
2019-07-11
>
dmaiocchi12:07:01

@seancorfield I finally managed to use jdbc.next with a local-jar driver for a custom db ! it works now.. 🚀. the most difficult pb I had was to build the jar local repo with mvn, and understanding the classpath jdbc functionality .. but i could get the DB version via query ! 🚀

4
dmaiocchi12:07:15

so excited about that lambdalove

dmaiocchi17:07:51

noob question. I did a query with execute! method.

dmaiocchi17:07:20

I saved it to

def version
var. version in repl i have something like that
[#:M_DATABASE_{:SYSTEM_ID "PRD",
               :DATABASE_NAME "SYSTEMDB",

dmaiocchi17:07:30

How can I acess the values? It looks to me that execute! returns a vector , but I'm struggling to access it for just getting a value like :DATABASE_NAME :thinking_face:

dmaiocchi18:07:54

ok, reading docs namespace-qualified keys, searching.

dmaiocchi18:07:06

(:M_DATABASE_/SYSTEM_ID (first version ))
ok solved with that.

dmaiocchi18:07:36

If anyone has some links docs about how to create namespaced-qualified keys feel free to share 😁

dmaiocchi18:07:48

it is the 1st time I see them 😁

seancorfield18:07:57

execute-one! will return a single row. execute! will always return a vector.

seancorfield18:07:12

I guess you haven't used clojure.spec yet? 🙂

dmaiocchi18:07:34

not yet 😬

dmaiocchi18:07:07

ok indeed, execute-one! make more sense instead of using first there

seancorfield18:07:33

https://clojure.org/reference/reader#_maps talks about qualified keys in maps.

❤️ 4
clj 4