Passing external transaction to Storm

This commit is contained in:
Asdine El Hrychy
2016-04-24 14:36:23 +02:00
parent 203d88c63c
commit b5486fd5cd
4 changed files with 45 additions and 0 deletions

View File

@@ -19,3 +19,9 @@ func (n Node) From(addend ...string) *Node {
n.rootBucket = append(n.rootBucket, addend...)
return &n
}
// WithTransaction returns a New Storm node that will use the given transaction.
func (n Node) WithTransaction(tx *bolt.Tx) *Node {
n.tx = tx
return &n
}