Add callback query

This commit is contained in:
Jinzhu 2014-01-26 12:49:10 +08:00
parent 12c3df1f47
commit 34122c12d1
1 changed files with 13 additions and 0 deletions

13
callback_query.go Normal file
View File

@ -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)
}