github.com/cayleygraph/cayley@v0.7.7/graph/nosql/elastic/elastic.go (about) 1 package elastic 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/elastic" 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 = elastic.Name 13 14 func Create(addr string, opt graph.Options) (nosql.Database, error) { 15 return elastic.Dial(addr, gnosql.DefaultDBName, nosql.Options(opt)) 16 } 17 18 func Open(addr string, opt graph.Options) (nosql.Database, error) { 19 return elastic.Dial(addr, gnosql.DefaultDBName, nosql.Options(opt)) 20 }