summaryrefslogtreecommitdiff
path: root/model/object.go
diff options
context:
space:
mode:
Diffstat (limited to 'model/object.go')
-rw-r--r--model/object.go15
1 files changed, 0 insertions, 15 deletions
diff --git a/model/object.go b/model/object.go
index bcbba3e..63ef419 100644
--- a/model/object.go
+++ b/model/object.go
@@ -10,18 +10,3 @@ type Object interface {
Update(tx *sql.Tx) error
Delete(tx *sql.Tx) error
}
-
-func SafeCrud(crud func(tx *sql.Tx) error) error {
- tx, err := NewTx()
- if err != nil {
- return err
- }
-
- err = crud(tx)
- if err != nil {
- Rollback(tx)
- return err
- }
-
- return tx.Commit()
-}