lbcd/ldb
Dave Collins 2eea55ae1d Prune the btcddb.Db interface.
This commit prunes several unused functions from the Db interface and the
underlying implementations.  For the most part these are holdovers from
the original sqlite implementation.  It also removes the types associated
with those functions since they are no longer needed.  The following
functions and types have been removed:

- InvalidateCache
- InvalidateBlockCache
- InvalidateTxCache
- SetDBInsertMode
  - InsertMode type and associated constants
- NewIterateBlocks
  - BlockIterator interface

The reasons for removing these are broken out below.

- Neither of two current implementations implement these functions nor
  does any of the fully functional code using the interface invoke them.
- After contemplating and testing caching of blocks and transactions at
  this layer, it doesn't seem to provide any real benefit unless very
  specific assumptions about the use case are made.  Making those
  assumptions can make other use cases worse.  For example, assuming a
  large cache is harmful to memory-constrained use cases.  Leaving it up
  to the caller to choose when to cache block and transactions allows much
  greater flexibility.
- The DB insert mode was an artifact of the original sqlite implementation
  and probably should have only been exposed specifically on the
  implementation as opposed through generic interface.  If a specific
  implementation wishes to provide functionality such as special modes,
  that should be done through type assertions.
2014-01-19 18:01:05 -06:00
..
dbtest Update ldb/dbtest to latest goleveldb API. 2014-01-18 21:06:10 -06:00
block.go Prune the btcddb.Db interface. 2014-01-19 18:01:05 -06:00
boundary_test.go Add 2014 to copyright dates. 2014-01-08 23:54:52 -06:00
doc.go Add 2014 to copyright dates. 2014-01-08 23:54:52 -06:00
dup_test.go Add 2014 to copyright dates. 2014-01-08 23:54:52 -06:00
insertremove_test.go Prune the btcddb.Db interface. 2014-01-19 18:01:05 -06:00
internal_test.go Add 2014 to copyright dates. 2014-01-08 23:54:52 -06:00
leveldb.go Prune the btcddb.Db interface. 2014-01-19 18:01:05 -06:00
operational_test.go Prune the btcddb.Db interface. 2014-01-19 18:01:05 -06:00
tx.go Add 2014 to copyright dates. 2014-01-08 23:54:52 -06:00