This replaces the manual parser with a new parser constructed with pyparsing. The parser returns a ParseResults object, which is then recursively executed by _execute_query_list. In combination with a change in named_query_parameterized, this also allows to run encapsulated queries, like this one:
macaddress(ipaddress=most_used(ipaddress));
The parser isn't fully documented yet and currently allows some constructs that aren't supposed to be accepted. Also, nested queries where the inner query produces multiple results also produce unexpected results for now.
However, our tests show no regressions, and I plan to address the remaining flaws in an upcoming pull request. We were already running late to implement this, so I decided to get this pull request out as quickly as possible.
P.S.:
Error reporting for queries will also get further improvements. Currently, query mode only reports at which character an error did occur (you can test that by issuing an invalid query in query mode), but not the exact problem the parser detected. Internally issued named queries (i.e. not going through query mode) currently produce hard to read exceptions when containing errors.
This replaces the manual parser with a new parser constructed with pyparsing. The parser returns a ParseResults object, which is then recursively executed by _execute_query_list. In combination with a change in named_query_parameterized, this also allows to run encapsulated queries, like this one:
macaddress(ipaddress=most_used(ipaddress));
The parser isn't fully documented yet and currently allows some constructs that aren't supposed to be accepted. Also, nested queries where the inner query produces multiple results also produce unexpected results for now.
However, our tests show no regressions, and I plan to address the remaining flaws in an upcoming pull request. We were already running late to implement this, so I decided to get this pull request out as quickly as possible.
P.S.:
Error reporting for queries will also get further improvements. Currently, query mode only reports at which character an error did occur (you can test that by issuing an invalid query in query mode), but not the exact problem the parser detected. Internally issued named queries (i.e. not going through query mode) currently produce hard to read exceptions when containing errors.
This replaces the manual parser with a new parser constructed with pyparsing. The parser returns a ParseResults object, which is then recursively executed by _execute_query_list. In combination with a change in named_query_parameterized, this also allows to run encapsulated queries, like this one:
The parser isn't fully documented yet and currently allows some constructs that aren't supposed to be accepted. Also, nested queries where the inner query produces multiple results also produce unexpected results for now.
However, our tests show no regressions, and I plan to address the remaining flaws in an upcoming pull request. We were already running late to implement this, so I decided to get this pull request out as quickly as possible.
P.S.: Error reporting for queries will also get further improvements. Currently, query mode only reports at which character an error did occur (you can test that by issuing an invalid query in query mode), but not the exact problem the parser detected. Internally issued named queries (i.e. not going through query mode) currently produce hard to read exceptions when containing errors.
This is a welcomed change. I will merge this PL and wait for improvements in another PL.