Fix #21 and change the MQL semantics slightly to match the original MQL

This commit is contained in:
Barak Michener 2014-06-29 21:20:54 -04:00
parent 18c56be950
commit 18c4c555b5
6 changed files with 42 additions and 23 deletions

View file

@ -32,10 +32,13 @@ type Query struct {
queryResult map[ResultPath]map[string]interface{}
results []interface{}
resultOrder []string
isError bool
err error
}
func (q *Query) isError() bool {
return q.err != nil
}
func (q *Query) copyPathStructure(path Path) map[string]interface{} {
output := make(map[string]interface{})
for k, v := range q.queryStructure[path] {
@ -106,6 +109,5 @@ func NewQuery(ses *Session) *Query {
q.results = make([]interface{}, 0)
q.resultOrder = make([]string, 0)
q.err = nil
q.isError = false
return &q
}