An Architect's View

Clojure, Software Design, Frameworks and more...

next.jdbc Compendium

| Comments

seancorfield/next.jdbc 1.0.445

This morning I released 1.0.445 and realized it’s the sixth release since I last mentioned it in a blog post, so I thought it would be helpful to summarize all of the changes made so far in 2020. 1.0.13 came out at the end of December and I decided to switch from MAJOR.MINOR.PATCH versioning to MAJOR.MINOR.COMMITS versioning since I’d already made the commitment to no breaking changes – only fixative/accretive changes – when the library originally moved from Alpha to Beta a year ago.

Unlike the change log and release notes which are chronological, this post is organized into fixative changes, accretive changes, and documentation improvements, with each section organized by functionality or by database as appropriate.

Happy New Releases!

| Comments

Wrapping Up 2019

It’s been a while since I blogged about the projects I maintain so I figured New Year’s Eve 2019 was a good time to provide an update!

expectations/clojure-test 1.2.1

Mocking in side-effects, optional message argument in expect (like is), between predicate, official support for Clojure 1.8 onward, lots of documentation improvements!

See the change log for more details.

jkk/honeysql 0.9.8

Lots of bug fixes, some enhancements (composite, truncate), and some documentation enhancements.

See the change log for more details.

org.clojure/core.cache 0.8.2

Add clojure.core.cache.wrapped to make using the library easier!

See the change log for more details.

org.clojure/core.memoize 0.8.2

Bug fixes and a new memoizer function that makes it easier to define custom function caches.

See the change log for more details.

org.clojure/java.data 0.1.5

Yup, I took over maintenance of this in October!

set-properties to set arbitrary properties post-construction, constructor argument support, numerous bug fixes and reflection warnings addressed.

See the change log for more details.

org.clojure/java.jdbc 0.7.11

This library is officially “stable” and no longer being actively maintained beyond critical bug fixes – please consider migrating to seancorfield/next.jdbc (see below).

That said, this got the same transaction rollback exception edge case fix and Turkish locale fix that next.jdbc already had.

See the change log for more details.

seancorfield/clj-new 0.8.2

AOT compilation in app uberjar, pom.xml generation, :uberjar in app and :jar in lib and template projects, -? / --query option to explain what clj-new will attempt to do, -e / --env option to define “environment” variables that set substitution values in project templates, dependency updates, documentation improvements.

See the change log for more details.

seancorfield/depstar 0.4.2

Support for Multi-Release JARs, AOT compilation for uberjars (with pom.xml), JDK 11 support, better handling of unknown file types.

See the change log for more details.

seancorfield/next.jdbc 1.0.13

next.jdbc.prepare/statement and support for java.sql.Statement, arbitrary Connection and Statement property support, fix transaction rollback exception edge case (thank you Jepsen!), expose SQL builders, now tested against MS SQL Server and MySQL (formally), provide additional date/time/timestamp conversion support, CLOB support, :jdbcUrl support, HugSQL quick start guide, result set builder adapters, expanded Tips & Tricks, lots of documentation enhancements!

See the change log for more details.

seancorfield/dot-clojure

If you are getting started with the Clojure CLI and deps.edn then you might want to check out my .clojure/deps.edn file which contains a lot of useful aliases and hints & tips to get you up and running with a powerful set of composable tools: create new projects, start various types of REPLs, run tests – against multiple versions of Clojure, build JARs and uberjars, benchmark your code, check for outdated dependencies, and more!

Release! Release! Release!

| Comments

Lots of Releases

Over the last week or so I’ve released minor updates to several of the projects I maintain, so I thought it would be nice to have a summary blog post rather than a scattering of minor announcements.

clj-time 0.15.2

Add type hints, fix a bug in overlaps?, improve tests and documentation.

See the change log for more details.

jkk/honeysql 0.9.5

Support JDK11 for dev/test, support Turkish language users, enhance format-predicate to match format (parameterizer).

See the change log for more details.

seancorfield/clj-new 0.7.7

Pin Clojure (and test.check) version in generated projects instead of using "RELEASE".

See the change log for more details.

seancorfield/depstar 0.3.1

Add -m / --main option to override Main-Class in generated manifest.

See the change log for more details.

seancorfield/next.jdbc 1.0.5

plan’s “mapified” ResultSet is now a full IPersistentMap implementation which adds support for cons, count, dissoc, empty, etc. Continued improvements to documentation.

See the change log for more details.

Next.JDBC to 1.0.0 and Beyond!

| Comments

next.jdbc 1.0.0 and 1.0.1

First off, seancorfield/next.jdbc 1.0.0 was released on June 13th, 2019 (and I announced it on ClojureVerse but did not blog about it), and yesterday I released seancorfield/next.jdbc 1.0.1 which is mostly documentation improvements.

