Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supporting Oracle operators like '>=' or '<=' with embedded whitespace. #258

Conversation

davelindquist-egistix
Copy link
Contributor

Added ability to have operators like '>=' or '<=' separated by a space.

This includes:

  • Modifying the JJT syntax to support the 'space in the middle' versions of operators (any quantity of whitespace is supported).
  • Modifying the various operators to inherit from a new 'ComparisonOperator' class, which handles the (previously NotEqualsTo-only) logic for capturing the form of the operator.
  • Giving each of the various operators a constructor that accepts the syntax used.
  • Modifying TestUtils to strip comments out before comparing SQL text (necessary because condition07.sql is now passing, and has a comment).
  • Updating SpecialOracleTest to indicate 130 tests passing now (condition7.sql now passes).
  • Adding a new test specifically for operators into SpecialOracleTest.

NOTE: Because the "! =" form of the 'not equals' operator means something different in PostgresSQL (factorial of previous argument + equals), we do NOT include that case.

This includes:
* Modifying the JJT syntax to support the 'space in the middle' versions
  of operators (any quantity of whitespace is supported).
* Modifying the various operators to inherit from a new
  'ComparisonOperator' class, which handles the (previously NotEqualsTo-
  only) logic for capturing the form of the operator.
* Giving each of the various operators a constructor that accepts the
  syntax used.
* Modifying TestUtils to strip comments out before comparing SQL text
  (necessary because condition07.sql is now passing, and has a comment).
* Updating SpecialOracleTest to indicate 130 tests passing now
  (condition7.sql now passes).
* Adding a new test specifically for operators into SpecialOracleTest.

NOTE: Because the "! =" form of the 'not equals' operator means something
different in PostgresSQL (factorial of previous argument + equals), we do
NOT include that case.
@coveralls
Copy link

coveralls commented May 4, 2016

Coverage Status

Coverage decreased (-0.1%) to 83.506% when pulling 9886b02 on davelindquist-egistix:whitespace-inside-oracle-operators into 5714516 on JSQLParser:master.

@wumpz wumpz merged commit 0073d11 into JSQLParser:master May 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants