4 ms·
Is any one aware of a language (or dsl) which will compile to recursive CTEs? It'd be helpful to see queries at the domain level to understand how they fit int
by mjburgess 5y ago
Is any one aware of a language (or dsl) which will compile to recursive CTEs?
It'd be helpful to see queries at the domain level to understand how they fit into a problem; rather than this weird embedding of some implicit idea.
- jitl 5y agoI spent some time looking for this specifically to translate Datalog or Prolog to SQL. There’s theoretical work out there but I didn’t find anything plug and play.
- refset 5y agoNot exactly plug and play, but for BigQuery there's now Logica https://opensource.googleblog.com/2021/04/logica-organizing-your-data-queries.html https://opensource.googleblog.com/2021/04/logica-organizing-...
- jitl 5y agoThanks, this is great — and it claims experimental support for SQLite which is where I want it the most.
- handrous 5y agoThere's the AGE plugin: https://age.apache.org https://age.apache.org Dunno how close it is to being ready for production, but it lets you use Cypher in PostgreSQL, which is a pretty damn nice language for doing many of the things you'd use recursive CTEs for. I don't much care for Neo4j (the "home" database for the Cypher language) but Cypher is good.