Support for cljc
Opened this issue · 3 comments
I'd like to use this library from other clojure runtimes (like cljs). Honeysql already supports cljc, it'd be nice if we had an cljc implementation at least for eql->hsql that is decoupled from next.jdbc
Hi @conjurernix,
The logic for "eql->hsql" is heavily driven by the JDBC metadata and the DB-specific nuances. Can you provide some more detail about the actual usecase that you want to address?
There's a few that I can mention but it all boils down to "Use EQL from any non JVM Clojure implementation"
- Use EQL from Nodejs Clojurescript backends.
- Use EQL with SQL based local-first databases from Clojurescript front-end, or ClojureDart apps etc.
HoneySQL is a simple data to query translation, I assumed HoneyEQL would be similar.
Got it.
@conjurernix, EQL -> SQL translation logic is not mere data structure translation. The translation heavily depends on two things.
- The JDBC metadata
- The database-specific nuances (MySQL and Postgres have different JSON query logic, which is heavily used in HoneyEQL)
The latter part is runtime agonistic.
However, the first part directly uses Java's JDBC Metadata API. To make it truly cross-platform, we need to decouple this part from hosting runtime-specific DB metadata drivers.
Currently, I don't have any plans to add support for this. If you would like to contribute, PRs are always welcome :)