feat: Implement DataStructureManager and internal structures for vari… #318
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces a unified data structure management system for the FlyDB project. It adds a
DataStructureManager
class to provide a single interface for managing multiple data structures, all sharing a single database instance. The changes also include the internal implementation of various data structure types that integrate with the shared database.Unified Data Structure Management:
DataStructureManager
Implementation: Added a newDataStructureManager
class instructure/manager.go
to manage multiple data structures (e.g., strings, hashes, lists, sets, sorted sets, bitmaps, streams) through a single database instance. It supports operations like key deletion, expiration, TTL retrieval, and syncing data to disk.DataStructureManager
initializes and provides access to internal implementations of supported data structures, ensuring they share the same database instance.Internal Data Structure Implementations:
ListStructureInternal
,SetStructureInternal
,ZSetStructureInternal
,BitmapStructureInternal
,StreamStructureInternal
, andExpiringKeyInternal
instructure/structures_internal.go
. These classes are designed to work with the shared database instance.newListStructureInternal
) to simplify their initialization with the shared database instance.