export Quad via a function
This commit is contained in:
parent
fa9945ed92
commit
2356ba4a64
1 changed files with 4 additions and 2 deletions
|
|
@ -14,8 +14,6 @@ type QuadWriter graph.QuadWriter
|
||||||
|
|
||||||
type Path path.Path
|
type Path path.Path
|
||||||
|
|
||||||
type Quad quad.Quad
|
|
||||||
|
|
||||||
var StartMorphism = path.StartMorphism
|
var StartMorphism = path.StartMorphism
|
||||||
var StartPath = path.StartPath
|
var StartPath = path.StartPath
|
||||||
|
|
||||||
|
|
@ -26,6 +24,10 @@ type Handle struct {
|
||||||
graph.QuadWriter
|
graph.QuadWriter
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func Quad(subject, predicate, object, label string) quad.Quad {
|
||||||
|
return quad.Quad{subject, predicate, object, label}
|
||||||
|
}
|
||||||
|
|
||||||
func NewMemoryGraph() (*Handle, error) {
|
func NewMemoryGraph() (*Handle, error) {
|
||||||
qs, err := graph.NewQuadStore("memstore", "", nil)
|
qs, err := graph.NewQuadStore("memstore", "", nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue