forked from mirror/gorm
Add callback query
This commit is contained in:
parent
12c3df1f47
commit
34122c12d1
|
@ -0,0 +1,13 @@
|
|||
package gorm
|
||||
|
||||
func Query(scope *Scope) {
|
||||
}
|
||||
|
||||
func AfterQuery(scope *Scope) {
|
||||
scope.CallMethod("AfterFind")
|
||||
}
|
||||
|
||||
func init() {
|
||||
DefaultCallback.Query().Register("query", Query)
|
||||
DefaultCallback.Query().Register("after_query", AfterQuery)
|
||||
}
|
Loading…
Reference in New Issue