Documentation
¶
Index ¶
- Constants
- type BadgerDb
- type BadgerXDb
- func (d *BadgerXDb) Close() error
- func (d *BadgerXDb) LoadCluster(tier, shapeHash string) (ds.Cluster, error)
- func (d *BadgerXDb) LoadClusterByIndex(tier string, lang string, idx int) (ds.Cluster, error)
- func (d *BadgerXDb) LoadClusterCount(tier string) (int, error)
- func (d *BadgerXDb) LoadOrphanedFunctions(lang ds.Language) ([]ds.OrphanedFunction, error)
- func (d *BadgerXDb) ScanClusters(tier string) ([]ds.Cluster, error)
- func (d *BadgerXDb) StoreCluster(tier, shapeHash string, c ds.Cluster) error
- func (d *BadgerXDb) StoreClusterByIndex(tier string, idx int, lang string, c ds.Cluster) error
- func (d *BadgerXDb) StoreClusterCount(tier string, count int) error
- func (d *BadgerXDb) StoreDocFreq(hash int64, lang ds.Language, count int) error
- func (d *BadgerXDb) StoreFunctionMeta(id string, lang ds.Language, fn ds.FunctionMeta) error
- func (d *BadgerXDb) StoreOrphanedFunctions(orphans []ds.OrphanedFunction, lang ds.Language) error
- func (d *BadgerXDb) StorePostings(hash int64, lang ds.Language, fnId []string) error
Constants ¶
const ( TierRaw = "raw" TierCollapsed = "collapsed" TierLabel = "label" TierIdentified = "identified" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BadgerXDb ¶ added in v0.1.5
type BadgerXDb struct {
// contains filtered or unexported fields
}
func NewBadgerXDb ¶ added in v0.1.5
func (*BadgerXDb) LoadCluster ¶ added in v0.1.5
LoadCluster retrieves a single cluster by tier and shapeHash.
func (*BadgerXDb) LoadClusterByIndex ¶ added in v0.1.7
LoadClusterByIndex retrieves a single cluster by tier and numeric index.
func (*BadgerXDb) LoadClusterCount ¶ added in v0.1.7
LoadClusterCount returns the number of clusters stored for a tier.
func (*BadgerXDb) LoadOrphanedFunctions ¶ added in v0.1.7
LoadOrphanedFunctions retrieves the orphaned functions slice, or returns an empty slice when none have been stored yet.
func (*BadgerXDb) ScanClusters ¶ added in v0.1.5
ScanClusters returns all clusters stored under the given tier prefix.
func (*BadgerXDb) StoreCluster ¶ added in v0.1.5
func (*BadgerXDb) StoreClusterByIndex ¶ added in v0.1.7
StoreClusterByIndex stores a cluster under a zero-padded numeric key so that clusters can be retrieved by sequential index without knowing the shape hash. Key format: cluster:<tier>:<10-digit-index> e.g. cluster:identified:0000000042
func (*BadgerXDb) StoreClusterCount ¶ added in v0.1.7
StoreClusterCount persists the total number of clusters for a tier so callers don't have to scan the full prefix to discover how many there are. Key format: meta:<tier>:count
func (*BadgerXDb) StoreDocFreq ¶ added in v0.1.5
func (*BadgerXDb) StoreFunctionMeta ¶ added in v0.1.5
func (*BadgerXDb) StoreOrphanedFunctions ¶ added in v0.1.7
StoreOrphanedFunctions persists the full slice of OrphanedFunction values. Key: meta:orphans