From 32937280c36f9af3755472c4e8c825ec3a9d7539 Mon Sep 17 00:00:00 2001 From: Steven Normore Date: Wed, 16 Apr 2014 15:00:26 +0000 Subject: wip --- db.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'db.go') diff --git a/db.go b/db.go index 54f726e..7e8dd7f 100644 --- a/db.go +++ b/db.go @@ -580,8 +580,8 @@ func (db *DB) checkBucket(b *Bucket, reachable map[pgid]*page, errors *ErrorList // This is for internal access to the raw data bytes from the C cursor, use // carefully, or not at all. -func (db *DB) RawData() ([]byte, int) { - return db.data, db.pageSize +func (db *DB) Info() *Info { + return &Info{db.data, db.pageSize} } // page retrieves a page reference from the mmap based on the current page size. @@ -647,3 +647,8 @@ func (s *Stats) Sub(other *Stats) Stats { func (s *Stats) add(other *Stats) { s.TxStats.add(&other.TxStats) } + +type Info struct { + Data []byte + PageSize int +} -- cgit v1.2.3