lmdb

package
v0.4.2-0...-5b73136 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2015 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// QuadStoreType is used to select a QuadStore backend to Cayley.
	QuadStoreType = "lmdb"
)

Variables

This section is empty.

Functions

func PositionOf

func PositionOf(tok *Token, d quad.Direction, qs *QuadStore) int

PositionOf ??

func Type

func Type() graph.Type

Type ???

Types

type AllIterator

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

AllIterator is an implementation of graph.Nexter.

func NewAllIterator

func NewAllIterator(db string, d quad.Direction, qs *QuadStore) *AllIterator

NewAllIterator allocates and initializes an AllIterator that is returned to the caller.

func (*AllIterator) Clone

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

Clone returns an independent copy of it.

func (*AllIterator) Close

func (it *AllIterator) Close() error

Close ???

func (*AllIterator) Contains

func (it *AllIterator) Contains(v graph.Value) (ok bool)

Contains ??? BUG(bmatsuo): Contains is surely broken. It just looks for v in the given database. It seems like it should buffer the output, or run the iteration again.

func (*AllIterator) Describe

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

Describe ???

func (*AllIterator) Err

func (it *AllIterator) Err() error

Err ???

func (*AllIterator) Next

func (it *AllIterator) Next() bool

Next ???.

func (*AllIterator) NextPath

func (it *AllIterator) NextPath() bool

NextPath ???

func (*AllIterator) Optimize

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

Optimize ???

func (*AllIterator) Reset

func (it *AllIterator) Reset()

Reset ???.

func (*AllIterator) Result

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

Result ???

func (*AllIterator) Size

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

Size ???

func (*AllIterator) Sorted

func (it *AllIterator) Sorted() bool

Sorted ???

func (*AllIterator) Stats

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

Stats ???

func (*AllIterator) SubIterators

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

SubIterators are not supported and a nil slice is always returned.

func (*AllIterator) TagResults

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

TagResults returns the iterators tags.

func (*AllIterator) Tagger

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

Tagger returns the iterator's tagger.

func (*AllIterator) Type

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

Type ???

func (*AllIterator) UID

func (it *AllIterator) UID() uint64

UID returns iterator UID for it.

type Iterator

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

Iterator is an implementation of graph.Nexter.

func NewIterator

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

NewIterator allocates and initializes a new Iterator that is returned to the caller.

func (*Iterator) Clone

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

Clone ??

func (*Iterator) Close

func (it *Iterator) Close() error

Close ??

func (*Iterator) Contains

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

Contains ??

func (*Iterator) Describe

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

Describe ??

func (*Iterator) Err

func (it *Iterator) Err() error

Err ??

func (*Iterator) Next

func (it *Iterator) Next() bool

Next ??

func (*Iterator) NextPath

func (it *Iterator) NextPath() bool

NextPath ??

func (*Iterator) Optimize

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

Optimize ??

func (*Iterator) Reset

func (it *Iterator) Reset()

Reset ???

func (*Iterator) Result

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

Result ??

func (*Iterator) Size

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

Size ??

func (*Iterator) Sorted

func (it *Iterator) Sorted() bool

Sorted ??

func (*Iterator) Stats

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

Stats ??

func (*Iterator) SubIterators

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

SubIterators are not supported and a nil slice is always returned.

func (*Iterator) TagResults

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

TagResults ??

func (*Iterator) Tagger

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

Tagger ??

func (*Iterator) Type

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

Type ??

func (*Iterator) UID

func (it *Iterator) UID() uint64

UID ???

type QuadStore

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

QuadStore ??

func (*QuadStore) ApplyDeltas

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

ApplyDeltas ??

func (*QuadStore) Close

func (qs *QuadStore) Close()

Close ??

func (*QuadStore) FixedIterator

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

FixedIterator ??

func (*QuadStore) Horizon

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

Horizon ??

func (*QuadStore) NameOf

func (qs *QuadStore) NameOf(k graph.Value) string

NameOf ??

func (*QuadStore) NodesAllIterator

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

NodesAllIterator ??

func (*QuadStore) OptimizeIterator

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

OptimizeIterator ??

func (*QuadStore) Quad

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

Quad ??

func (*QuadStore) QuadDirection

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

QuadDirection ??

func (*QuadStore) QuadIterator

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

QuadIterator ??

func (*QuadStore) QuadsAllIterator

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

QuadsAllIterator ??

func (*QuadStore) Size

func (qs *QuadStore) Size() int64

Size ??

func (*QuadStore) SizeOf

func (qs *QuadStore) SizeOf(k graph.Value) int64

SizeOf ??

func (*QuadStore) Type

func (qs *QuadStore) Type() string

Type ??

func (*QuadStore) UpdateValueKeyBy

func (qs *QuadStore) UpdateValueKeyBy(name string, amount int64, tx *lmdb.Txn) error

UpdateValueKeyBy ??

func (*QuadStore) ValueOf

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

ValueOf ??

func (*QuadStore) WriteHorizonAndSize

func (qs *QuadStore) WriteHorizonAndSize(tx *lmdb.Txn) error

WriteHorizonAndSize ??

type Token

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

Token is a reference into an LMDB environment.

func (*Token) Key

func (t *Token) Key() interface{}

Key implements the Keyer interface used by several packages and identifies a Token within the LMDB environment.

Notes

Bugs

  • Contains is surely broken. It just looks for v in the given database. It seems like it should buffer the output, or run the iteration again.

Jump to

Keyboard shortcuts

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