xtdb 2024-10-17

Is there a function available to transform return values from SQL into idiomatic Clojure data? I started out using XTQL, but it seems like some things aren't supported there yet (information schema, limit/offset arguments), so I'm thinking of switching to SQL for some things. However SQL returns data in a different form, e.g. keywords look like :foo$bar instead of :foo/bar, and Clojure data structures are represented as json in org.postgresql.util.PGobject objects.

Are you using next.jdbc for running SQL against XTDB?

If so, you can use a different :builder-fn to convert :foo$bar column names to :foo/bar, and the library docs have information for working with JSON/JSONB which will probably help you.

I need to carve out some time to circle back around to working with XTDB -- I have a bunch of open issues on HoneySQL for adding support for XTDB's SQL extensions, and I want to make next.jdbc easier to use with it as well.