-
Notifications
You must be signed in to change notification settings - Fork 453
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
Use Oracle date/timestamp literals instead of functions #2957
Conversation
Do you know if this is covered by regression tests? |
It should be. But I think you may broke lower Oracle versions. |
How low do we go? AFAIK it's at least supported in Oracle 10+ , which is really old and out of support. |
/azp run test-oracle |
Azure Pipelines successfully started running 1 pipeline(s). |
There are regression tests for sure... they failed! 😄 They actually failed because they assert the presence of a specific literal expansion, which I've changed, so I need to update the tests accordingly. |
Interestingly I found out that the literal syntax was already used in some tests, see |
/azp run test-oracle |
Azure Pipelines successfully started running 1 pipeline(s). |
Test baselines changed by this PR. Don't forget to merge/close baselines PR after this pr merged/closed. |
Everything is green, only failure is Mac tests that were cancelled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
* [Linux / NETCOREAPP2.1 / Oracle 11g XE] baselines * [Linux / NETCOREAPP2.1 / Oracle 12c] baselines Co-authored-by: Azure Pipelines Bot <azp@linq2db.com>
Oracle supports ANSI SQL dates literal, as well as timestamp literals, which are shorter and more readable then calling parsing functions:
DATE '2020-01-01'
TIMESTAMP '2020-01-01 10:30:00.1234567 +00:00'
Sadly, there's no such literal for dates with times, so this has to stay as
TO_DATE('2020-01-01 10:00:00', 'YYYY-MON-DD HH24:MIN-SS')