diff options
Diffstat (limited to 'src/dedo.go')
-rw-r--r-- | src/dedo.go | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/dedo.go b/src/dedo.go index 734b384..2bb805e 100644 --- a/src/dedo.go +++ b/src/dedo.go @@ -91,6 +91,24 @@ type DatabaseI interface{ Path() string } +/// transactionT represents a read-only or read/write transaction on the +/// database. Read-only transactions can be used for retrieving values for keys +/// and creating cursors. Read/write transactions can create and remove buckets +/// and create and remove keys. +/// +/// IMPORTANT: You must commit or rollback transactions when you are done with +/// them. Pages can not be reclaimed by the writer until no more transactions +/// are using them. A long running read transaction can cause the database to +/// quickly grow. +type transactionT struct{ + writable bool + db *DB + meta *meta + root Bucket + pages map[pgid]*page + commitHandlers []func() +} + type pgid uint64 /// bucket represents the on-file representation of a bucket. This is stored as @@ -295,24 +313,6 @@ type pgids []pgid /// txid represents the internal transaction identifier. type txid uint64 -/// transactionT represents a read-only or read/write transaction on the database. -/// Read-only transactions can be used for retrieving values for keys and -/// creating cursors. Read/write transactions can create and remove buckets -/// and create and remove keys. -/// -/// IMPORTANT: You must commit or rollback transactions when you are done with -/// them. Pages can not be reclaimed by the writer until no more transactions -/// are using them. A long running read transaction can cause the database to -/// quickly grow. -type transactionT struct { - writable bool - db *DB - meta *meta - root Bucket - pages map[pgid]*page - commitHandlers []func() -} - /// walkFunc is the type of the function called for keys (buckets and "normal" /// values) discovered by Walk. Keys is the list of keys to descend to the /// bucket owning the discovered key/value pair k/v. |