Fork me on GitHub

seancorfield/next.jdbc {:mvn/version "1.0.5"} is available -- plan's internal "mapified" result set now implements all of IPersistentMap so dissoc, cons, count, empty etc all work (although dissoc and cons will realize a full row as a hash map, just like assoc and seq did before).


The docs around connection pooling have also been updated.


(def sqlite {:classname   "org.sqlite.JDBC"
             :subprotocol "sqlite"
             :subname     "resources/db/component.db"})
I'm getting "No suitable driver found for <jdbc://> .." Am i missing something obvious? I've got org.xerial/sqlite-jdbc {:mvn/version "3.28.0"} in my project and the db is at resources/db/component.db


i feel like i never know where to find an authoritative source for making the connection maps. would love to know where to look to figure this out


using "jdbc:sqlite:resources/db/component.db" works correctly though


{:dbtype "sqlite" :dbname "resources/db/component.db"}


next.jdbc has dropped support for the :subprotocol / :subname form of db-spec because so many people get it wrong.

πŸ‘ 1
seancorfield03:08:56 and next.jdbc should both work with that :dbtype / :dbname version @dpsutton


yes! that's what i was looking for. i remembered something like that for the older version but didn't see it for the new next.jdbc version.


The next.jdbc getting started docs show the :dbtype / :dbname format and refer you to for the full, mind-numbing detail on what is acceptable. Suggestions for improvements always welcome.


wow. you just get tunnel vision some times πŸ™‚. I also found your specs that were very helpful


s/describe and s/explain


@dpsutton In java.jdbc, the docstring for get-connection also covers this in detail -- including saying that the subprotocol/subname format is "legacy" and the dbtype/dbname format is "preferred" by the way πŸ™‚

πŸ‘ 1

I'm just kind of concerned about where folks are reading about java.jdbc and finding the bad/outdated advice about using that legacy format?


i was just grabbing some connection maps from examples. i didn't know which drivers to use for sqlite so i found a project with it and its on the older version. and i thought i remembered the old connection map was still the same


Cool re: specs. I'll note that in java.jdbc, instrumenting everything really slows things down. The specs in next.jdbc seem to be a lot leaner / faster.


I'm always interested to hear of links to resources that have out of date information so I can go create issues, send PRs, or edit wikis!


(that's a soul-crushing uphill battle but, hey... at least there should never be this problem with next.jdbc πŸ™‚ )


This example was clojure-lsp. It’s on the older junction


@dpsutton URL? clojure-lsp isn't turning up any java.jdbc examples for me.