Someone recently commented that this blog had the Release Candidate announcement on June 4th and was surprised I didn’t “make a big deal” about the “gold” release. The 1.0.0 release is a big deal and this blog post is about that – what it’s taken to get here and what’s to come.

Next.JDBC Release Candidate 1

| Comments

seancorfield/next.jdbc 1.0.0-rc1

next.jdbc – the “next generation” of clojure.java.jdbc – is a modern Clojure wrapper for JDBC. The first Release Candidate is now available to test – containing only accretive and fixative changes from Beta 1. The API should be considered stable enough for production usage.

https://cljdoc.org/d/seancorfield/next.jdbc/1.0.0-rc1/doc/readme

The focus of this release is providing more flexibility in result set builders, so that it is easier to implement your own naming strategies, via new builders that accept :label-fn and :qualifier-fn options. These mirror the :column-fn and :table-fn options used in next.jdbc.sql – which are updated versions of clojure.java.jdbc’s :entities option. These new builder options are updated versions of clojure.java.jdbc’s :identifiers option.

Changes since Beta 1

  • Fix #24 by adding return type hints to next.jdbc functions.
  • Fix #22 by adding next.jdbc.optional with six map builders that omit NULL columns from the row hash maps.
  • Documentation improvements (#27, #28, and #29), including changing “connectable” to “transactable” for the transact function and the with-transaction macro (for consistency with the name of the underlying protocol).
  • Fix #30 by adding modified variants of column name functions and builders. The lower variants have been rewritten in terms of these new modified variants. This adds :label-fn and :qualifier-fn options that mirror :column-fn and :table-fn for row builders.

Please take it for a test drive and let me know if you run into any problems via GitHub issues or in the #sql channel on the Clojurians Slack or the #sql stream on the Clojurians Zulip.

Next.JDBC Beta 1

| Comments

seancorfield/next.jdbc 1.0.0-beta1

next.jdbc – the “next generation” of clojure.java.jdbc – is a modern Clojure wrapper for JDBC. Beta 1 is now available to test – only accretive and fixative changes will be made from this point on, so the API should be considered stable enough for production usage.

https://cljdoc.org/d/seancorfield/next.jdbc/1.0.0-beta1/doc/readme

The group and artifact ID will remain seancorfield/next.jdbc, the namespace structure will remain next.jdbc.*. With auto-generated documentation hosted on cljdoc.org and Continuous Integration testing hosted on circleci.com, I have decided to continue work on next.jdbc outside Clojure Contrib, rather than merge it into clojure.java.jdbc as new namespaces there. I have updated the Contributing page on GitHub to reflect that Pull Requests can now be submitted.

Changes since Alpha 13

  • Set up CircleCI testing (just local DBs for now).
  • Address #21 by adding next.jdbc.specs and documenting basic usage.
  • Fix #19 by caching loaded database driver classes.
  • Address #16 by renaming reducible! to plan (this is a BREAKING CHANGE! from Alpha 13 – the naming of this function was the blocker for moving from Alpha to Beta).
  • Address #3 by deciding to maintain this library outside Clojure Contrib.

Please take it for a test drive and let me know if you run into any problems via GitHub issues or in the #sql channel on the Clojurians Slack or the #sql stream on the Clojurians Zulip.

Next.JDBC

| Comments

seancorfield/next.jdbc 1.0.0-alpha8

I’ve talked about this in a few groups – it’s been a long time coming. This is the “next generation” of clojure.java.jdbc – a modern wrapper for JDBC, that focuses on reduce/transducers, qualified-keywords, and datafy/nav support (so, yes, it requires Clojure 1.10).

https://cljdoc.org/d/seancorfield/next.jdbc/1.0.0-alpha8/doc/readme

The next generation of clojure.java.jdbc: a new low-level Clojure wrapper for JDBC-based access to databases. It’s intended to be both faster and simpler than clojure.java.jdbc and it’s where I intend to focus my future energy, although I have not yet decided whether it will ultimately be a new set of namespaces in the Contrib lib or a separate, standalone OSS library!

At this point, I’m looking for feedback on the API and the approach (as well as bugs, performance issues, etc). Please take it for a spin and let me know what you think via GitHub issues or in the #sql channel on the Clojurians Slack or the #sql stream on the Clojurians Zulip.

The group/artifact ID will change at some point: and the actual namespaces will too, but I will try to make that as painless as possible when I take this out of the alpha phase.

Atom, Chlorine, and Windows

| Comments

About a month ago, I was praising Chlorine, the new Clojure package for Atom and I’ve been using it, day-in, day-out, for all my Clojure development. On a Mac, that’s straightforward because I start a Socket REPL on the Mac and I run Atom on the Mac so when I connect via Chlorine and issue the Chlorine: Load File command (via Ctrl-, f in my keymap), it sends (load-file "/path/to/file.clj") to the REPL, for the file being edited, and that is evaluated and loads the source from disk and compiles it. On Windows…