db

package
v0.1.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TierRaw        = "raw"
	TierCollapsed  = "collapsed"
	TierLabel      = "label"
	TierIdentified = "identified"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BadgerDb

type BadgerDb struct {
	// contains filtered or unexported fields
}

func NewDb

func NewDb(path string) *BadgerDb

func (*BadgerDb) Close

func (d *BadgerDb) Close() error

type BadgerXDb added in v0.1.5

type BadgerXDb struct {
	// contains filtered or unexported fields
}

func NewBadgerXDb added in v0.1.5

func NewBadgerXDb(path string) *BadgerXDb

func (*BadgerXDb) Close added in v0.1.5

func (d *BadgerXDb) Close() error

func (*BadgerXDb) LoadCluster added in v0.1.5

func (d *BadgerXDb) LoadCluster(tier, shapeHash string) (ds.Cluster, error)

LoadCluster retrieves a single cluster by tier and shapeHash.

func (*BadgerXDb) LoadClusterByIndex added in v0.1.7

func (d *BadgerXDb) LoadClusterByIndex(tier string, lang string, idx int) (ds.Cluster, error)

LoadClusterByIndex retrieves a single cluster by tier and numeric index.

func (*BadgerXDb) LoadClusterCount added in v0.1.7

func (d *BadgerXDb) LoadClusterCount(tier string) (int, error)

LoadClusterCount returns the number of clusters stored for a tier.

func (*BadgerXDb) LoadOrphanedFunctions added in v0.1.7

func (d *BadgerXDb) LoadOrphanedFunctions(lang ds.Language) ([]ds.OrphanedFunction, error)

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

func (d *BadgerXDb) ScanClusters(tier string) ([]ds.Cluster, error)

ScanClusters returns all clusters stored under the given tier prefix.

func (*BadgerXDb) StoreCluster added in v0.1.5

func (d *BadgerXDb) StoreCluster(tier, shapeHash string, c ds.Cluster) error

func (*BadgerXDb) StoreClusterByIndex added in v0.1.7

func (d *BadgerXDb) StoreClusterByIndex(tier string, idx int, lang string, c ds.Cluster) error

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

func (d *BadgerXDb) StoreClusterCount(tier string, count int) error

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 (d *BadgerXDb) StoreDocFreq(hash int64, lang ds.Language, count int) error

func (*BadgerXDb) StoreFunctionMeta added in v0.1.5

func (d *BadgerXDb) StoreFunctionMeta(id string, lang ds.Language, fn ds.FunctionMeta) error

func (*BadgerXDb) StoreOrphanedFunctions added in v0.1.7

func (d *BadgerXDb) StoreOrphanedFunctions(orphans []ds.OrphanedFunction, lang ds.Language) error

StoreOrphanedFunctions persists the full slice of OrphanedFunction values. Key: meta:orphans

func (*BadgerXDb) StorePostings added in v0.1.5

func (d *BadgerXDb) StorePostings(hash int64, lang ds.Language, fnId []string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL