Help us shape the future of Go! Take the 2026 Go Developer Survey

nosql

package module
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: Apache-2.0 Imports: 8 Imported by: 51

README

NoSQL

NoSQL is an abstraction layer for data persistence.

This project is in development, the API is not stable.

Implementations

The current version comes with a few implementations inlcuding Mysql, Badger, and BoltDB, but implementations are on the roadmap.

  • Memory
  • BoltDB etcd fork.
  • Badger
  • MariaDB/MySQL
  • PostgreSQL
  • Cassandra
  • ...

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// WithValueDir is a wrapper over database.WithValueDir.
	WithValueDir = database.WithValueDir
	// WithDatabase is a wrapper over database.WithDatabase.
	WithDatabase = database.WithDatabase
	// WithBadgerFileLoadingMode is a wrapper over database.WithBadgerFileLoadingMode.
	WithBadgerFileLoadingMode = database.WithBadgerFileLoadingMode
	// IsErrNotFound is a wrapper over database.IsErrNotFound.
	IsErrNotFound = database.IsErrNotFound
	// IsErrOpNotSupported is a wrapper over database.IsErrOpNotSupported.
	IsErrOpNotSupported = database.IsErrOpNotSupported

	// BadgerDriver indicates the default Badger database - currently Badger V1.
	BadgerDriver = "badger"
	// BadgerV1Driver explicitly selects the Badger V1 driver.
	BadgerV1Driver = "badgerv1"
	// BadgerV2Driver explicitly selects the Badger V2 driver.
	BadgerV2Driver = "badgerv2"
	// BBoltDriver indicates the default BBolt database.
	BBoltDriver = "bbolt"
	// MySQLDriver indicates the default MySQL database.
	MySQLDriver = "mysql"
	// PostgreSQLDriver indicates the default PostgreSQL database.
	PostgreSQLDriver = "postgresql"

	// BadgerMemoryMap indicates the MemoryMap FileLoadingMode option.
	BadgerMemoryMap = database.BadgerMemoryMap
	// BadgerFileIO indicates the FileIO FileLoadingMode option.
	BadgerFileIO = database.BadgerFileIO
)

Functions

func New

func New(driver, dataSourceName string, opt ...Option) (db database.DB, err error)

New returns a database with the given driver.

Types

type Compactor added in v0.6.0

type Compactor interface {
	Compact(discardRatio float64) error
}

Compactor in an interface implemented by those databases that can run a value log garbage collector like badger.

type DB

type DB = database.DB

DB is just a wrapper over database.DB.

type Option

type Option = database.Option

Option is just a wrapper over database.Option.

Directories

Path Synopsis
badger
v1
v2

Jump to

Keyboard shortcuts

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