clojure-dev

Issues: https://clojure.atlassian.net/browse/CLJ | Guide: https://insideclojure.org/2015/05/01/contributing-clojure/
seancorfield 2019-04-01T06:29:05.001300Z

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!

👍 2
mpenet 2019-04-01T07:39:57.001500Z

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

mpenet 2019-04-01T07:44:14.001700Z

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

mpenet 2019-04-01T07:58:50.002Z

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"

seancorfield 2019-04-01T16:41:13.006400Z

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.

seancorfield 2019-04-01T16:48:32.006600Z

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

seancorfield 2019-04-01T17:04:47.006800Z

https://github.com/seancorfield/next-jdbc/issues/2 -- for further consideration

mpenet 2019-04-01T18:42:02.007200Z

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

seancorfield 2019-04-01T19:21:16.007400Z

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.

seancorfield 2019-04-02T07:59:57.007900Z

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

krastins 2019-04-01T13:07:01.003200Z

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

alexmiller 2019-04-01T13:19:31.004300Z

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

dnolen 2019-04-01T14:29:33.004600Z

go for it!

alexmiller 2019-04-01T14:52:28.004900Z

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

dnolen 2019-04-01T14:52:48.005200Z

0.3.0 is cool with me

alexmiller 2019-04-01T14:54:03.005400Z

ok

alexmiller 2019-04-01T15:17:25.005700Z

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

🎉 6
krastins 2019-04-01T15:18:15.005900Z

nice, thank you!