Fork me on GitHub
#clojure-dev
<
2019-04-01
>
seancorfield06:04:05

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!

👍 8
mpenet07:04:57

Nice! Imho there's little point to make a lib "contrib", please don't .

mpenet07:04:14

mapify-result-set feels odd at first glance, why its existence? Is it meant to be public?

mpenet07:04:50

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"

seancorfield16:04:13

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.

seancorfield16:04:32

I've talked with @U050ECB92 about squee and it was some of his input that led to reducible-query in the first place (along with some prodding from @U0NCTKEV8 🙂 )

mpenet18:04:02

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

seancorfield19:04:16

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.

seancorfield07:04:57

I've made some changes to the API and the implementation that I think clean this up.

krastins13:04:01

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

Alex Miller (Clojure team)13:04:31

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?)

dnolen14:04:33

go for it!

Alex Miller (Clojure team)14:04:28

@dnolen go for it, as a new alpha, or as 0.3.0?

dnolen14:04:48

0.3.0 is cool with me

Alex Miller (Clojure team)15:04:25

@jurgis.krastins 0.3.0 of core.match is now available

🎉 24
krastins15:04:15

nice, thank you!