honeysql

slipset 2025-01-04T17:03:41.129469Z

So, let’s say that one for the heck of it wanted to start prototyping on a thing. And in the beginning, I don’t want to mess with setting up databases and stuff, so I’d just run with an atom . But it would be cool to have a query language on top of that atom. I found https://github.com/djjolicoeur/datamaps for datalog, but do anyone know of something for honeysql?

isak 2025-01-06T22:56:37.920119Z

Kind of: https://github.com/wotbrew/relic

seancorfield 2025-01-04T18:26:59.358979Z

HoneySQL is very focused on SQL -- you'd essentially need something in-memory that supported "full SQL"... at which point, why not just use SQLite or Derby or H2 or...? (H2 has an in-memory version) You could even use Embedded PostgreSQL -- and have a full PG database in memory (see next.jdbc's tests for that).

2025-01-04T18:28:52.405529Z

is it possible to embed xtdb?

slipset 2025-01-04T18:30:09.245689Z

@seancorfield yes, I somewhat figured. I was just wondering if someone had done something in that vein.

slipset 2025-01-04T18:30:14.514699Z

A full sql would be too much.

seancorfield 2025-01-04T18:30:44.260809Z

Yes, you can have full XTDB in-memory too.

seancorfield 2025-01-04T18:32:46.827319Z

(my usermanager example uses an in-memory XTDB for testing, but assumes a standalone instance for normal running)

2025-01-04T18:33:05.491129Z

ooh, shiny

seancorfield 2025-01-04T18:34:25.183679Z

TBH, one of the "problems" with SQL, or rather with SQL databases, is that DDL varies so much across them that it's almost impossible to realistically switch databases between tests and production code, so you might just as well pick a DB and use that from the get-go.

🆒 1
seancorfield 2025-01-04T18:35:12.299169Z

I like XTDB in that regard because it has no DDL, but otherwise looks like "full PostgreSQL"... Much easier to explore/prototype stuff with.

slipset 2025-01-04T17:04:42.449769Z

Basically transforming [:= :id foo] to #(= (:id %) foo) which is somewhat trivial, but of course the joins and stuff is a bit more involved.