honeysql

Discussion of https://github.com/seancorfield/honeysql :slightly_smiling_face:
seancorfield 2021-02-01T00:24:15.040100Z

Major milestone: HoneySQL v2 repo now passes all the tests (for the first time!). The next two days will be about documentation!

💯 6
2
😍 1
🎉 6
seancorfield 2021-02-01T00:24:52.040700Z

I plan to incorporate a bunch of new tests from a recent v1 PR into the v2 test base as well.

seancorfield 2021-02-01T00:25:20.041Z

I hope to cut a v2 alpha by the end of Tuesday.

seancorfield 2021-02-01T00:33:48.041600Z

(I also need to substantially clean up the code 🙂 but that will be an ongoing process now that I have a passing test suite)

2021-02-01T16:43:46.045900Z

Hey @seancorfield, just ran into surprising behavior with the way honeysql formats :values clauses. We were inserting a collection of maps that didn't all have the same keys and discovered after a period of confusion that honeysql picks the columns based off the first map in the :values vector. Would you be amenable to changing this so that honeysql picks the columns to be the union of all keys present in :values maps? Happy to provide a PR.

seancorfield 2021-02-01T16:58:47.046600Z

@codonnell I'll fix that for v2 but not for v1 at this point. It's the same behavior as clojure.pprint/print-table BTW.

seancorfield 2021-02-01T16:59:58.047200Z

(I don't think it's a bug but I agree it could be a bit surprising -- feel free to open an issue on GH so I don't forget)

2021-02-01T17:03:45.047400Z

Will do, thanks.

seancorfield 2021-02-01T17:44:14.048100Z

Thanks! I'll probably work on that for v2 later today.

dharrigan 2021-02-01T17:45:24.048600Z

Just a shout out for a big thanks for @seancorfield for doing the work for honeysql v2. Looking forward to it! 🙂

😊 1
☝️ 4
seancorfield 2021-02-01T18:46:20.049800Z

@codonnell That is fixed on the v2 branch.

2021-02-01T18:49:12.050100Z

Thanks a bunch!

seancorfield 2021-02-01T21:29:44.050800Z

@codonnell BTW, the 1.x readme says "the first map defines the columns to insert, and the remaining maps must have the same set of keys and values" (but this restriction is gone in 2.x).

seancorfield 2021-02-01T22:57:41.055600Z

Today I have mostly worked on docstrings for the public API and updating the README to ensure it's all up-to-date and has examples of several new pieces of syntax, as well as ensuring all the tests pass on Clojure 1.9/1.10/1.11 (master) and ClojureScript and that the README example code also all passes (as tests). Code-wise, I'm pretty much at a 2.0.0 Alpha 1 state now for anyone who feels adventurous enough to try it out 🙂

👏 3
seancorfield 2021-02-01T22:58:09.056100Z

seancorfield/honeysql {:git/url "<https://github.com/seancorfield/honeysql>" :sha "4cbeb170ddf4ba0d7238c43b092ffb0a33062474"} updated to latest SHA

seancorfield 2021-02-01T22:58:42.056500Z

And follow the README here https://github.com/seancorfield/honeysql/tree/v2 (not the develop branch)

seancorfield 2021-02-01T23:01:11.058500Z

I'm about to start fleshing out the "differences between v1 and v2" document and then I'll move on to full-blown documentation of v2 later today and most of tomorrow and at some point when I think there's at least enough documentation to support more widespread testing, I'll cut a 2.0.0-alpha1 release on Clojars for folks to use with Leiningen.

seancorfield 2021-02-01T23:03:45.060200Z

There's still a lot of work to do but at this point I believe v2 has reached general feature parity with v1 -- although I have deliberately not implemented several of the v1 formatting options (so I'm looking forward to some discussions about what folks rely on from v1 that I would prefer not to implement in v2 🙂 ).

2021-02-01T23:44:22.060600Z

Sorry, I totally missed that! Maybe it's just me, but I don't often consult the Readme anymore except to glance at an example when I don't remember syntax. I'm sure I read the prose some time ago, but didn't remember that detail. Definitely appreciate that is documented.