Documentation
¶
Index ¶
- func New(path string, cache int, handles int, namespace string, readonly bool) (ethdb.Database, error)
- type Database
- func (d *Database) Ancient(kind string, number uint64) ([]byte, error)
- func (d *Database) AncientBatch() ethdb.AncientWriteOp
- func (d *Database) AncientBytes(kind string, id, offset, length uint64) ([]byte, error)
- func (d *Database) AncientDatadir() (string, error)
- func (d *Database) AncientOffSet() uint64
- func (d *Database) AncientRange(kind string, start, count, maxBytes uint64) ([][]byte, error)
- func (d *Database) AncientSize(kind string) (uint64, error)
- func (d *Database) Ancients() (uint64, error)
- func (d *Database) Close() error
- func (d *Database) Compact(start []byte, limit []byte) error
- func (d *Database) Delete(key []byte) error
- func (d *Database) DeleteRange(start, end []byte) error
- func (d *Database) Get(key []byte) ([]byte, error)
- func (d *Database) Has(key []byte) (bool, error)
- func (d *Database) HasAncient(kind string, number uint64) (bool, error)
- func (d *Database) MigrateTable(s string, f func([]byte) ([]byte, error)) error
- func (d *Database) ModifyAncients(fn func(ethdb.AncientWriteOp) error) (int64, error)
- func (d *Database) NewBatch() ethdb.Batch
- func (d *Database) NewBatchWithSize(size int) ethdb.Batch
- func (d *Database) NewIterator(prefix []byte, start []byte) ethdb.Iterator
- func (d *Database) NewSnapshot() (Snapshot, error)
- func (d *Database) Put(key []byte, value []byte) error
- func (d *Database) ReadAncients(fn func(ethdb.AncientReaderOp) error) error
- func (d *Database) Stat() (string, error)
- func (d *Database) Sync() error
- func (d *Database) SyncAncient() error
- func (d *Database) SyncKeyValue() error
- func (d *Database) Tail() (uint64, error)
- func (d *Database) TruncateHead(n uint64) (uint64, error)
- func (d *Database) TruncateTail(n uint64) (uint64, error)
- type Snapshot
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
Database is a zapdb (badgerdb fork) implementation of ethdb.Database
func (*Database) AncientBatch ¶
func (d *Database) AncientBatch() ethdb.AncientWriteOp
func (*Database) AncientBytes ¶
func (*Database) AncientDatadir ¶
func (*Database) AncientOffSet ¶
func (*Database) AncientRange ¶
func (*Database) DeleteRange ¶
func (*Database) HasAncient ¶
func (*Database) MigrateTable ¶
func (*Database) ModifyAncients ¶
func (*Database) NewBatchWithSize ¶
NewBatchWithSize creates a new batch with size hint
func (*Database) NewIterator ¶
NewIterator creates a new iterator
func (*Database) NewSnapshot ¶
func (*Database) ReadAncients ¶
func (d *Database) ReadAncients(fn func(ethdb.AncientReaderOp) error) error
func (*Database) SyncAncient ¶
func (*Database) SyncKeyValue ¶
Click to show internal directories.
Click to hide internal directories.