db

package
v0.5.14 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cover added in v0.2.1

func Cover(dst, src []byte) *qerror.Error

Cover src to dst, if dst is not found then rename src to dst

func Del added in v0.2.1

func Del(key []byte) *qerror.Error

Del node in table with key

func Dels added in v0.2.1

func Dels(keys ...[]byte) int

Dels node int table with key list

func Exist added in v0.2.1

func Exist(key []byte) bool

Exist key

func Get added in v0.2.1

func Get(key []byte) template.Node

Get value in table with name

func Gets added in v0.2.1

func Gets(keys ...[]byte) []template.Node

Gets value list in table with name list

func InitDB added in v0.1.4

func InitDB(c persistence.Config) (err *qerror.Error)

func Iterators added in v0.2.1

func Iterators(callBack func(hash.Node) bool)

Range iterators

func Regexp added in v0.2.1

func Regexp(rex []byte) [][]byte

Regexp string to get value in table

func Rename added in v0.2.1

func Rename(dst, src []byte) *qerror.Error

Rename src to dst

func Set added in v0.2.1

func Set(key []byte, value template.Node) *qerror.Error

Set value in table when value is not found before

func SetX added in v0.2.1

func SetX(key []byte, value template.Node)

Set value in table

func Size added in v0.5.11

func Size() int

Size

func Update added in v0.2.1

func Update(key []byte, value template.Node) *qerror.Error

Update value in table

Types

type Table

type Table interface {
	//Set value in table when value is not found before
	Set([]byte, template.Node) *qerror.Error
	//Set value in table
	SetX([]byte, template.Node)
	//Update value in table
	Update([]byte, template.Node) *qerror.Error
	//Get value in table with name
	Get([]byte) template.Node
	//Gets value list in table with name list
	Gets(...[]byte) []template.Node
	//Del node in table with key
	Del([]byte) *qerror.Error
	//Dels node int table with key list
	Dels(...[]byte) int
	//Regexp string to get value in table
	Regexp([]byte) [][]byte
	//Range iterators
	Iterators(func(hash.Node) bool)
	//Rename src to dst
	Rename([]byte, []byte) *qerror.Error
	//Cover src to dst, if dst is not found then rename src to dst
	Cover([]byte, []byte) *qerror.Error
	//Exist key
	Exist([]byte) bool
	//Size
	Size() int
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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