Documentation
¶
Overview ¶
Package keys provides support for building and parsing the DiskView's binary key format that facts are encoded into.
Index ¶
- func FactKeysEqualIgnoreIndex(a, b []byte) bool
- func KeyPrefixPredicate(p uint64) []byte
- func KeyPrefixPredicateObjectNoLang(p uint64, obj rpc.KGObject) []byte
- func KeyPrefixPredicateObjectType(p uint64, obj rpc.KGObject) []byte
- func KeyPrefixSubject(s uint64) []byte
- func KeyPrefixSubjectPredicate(s, p uint64) []byte
- func KeyPrefixSubjectPredicateObjectNoLang(s, p uint64, obj rpc.KGObject) []byte
- func ParseIndex(key []byte) blog.Index
- type FactKey
- type MetaKey
- type Spec
- type StatsKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FactKeysEqualIgnoreIndex ¶
FactKeysEqualIgnoreIndex returns true if the 2 supplied keys are for the same fact, ignoring the log index part of the key.
func KeyPrefixPredicate ¶
KeyPrefixPredicate returns a byte key prefix containing the supplied predicate in the POS space.
func KeyPrefixPredicateObjectNoLang ¶
KeyPrefixPredicateObjectNoLang returns a byte key prefix containing the supplied predicate and object value in the POS space. If the object value is of type string, the language identifier is not included in the returned key.
func KeyPrefixPredicateObjectType ¶
KeyPrefixPredicateObjectType returns a byte key prefix containing the supplied predicate and Object type in the POS space.
func KeyPrefixSubject ¶
KeyPrefixSubject returns a byte key prefix containing the supplied subject in the SPO space.
func KeyPrefixSubjectPredicate ¶
KeyPrefixSubjectPredicate returns a byte key prefix containing the supplied subject and predicate in the SPO space.
func KeyPrefixSubjectPredicateObjectNoLang ¶
KeyPrefixSubjectPredicateObjectNoLang returns a byte key prefix containing the supplied subject, predicate & object in the SPO space. If the Object is of type string, the Language identifier is not included in the returned key prefix.
func ParseIndex ¶
ParseIndex extracts the index from the provided key [if it has one] and returns it otherwise returns 0.
Types ¶
type FactKey ¶
type FactKey struct { Fact *rpc.Fact Encoding rpc.FactKeyEncoding }
FactKey can be used to generate a fully serialized Fact in the specified encoding
type MetaKey ¶
type MetaKey struct { }
MetaKey represents the well known key for that contains the current diskview metadata.