Documentation
¶
Index ¶
- func Contains(g *Graph, stmt Statement) bool
- func Count(g *Graph) int
- func Insert(g *Graph, statements ...Statement) error
- func Remove(g *Graph, predicate func(Statement) bool) error
- type EdgeType
- type Entity
- type Graph
- func CrossProduct(g1, g2 *Graph) *Graph
- func Difference(g1, g2 *Graph) *Graph
- func Distinct(g *Graph) *Graph
- func Intersection(g1, g2 *Graph) *Graph
- func Join(g1, g2 *Graph, onField string) *Graph
- func New(dbPath string) (*Graph, error)
- func Project(g *Graph, fields ...string) *Graph
- func Rename(g *Graph, oldName, newName string, targetType string) *Graph
- func Restrict(g *Graph, predicate func(Statement) bool) *Graph
- func Union(g1, g2 *Graph) *Graph
- func (g *Graph) AddStatement(stmt Statement) error
- func (g *Graph) GetEntity(name string) (*Entity, bool)
- func (g *Graph) GetRelationship(name string) (*Relationship, bool)
- func (g *Graph) ListEntities() []string
- func (g *Graph) ListSubgraphs() []string
- func (g *Graph) Load() error
- func (g *Graph) Query(subject, relationship, object string) []Statement
- func (g *Graph) QueryWithScope(subject, relationship, object, scope string) []Statement
- func (g *Graph) SetEntity(name, content string) error
- func (g *Graph) SetRelationship(name, content string) error
- func (g *Graph) String() string
- type Relationship
- type Schema
- type Statement
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Graph ¶
type Graph struct {
Statements []Statement
Entities map[string]*Entity
Relationships map[string]*Relationship
Schema *Schema
Subgraphs map[string][]Statement
// contains filtered or unexported fields
}
func CrossProduct ¶
func Difference ¶
func Intersection ¶
func (*Graph) AddStatement ¶
func (*Graph) GetRelationship ¶
func (g *Graph) GetRelationship(name string) (*Relationship, bool)
func (*Graph) ListEntities ¶
func (*Graph) ListSubgraphs ¶
func (*Graph) QueryWithScope ¶
func (*Graph) SetRelationship ¶
type Relationship ¶
Click to show internal directories.
Click to hide internal directories.