This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-05-21
Channels
- # calva (11)
- # cider (4)
- # clojure (15)
- # clojure-europe (20)
- # clojurescript (14)
- # clr (45)
- # conjure (2)
- # cursive (1)
- # fulcro (10)
- # helix (4)
- # honeysql (7)
- # hoplon (21)
- # humbleui (2)
- # hyperfiddle (23)
- # introduce-yourself (1)
- # malli (11)
- # matrix (3)
- # off-topic (6)
- # pathom (2)
- # practicalli (1)
- # re-frame (9)
- # releases (1)
- # specter (2)
- # sql (10)
- # xtdb (2)
Anyone aware of efforts to turn string SQL queries into honey sql? Via an AST maybe? This was my first hit when I googled for a sql parser https://github.com/JSQLParser/JSqlParser
The XTDB 2.x SQL parser & AST rewrite namespace might be a reasonable starting point for such a thing https://github.com/xtdb/xtdb/blob/2.x/core/src/main/clojure/xtdb/sql/plan.clj
Maybe something more simplistic could be built specifically for HoneySQL without needing the full semantic analysis machinery, but I wouldn't bet on it :thinking_face:
It's been asked repeatedly over the years but SQL parsing is a massive effort -- as the XTDB folks know -- and completely out of scope for HoneySQL.
See https://github.com/seancorfield/honeysql/issues/182 for at least one thread on it -- and why an ANSI SQL parser alone is not sufficient.
Yeah, I see the issues with being dialect neutral. For me it would be a one-off thing to convert lots of pretty standard MySQL queries into HoneySQL. So I was interested in hearing if anyone has done something similar for migration rather than a general solution.
I'm not sure if anyone here is trying to use ClojureCLR but I just pushed some changes to HoneySQL to get at least basic compatibility in place... testing and feedback welcome!