Commits

Olemis Lang committed 7de29ed

GViz QL : Execution order changed group by, pivot, where, ... => where, group by, pivot, ...

Comments (0)

Files changed (2)

trac-dev/gviz/TODO

 
 X GViz API QL: Implement `order by` clause.
 
+- GViz API QL: Implement `group by` clause.
+
 - Add `limit` parameter for history methods in VersionControlRPC.
 
 - Implement data source provider for Ticket->Query
 
-- GViz API QL: Add tasks to support `group by`, 
-  `pivot`, and `options` clauses.
+- GViz API QL: Add tasks to support `pivot`, and `options` clauses.
 
 - Allow data source providers to control the details needed to handle 
   queries.

trac-dev/gviz/tracgviz/gvizql.py

   ... as well as evaluation order.
 
   >>> ','.join(ct.get_props('keyw') for ct in GVizQLClauseType.itereval())
-  'from,group by,pivot,where,order by,offset,limit,select,format,options,label'
+  'from,where,group by,pivot,order by,offset,limit,select,format,options,label'
   """
   CLAUSE_CACHE = dict()
   SYNTAX_ORDER = list()
         " from the language.")
 
 class GVizWhereClause(GVizQLClauseHandler):
-  _PROPS = {'idx_syntax' : 2, 'idx_eval': 3, 'keyw' : 'where'}
+  _PROPS = {'idx_syntax' : 2, 'idx_eval': 1, 'keyw' : 'where'}
   KEYWORDS = ('where',)
 
   def __init__(self, expr):
     return schema, new_data
 
 class GVizGroupByClause(GVizQLClauseHandler):
-  _PROPS = {'idx_syntax' : 3, 'idx_eval': 1, 'keyw' : 'group by'}
+  _PROPS = {'idx_syntax' : 3, 'idx_eval': 2, 'keyw' : 'group by'}
   KEYWORDS = ('group', 'by')
 
   def __init__(self, seq):
     self.unsupported()
 
 class GVizPivotClause(GVizQLClauseHandler):
-  _PROPS = {'idx_syntax' : 4, 'idx_eval': 2, 'keyw' : 'pivot'}
+  _PROPS = {'idx_syntax' : 4, 'idx_eval': 3, 'keyw' : 'pivot'}
   KEYWORDS = ('pivot',)
 
   def __init__(self, seq):