-
-
Notifications
You must be signed in to change notification settings - Fork 160
Description
SQLPage is awesome!
I'm currently building larger and larger (internal) applications with it, but with increasing project size SQLPage's limitations become more and more apparent.
The main pain points for me are keeping things DRY and code organization.
While the run_sql function helps somewhat it's clunky and a bit limited as the only real vehicle for factoring out code.
Therefore I'd like to propose adding support for PRQL as a layer on top of (the query side of) SQL.
PRQL looks like a great complement/addition to SQLPage!
Apart from a more modern, concise and easier to read query syntax it also provides things like custom functions, a much richer "standard library" of predefined functions and -- hopefully soon -- a module system, which will allow importing declarations from other files with proper namespacing.
The only "problem" that SQLPage would have to work around is that PRQL is currently only focused on the query side of things and doesn’t plan on supporting writing to the database. So, we'd still need support for writing SQL directly for all the "non-SELECT" parts of the language.
I haven't really thought through how this might be achieved best.
But to me it looks like PRQL is something that SQLPage could definitely benefit from!