Commits

Olemis Lang  committed ca328ae

GViz QL : Parenthesis allowed in boolean expressions

  • Participants
  • Parent commits 2ba578f
  • Branches gviz_ql

Comments (0)

Files changed (2)

File trac-dev/gviz/tracgviz/gvizql.py

     elif isinstance(seq, dict):
       seq = Sequence([(seq, True)])
     self.order_def = seq
+    self.sort = [(self._resolve_schema(c, lambda colnm: (colnm, None))[0], is_asc) 
+        for c, is_asc in self.order_def ]
 
   def transform(self, schema, data):
     r"""Sort rows in base result set by evaluating target expressions.

File trac-dev/gviz/tracgviz/testing/test_gvizql.py

          name = Dave
 
       >>> parse("  select dept , lunchTime   group by dept "
-      ...       "   order by dept limit 100", 'cnt', 'cols', 'aggregate')
+      ...       "   order by dept limit 100", 'cnt', 'cols', 'aggregate', 
+      ...                                     'sort')
       ... 
       *****
       * Tokens