graph

package
v0.7.7 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2019 License: Apache-2.0 Imports: 10 Imported by: 1,129

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDatabaseExists = errors.New("quadstore: cannot init; database already exists")
	ErrNotInitialized = errors.New("quadstore: not initialized")
)
View Source
var (
	ErrQuadExists    = errors.New("quad exists")
	ErrQuadNotExist  = errors.New("quad does not exist")
	ErrInvalidAction = errors.New("invalid action")
	ErrNodeNotExists = errors.New("node does not exist")
)
View Source
var (
	// IgnoreDuplicates specifies whether duplicate quads
	// cause an error during loading or are ignored.
	IgnoreDuplicates = true

	// IgnoreMissing specifies whether missing quads
	// cause an error during deletion or are ignored.
	IgnoreMissing = false
)
View Source
var (
	ErrQuadStoreNotRegistred  = fmt.Errorf("This QuadStore is not registered.")
	ErrQuadStoreNotPersistent = fmt.Errorf("cannot specify address for non-persistent backend")
	ErrOperationNotSupported  = fmt.Errorf("This Operation is not supported.")
)

Functions

func Height added in v0.4.0

func Height(it Iterator, filter func(Iterator) bool) int

Height is a convienence function to measure the height of an iterator tree.

func Height2 added in v0.7.6

func Height2(it IteratorShape, filter func(IteratorShape) bool) int

Height is a convienence function to measure the height of an iterator tree.

func InitQuadStore added in v0.4.1

func InitQuadStore(name string, dbpath string, opts Options) error

func IsInvalidAction added in v0.6.0

func IsInvalidAction(err error) bool

IsInvalidAction returns whether an error is a DeltaError with the Err field equal to ErrInvalidAction.

func IsPersistent added in v0.4.0

func IsPersistent(name string) bool

func IsQuadExist added in v0.6.0

func IsQuadExist(err error) bool

IsQuadExist returns whether an error is a DeltaError with the Err field equal to ErrQuadExists.

func IsQuadNotExist added in v0.6.0

func IsQuadNotExist(err error) bool

IsQuadNotExist returns whether an error is a DeltaError with the Err field equal to ErrQuadNotExist.

func IsRegistered added in v0.7.0

func IsRegistered(name string) bool

func NewQuadStoreReader added in v0.6.1

func NewQuadStoreReader(qs QuadStore) quad.ReadSkipCloser

NewResultReader creates a quad reader for a given QuadStore.

func NewResultReader added in v0.6.1

func NewResultReader(qs QuadStore, it Iterator) quad.ReadSkipCloser

NewResultReader creates a quad reader for a given QuadStore and iterator. If iterator is nil QuadsAllIterator will be used.

Only quads returned by iterator's Result will be used.

Iterator will be closed with the reader.

func NewTxWriter added in v0.7.0

func NewTxWriter(tx *Transaction, p Procedure) quad.Writer

NewTxWriter creates a writer that applies a given procedures for all quads in stream. If procedure is zero, Add operation will be used.

func QuadStores added in v0.4.1

func QuadStores() []string

func RegisterQuadStore added in v0.4.1

func RegisterQuadStore(name string, register QuadStoreRegistration)

func RegisterWriter added in v0.4.0

func RegisterWriter(name string, newFunc NewQuadWriterFunc)

func ToKey added in v0.6.0

func ToKey(v Ref) interface{}

ToKey prepares Ref to be stored inside maps, calling Key() if necessary.

func UpgradeQuadStore added in v0.5.0

func UpgradeQuadStore(name string, dbpath string, opts Options) error

func ValuesOf added in v0.7.0

func ValuesOf(ctx context.Context, qs Namer, vals []Ref) ([]quad.Value, error)

func WriterMethods added in v0.4.0

func WriterMethods() []string

Types

type ApplyMorphism added in v0.5.0

type ApplyMorphism func(QuadStore, Iterator) Iterator

ApplyMorphism is a curried function that can generates a new iterator based on some prior iterator.

type BatchQuadStore added in v0.7.0

type BatchQuadStore interface {
	ValuesOf(ctx context.Context, vals []Ref) ([]quad.Value, error)
	RefsOf(ctx context.Context, nodes []quad.Value) ([]Ref, error)
}

type BatchWriter added in v0.6.1

type BatchWriter interface {
	quad.WriteCloser
	Flush() error
}

func NewRemover added in v0.6.1

