Global query filters #4111
Unanswered
tomflenner
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi 👋🏻
I’m new to SQLC and Go, coming from a strong .NET background - so apologies in advance if this question sounds too “C#-oriented.”
In Entity Framework (EF), there’s a feature called Global Query Filters (docs here) that lets you define filters applied automatically to all queries (e.g., soft deletes, multi-tenancy).
👉 I’m wondering if something similar is possible with SQLC.
For example, some kind of SQL middleware in Go where generated SQLC queries could take an additional filter that gets applied automatically, without needing to repeat it everywhere in the code.
Is there a recommended pattern for this with SQLC?
Thanks a lot in advance 🙏
Beta Was this translation helpful? Give feedback.
All reactions