db

package module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2020 License: MIT Imports: 6 Imported by: 1

README

db

Database abstractions for Snart.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnknownProto = errors.New("unknown proto")
View Source
var Protos = map[string]Proto{
	"file": file.NewFile,
	"map":  gomap.NewGoMap,
}

Functions

This section is empty.

Types

type DB

type DB struct {
	Proto string
	Name  string
	Opts  impl.Opts

	impl.Impl
}

DB is a wrapper for a number of database implementations.

func New

func New(proto, name string, opts impl.Opts) (*DB, error)

func Open added in v0.3.0

func Open(uri string) (*DB, error)

func (*DB) String added in v0.3.0

func (d *DB) String() string

func (*DB) URI added in v0.3.0

func (d *DB) URI() *url.URL

type Proto added in v0.3.0

type Proto func(opts impl.Opts) (impl.Impl, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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