Added functionality so quadstore is generated per request (if needed) for the new appengine backend \n CR : nobody \n Tests run: unit tests
This commit is contained in:
parent
2c74cb1657
commit
35ccfe7677
8 changed files with 130 additions and 51 deletions
|
|
@ -27,10 +27,12 @@ import (
|
|||
"github.com/google/cayley/quad"
|
||||
)
|
||||
|
||||
const QuadStoreType = "memstore"
|
||||
|
||||
func init() {
|
||||
graph.RegisterQuadStore("memstore", false, func(string, graph.Options) (graph.QuadStore, error) {
|
||||
graph.RegisterQuadStore(QuadStoreType, false, func(string, graph.Options) (graph.QuadStore, error) {
|
||||
return newQuadStore(), nil
|
||||
}, nil)
|
||||
}, nil, nil)
|
||||
}
|
||||
|
||||
type QuadDirectionIndex struct {
|
||||
|
|
@ -270,3 +272,7 @@ func (qs *QuadStore) NodesAllIterator() graph.Iterator {
|
|||
}
|
||||
|
||||
func (qs *QuadStore) Close() {}
|
||||
|
||||
func (qs *QuadStore) GetType() string {
|
||||
return QuadStoreType
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue