aboutsummaryrefslogtreecommitdiff
path: root/db.go
diff options
context:
space:
mode:
authorBen Johnson <benbjohnson@yahoo.com>2014-05-27 11:31:55 -0600
committerBen Johnson <benbjohnson@yahoo.com>2014-05-27 11:31:55 -0600
commit92a9f2e200e83fd0b3ddef177f9a454b0273c17e (patch)
treefe1fdb4aed24d100cac337e18afce207674fd65e /db.go
parentMerge branch 'master' of https://github.com/boltdb/bolt (diff)
downloaddedo-92a9f2e200e83fd0b3ddef177f9a454b0273c17e.tar.gz
dedo-92a9f2e200e83fd0b3ddef177f9a454b0273c17e.tar.xz
Remove DB.Check(). Allow read-only Tx.Check().
This commit removes the DB.Check() function and instead makes the user decide whether a transaction should be writable or read-only. Tx.Check() is not safe to use concurrently on a read-only transaction, however, it significantly improves the performance of it.
Diffstat (limited to 'db.go')
-rw-r--r--db.go8
1 files changed, 0 insertions, 8 deletions
diff --git a/db.go b/db.go
index 5b6cc3e..7b17086 100644
--- a/db.go
+++ b/db.go
@@ -501,14 +501,6 @@ func (db *DB) Stats() Stats {
return db.stats
}
-// Check performs several consistency checks on the database.
-// An error is returned if any inconsistency is found.
-func (db *DB) Check() error {
- return db.Update(func(tx *Tx) error {
- return tx.Check()
- })
-}
-
// This is for internal access to the raw data bytes from the C cursor, use
// carefully, or not at all.
func (db *DB) Info() *Info {