Move query interface definitions into query
This commit is contained in:
parent
38f7b79761
commit
a6cf432313
7 changed files with 74 additions and 70 deletions
|
|
@ -23,6 +23,7 @@ import (
|
|||
|
||||
"github.com/google/cayley/graph"
|
||||
"github.com/google/cayley/graph/iterator"
|
||||
"github.com/google/cayley/query"
|
||||
)
|
||||
|
||||
type Session struct {
|
||||
|
|
@ -62,13 +63,13 @@ func (m *Session) GetQuery(input string, output_struct chan map[string]interface
|
|||
output_struct <- output
|
||||
}
|
||||
|
||||
func (s *Session) InputParses(input string) (graph.ParseResult, error) {
|
||||
func (s *Session) InputParses(input string) (query.ParseResult, error) {
|
||||
var x interface{}
|
||||
err := json.Unmarshal([]byte(input), &x)
|
||||
if err != nil {
|
||||
return graph.ParseFail, err
|
||||
return query.ParseFail, err
|
||||
}
|
||||
return graph.Parsed, nil
|
||||
return query.Parsed, nil
|
||||
}
|
||||
|
||||
func (s *Session) ExecInput(input string, c chan interface{}, limit int) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue