mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 06:36:43 +00:00
ethdb: Add documentation for NewTable and NewTableBatch
This commit is contained in:
parent
2928bfdfc4
commit
1d5814dc2a
1 changed files with 5 additions and 2 deletions
|
|
@ -311,7 +311,9 @@ type table struct {
|
|||
prefix string
|
||||
}
|
||||
|
||||
func NewTable(db Database, prefix string) *table {
|
||||
// NewTable returns a Database object that prefixes all keys with a given
|
||||
// string.
|
||||
func NewTable(db Database, prefix string) Database {
|
||||
return &table{
|
||||
db: db,
|
||||
prefix: prefix,
|
||||
|
|
@ -339,7 +341,8 @@ type tableBatch struct {
|
|||
prefix string
|
||||
}
|
||||
|
||||
func NewTableBatch(db Database, prefix string) *tableBatch {
|
||||
// NewTableBatch returns a Batch object which prefixes all keys with a given string.
|
||||
func NewTableBatch(db Database, prefix string) *Batch {
|
||||
return &tableBatch{db.NewBatch(), prefix}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue