by gavinray · 3y ago · 0 comments
The article mentions a "SQL-to-SQL" compiler -- how exactly does this work?
Are you intercepting plain SQL queries over the wire, analyzing them, and then rewriting them into the form of queries that EdgeDB internally generates?
Any chance you'd be able to link the relevant parts of the code?
I had a look through the "/pg" directory but there was a lot there and it wasn't immediately clear which parts did what
1. SQL parser: https://github.com/edgedb/edgedb/tree/master/edb/pgsql/parse... 2. SQL transpiler: https://github.com/edgedb/edgedb/tree/master/edb/pgsql/parse... 3. Wire protocol handler: https://github.com/edgedb/edgedb/blob/master/edb/server/prot...