summaryrefslogtreecommitdiff
path: root/cpp/src/tests/Selector.cpp
Commit message (Collapse)AuthorAgeFilesLines
* QPID-4558: C++ broker selectors: Improved error reportingAndrew Stitcher2013-03-201-0/+6
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1458610 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4624: Implement IN operator for C++ broker selectorsAndrew Stitcher2013-03-181-0/+7
| | | | | | | | | - Implemented parser for IN operator - Implement In operator evaluator and unit tests - Syntax is a bit wider than the spec allowing full expressions in the contents of the IN expression not just strings. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1457998 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4621: Arithmetic operations for C++ broker selectorsAndrew Stitcher2013-03-181-68/+153
| | | | | | | | | | | | | | | - Rearranged Syntax and parser to support arithmetic - Implemented arithmetic syntax - Implemented arithmetic operators - Added some tests for arithmetic operations - Added explicit lexical tokens for all the comparison and arithmetic operations - Added the missing ',' token for us in the 'IN' comparison - Rearranged the lexer so that everything is not uniformly inside the hand crafted state machine. - Moved a bunch of testing code from the tokeniser to the unit test (much of this code might actually not be very useful anymore) git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1457912 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4623: Fixed the unit test for unknown valuesAndrew Stitcher2013-03-151-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1457062 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4623: Fixed unknown semantics of "between" comparisonAndrew Stitcher2013-03-151-0/+5
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1457058 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4623: Implemented parser and evaluator for BETWEEN comparisonsAndrew Stitcher2013-03-151-0/+7
| | | | | | | | | - The implementation uses a custom between operator rather than desugaring the syntax, because we can avoid repeated evaluation of the expression bing compared that way (this will also be true for the IN comparison operator). git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1457029 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4622: Implement 'LIKE' string matching operations in selectorAndrew Stitcher2013-03-141-0/+11
| | | | | | | | | - This implements <expression> [NOT] LIKE <string> [ESCAPE <character>] - The implementation uses the posix regex library (in BRE mode) on Unix systems - It uses std::tr1::regex on Visual Studio (in std::tr1::regex::basic mode) git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1456561 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4558: Selectors for C++ broker - fixes windows builds and 32-bit buildsCharles E. Rolke2013-03-071-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1453898 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4558: Selectors for C++ brokerAndrew Stitcher2013-03-061-6/+2
| | | | | | | - Changed unit test code that relied on non C++03 feature Windows compiler spotted this problem. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1453536 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4558: Selectors for C++ brokerAndrew Stitcher2013-03-041-45/+143
| | | | | | | | | | | | | - Added numeric and boolean values * To literals and identifier values * To the code that extracts values from message properties - Added the full set of comparison operators - Implemented full "unknown" semantics for all operators. - Implemented extended "is null" and "is not null" operators that allow expressions as well as just identifiers. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1452525 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4558: Selectors for C++ brokerAndrew Stitcher2013-03-041-0/+220
- Initial Selectors implemented: * Only string values supported (no numerics or bools) - Parses and executes the forms: * A=B * A<>B * I IS NULL * I IS NOT NULL - where A, B are strings or identifiers - I is an identifier * Conditional expressions can include the AND, OR and NOT operators and use parentheses. - Only limited special identifiers return useful values (although they are all recognised) - Unit tests for selector language git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1452523 13f79535-47bb-0310-9956-ffa450edef68