Skip to content

Commit

Permalink
Merge pull request #1 from happyyi008/rollback-unless-committed
Browse files Browse the repository at this point in the history
Add RollBackUnlessCommitted to interface
  • Loading branch information
kacperjurak authored Nov 5, 2019
2 parents f3bce09 + ce09bc0 commit b4c3d51
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions igorm.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ type Gormw interface {
Begin() Gormw
Commit() Gormw
Rollback() Gormw
RollbackUnlessCommitted() Gormw
NewRecord(value interface{}) bool
RecordNotFound() bool
CreateTable(values ...interface{}) Gormw
Expand Down Expand Up @@ -302,6 +303,10 @@ func (it *gormw) Rollback() Gormw {
return Wrap(it.w.Rollback())
}

func (it *gormw) RollbackUnlessCommitted() Gormw {
return Wrap(it.w.RollbackUnlessCommitted())
}

func (it *gormw) NewRecord(value interface{}) bool {
return it.w.NewRecord(value)
}
Expand Down

0 comments on commit b4c3d51

Please sign in to comment.