コード例 #1
0
ファイル: store.go プロジェクト: c2h5oh/bond
// Tx returns a copy of the store that runs in the context of the given
// transaction.
func (s *store) Tx(tx db.Tx) Store {
	return &store{
		Collection: tx.C(s.Collection.Name()),
		session: &session{
			Database: tx,
			stores:   make(map[string]*store),
		},
	}
}