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
π bugfix/#6261 - Allow (also for DATETIME) dynamic intervals in DATE_ADD & DATE_SUB for SQLite #6262
Conversation
β¦in DATE_ADD & DATE_SUB for SQLite - π Fix code divergence - β Add related tests
3dc634b
to
843719c
Compare
Please add a functional test that covers your change. Are you sure that this issue applies to SQLite only? |
β¦in DATE_ADD & DATE_SUB for SQLite - β Add related functional test
I added a related functional test. |
Do you have time to do that? It would be wierd to fix this problem for SQLite only. If we remove the SQL assertion from your functional test, it more or less looks like a test that should pass on any platform. |
Here, my pure code analyse, i didn't test functionaly all platforms : β AbstractMySQLPlatform (including all Mysql/Mariadb Platforms)Use the dedicated
|
β¦in DATE_ADD & DATE_SUB for SQLite - π Code review from @derrabus
There hasn't been any activity on this pull request in the past 90 days, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days. |
This pull request was closed due to inactivity. |
Summary
Code inspired from a sibling Pull Request
Question
May i update documentation ?
WEEK
andQUARTER
with a$interval
as non-numeric value. Probably an unknown issue, so maybe the code would throw an error for these specific cases.https://github.com/doctrine/dbal/blob/6a793fb72948c9dec844de57de8cdbc16ff75bec/src/Platforms/SqlitePlatform.php#L160C3-L160C3
In doctrine 4.x.x,
getDateArithmeticIntervalExpression
is redesigned and :DATETIME()
in all cases;getConcatExpression
andquoteStringLiteral
;For
WEEK
andQUARTER
, a method calledmultiplyInterval
is called and may prevent this issue.