table

package
v0.0.0-...-59e56fa Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MigrateCaches

func MigrateCaches(c interface{}, get func() interface{})

MigrateCaches sets target fields to get() result.

func MigrateTables

func MigrateTables(s interface{}, db ethdb.KeyValueStore)

MigrateTables sets target fields to database tables.

Types

type Table

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

Table wraps the underling DB, so all the table's data is stored with a prefix in underling DB

func New

func New(db ethdb.KeyValueStore, prefix []byte) *Table

func (*Table) Close

func (t *Table) Close() error

func (*Table) Compact

func (t *Table) Compact(start []byte, limit []byte) error

func (*Table) Delete

func (t *Table) Delete(key []byte) error

func (*Table) Drop

func (t *Table) Drop()

Drop the whole database.

func (*Table) Get

func (t *Table) Get(key []byte) ([]byte, error)

func (*Table) Has

func (t *Table) Has(key []byte) (bool, error)

func (*Table) NewBatch

func (t *Table) NewBatch() ethdb.Batch

func (*Table) NewIterator

func (t *Table) NewIterator() ethdb.Iterator

func (*Table) NewIteratorWithPrefix

func (t *Table) NewIteratorWithPrefix(itPrefix []byte) ethdb.Iterator

func (*Table) NewIteratorWithStart

func (t *Table) NewIteratorWithStart(start []byte) ethdb.Iterator

func (Table) NewTable

func (t Table) NewTable(prefix []byte) *Table

func (*Table) Put

func (t *Table) Put(key []byte, value []byte) error

func (*Table) Stat

func (t *Table) Stat(property string) (string, error)

Jump to

Keyboard shortcuts

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