Versions in this module Expand all Collapse all v0 v0.1.0 Jun 29, 2019 Changes in this version + const Gamma + const MaxLevel + const MinParallelKeys + var ErrFrozen = errors.New("DB already frozen") + var ErrMPHFail = errors.New("failed to build MPH; gamma possibly small") + var ErrNoKey = errors.New("No such key") + type BBHash struct + func New(g float64, keys []uint64) (*BBHash, error) + func NewConcurrent(g float64, keys []uint64) (*BBHash, error) + func NewSerial(g float64, keys []uint64) (*BBHash, error) + func UnmarshalBBHash(r io.Reader) (*BBHash, error) + func (bb *BBHash) Find(k uint64) uint64 + func (bb *BBHash) MarshalBinary(w io.Writer) error + func (bb *BBHash) MarshalBinarySize() uint64 + func (bb BBHash) String() string + type DBReader struct + func NewDBReader(fn string, cache int) (rd *DBReader, err error) + func (rd *DBReader) Close() + func (rd *DBReader) Find(key []byte) ([]byte, error) + func (rd *DBReader) Lookup(key []byte) ([]byte, bool) + func (rd *DBReader) TotalKeys() int + type DBWriter struct + func NewDBWriter(fn string) (*DBWriter, error) + func (w *DBWriter) Abort() + func (w *DBWriter) AddCSVFile(fn string, comma, comment rune, kwfield, valfield int) (uint64, error) + func (w *DBWriter) AddCSVStream(fd io.Reader, comma, comment rune, kwfield, valfield int) (uint64, error) + func (w *DBWriter) AddKeyVals(keys [][]byte, vals [][]byte) (uint64, error) + func (w *DBWriter) AddTextFile(fn string, delim string) (uint64, error) + func (w *DBWriter) AddTextStream(fd io.Reader, delim string) (uint64, error) + func (w *DBWriter) Freeze(g float64) error + func (w *DBWriter) TotalKeys() int