示例#1
0
文件: query.go 项目: e4x/cayley
func Run(q string, ses query.HTTP) (interface{}, error) {
	c := make(chan interface{}, 5)
	go ses.Execute(q, c, 100)
	for res := range c {
		ses.Collate(res)
	}
	return ses.Results()
}
示例#2
0
func runGremlinQuery(q string, session cayleyQuery.HTTP) (interface{}, error) {
	c := make(chan interface{}, 5)
	go session.Execute(q, c, 100)
	for result := range c {
		session.Collate(result)
	}

	return session.Results()
}