hashdb

package
v0.0.0-...-de9bd37 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2018 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrCreatingDatabase 创建数据库错误
	ErrCreatingDatabase = errors.New(`error while creating Database`)
	// ErrDataStoreNotFound 没有找到数据记录
	ErrDataStoreNotFound = errors.New(`the requested data store was not found`)
)

Functions

This section is empty.

Types

type HashDatabase

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

HashDatabase 数据库

func Create

func Create(bucketNum uint32) (*HashDatabase, error)

Create 创建数据库

func (*HashDatabase) Clear

func (db *HashDatabase) Clear()

Clear 清空数据

func (*HashDatabase) Erase

func (db *HashDatabase) Erase(key uint32) uint32

Erase 擦除数据

func (*HashDatabase) Find

func (db *HashDatabase) Find(key uint32) (interface{}, error)

Find 查找数据

func (*HashDatabase) Insert

func (db *HashDatabase) Insert(key uint32, value interface{}) uint32

Insert 插入数据

func (*HashDatabase) Update

func (db *HashDatabase) Update(key uint32, fn func(interface{}) interface{})

Update 更新数据

Jump to

Keyboard shortcuts

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