github.com/cayleygraph/cayley@v0.7.7/graph/nosql/mongo/mongo.go (about)

     1  package mongo
     2  
     3  import (
     4  	"github.com/cayleygraph/cayley/graph"
     5  	"github.com/hidal-go/hidalgo/legacy/nosql"
     6  	"github.com/hidal-go/hidalgo/legacy/nosql/mongo"
     7  	//import hidal-go first so the registration of the no sql stores occurs before quadstore iterates for registration
     8  	gnosql "github.com/cayleygraph/cayley/graph/nosql"
     9  	
    10  )
    11  
    12  const Type = mongo.Name
    13  
    14  func Create(addr string, opt graph.Options) (nosql.Database, error) {
    15  	return mongo.Dial(addr, gnosql.DefaultDBName, nosql.Options(opt))
    16  }
    17  
    18  func Open(addr string, opt graph.Options) (nosql.Database, error) {
    19  	return mongo.Dial(addr, gnosql.DefaultDBName, nosql.Options(opt))
    20  }