GraphLayer 图形数据库的适配器 项目简介
GraphLayer,中文名图层,图形数据库的适配器,可将业务数据持久化到图形数据库(neo4j等)。并提供增、删、改、查、事务等操作。基本示例:package main
import (
"log"
_ "github.com/cloudcube/GraphLayer" //github.com
//git.oschina.net/cloudcube/graphlayer //oschina.net
)
func main(){
session,err:=Dial(dbConfig)
if err!=nil{
log.Println(err)
}
//create a node
data:=map[string]interface{}{
"name":"test",
"key":1,
}
node1,err:=session.CreateNode(data)
if err! = nil{
log.Println(err)
}
......
}
import (
"log"
_ "github.com/cloudcube/GraphLayer" //github.com
//git.oschina.net/cloudcube/graphlayer //oschina.net
)
func main(){
session,err:=Dial(dbConfig)
if err!=nil{
log.Println(err)
}
//create a node
data:=map[string]interface{}{
"name":"test",
"key":1,
}
node1,err:=session.CreateNode(data)
if err! = nil{
log.Println(err)
}
......
}