Move query interface definitions into query

This commit is contained in:
kortschak 2014-07-31 08:52:24 +09:30
parent 38f7b79761
commit a6cf432313
7 changed files with 74 additions and 70 deletions

View file

@ -23,6 +23,7 @@ import (
"github.com/robertkrimen/otto"
"github.com/google/cayley/graph"
"github.com/google/cayley/query"
)
type Session struct {
@ -81,13 +82,13 @@ func (s *Session) GetQuery(input string, output_struct chan map[string]interface
s.queryShape = nil
}
func (s *Session) InputParses(input string) (graph.ParseResult, error) {
func (s *Session) InputParses(input string) (query.ParseResult, error) {
script, err := s.env.Compile("", input)
if err != nil {
return graph.ParseFail, err
return query.ParseFail, err
}
s.script = script
return graph.Parsed, nil
return query.Parsed, nil
}
func (s *Session) SendResult(result *GremlinResult) bool {