Datomic Local 1.0.291 now available

The complete change log can be found at Change Log | Datomic Local

2025/03/19 - 1.0.291

  • Fix: ‘:db-name’ key is now available for Datomic Local DBs.
  • Fix: changes to BigDecimal attribute scale no longer ignored.

Are these problems documented somewhere, so I can understand what situations do they actually fix?

That might allow me to clean up some of our own workarounds.
Eg. we had to work around database IDs not consistently being UUIDs.
eg. a :storage-dir :mem db val’s :id is a UUID, but a :storage-dir "..." one’s is a string (the db name)

In-memory dbs still don’t return the actual :db-name, but some UUID instead, so I’m really not sure what is this fix about:

(ns datomic-repro-db-name
  "https://forum.datomic.com/t/datomic-local-1-0-291-now-available/2552"
  (:require [datomic.client.api :as d]))

(defn mk-db "Returns a db connection." [& [cfg-overrides]]
  (let [cfg (-> {:server-type :datomic-local
                 :system      "repro"
                 :db-name     "<db-name>"}
                (merge cfg-overrides))]
    (-> (d/client cfg)
        (doto (d/create-database cfg)) 
        (d/connect cfg)
        d/db)))

(comment
  (for [storage-dir [:mem
                     (-> "datomic-local-repro/"
                         (java.nio.file.Path/of (into-array String nil))
                         .toAbsolutePath str)]]
    ((juxt :id :db-name) (mk-db {:storage-dir storage-dir})))

=>
(["33283f96-cb0f-4b03-9b7f-f7ed7273048b" "33283f96-cb0f-4b03-9b7f-f7ed7273048b"]
 ["<db-name>" "<db-name>"])

  :-)