setResultsName does not always work?
Brought to you by:
ptmcg
playing with examples/select_parser.py
"select a, b from test_table where (1=1 or 2=3) and b='yes' group by zx having b=2 order by 1"
results in
['SELECT', [['a'], ['b']], 'FROM', 'test_table', 'WHERE', [[['1', '=', '1'], 'OR', ['2', '=', '3']], 'AND', ['b', '=', 'yes']], 'GROUP', 'BY', [['zx']], 'HAVING', ['b', '=', '2'], 'ORDER', 'BY', [['1']]]
- columns: [['a'], ['b']]
- from: test_table
- having_expr: ['b', '=', '2']
- order_by_terms: [['1']]
- table: ['test_table']
- where_expr: [[['1', '=', '1'], 'OR', ['2', '=', '3']], 'AND', ['b', '=', 'yes']]
I'm missing "group_by_terms". Is it me or is it a bug?
It's a bug! Here is the fixed code, to be released in 2.2.1: