OK, I'm finally at a place where I feel comfortable showing an early working draft of next.jdbc
to the world: https://github.com/seancorfield/next-jdbc/blob/master/src/next/jdbc.clj -- although it is not API-compatible with clojure.java.jdbc
, it is almost at feature parity at this point.
Feedback here, or via issues, or via DM is all fine. The code is substantially shorter and simpler than clojure.java.jdbc
and the performance is substantially better.
I have not yet decided whether this will live in Contrib or not, at this point so feedback on that is also useful!
Nice! Imho there's little point to make a lib "contrib", please don't .
mapify-result-set feels odd at first glance, why its existence? Is it meant to be public?
something squee/alia have that is quite nice is protocolizing the row construction, sometimes you want a map, sometimes you don't care and might just want the values in order or a seq of tuples etc etc https://github.com/ghadishayban/squee/blob/master/src/squee/impl/protocols.clj#L18-L21 You can also simply make it a reduce like fn signature out of it (0-arity is "mempty", 1-arity is "reduced", 2-arity is "mappend") and allow to optionally pass that fn to "execute"
mapify-result-set
is an implementation detail. When I get a bit further into documenting it all, I'll add metadata to a lot of the implementation functions so they do not appear in generated docs.
https://github.com/seancorfield/next-jdbc/issues/2 -- for further consideration
Actually i remember he mentioned using a 3-arity fn "a la reduce" to do this instead of a protocol back then. Personally i prefer a fn over a protocol, it's a quite simple use case
Well, reducible!
is the core API in next.jdbc
so the expectation is that you use it with reduce
and transducers... but, yeah, :row-fn
still looks a bit of an odd way to do things now the API is more focused on that.
I've made some changes to the API and the implementation that I think clean this up.
is it possible to get a release of core.match
that works with clojure 1.9? I see that the required changes are already in master, just not released https://github.com/clojure/core.match/commit/1837ffbd4a150e8f3953b2d9ed5cf4a4ad3720a7
ping @dnolen ^^ or if David, if you want me to do so, I'm happy to do a release (not sure if that's another alpha or if there's any reason not to just release 0.3.0?)
go for it!
@dnolen go for it, as a new alpha, or as 0.3.0?
0.3.0 is cool with me
ok
@jurgis.krastins 0.3.0 of core.match is now available
nice, thank you!