Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Global query filters #4111

Unanswered
tomflenner asked this question in Q&A
Discussion options

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 🙏

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /