-
Notifications
You must be signed in to change notification settings - Fork 891
SQLc fork (or other solution) to implement reusable VIEW
s
#8702
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
For:
Against:
|
We could implement the template before we go to sqlc generation too. Mutate the SQL files that go into SQLc and prevent a fork. After doing a dive into the SQLc to do this myself, I don't think it is any much easier to do in sqlc. A large discovery was that although the core of SQLc parses the SQL ast, and you can use that AST to make generation decisions, the actual writing of output SQL is done manually with effectively Because of this, if our templates are as simple as a However, if that was done, there is no way to use A positive note of this design is that at any moment we can just move the view to a migration and remove our additional generation code. Or in other words, we have an avenue to roll it back. |
I am beginning a conversion with the SQLc maintainer. Going to look into as many options as I can to avoid forking. |
The SQLc team expressed that our wants are a common request. I need to follow up with them, but it might not be worth implementing this ourselves manually. If maintaining the views really hurts, we can come back to this |
Uh oh!
There was an error while loading. Please reload this page.
Following this PR #8625 all table updates to templates, workspace builds, template versions require updating the view.
This is tedious, and we should have the ability to reuse views dynamically.
Example POC: Emyrk/sqlc#1
The text was updated successfully, but these errors were encountered: