Does anyone know of a project that would introspect (presumably with jdbc) a given database and exfiltrate all the data from the database as Clojure data (in memory, edn-ish)?
I've been given some H2 .db files that I think I could explore more easily if the data were just clojure data rather than sql.
Is such a thing even possible (does jdbc enable enough introspection)?
Some databases provide an information_schema that has metadata about tables and columns. Not sure about H2.
Donut xray is a library that might help you here.
Thanks, that does look relevant.
Just in case - note that you'll likely lose some information that way due to type mappings.
That makes sense... If I need to do it myself, I can probably employ TMD, which will give me some leverage. What kind of lossage are you imagining @p-himik?
I meant only in terms of data. If you also introspect the schema and keep it in mind, then it's likely that there will be no loss. Just take a look at https://www.h2database.com/html/datatypes.html and think which H2 types map to which Clojure types. :) I imagine all four text types along with the enum type will be represented as Java strings.