Filter support passing context (#2200) #2270
No reviewers
Labels
No Label
backport/done
backport/v1
blocked
db
oracle
db
sqlserver
duplicate
feature
cache
frontport/done
frontport/main
invalid
kind
breaking
kind
bug
kind
build
kind
dependencies
kind
docs
kind
driver
kind
enhancement
kind
feature
kind
performance
kind
proposal
kind
question
kind
refactor
kind
testing
need
feedback
need
test
proposal:accepted
RaspBerry Pi
regression
skip-changelog
upstream
wip
wontfix
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: xorm/xorm#2270
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "LinkinStars/xorm:feat_filter_context"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds a
Context
parameter to theDo
method of the Filter interface.Developers can rewrite SQL through the
Filter
Do
method and need to get the necessary data from the Context to assist.For example, get user information through
Context
, so that different users can use different tables. Another example is to get the flags throughContext
to add annotations to the SQL, and use the annotations to let the subsequentDB-Proxy
to achieve read/write separation.