delete unused callbacks/create.go

This commit is contained in:
Jinzhu 2014-01-26 14:28:35 +08:00
parent 10fcb0c88e
commit 6775ecaf13
2 changed files with 0 additions and 23 deletions

View File

@ -1,21 +0,0 @@
package callbacks
import "github.com/jinzhu/gorm"
func Create(scope *gorm.Scope) {
}
func init() {
gorm.DefaultCallback.Create().Before().Register(Create)
}
func init() {
DefaultCallback.Create().Before("Delete").After("Lalala").Register("delete", Delete)
DefaultCallback.Update().Before("Delete").After("Lalala").Remove("replace", Delete)
DefaultCallback.Delete().Before("Delete").After("Lalala").Replace("replace", Delete)
DefaultCallback.Query().Before("Delete").After("Lalala").Replace("replace", Delete)
}
// Scope
// HasError(), HasColumn(), CallMethod(), Raw(), Exec()
// TableName(), CombinedQuerySQL()

View File

@ -86,8 +86,6 @@ func (scope *Scope) CallMethod(name string) {
} else { } else {
scope.Err(errors.New(fmt.Sprintf("unsupported function %v", name))) scope.Err(errors.New(fmt.Sprintf("unsupported function %v", name)))
} }
} else {
scope.Err(errors.New(fmt.Sprintf("no valid function %v found", name)))
} }
} }