From feccc712f178d16134c14c955ff04d9e2931a68c Mon Sep 17 00:00:00 2001 From: Benjamin Wang Date: Tue, 11 Apr 2023 18:58:53 +0800 Subject: [PATCH] Export both FreelistArrayType and FreelistMapType so as to keep API compatibility Signed-off-by: Benjamin Wang --- db.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/db.go b/db.go index d17322d..80be5f5 100644 --- a/db.go +++ b/db.go @@ -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.