graphmock

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IntVal

type IntVal int

func (IntVal) Key

func (v IntVal) Key() interface{}

type Oldstore

type Oldstore struct {
	Parse bool
	Data  []string
	Iter  iterator.Shape
}

Oldstore is a mocked version of the QuadStore interface, for use in tests.

func (*Oldstore) ApplyDeltas

func (qs *Oldstore) ApplyDeltas(context.Context, []graph.Delta, graph.IgnoreOpts) error

func (*Oldstore) Close

func (qs *Oldstore) Close() error

func (*Oldstore) DebugPrint

func (qs *Oldstore) DebugPrint()

func (*Oldstore) NameOf

func (qs *Oldstore) NameOf(ctx context.Context, v graph.Ref) (quad.Value, error)

func (*Oldstore) NewQuadWriter added in v0.9.0

func (qs *Oldstore) NewQuadWriter(ctx context.Context) (quad.WriteCloser, error)

func (*Oldstore) NodesAllIterator

func (qs *Oldstore) NodesAllIterator(ctx context.Context) iterator.Shape

func (*Oldstore) OptimizeIterator

func (qs *Oldstore) OptimizeIterator(ctx context.Context, it iterator.Shape) (iterator.Shape, bool, error)

func (*Oldstore) Quad

func (qs *Oldstore) Quad(context.Context, graph.Ref) quad.Quad

func (*Oldstore) QuadDirection

func (qs *Oldstore) QuadDirection(_ context.Context, _ graph.Ref, _ quad.Direction) (graph.Ref, error)

func (*Oldstore) QuadIterator

func (qs *Oldstore) QuadIterator(ctx context.Context, d quad.Direction, i graph.Ref) iterator.Shape

func (*Oldstore) QuadIteratorSize added in v0.9.0

func (qs *Oldstore) QuadIteratorSize(ctx context.Context, d quad.Direction, val graph.Ref) (refs.Size, error)

func (*Oldstore) QuadsAllIterator

func (qs *Oldstore) QuadsAllIterator(ctx context.Context) iterator.Shape

func (*Oldstore) RemoveQuad

func (qs *Oldstore) RemoveQuad(t quad.Quad)

func (*Oldstore) Size

func (qs *Oldstore) Size() int64

func (*Oldstore) Type

func (qs *Oldstore) Type() string

func (*Oldstore) ValueOf

func (qs *Oldstore) ValueOf(ctx context.Context, s quad.Value) (graph.Ref, error)

type Store

type Store struct {
	Data []quad.Quad
}

func (*Store) ApplyDeltas

func (qs *Store) ApplyDeltas(context.Context, []graph.Delta, graph.IgnoreOpts) error

func (*Store) Close

func (qs *Store) Close() error

func (*Store) DebugPrint

func (qs *Store) DebugPrint()

func (*Store) NameOf

func (qs *Store) NameOf(ctx context.Context, v graph.Ref) (quad.Value, error)

func (*Store) NewQuadWriter added in v0.9.0

func (qs *Store) NewQuadWriter(ctx context.Context) (quad.WriteCloser, error)

func (*Store) NodesAllIterator

func (qs *Store) NodesAllIterator(ctx context.Context) iterator.Shape

func (*Store) Quad

func (qs *Store) Quad(ctx context.Context, v graph.Ref) (quad.Quad, error)

func (*Store) QuadDirection

func (qs *Store) QuadDirection(ctx context.Context, v graph.Ref, d quad.Direction) (graph.Ref, error)

func (*Store) QuadIterator

func (qs *Store) QuadIterator(ctx context.Context, d quad.Direction, i graph.Ref) iterator.Shape

func (*Store) QuadIteratorSize added in v0.9.0

func (qs *Store) QuadIteratorSize(ctx context.Context, d quad.Direction, val graph.Ref) (refs.Size, error)

func (*Store) QuadsAllIterator

func (qs *Store) QuadsAllIterator(ctx context.Context) iterator.Shape

func (*Store) RemoveQuad

func (qs *Store) RemoveQuad(t quad.Quad)

func (*Store) Stats added in v0.9.0

func (qs *Store) Stats(ctx context.Context, exact bool) (graph.Stats, error)

func (*Store) Type

func (qs *Store) Type() string

func (*Store) ValueOf

func (qs *Store) ValueOf(ctx context.Context, s quad.Value) (graph.Ref, error)

type StringNode

type StringNode string

func (StringNode) Key

func (s StringNode) Key() interface{}

Jump to

Keyboard shortcuts

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