Correct leveldb package documenation.

The leveldb package documentation still referred to sqlite from
original copy/paste.
This commit is contained in:
Dave Collins 2013-10-22 15:25:33 -05:00
parent 3b56ccaff7
commit 5eee027f92
2 changed files with 6 additions and 16 deletions

10
doc.go
View file

@ -9,8 +9,7 @@ As of May 2013, there are over 235,000 blocks in the Bitcoin block chain and
and over 17 million transactions (which turns out to be over 11GB of data).
btcdb provides a database layer to store and retrieve this data in a fairly
simple and efficient manner. The use of this should not require specific
knowledge of the database backend used although currently only db_sqlite is
provided.
knowledge of the database backend.
Basic Design
@ -20,8 +19,7 @@ increases monotonically. Each transaction belongs to a single block
although a block can have a variable number of transactions. Along
with these two items, several convenience functions for dealing with
the database are provided as well as functions to query specific items
that may be present in a block or tx (although many of these are in
the sqlite3 subpackage).
that may be present in a block or tx.
Usage
@ -34,14 +32,14 @@ referenced parent block to already exist. In a more concrete example:
// Import packages.
import (
"github.com/conformal/btcdb"
_ "github.com/conformal/btcdb/sqlite3"
_ "github.com/conformal/btcdb/ldb"
"github.com/conformal/btcutil"
"github.com/conformal/btcwire"
)
// Create a database and schedule it to be closed on exit.
dbName := "example.db"
db, err := btcdb.CreateDB("sqlite", dbName)
db, err := btcdb.CreateDB("leveldb", dbName)
if err != nil {
// Log and handle the error
}

View file

@ -3,20 +3,12 @@
// license that can be found in the LICENSE file.
/*
Package sqlite3 implements a sqlite3 instance of btcdb.
sqlite provides a zero setup, single file database. It requires cgo
and the presence of the sqlite library and headers, but nothing else.
The performance is generally high although it goes down with database
size.
Many of the block or tx specific functions for btcdb are in this subpackage.
Package ldb implements a instance of btcdb backed by leveldb.
Database version number is stored in a flat file <dbname>.ver
Currently a single (littlendian) integer in the file. If there is
additional data to save in the future, the presense of additional
additional data to save in the future, the presence of additional
data can be indicated by changing the version number, then parsing the
file differently.
*/
package ldb