From 1d5814dc2a61adff6431e753d413bcfbef906b0c Mon Sep 17 00:00:00 2001 From: Nick Johnson Date: Wed, 11 Jan 2017 09:45:59 +0000 Subject: [PATCH] ethdb: Add documentation for NewTable and NewTableBatch --- ethdb/database.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ethdb/database.go b/ethdb/database.go index 5516a54df0..05f093c48a 100644 --- a/ethdb/database.go +++ b/ethdb/database.go @@ -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} }