Fork me on GitHub
#sql
<
2017-08-30
>
gdeer8117:08:41

@seancorfield in clojure.java.jdbc passing in a connection string to get-connection with mismatched parameters gives you a generic "Vector arg to map conj must be a pair". example "<mysql://localhost:3306/dbname?user=root&password=>" the person assumed this is what the connection string should look like if your password is blank. I was wondering if this is something worth wrapping in better error messaging or not.

seancorfield17:08:21

Hmm, I would have expected that to work and just produce a nil password field. Can you open a JIRA issue? (I'm deep in debugging something unrelated right now)

seancorfield17:08:19

Include the stack trace -- it looks to me like the code should just defer to java.net.URI for that case...?

gdeer8117:08:31

I'm running it at the repl using lein try and the stack trace is literally one line

seancorfield17:08:44

Type *e to see the full stack trace

seancorfield17:08:46

I've repro'd (since I had a REPL open and I'm stuck on my other problem! 😆 )

gdeer8117:08:20

oh nice, I didn't see any calls to java.net.URI in the stacktrace

seancorfield17:08:56

The bug is in parse-properties-uri which it calls after it gets the URI... I didn't write that function 🙂

seancorfield17:08:30

Ah, (into {} query-parts) and that is produced by calling .split on foo= which doesn't produce a 2-element vector...

gdeer8117:08:22

wow, you debugged it before I finished creating the JIRA ticket 👏:skin-tone-2:

seancorfield17:08:52

I have a fix... testing...

seancorfield17:08:35

OK, release 0.7.1 should be up on Maven later today with a fix for that. Thank you!

gdeer8117:08:25

awesome! good luck on your other problem, hopefully getting an easy win with this one will help you get over the blocker bowtie