Esempio n. 1
0
File: query.go Progetto: 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()
}
Esempio n. 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()
}