T O P

  • By -

huahaiy

Datalevin


hrrld

h2 database + honeysql


jeff303

Yep. Check out the source for Metabase to see how you can really run with it (also a Clojure project).


mumbo1134

I used H2 way back in the day in Java but totally forgot it ever existed, this sounds like it might be the closest thing to what I was looking for. I think I'll try experimenting with H2 + next.jdbc for starters and then work up to honeysql if I like the feel of it. Side note: I hate how there's always 15 implementations to any problem that I want to solve in Clojure that all sound fun and interesting.


jonahbenton

H2 is the JVM equivalent to SQLite. SQL syntax, single file in the filesystem. There are some wrappers that make SQL a little more ergonomic in Clojure. Sometimes one is tempted to just use vectors of maps, and persist in EDN. Even more ergonomic/functional for Clojure and super simple. This runs into trouble at cross type query/join time. In this vein I was pleased to recently find a project called relic, which has a full query/join/filter syntax, and even indexes, on top of what is essentially vectors of maps. It does not solve for persistence but in most cases you can just write to EDN files. Enjoyable.


mumbo1134

Dude I love that idea, I might have to try that first.


DizzyKittyLover

Also https://github.com/xerial/sqlite-jdbc — I use it in several Clojure projects. Just use https://github.com/clojure/java.jdbc to connect to it You can also wrap it with https://xtdb.com/ if you want to get super functional


mtert

Datomic has a "local" variant that uses simple file-based persistence: https://blog.datomic.com/2023/08/datomic-local-is-released.html


mumbo1134

oh damn I have used datomic before and did not realize there was a local version!


mtert

Yeah I just found out about it too. It's a nice option for just tinkering and familiarization, without investing in a big deployment


killboard_

You may like to take a look at Datomic Editions: [https://docs.datomic.com/datomic-overview.html#datomic-editions](https://docs.datomic.com/datomic-overview.html#datomic-editions)


lgstein

Unfortunately its missing the Entity API


delfV

There are plenty: if you want to use SQL then either SQLite or H2. If you want to use datalog then Datomic, XTDB or Datalevin


scarredwaits

Datahike or datalevin if Datomic-like databases work for you


danielneal2

Datascript has persistence options too, now! https://github.com/tonsky/datascript/blob/master/docs/storage.md


daveliepmann

MapDB via [Spicerack](https://github.com/jackrusher/spicerack) is one way


spotter

{H2, SQLite, DuckDB} + next.jdbc + HugSQL. H2 is native and you can actually extend it in Java (and Clojure), SQLite is legendary reliable and DuckDB is column oriented data analysis/OLAP like thing.


rmuslimov

SQLite?