func NewRemover(qs QuadWriter) BatchWriter

NewRemover creates a quad writer for a given QuadStore which removes quads instead of adding them.

func NewWriter added in v0.6.1

func NewWriter(qs QuadWriter) BatchWriter

NewWriter creates a quad writer for a given QuadStore.

Caller must call Flush or Close to flush an internal buffer.

type BulkLoader added in v0.3.1

type BulkLoader interface {
	// BulkLoad loads Quads from a quad.Unmarshaler in bulk to the QuadStore.
	// It returns ErrCannotBulkLoad if bulk loading is not possible. For example if
	// you cannot load in bulk to a non-empty database, and the db is non-empty.
	BulkLoad(quad.Reader) error
}

type Delta added in v0.4.0

type Delta struct {
	Quad   quad.Quad
	Action Procedure
}

type DeltaError added in v0.6.0

type DeltaError struct {
	Delta Delta
	Err   error
}

DeltaError records an error and the delta that caused it.

func (*DeltaError) Error added in v0.6.0

func (e *DeltaError) Error() string

type Description added in v0.4.1

type Description struct {
	UID       uint64        `json:",omitempty"`
	Name      string        `json:",omitempty"`
	Type      string        `json:",omitempty"`
	Tags      []string      `json:",omitempty"`
	Size      int64         `json:",omitempty"`
	Exact     bool          `json:",omitempty"`
	Iterators []Description `json:",omitempty"`
}

func DescribeIterator added in v0.7.0

func DescribeIterator(it Iterator) Description

DescribeIterator returns a description of the iterator tree.

type FixedIterator

type FixedIterator interface {
	Iterator
	Add(Ref)
}

FixedIterator wraps iterators that are modifiable by addition of fixed value sets.

type Handle added in v0.4.0

type Handle struct {
	QuadStore
	QuadWriter
}

func (*Handle) Close added in v0.4.0

func (h *Handle) Close() error

type IgnoreOpts added in v0.4.1

type IgnoreOpts struct {
	IgnoreDup, IgnoreMissing bool
}

type Index added in v0.7.6

type Index interface {
	IteratorBase

	// Contains returns whether the value is within the set held by the iterator.
	//
	// It will set Result to the matching subtree. TagResults can be used to collect values from tree branches.
	Contains(ctx context.Context, v Ref) bool
}

Index is an index lookup iterator. It allows to check if an index contains a specific value.

type InitStoreFunc added in v0.3.1

type InitStoreFunc func(string, Options) error

type IterateChain added in v0.6.0

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

IterateChain is a chain-enabled helper to setup iterator execution.

func Iterate added in v0.6.0

func Iterate(ctx context.Context, it Iterator) *IterateChain

Iterate is a set of helpers for iteration. Context may be used to cancel execution. Iterator will be optimized and closed after execution.

By default, iteration has no limit and includes sub-paths.

func (*IterateChain) All added in v0.6.0

func (c *IterateChain) All() ([]Ref, error)

All will return all results of an iterator.

func (*IterateChain) AllValues added in v0.6.0

func (c *IterateChain) AllValues(qs QuadStore) ([]quad.Value, error)

AllValues is an analog of All, but it will additionally call NameOf for each graph.Ref before returning the results slice.

func (*IterateChain) Count added in v0.7.0

func (c *IterateChain) Count() (int64, error)

All will return all results of an iterator.

func (*IterateChain) Each added in v0.6.0

func (c *IterateChain) Each(fnc func(Ref)) error

Each will run a provided callback for each result of the iterator.

func (*IterateChain) EachValue added in v0.6.0

func (c *IterateChain) EachValue(qs QuadStore, fnc func(quad.Value)) error

EachValue is an analog of Each, but it will additionally call NameOf for each graph.Ref before passing it to a callback.

func (*IterateChain) EachValuePair added in v0.6.1

func (c *IterateChain) EachValuePair(qs QuadStore, fnc func(Ref, quad.Value)) error

EachValuePair is an analog of Each, but it will additionally call NameOf for each graph.Ref before passing it to a callback. Original value will be passed as well.

func (*IterateChain) First added in v0.7.0

func (c *IterateChain) First() (Ref, error)

First will return a first result of an iterator. It returns nil if iterator is empty.

func (*IterateChain) FirstValue added in v0.7.0

func (c *IterateChain) FirstValue(qs QuadStore) (quad.Value, error)

FirstValue is an analog of First, but it does lookup of a value in QuadStore.

func (*IterateChain) Limit added in v0.6.0

func (c *IterateChain) Limit(n int) *IterateChain

Limit limits a total number of results returned.

func (*IterateChain) On added in v0.6.0

func (c *IterateChain) On(qs QuadStore) *IterateChain

On sets a default quad store for iteration. If qs was set, it may be omitted in other functions.

func (*IterateChain) Paths added in v0.6.0

func (c *IterateChain) Paths(enable bool) *IterateChain

Paths switches iteration over sub-paths (with it.NextPath). Defaults to true.

func (*IterateChain) Send added in v0.6.0

func (c *IterateChain) Send(out chan<- Ref) error

Send will send each result of the iterator to the provided channel.

Channel will NOT be closed when function returns.

func (*IterateChain) SendValues added in v0.6.0

func (c *IterateChain) SendValues(qs QuadStore, out chan<- quad.Value) error

SendValues is an analog of Send, but it will additionally call NameOf for each graph.Ref before sending it to a channel.

func (*IterateChain) TagEach added in v0.6.0

func (c *IterateChain) TagEach(fnc func(map[string]Ref)) error

TagEach will run a provided tag map callback for each result of the iterator.

func (*IterateChain) TagValues added in v0.6.0

func (c *IterateChain) TagValues(qs QuadStore, fnc func(map[string]quad.Value)) error

TagValues is an analog of TagEach, but it will additionally call NameOf for each graph.Ref before passing the map to a callback.

func (*IterateChain) UnOptimized added in v0.6.0

func (c *IterateChain) UnOptimized() *IterateChain

UnOptimized disables iterator optimization.

type Iterator

type Iterator interface {
	IteratorBase

	// Next advances the iterator to the next value, which will then be available through
	// the Result method. It returns false if no further advancement is possible, or if an
	// error was encountered during iteration.  Err should be consulted to distinguish
	// between the two cases.
	Next(ctx context.Context) bool

	// Contains returns whether the value is within the set held by the iterator.
	Contains(ctx context.Context, v Ref) bool

	// Start iteration from the beginning
	Reset()

	// These methods relate to choosing the right iterator, or optimizing an
	// iterator tree
	//
	// Stats() returns the relative costs of calling the iteration methods for
	// this iterator, as well as the size. Roughly, it will take NextCost * Size
	// "cost units" to get everything out of the iterator. This is a wibbly-wobbly
	// thing, and not exact, but a useful heuristic.
	Stats() IteratorStats

	// Helpful accessor for the number of things in the iterator. The first return
	// value is the size, and the second return value is whether that number is exact,
	// or a conservative estimate.
	Size() (int64, bool)

	// Optimizes an iterator. Can replace the iterator, or merely move things
	// around internally. if it chooses to replace it with a better iterator,
	// returns (the new iterator, true), if not, it returns (self, false).
	Optimize() (Iterator, bool)

	// Return a slice of the subiterators for this iterator.
	SubIterators() []Iterator
}

func AsLegacy added in v0.7.6

func AsLegacy(s IteratorShape) Iterator

AsLegacy convert an iterator Shape to a legacy Iterator interface.

func NewLegacy added in v0.7.6

func NewLegacy(s IteratorShape, self Iterator) Iterator

NewLegacy creates a new legacy Iterator from an iterator Shape. This method will always create a new iterator, while AsLegacy will try to unwrap it first.

type IteratorBase added in v0.7.6

type IteratorBase interface {
	// String returns a short textual representation of an iterator.
	String() string

	// Fills a tag-to-result-value map.
	TagResults(map[string]Ref)

	// Returns the current result.
	Result() Ref

	// These methods are the heart and soul of the iterator, as they constitute
	// the iteration interface.
	//
	// To get the full results of iteration, do the following:
	//
	//  for graph.Next(it) {
	//  	val := it.Result()
	//  	... do things with val.
	//  	for it.NextPath() {
	//  		... find other paths to iterate
	//  	}
	//  }
	//
	// All of them should set iterator.result to be the last returned value, to
	// make results work.
	//
	// NextPath() advances iterators that may have more than one valid result,
	// from the bottom up.
	NextPath(ctx context.Context) bool

	// Err returns any error that was encountered by the Iterator.
	Err() error

	// Close the iterator and do internal cleanup.
	Close() error
}

IteratorBase is a set of common methods for Scanner and Index iterators.

type IteratorCosts added in v0.7.6

type IteratorCosts struct {
	ContainsCost int64
	NextCost     int64
	Size         Size
}

type IteratorFuture added in v0.7.6

type IteratorFuture interface {
	Iterator
	AsShape() IteratorShape
}

IteratorFuture is an optional interface for legacy Iterators that support direct conversion to an IteratorShape. This interface should be avoided an will be deprecated in the future.

type IteratorShape added in v0.7.6

type IteratorShape interface {

	// String returns a short textual representation of an iterator.
	String() string

	// Iterate starts this iterator in scanning mode. Resulting iterator will list all
	// results sequentially, but not necessary in the sorted order. Caller must close
	// the iterator.
	Iterate() Scanner

	// Lookup starts this iterator in an index lookup mode. Depending on the iterator type,
	// this may still involve database scans. Resulting iterator allows to check an index
	// contains a specified value. Caller must close the iterator.
	Lookup() Index

	// These methods relate to choosing the right iterator, or optimizing an
	// iterator tree
	//
	// Stats() returns the relative costs of calling the iteration methods for
	// this iterator, as well as the size. Roughly, it will take NextCost * Size
	// "cost units" to get everything out of the iterator. This is a wibbly-wobbly
	// thing, and not exact, but a useful heuristic.
	Stats(ctx context.Context) (IteratorCosts, error)

	// Optimizes an iterator. Can replace the iterator, or merely move things
	// around internally. if it chooses to replace it with a better iterator,
	// returns (the new iterator, true), if not, it returns (self, false).
	Optimize(ctx context.Context) (IteratorShape, bool)

	// Return a slice of the subiterators for this iterator.
	SubIterators() []IteratorShape
}

Shape is an iterator shape, similar to a query plan. But the plan is not specific in this case - it is used to reorder query branches, and the decide what branches will be scanned and what branches will lookup values (hopefully from the index, but not necessarily).

func AsShape added in v0.7.6

func AsShape(it Iterator) IteratorShape

AsShape converts a legacy Iterator to an iterator Shape.

type IteratorShapeCompat added in v0.7.6

type IteratorShapeCompat interface {
	IteratorShape
	AsLegacy() Iterator
}

IteratorShapeCompat is an optional interface for iterator Shape that support direct conversion to a legacy Iterator. This interface should be avoided an will be deprecated in the future.

type IteratorStats

type IteratorStats struct {
	ContainsCost int64
	NextCost     int64
	Size         int64
	ExactSize    bool
	Next         int64
	Contains     int64
	ContainsNext int64
}

type Keyer deprecated added in v0.6.0

type Keyer = Ref

Keyer provides a method for comparing types that are not otherwise comparable. The Key method must return a dynamic type that is comparable according to the Go language specification. The returned value must be unique for each receiver value.

Deprecated: Ref contains the same method now.

type Linkage added in v0.4.1

type Linkage struct {
	Dir   quad.Direction
	Value Ref
}

Linkage is a union type representing a set of values established for a given quad direction.

type Namer added in v0.7.6

type Namer interface {
	// Given a node ID, return the opaque token used by the QuadStore
	// to represent that id.
	ValueOf(quad.Value) Ref
	// Given an opaque token, return the node that it represents.
	NameOf(Ref) quad.Value
}

type NewQuadWriterFunc added in v0.4.0

type NewQuadWriterFunc func(QuadStore, Options) (QuadWriter, error)

type NewStoreFunc added in v0.3.1

type NewStoreFunc func(string, Options) (QuadStore, error)

type Options added in v0.3.1

type Options map[string]interface{}

func (Options) BoolKey added in v0.4.0

func (d Options) BoolKey(key string, def bool) (bool, error)

func (Options) IntKey added in v0.3.1

func (d Options) IntKey(key string, def int) (int, error)

func (Options) StringKey added in v0.3.1

func (d Options) StringKey(key string, def string) (string, error)

type PreFetchedValue added in v0.6.0

type PreFetchedValue interface {
	Ref
	NameOf() quad.Value
}

PreFetchedValue is an optional interface for graph.Ref to indicate that quadstore has already loaded a value into memory.

func PreFetched added in v0.7.0

func PreFetched(v quad.Value) PreFetchedValue

type Procedure added in v0.4.0

type Procedure int8
const (
	Add    Procedure = +1
	Delete Procedure = -1
)

The different types of actions a transaction can do.

func (Procedure) String added in v0.6.0

func (p Procedure) String() string

type QuadHash added in v0.7.0

type QuadHash struct {
	Subject   ValueHash
	Predicate ValueHash
	Object    ValueHash
	Label     ValueHash
}

func (QuadHash) Dirs added in v0.7.0

func (q QuadHash) Dirs() [4]ValueHash

func (QuadHash) Get added in v0.7.0

func (q QuadHash) Get(d quad.Direction) ValueHash

func (QuadHash) Key added in v0.7.0

func (q QuadHash) Key() interface{}

func (*QuadHash) Set added in v0.7.0

func (q *QuadHash) Set(d quad.Direction, h ValueHash)

type QuadIndexer added in v0.7.6

type QuadIndexer interface {
	// Given an opaque token, returns the quad for that token from the store.
	Quad(Ref) quad.Quad

	// Given a direction and a token, creates an iterator of links which have
	// that node token in that directional field.
	QuadIterator(quad.Direction, Ref) Iterator

	// QuadIteratorSize returns an estimated size of an iterator.
	QuadIteratorSize(ctx context.Context, d quad.Direction, v Ref) (Size, error)

	// Convenience function for speed. Given a quad token and a direction
	// return the node token for that direction. Sometimes, a QuadStore
	// can do this without going all the way to the backing store, and
	// gives the QuadStore the opportunity to make this optimization.
	//
	// Iterators will call this. At worst, a valid implementation is
	//
	//  qs.ValueOf(qs.Quad(id).Get(dir))
	//
	QuadDirection(id Ref, d quad.Direction) Ref
}

type QuadStore added in v0.4.1

type QuadStore interface {
	Namer
	QuadIndexer

	// The only way in is through building a transaction, which
	// is done by a replication strategy.
	ApplyDeltas(in []Delta, opts IgnoreOpts) error

	// NewQuadWriter starts a batch quad import process.
	// The order of changes is not guaranteed, neither is the order and result of concurrent ApplyDeltas.
	NewQuadWriter() (quad.WriteCloser, error)

	// Returns an iterator enumerating all nodes in the graph.
	NodesAllIterator() Iterator

	// Returns an iterator enumerating all links in the graph.
	QuadsAllIterator() Iterator

	// Stats returns the number of nodes and quads currently stored.
	// Exact flag controls the correctness of the value. It can be an estimation, or a precise calculation.
	// The quadstore may have a fast way of retrieving the precise stats, in this case it may ignore 'exact'
	// flag and always return correct stats (with an appropriate flags set in the output).
	Stats(ctx context.Context, exact bool) (Stats, error)

	// Close the quad store and clean up. (Flush to disk, cleanly
	// sever connections, etc)
	Close() error
}

func NewQuadStore added in v0.4.1

func NewQuadStore(name string, dbpath string, opts Options) (QuadStore, error)

func Unwrap added in v0.7.1

func Unwrap(qs QuadStore) QuadStore

Unwrap returns an original QuadStore value if it was wrapped by Handle. This prevents shadowing of optional interface implementations.

type QuadStoreRegistration added in v0.5.0

type QuadStoreRegistration struct {
	NewFunc      NewStoreFunc
	UpgradeFunc  UpgradeStoreFunc
	InitFunc     InitStoreFunc
	IsPersistent bool
}

type QuadWriter added in v0.4.0

type QuadWriter interface {
	// AddQuad adds a quad to the store.
	AddQuad(quad.Quad) error

	// TODO(barakmich): Deprecate in favor of transaction.
	// AddQuadSet adds a set of quads to the store, atomically if possible.
	AddQuadSet([]quad.Quad) error

	// RemoveQuad removes a quad matching the given one  from the database,
	// if it exists. Does nothing otherwise.
	RemoveQuad(quad.Quad) error

	// ApplyTransaction applies a set of quad changes.
	ApplyTransaction(*Transaction) error

	// RemoveNode removes all quads which have the given node as subject, predicate, object, or label.
	//
	// It returns ErrNodeNotExists if node is missing.
	RemoveNode(quad.Value) error

	// Close cleans up replication and closes the writing aspect of the database.
	Close() error
}

func NewQuadWriter added in v0.4.0

func NewQuadWriter(name string, qs QuadStore, opts Options) (QuadWriter, error)

type Ref added in v0.7.6

type Ref interface {
	// Key returns a dynamic type that is comparable according to the Go language specification.
	// The returned value must be unique for each receiver value.
	Key() interface{}
}

Ref defines an opaque "quad store reference" type. However the backend wishes to implement it, a Ref is merely a token to a quad or a node that the backing store itself understands, and the base iterators pass around.

For example, in a very traditional, graphd-style graph, these are int64s (guids of the primitives). In a very direct sort of graph, these could be pointers to structs, or merely quads, or whatever works best for the backing store.

These must be comparable, or return a comparable version on Key.

func RefsOf added in v0.7.5

func RefsOf(ctx context.Context, qs QuadStore, nodes []quad.Value) ([]Ref, error)

type Scanner added in v0.7.6

type Scanner interface {
	IteratorBase

	// Next advances the iterator to the next value, which will then be available through
	// the Result method. It returns false if no further advancement is possible, or if an
	// error was encountered during iteration.  Err should be consulted to distinguish
	// between the two cases.
	Next(ctx context.Context) bool
}

Scanner is an iterator that lists all results sequentially, but not necessarily in a sorted order.

type Size added in v0.7.6

type Size struct {
	Size  int64
	Exact bool
}

Size of a graph (either in nodes or quads).

type Stats added in v0.7.6

type Stats struct {
	Nodes Size // number of nodes
	Quads Size // number of quads
}

Stats of a graph.

type StatsContainer added in v0.4.0

type StatsContainer struct {
	UID  uint64
	Type string
	IteratorStats
	SubIts []StatsContainer
}

func DumpStats added in v0.4.0

func DumpStats(it Iterator) StatsContainer

type Tagger added in v0.3.1

type Tagger interface {
	Iterator
	TaggerBase
	CopyFromTagger(st TaggerBase)
}

Tagger is an interface for iterators that can tag values. Tags are returned as a part of TagResults call.

type TaggerBase added in v0.7.6

type TaggerBase interface {
	Tags() []string
	FixedTags() map[string]Ref
	AddTags(tag ...string)
	AddFixedTag(tag string, value Ref)
}

TaggerBase is a base interface for Tagger and TaggerShape.

type TaggerShape added in v0.7.6

type TaggerShape interface {
	IteratorShape
	TaggerBase
	CopyFromTagger(st TaggerBase)
}

Tagger is an interface for iterators that can tag values. Tags are returned as a part of TagResults call.

type Transaction added in v0.5.0

type Transaction struct {
	// Deltas stores the deltas in the right order
	Deltas []Delta
	// contains filtered or unexported fields
}

Transaction stores a bunch of Deltas to apply together in an atomic step on the database.

func NewTransaction added in v0.5.0

func NewTransaction() *Transaction

NewTransaction initialize a new transaction.

func NewTransactionN added in v0.7.4

func NewTransactionN(n int) *Transaction

NewTransactionN initialize a new transaction with a predefined capacity.

func (*Transaction) AddQuad added in v0.5.0

func (t *Transaction) AddQuad(q quad.Quad)

AddQuad adds a new quad to the transaction if it is not already present in it. If there is a 'remove' delta for that quad, it will remove that delta from the transaction instead of actually adding the quad.

func (*Transaction) RemoveQuad added in v0.5.0

func (t *Transaction) RemoveQuad(q quad.Quad)

RemoveQuad adds a quad to remove to the transaction. The quad will be removed from the database if it is not present in the transaction, otherwise it simply remove it from the transaction.

type UpgradeStoreFunc added in v0.5.0

type UpgradeStoreFunc func(string, Options) error

type Value deprecated added in v0.3.1

type Value = Ref

Value is an alias for Ref.

Deprecated: use Ref instead.

type ValueHash added in v0.7.0

type ValueHash [quad.HashSize]byte

ValueHash is a hash of a single value.

func HashOf added in v0.7.0

func HashOf(s quad.Value) (out ValueHash)

func (ValueHash) Key added in v0.7.0

func (h ValueHash) Key() interface{}

func (ValueHash) String added in v0.7.0

func (h ValueHash) String() string

func (ValueHash) Valid added in v0.7.0

func (h ValueHash) Valid() bool

Directories

Path Synopsis
kv
all
Package b implements a B+tree.
Package b implements a B+tree.
all
Package proto is a generated protocol buffer package.
Package proto is a generated protocol buffer package.
sql

Jump to

Keyboard shortcuts

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