package trie
import "github.com/dgraph-io/badger/v3/trie"
Index ¶
Types ¶
type Trie ¶
type Trie struct {
// contains filtered or unexported fields
}
Trie datastructure.
func NewTrie ¶
func NewTrie() *Trie
NewTrie returns Trie.
func (*Trie) Add ¶
Add adds the id in the trie for the given prefix path.
func (*Trie) AddMatch ¶
AddMatch allows you to send in a prefix match, with "holes" in the prefix. The holes are specified via IgnoreBytes in a comma-separated list of indices starting from 0. A dash can be used to denote a range. Valid example is "3, 5-8, 10, 12-15". Length of IgnoreBytes does not need to match the length of the Prefix passed.
Consider a prefix = "aaaa". If the IgnoreBytes is set to "0, 2", then along with key "aaaa...", a key "baba..." would also match.
func (*Trie) Delete ¶
Delete will delete the id if the id exist in the given index path.
func (*Trie) DeleteMatch ¶
func (*Trie) Get ¶
Source Files ¶
- Version
- v3.2103.5 (latest)
- Published
- Dec 15, 2022
- Platform
- linux/amd64
- Imports
- 6 packages
- Last checked
- 2 weeks ago –
Tools for package owners.