datalevin

Huahai 2026-01-22T16:17:26.750029Z

Version 0.10.1 is released, https://github.com/datalevin/datalevin/blob/master/CHANGELOG.md#0101-2026-01-21

👏 6
🎉 8
hlship 2026-01-23T21:19:03.105299Z

I don't think the Pod version for Babashka is working: user=> (pods/load-pod 'huahaiy/datalevin "0.10.1") Downloading pod huahaiy/datalevin (0.10.1) java.io.FileNotFoundException: https://github.com/datalevin/datalevin/releases/download/0.10.1/dtlv-0.10.1-macos-latest-aarch64.zip [at <repl>31]

Huahai 2026-01-23T21:20:27.307459Z

it's not released as pod, this is normally handled by someone else.

Huahai 2026-01-23T21:21:22.236449Z

the url is wrong too

hlship 2026-01-23T21:21:28.399919Z

Sorry to bug you then, thought it was official, but looks to be via someone named "bzg"

Huahai 2026-01-23T21:21:54.489299Z

I can send a PR to borkdude

Huahai 2026-01-23T21:35:38.706829Z

Sent a PR to him

Huahai 2026-01-23T21:36:51.803759Z

I should have told bzg about the URL changes. My bad.

Huahai 2026-01-23T22:27:46.495279Z

Merged.

phronmophobic 2026-01-22T17:27:04.787659Z

Trying the latest version and it loads without issue! gratitude I noticed a small typo in https://github.com/datalevin/datalevin/blob/master/doc/upgrade.md#in-code datalein.main/dump should probably be datalevin.main/dump.

Huahai 2026-01-22T17:30:51.431129Z

Fixed. Thx.

phronmophobic 2026-01-22T17:32:37.109249Z

I'm trying to dump the full database and restore in code. I'm not really sure what the recommended values are for dbis list? datalog? all?. Ideally, I could just do:

(require 'datalevin.main)
;; using old version
(datalevin.main/dump src-dir backup-file)
;; using new version
(datalevin.main/load new-copy-dir backup-file)

phronmophobic 2026-01-22T17:35:26.971289Z

I don't understand the descriptions for all? and datalog?

phronmophobic 2026-01-22T17:35:43.258529Z

Is this the right idea?

(require 'datalevin.main)
;; using old version
(datalevin.main/dump src-dir backup-file nil false true true)
;; using new version
(datalevin.main/load new-copy-dir backup-file nil true)

Huahai 2026-01-22T17:38:55.050849Z

looks ok, anything wrong?

phronmophobic 2026-01-22T17:42:17.328529Z

I don't know. Like I said, I don't understand what all? and datalog? do so I don't know how to check if everything worked.

Huahai 2026-01-22T17:46:03.844469Z

ok, Datalevin expose both underlying key-value and Datalog API. Dump/load are trying to use the same function for both. all? means dump/load all the DBI, i.e. all the key-value sub-database. datalog? means dum/load the DB as a Datalog DB, not in terms key values, so it will dump all datoms, instead of key value raw bytes.

phronmophobic 2026-01-22T17:47:50.413719Z

if both are true, does it dump both?

Huahai 2026-01-22T17:48:07.901199Z

In any case, if you have a Datalog DB, set datalog? true, it will dump datoms and schema.

Huahai 2026-01-22T17:48:29.054269Z

datalog? takes precedence.

Huahai 2026-01-22T17:49:13.057539Z

We will not dump both formats at the same time. Only in one format.

phronmophobic 2026-01-22T17:58:12.351879Z

Ok, I think it worked. I initially dumped nippy? set to false, but it had trouble loading some records I had stored. Using nippy? set to true seemed to work. It wasn't really clear what format would be used if nippy? was false.

Huahai 2026-01-22T18:01:04.517599Z

If nippy? set as false, datoms are printed, so the values are expected to be printable.

phronmophobic 2026-01-22T18:20:13.322119Z

Yes, I figured that, but it was apparent from the documentation. Thankfully, the db was small.

Huahai 2026-01-22T18:22:52.302579Z

Added a note in the doc string. Thanks.

1
Ahmed Hassan 2026-01-22T18:54:16.967699Z

So, if datalevin have both key/value and datalog databases, then we need to dump/load it for each kind?

Huahai 2026-01-22T18:59:17.359119Z

Correct. If you have both in the same db file, dump it as datalog will not dump non-datalog DBIs, you will have to dump them separately.

👍 1
Huahai 2026-01-22T19:23:04.282859Z

we could automate this though. I can file an issue.

Huahai 2026-01-22T19:25:17.508149Z

https://github.com/datalevin/datalevin/issues/348

2
phronmophobic 2026-01-22T19:32:46.665479Z

It should also be possible to dump reload via the clojure cli without downloading a separate binary. An example command would be helpful. Something like:

clojure -Sdeps {:deps\ {datalevin/datalevin\ {:mvn/version\ \"old-version\"}}} -M -m datalevin.main.dump db-dir backup-file
clojure -Sdeps {:deps\ {datalevin/datalevin\ {:mvn/version\ \"new-version\"}}} -M -m datalevin.main.load backup-file new-db-dir

Huahai 2026-01-22T19:33:30.100159Z

Cool, a PR on the doc would be appreciated

phronmophobic 2026-01-22T19:34:59.622049Z

I don't think datalevin.main.dump and datalevin.main.load exist in the right form right now

phronmophobic 2026-01-22T19:37:15.842249Z

or maybe the main function in datalevin.main could work

Huahai 2026-01-22T19:42:21.754059Z

yeah, main function handles argument parsing etc. so it may work