mongo

package
v0.0.0-...-05f225d Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2017 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func Type

func Type() graph.Type

Types

type Iterator

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

func NewAllIterator

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

func NewIterator

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

func NewIteratorWithConstraints

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

func (*Iterator) Clone

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

func (*Iterator) Close

func (it *Iterator) Close() error

func (*Iterator) Contains

func (it *Iterator) Contains(v graph.Value) bool

func (*Iterator) Describe

func (it *Iterator) Describe() graph.Description

func (*Iterator) Err

func (it *Iterator) Err() error

func (*Iterator) Next

func (it *Iterator) Next() bool

func (*Iterator) NextPath

func (it *Iterator) NextPath() bool

func (*Iterator) Optimize

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

func (*Iterator) Reset

func (it *Iterator) Reset()

func (*Iterator) Result

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

func (*Iterator) Size

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

func (*Iterator) Sorted

func (it *Iterator) Sorted() bool

func (*Iterator) Stats

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

func (*Iterator) SubIterators

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

SubIterators returns no subiterators for a Mongo iterator.

func (*Iterator) TagResults

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

func (*Iterator) Tagger

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

func (*Iterator) Type

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

func (*Iterator) UID

func (it *Iterator) UID() uint64

type LinksTo

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

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

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

func (*LinksTo) Close

func (it *LinksTo) Close() error

func (*LinksTo) Contains

func (it *LinksTo) Contains(val graph.Value) bool

func (*LinksTo) Describe

func (it *LinksTo) Describe() graph.Description

func (*LinksTo) Direction

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

Return the direction under consideration.

func (*LinksTo) Err

func (it *LinksTo) Err() error

func (*LinksTo) Next

func (it *LinksTo) Next() bool

func (*LinksTo) NextPath

func (it *LinksTo) NextPath() bool

func (*LinksTo) Optimize

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

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

func (*LinksTo) Reset

func (it *LinksTo) Reset()

func (*LinksTo) Result

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

func (*LinksTo) Size

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

func (*LinksTo) Stats

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

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

func (*LinksTo) SubIterators

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

Return a list containing only our subiterator.

func (*LinksTo) TagResults

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

Tag these results, and our subiterator's results.

func (*LinksTo) Tagger

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

func (*LinksTo) Type

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

func (*LinksTo) UID

func (it *LinksTo) UID() uint64

type MongoLogEntry

type MongoLogEntry struct {
	LogID     int64  `bson:"LogID"`
	Action    string `bson:"Action"`
	Key       string `bson:"Key"`
	Timestamp int64
}

type MongoNode

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

type NodeHash

type NodeHash string

func (NodeHash) IsNode

func (NodeHash) IsNode() bool

func (NodeHash) Key

func (v NodeHash) Key() interface{}

type QuadHash

type QuadHash string

func (QuadHash) Get

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

func (QuadHash) IsNode

func (QuadHash) IsNode() bool

func (QuadHash) Key

func (v QuadHash) Key() interface{}

type QuadStore

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

func (*QuadStore) ApplyDeltas

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

func (*QuadStore) Close

func (qs *QuadStore) Close() error

func (*QuadStore) FixedIterator

func (qs *QuadStore) FixedIterator() graph.FixedIterator

func (*QuadStore) Horizon

func (qs *QuadStore) Horizon() graph.PrimaryKey

func (*QuadStore) NameOf

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

func (*QuadStore) NodesAllIterator

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

func (*QuadStore) OptimizeIterator

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

func (*QuadStore) Quad

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

func (*QuadStore) QuadDirection

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

func (*QuadStore) QuadIterator

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

func (*QuadStore) QuadsAllIterator

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

func (*QuadStore) Size

func (qs *QuadStore) Size() int64

func (*QuadStore) Type

func (qs *QuadStore) Type() string

func (*QuadStore) ValueOf

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