Create quads hierarchy
* Move nquads into quad. * Create cquads simplified parser in quad. * Move Triple (renamed Quad) to quad. Also made sure mongo actually implements BulkLoader.
This commit is contained in:
parent
01bc63810b
commit
401c58426f
51 changed files with 13400 additions and 5495 deletions
|
|
@ -21,6 +21,7 @@ import (
|
|||
|
||||
"github.com/google/cayley/graph"
|
||||
_ "github.com/google/cayley/graph/memstore"
|
||||
"github.com/google/cayley/quad"
|
||||
)
|
||||
|
||||
// This is a simple test graph.
|
||||
|
|
@ -36,7 +37,7 @@ import (
|
|||
// \-->|#D#|------------->+---+
|
||||
// +---+
|
||||
//
|
||||
var simpleGraph = []*graph.Triple{
|
||||
var simpleGraph = []*quad.Quad{
|
||||
{"A", "follows", "B", ""},
|
||||
{"C", "follows", "B", ""},
|
||||
{"C", "follows", "D", ""},
|
||||
|
|
@ -50,7 +51,7 @@ var simpleGraph = []*graph.Triple{
|
|||
{"G", "status", "cool", "status_graph"},
|
||||
}
|
||||
|
||||
func makeTestSession(data []*graph.Triple) *Session {
|
||||
func makeTestSession(data []*quad.Quad) *Session {
|
||||
ts, _ := graph.NewTripleStore("memstore", "", nil)
|
||||
for _, t := range data {
|
||||
ts.AddTriple(t)
|
||||
|
|
@ -244,7 +245,7 @@ var testQueries = []struct {
|
|||
},
|
||||
}
|
||||
|
||||
func runQueryGetTag(g []*graph.Triple, query string, tag string) []string {
|
||||
func runQueryGetTag(g []*quad.Quad, query string, tag string) []string {
|
||||
js := makeTestSession(g)
|
||||
c := make(chan interface{}, 5)
|
||||
js.ExecInput(query, c, -1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue