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:
= 2014-11-27 15:32:46 +01:00 committed by panamafrancis
parent 2c74cb1657
commit 35ccfe7677
8 changed files with 130 additions and 51 deletions

View file

@ -35,12 +35,13 @@ import (
)
func init() {
graph.RegisterQuadStore("leveldb", true, newQuadStore, createNewLevelDB)
graph.RegisterQuadStore(QuadStoreType, true, newQuadStore, createNewLevelDB, nil)
}
const (
DefaultCacheSize = 2
DefaultWriteBufferSize = 20
QuadStoreType = "leveldb"
)
var (
@ -495,3 +496,7 @@ func compareBytes(a, b graph.Value) bool {
func (qs *QuadStore) FixedIterator() graph.FixedIterator {
return iterator.NewFixed(compareBytes)
}
func (qs *QuadStore) GetType() string {
return QuadStoreType
}