simplegraph

package module
v0.0.0-...-c53faf3 Latest Latest
Warning

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

Go to latest
Published: May 23, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

README

simplegraph

a really, really simple graph database modeled after hexastore

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Indices = map[string]*hexastoreIndex{
	"spo": {subspace.Sub("spo"), []DataField{SUBJECT, PREDICATE, OBJECT}},
	"sop": {subspace.Sub("sop"), []DataField{SUBJECT, OBJECT, PREDICATE}},
	"pos": {subspace.Sub("pos"), []DataField{PREDICATE, OBJECT, SUBJECT}},
	"pso": {subspace.Sub("pso"), []DataField{PREDICATE, SUBJECT, OBJECT}},
	"osp": {subspace.Sub("osp"), []DataField{OBJECT, SUBJECT, PREDICATE}},
	"ops": {subspace.Sub("ops"), []DataField{OBJECT, PREDICATE, SUBJECT}},
}

Functions

This section is empty.

Types

type DataField

type DataField int
const (
	SUBJECT   DataField = 1
	PREDICATE DataField = 2
	OBJECT    DataField = 3
)

type Edge

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

func (Edge) String

func (e Edge) String() string

type EdgeResult

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

func (*EdgeResult) Edge

func (e *EdgeResult) Edge() *Edge

type FdbGraph

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

func (*FdbGraph) Delete

func (f *FdbGraph) Delete(keys ...[]byte) error

func (*FdbGraph) Get

func (f *FdbGraph) Get(prefix []byte, outputStream chan<- []byte) error

func (*FdbGraph) Put

func (f *FdbGraph) Put(keys ...[]byte) error

type KVStore

type KVStore interface {
	Get(prefix []byte, stream chan<- []byte) error
	Put(keys ...[]byte) error
	Delete(keys ...[]byte) error
}

type OrderedStreamJoin

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

type Query

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

type SearchResults

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

type SimpleGraph

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

func NewSimpleGraph

func NewSimpleGraph(kvstore KVStore) *SimpleGraph

func (*SimpleGraph) AddEdges

func (graph *SimpleGraph) AddEdges(edges []Edge) error

func (*SimpleGraph) GetEdges

func (graph *SimpleGraph) GetEdges(query Query) (<-chan *Edge, error)

func (*SimpleGraph) GetRangeStreamingAnd

func (graph *SimpleGraph) GetRangeStreamingAnd(query1 Query, query2 Query) (<-chan *Edge, error)

func (*SimpleGraph) Search

func (graph *SimpleGraph) Search(query Query) (<-chan *SearchResults, error)

type SortStream

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

type TripleOrder

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

type VariableResult

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

type VariableStream

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

Jump to

Keyboard shortcuts

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