aquametalabs / aquameta

Web development platform built entirely in PostgreSQL
GNU General Public License v3.0
1.1k stars 52 forks source link

endpoint: sql templates? #227

Open erichanson opened 3 years ago

erichanson commented 3 years ago

Sometimes a view is just too much, when what you want is basically a one-off query that just does some data slicing off in the corner of some app. It'd be nice to have server-side SQL templates, where you just pass them some arguments and they run the SQL. How is this functionally different than a sql function? It's not. But it doesn't clutter up the function space with less-important functions. That said, why isn't there more coherence around how extensions/schemas/bundles are organized w.r.t. functions? This relates to the public/private issue (#218) as well. I could imagine a function metadata layer in semantics that decorated functions according to their importance and role.