module
Version:
v1.0.4
Opens a new window with list of versions in this module.
Published: Feb 25, 2025
License: MIT
Opens a new window with license information.
README
¶
Go-Shelve Drivers
This module contains independent submodules for different database drivers and
codecs, meant to be used as part of the go-shelve project.
Databases:
Supported:
Beta:
Wishlist:
- Berkeley DB / DBM (For Python interoperability)
Codecs:
Supported:
Beta
Wishlist
Implementation Guidelines
Database Drivers
- Drivers should be implemented for key-value stores. For SQL databases, ORMs already provide a mapper from objects to database types.
- With this in mind, a driver for SQLite probably won't be provided, even if it is a popular option for embedded databases.
- Drivers must implement the shelve.DB interface.
- Optionally, drivers can implement the shelve.Sorted interface, if the underlying database supports sorted iteration.
- Drivers must have a
New
function to create new instances.
- Optionally, a
NewDefault
function, which creates a driver with sensible defaults, can also be provided.
- When a key is not found, DB.Get() must return a nil value and no error.
Codecs
- Codecs must implement the shelve.Codec interface.
Click to show internal directories.
Click to hide internal directories.