Merge pull request #459 from ahrtr/export_freelist_type_20230411

Export both FreelistArrayType and FreelistMapType so as to keep API compatibility
pull/460/head
Marek Siarkowicz 2023-04-11 21:27:18 +02:00 committed by GitHub
commit 5602d88f41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

9
db.go
View File

@ -18,6 +18,15 @@ import (
// The time elapsed between consecutive file locking attempts.
const flockRetryTimeout = 50 * time.Millisecond
// Export both FreelistArrayType and FreelistMapType so as to keep API compatibility.
// TODO(ahrtr): eventually we should (step by step)
// 1. default to FreelistMapType;
// 2. remove the FreelistArrayType and do not export FreelistMapType;
const (
FreelistArrayType = common.FreelistArrayType
FreelistMapType = common.FreelistMapType
)
// DB represents a collection of buckets persisted to a file on disk.
// All data access is performed through transactions which can be obtained through the DB.
// All the functions on DB will return a ErrDatabaseNotOpen if accessed before Open() is called.