newBucket returns a new bucket associated with a transaction.
(tx *Tx)
| 45 | |
| 46 | // newBucket returns a new bucket associated with a transaction. |
| 47 | func newBucket(tx *Tx) Bucket { |
| 48 | var b = Bucket{tx: tx, FillPercent: DefaultFillPercent} |
| 49 | if tx.writable { |
| 50 | b.buckets = make(map[string]*Bucket) |
| 51 | b.nodes = make(map[common.Pgid]*node) |
| 52 | } |
| 53 | return b |
| 54 | } |
| 55 | |
| 56 | // Tx returns the tx of the bucket. |
| 57 | func (b *Bucket) Tx() *Tx { |
no outgoing calls
no test coverage detected