Exemplo n.º 1
0
 def test_groupby_expr(self):
     self.assertParse(
         qSelect(qp.Wildcard(),
                 group_by=qp.GroupBy([
                     qp.Greater(qp.Function('length', [qp.Column('a')]), qp.Constant(0)),
                     qp.Column('b')], None)),
         "SELECT * GROUP BY length(a) > 0, b;")
Exemplo n.º 2
0
 def test_expr_gt(self):
     self.assertParse(
         qSelect(
             [qp.Target(qp.Greater(qp.Column('a'), qp.Constant(42)),
                        None)]), "SELECT a > 42;")