You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the only way to disable the vetting of rules for a query is with the @sqlc-vet-disable flag.
The problem with this is that it is an "all-or-nothing" approach. When provided, that flag disables the vetting of all rules for the query including some which might be needed.
It would be good to be able to provide a list of rules to skip, like:
/* @sqlc-vet-disable sqlc/db-prepare no-exec */
In this case, only the 2 listed rules in the comment would be skipped, but all others would run.
When no rule is provided, the flag should disable all rules in the query, just like the current behaviour, for backwards-compatibility.
Use Case
I have a basic no-delete-without-where rule which needs to be disabled for a few queries, but the current way to do that involves skipping all rules for the affected queries.
What database engines need to be changed?
PostgreSQL, MySQL, SQLite
What programming language backends need to be changed?
No response
The text was updated successfully, but these errors were encountered:
What do you want to change?
Currently, the only way to disable the vetting of rules for a query is with the
@sqlc-vet-disable
flag.The problem with this is that it is an "all-or-nothing" approach. When provided, that flag disables the vetting of all rules for the query including some which might be needed.
It would be good to be able to provide a list of rules to skip, like:
In this case, only the 2 listed rules in the comment would be skipped, but all others would run.
When no rule is provided, the flag should disable all rules in the query, just like the current behaviour, for backwards-compatibility.
Use Case
I have a basic
no-delete-without-where
rule which needs to be disabled for a few queries, but the current way to do that involves skipping all rules for the affected queries.What database engines need to be changed?
PostgreSQL, MySQL, SQLite
What programming language backends need to be changed?
No response
The text was updated successfully, but these errors were encountered: