mongo

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2017 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultDBName = "cayley"
View Source
const QuadStoreType = "mongo1"

Variables

This section is empty.

Functions

This section is empty.

Types

type Iterator added in v0.3.1

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

func NewAllIterator added in v0.3.1

func NewAllIterator(qs *QuadStore, collection string) *Iterator

func NewIterator added in v0.3.1

func NewIterator(qs *QuadStore, collection string, d quad.Direction, val graph.Value) *Iterator

func NewIteratorWithConstraints added in v0.6.0

func NewIteratorWithConstraints(qs *QuadStore, collection string, constraint bson.M) *Iterator

func (*Iterator) Clone added in v0.3.1

func (it *Iterator) Clone() graph.Iterator

func (*Iterator) Close added in v0.3.1

func (it *Iterator) Close() error

func (*Iterator) Contains added in v0.3.1

func (it *Iterator) Contains(ctx context.Context, v graph.Value) bool

func (*Iterator) Err added in v0.4.1

func (it *Iterator) Err() error

func (*Iterator) Next added in v0.3.1

func (it *Iterator) Next(ctx context.Context) bool

func (*Iterator) NextPath added in v0.4.0

func (it *Iterator) NextPath(ctx context.Context) bool

func (*Iterator) Optimize added in v0.3.1

func (it *Iterator) Optimize() (graph.Iterator, bool)

func (*Iterator) Reset added in v0.3.1

func (it *Iterator) Reset()

func (*Iterator) Result added in v0.3.1

func (it *Iterator) Result() graph.Value

func (*Iterator) Size added in v0.3.1

func (it *Iterator) Size() (int64, bool)

func (*Iterator) Sorted added in v0.3.1

func (it *Iterator) Sorted() bool

func (*Iterator) Stats added in v0.3.1

func (it *Iterator) Stats() graph.IteratorStats

func (*Iterator) String added in v0.7.0

func (it *Iterator) String() string

func (*Iterator) SubIterators added in v0.3.1

func (it *Iterator) SubIterators() []graph.Iterator

SubIterators returns no subiterators for a Mongo iterator.

func (*Iterator) TagResults added in v0.3.1

func (it *Iterator) TagResults(dst map[string]graph.Value)

func (*Iterator) Tagger added in v0.3.1

func (it *Iterator) Tagger() *graph.Tagger

func (*Iterator) Type added in v0.3.1

func (it *Iterator) Type() graph.Type

func (*Iterator) UID added in v0.3.1

func (it *Iterator) UID() uint64

type LinksTo added in v0.4.1

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

LinksTo is a MongoDB-dependent version of a LinksTo iterator. Like the normal LinksTo, it represents a set of links to a set of nodes, represented by its subiterator. However, this iterator may often be faster than the generic LinksTo, as it can use the secondary indices in Mongo as features within the Mongo query, reducing the size of the result set and speeding up iteration.

func NewLinksTo added in v0.4.1

func NewLinksTo(qs *QuadStore, it graph.Iterator, collection string, d quad.Direction, lset []graph.Linkage) *LinksTo

NewLinksTo constructs a new indexed LinksTo iterator for Mongo around a direction and a subiterator of nodes.

func (*LinksTo) Clone added in v0.4.1

func (it *LinksTo) Clone() graph.Iterator

func (*LinksTo) Close added in v0.4.1

func (it *LinksTo) Close() error

func (*LinksTo) Contains added in v0.4.1

func (it *LinksTo) Contains(ctx context.Context, val graph.Value) bool

func (*LinksTo) Direction added in v0.4.1

func (it *LinksTo) Direction() quad.Direction

Return the direction under consideration.

func (*LinksTo) Err added in v0.4.1

func (it *LinksTo) Err() error

func (*LinksTo) Next added in v0.4.1

func (it *LinksTo) Next(ctx context.Context) bool

func (*LinksTo) NextPath added in v0.4.1

func (it *LinksTo) NextPath(ctx context.Context) bool

func (*LinksTo) Optimize added in v0.4.1

func (it *LinksTo) Optimize() (graph.Iterator, bool)

Optimize the LinksTo, by replacing it if it can be.

func (*LinksTo) Reset added in v0.4.1

func (it *LinksTo) Reset()

func (*LinksTo) Result added in v0.4.1

func (it *LinksTo) Result() graph.Value

func (*LinksTo) Size added in v0.4.1

func (it *LinksTo) Size() (int64, bool)

func (*LinksTo) Stats added in v0.4.1

func (it *LinksTo) Stats() graph.IteratorStats

Return a guess as to how big or costly it is to next the iterator.

func (*LinksTo) String added in v0.7.0

func (it *LinksTo) String() string

func (*LinksTo) SubIterators added in v0.4.1

func (it *LinksTo) SubIterators() []graph.Iterator

Return a list containing only our subiterator.

func (*LinksTo) TagResults added in v0.4.1

func (it *LinksTo) TagResults(dst map[string]graph.Value)

Tag these results, and our subiterator's results.

func (*LinksTo) Tagger added in v0.4.1

func (it *LinksTo) Tagger() *graph.Tagger

func (*LinksTo) Type added in v0.4.1

func (it *LinksTo) Type() graph.Type

func (*LinksTo) UID added in v0.4.1

func (it *LinksTo) UID() uint64

type MongoLogEntry added in v0.4.0

type MongoLogEntry struct {
	ID     bson.ObjectId `bson:"_id"`
	Action string        `bson:"Action"`
	Key    string        `bson:"Key"`
}

type MongoNode

type MongoNode struct {
	ID   string `bson:"_id"`
	Name value  `bson:"Name"`
	Size int    `bson:"Size"`
}

type NodeHash added in v0.6.0

type NodeHash string

func (NodeHash) IsNode added in v0.6.0

func (NodeHash) IsNode() bool

func (NodeHash) Key added in v0.7.0

func (v NodeHash) Key() interface{}

type QuadHash added in v0.6.0

type QuadHash string

func (QuadHash) Get added in v0.6.0

func (h QuadHash) Get(d quad.Direction) string

func (QuadHash) IsNode added in v0.6.0

func (QuadHash) IsNode() bool

func (QuadHash) Key added in v0.7.0

func (v QuadHash) Key() interface{}

type QuadStore added in v0.4.1

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

func (*QuadStore) ApplyDeltas added in v0.4.1

func (qs *QuadStore) ApplyDeltas(deltas []graph.Delta, ignoreOpts graph.IgnoreOpts) error

func (*QuadStore) Close added in v0.4.1

func (qs *QuadStore) Close() error

func (*QuadStore) NameOf added in v0.4.1

func (qs *QuadStore) NameOf(v graph.Value) quad.Value

func (*QuadStore) NodesAllIterator added in v0.4.1

func (qs *QuadStore) NodesAllIterator() graph.Iterator

func (*QuadStore) OptimizeIterator added in v0.4.1

func (qs *QuadStore) OptimizeIterator(it graph.Iterator) (graph.Iterator, bool)

func (*QuadStore) Quad added in v0.4.1

func (qs *QuadStore) Quad(val graph.Value) quad.Quad

func (*QuadStore) QuadDirection added in v0.4.1

func (qs *QuadStore) QuadDirection(in graph.Value, d quad.Direction) graph.Value

func (*QuadStore) QuadIterator added in v0.4.1

func (qs *QuadStore) QuadIterator(d quad.Direction, val graph.Value) graph.Iterator

func (*QuadStore) QuadsAllIterator added in v0.4.1

func (qs *QuadStore) QuadsAllIterator() graph.Iterator

func (*QuadStore) Size added in v0.4.1

func (qs *QuadStore) Size() int64

func (*QuadStore) ValueOf added in v0.4.1

func (qs *QuadStore) ValueOf(s quad.Value) graph.Value

Jump to

Keyboard shortcuts

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