Add result validation

This commit is contained in:
kortschak 2014-07-31 08:33:18 +09:30
parent 02672da9ad
commit c4e4abbffc
4 changed files with 190 additions and 29 deletions

View file

@ -130,7 +130,7 @@ func (s *Session) BuildJson(result interface{}) {
s.currentQuery.treeifyResult(result.(map[string]graph.Value))
}
func (s *Session) GetJson() (interface{}, error) {
func (s *Session) GetJson() ([]interface{}, error) {
s.currentQuery.buildResults()
if s.currentQuery.isError() {
return nil, s.currentQuery.err