db

package
v1.30.0 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2018 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DbFilename = "ql.db"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	// contains filtered or unexported fields
}

func NewDB

func NewDB(dbdir string) (*DB, error)

func (*DB) Do

func (db *DB) Do(fns ...txfunc) error

Do Opens the db, executes DoTx and then Closes the DB To support a multiprocess and multigoroutine model on a single file access database like ql there's the need to exlusively lock, open, close, unlock the db for every transaction. For this reason every db transaction should be fast to not block other processes/goroutines.

Jump to

Keyboard shortcuts

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