driver

module
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2025 License: MIT

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:
  • None
Wishlist:
  • Berkeley DB / DBM (For Python interoperability)

Codecs:
Supported:
Beta
  • None
Wishlist
  • Pickle (Python)

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.

Directories

Path Synopsis
db
badger Module
bbolt Module
bolt Module
diskv Module
pebble Module
encoding
msgpack Module
Package shelvetest provides test utilities for the go-shelve drivers.
Package shelvetest provides test utilities for the go-shelve drivers.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL