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 ¶ added in v1.16.28
type Database struct {
// contains filtered or unexported fields
}
Database is a badgerdb implementation of ethdb.Database
func (*Database) AncientBatch ¶ added in v1.16.39
func (d *Database) AncientBatch() ethdb.AncientWriteOp
func (*Database) AncientBytes ¶ added in v1.16.40
AncientBytes retrieves the value segment of the element specified by the id and value offsets.
func (*Database) AncientDatadir ¶ added in v1.16.28
func (*Database) AncientOffSet ¶ added in v1.16.28
func (*Database) AncientRange ¶ added in v1.16.28
func (*Database) AncientSize ¶ added in v1.16.28
func (*Database) DeleteRange ¶ added in v1.16.28
func (*Database) HasAncient ¶ added in v1.16.28
func (*Database) MigrateTable ¶ added in v1.16.28
func (*Database) ModifyAncients ¶ added in v1.16.28
func (*Database) NewBatchWithSize ¶ added in v1.16.28
NewBatchWithSize creates a new batch with size hint
func (*Database) NewIterator ¶ added in v1.16.28
NewIterator creates a new iterator
func (*Database) NewSnapshot ¶ added in v1.16.28
func (*Database) ReadAncients ¶ added in v1.16.28
func (d *Database) ReadAncients(fn func(ethdb.AncientReaderOp) error) error
func (*Database) SyncAncient ¶ added in v1.16.28
func (*Database) SyncKeyValue ¶ added in v1.16.28
func (*Database) TruncateHead ¶ added in v1.16.28
Click to show internal directories.
Click to hide internal directories.