datalevin

Sigve 2025-05-05T12:08:24.098579Z

Hi! What is the difference between get-conn , create-conn and empty-db ? How would you recommend creating and destroying short-lived connections to tmp databases in tests? And how to get a fresh db on every test without having to manually delete the db-file?

Huahai 2025-05-05T20:26:03.507569Z

Set :temp? true for :kv-opts option, the file will be deleted on JVM exit.

Huahai 2025-05-05T20:27:17.235069Z

There's with-conn for short lived connection.

Sigve 2025-05-06T06:01:22.903169Z

Thanks 👍 with-db helps as well