gaedatastore

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: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QuadStoreType = "gaedatastore"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v0.7.0

type Config struct {
	DatabaseType       string
	DatabasePath       string
	DatabaseOptions    map[string]interface{}
	ReplicationType    string
	ReplicationOptions map[string]interface{}
	ListenHost         string
	ListenPort         string
	ReadOnly           bool
	Timeout            time.Duration
	LoadSize           int
}

Config defines the behavior of cayley database instances.

func LoadConf added in v0.7.0

func LoadConf(file string) (*Config, error)

Load reads a JSON-encoded config contained in the given file. A zero value config is returned if the filename is empty.

func (*Config) MarshalJSON added in v0.7.0

func (c *Config) MarshalJSON() ([]byte, error)

func (*Config) UnmarshalJSON added in v0.7.0

func (c *Config) UnmarshalJSON(data []byte) error

type Iterator

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

func NewAllIterator

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

func NewIterator

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

func (*Iterator) Close

func (it *Iterator) Close() error

func (*Iterator) Contains

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

func (*Iterator) Err

func (it *Iterator) Err() error

func (*Iterator) Next

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

func (*Iterator) NextPath

func (it *Iterator) NextPath(ctx context.Context) 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.Ref

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

TODO (panamafrancis) calculate costs

func (*Iterator) String added in v0.7.0

func (it *Iterator) String() string

func (*Iterator) SubIterators

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

No subiterators.

func (*Iterator) TagResults

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

type LogEntry

type LogEntry struct {
	Action    string
	Key       string
	Timestamp int64
}

type MetadataEntry

type MetadataEntry struct {
	NodeCount int64
	QuadCount int64
}

type NodeEntry

type NodeEntry struct {
	Name string
	Size int64
}

type QuadEntry

type QuadEntry struct {
	Hash      string
	Added     []int64 `datastore:",noindex"`
	Deleted   []int64 `datastore:",noindex"`
	Subject   string  `datastore:"subject"`
	Predicate string  `datastore:"predicate"`
	Object    string  `datastore:"object"`
	Label     string  `datastore:"label"`
}

type QuadStore

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

func (*QuadStore) ApplyDeltas

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

func (*QuadStore) Close

func (qs *QuadStore) Close() error

func (*QuadStore) ForRequest added in v0.7.0

func (qs *QuadStore) ForRequest(r *http.Request) (graph.QuadStore, error)

func (*QuadStore) NameOf

func (qs *QuadStore) NameOf(val graph.Ref) quad.Value

func (*QuadStore) NewQuadWriter added in v0.7.6

func (qs *QuadStore) NewQuadWriter() (quad.WriteCloser, error)

func (*QuadStore) NodesAllIterator

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

func (*QuadStore) Quad

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

func (*QuadStore) QuadDirection

func (qs *QuadStore) QuadDirection(val graph.Ref, dir quad.Direction) graph.Ref

func (*QuadStore) QuadIterator

func (qs *QuadStore) QuadIterator(dir quad.Direction, v graph.Ref) graph.Iterator

func (*QuadStore) QuadIteratorSize added in v0.7.6

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

func (*QuadStore) QuadsAllIterator

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

func (*QuadStore) Stats added in v0.7.6

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

func (*QuadStore) ValueOf

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

type Token

type Token struct {
	Kind string
	Hash string
}

func (Token) IsNode

func (t Token) IsNode() bool

func (Token) Key added in v0.7.0

func (t Token) Key() interface{}

Jump to

Keyboard shortcuts

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