aboutsummaryrefslogtreecommitdiff
path: root/meta.go
diff options
context:
space:
mode:
authorBen Johnson <benbjohnson@yahoo.com>2014-03-08 17:01:49 -0700
committerBen Johnson <benbjohnson@yahoo.com>2014-03-08 17:04:02 -0700
commit57376f090503d7ef5bc38f138e58e64bdea284a3 (patch)
treee215bb0cf8df72a53b662ff222c24a973e7faac3 /meta.go
parentAdd benchmarks. (diff)
downloaddedo-57376f090503d7ef5bc38f138e58e64bdea284a3.tar.gz
dedo-57376f090503d7ef5bc38f138e58e64bdea284a3.tar.xz
Rename Transaction to Tx.
I changed the Transaction/RWTransaction types to Tx/RWTx, respectively. This makes the naming more consistent with other packages such as database/sql. The txnid is changed to txid as well.
Diffstat (limited to 'meta.go')
-rw-r--r--meta.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/meta.go b/meta.go
index 643d339..cee2d29 100644
--- a/meta.go
+++ b/meta.go
@@ -10,7 +10,7 @@ type meta struct {
buckets pgid
freelist pgid
pgid pgid
- txnid txnid
+ txid txid
}
// validate checks the marker bytes and version of the meta page to ensure it matches this binary.
@@ -31,13 +31,13 @@ func (m *meta) copy(dest *meta) {
dest.buckets = m.buckets
dest.freelist = m.freelist
dest.pgid = m.pgid
- dest.txnid = m.txnid
+ dest.txid = m.txid
}
// write writes the meta onto a page.
func (m *meta) write(p *page) {
// Page id is either going to be 0 or 1 which we can determine by the Txn ID.
- p.id = pgid(m.txnid % 2)
+ p.id = pgid(m.txid % 2)
p.flags |= metaPageFlag
m.copy(p.meta())