lovasoa / SQLpage

SQL-only webapp builder, empowering data analysts to build websites and applications quickly
https://sql.ophir.dev
MIT License
896 stars 63 forks source link

delegate statement preparation to sqlx #135

Closed lovasoa closed 8 months ago

lovasoa commented 8 months ago

The logic of preparing statements and caching them for later reuse is now entirely delegated to the sql driver library (sqlx). This simplifies the code and logic inside sqlpage itself.

More importantly, statements are now prepared in a streaming fashion when a file is first loaded, instead of all at once, which allows referencing a temporary table created at the start of a file in a later statement in the same file.

fixes #100

lovasoa commented 8 months ago

@ipftalabua @nanawel : this pr should solve your respective problems, by allowing creating a temporary table and then referencing it from inside the same .sql file.