Review main Merged

85372[FEATURE] Add `if()` expression support to `ExpressionBuilder`

Stefan Bürk CR +2 V +2 Normal +176 −0 updated 07/26/24, 07:49

Commit message

In some cases more complex database queries needs to be
constructed to archieve a dedicated goal. This includes
the ability to use conditional based statements.

This change adds a cross database vendor compatible `if()`
expression method to the TYPO3 ExpressionBuilder to support
conditional based statement in database queries.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Georg Ringer +1
    • Anja Leichsenring +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Georg Ringer +1
    • Anja Leichsenring +1
    • core-ci +1 CI

Issues 2

Files 4

Review log 1925

  1. Stefan Bürk uploaded patch set 1 07/25/24, 10:27

  2. core-ci voted on patch set 1 V +1 07/25/24, 10:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62169

  3. Stefan Bürk rebased onto patch set 2 V +1 07/25/24, 17:43

  4. core-ci voted on patch set 2 V +1 07/25/24, 17:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62206

  5. Stefan Bürk uploaded patch set 3 V +1 07/25/24, 18:59

  6. core-ci voted on patch set 3 V +1 07/25/24, 19:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62220

  7. Stefan Bürk wrote 07/25/24, 19:16

    Topic set to doctrine/dbal
  8. Stefan Bürk wrote 07/25/24, 19:16

    Topic doctrine/dbal removed
  9. Stefan Bürk wrote 07/25/24, 19:16

    Topic set to doctrine-dbal
  10. Christian Kuhn voted on patch set 3 CR -1 07/25/24, 20:19

  11. Christian Kuhn uploaded patch set 4 CR -1 V +1 07/25/24, 20:32

  12. core-ci voted on patch set 4 V +1 07/25/24, 20:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62226

  13. Christian Kuhn uploaded patch set 5 V +1 07/25/24, 20:37

  14. Christian Kuhn voted on patch set 5 CR +1 V +1 07/25/24, 20:40

  15. core-ci voted on patch set 5 V +1 07/25/24, 20:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62227

  16. Anja Leichsenring voted on patch set 5 CR +1 V +1 07/26/24, 04:42

  17. Garvin Hicking commented on patch set 5 07/26/24, 05:27

    ExpressionBuilder.php:1004

    Is "literal" instead of "quote" here (and in the docs) a better way to keep it consistent?

    ExpressionBuilder.php:1013

    missing ' after page-is-not-visible

    Feature-104482-IfSupportInExpressionBuilder.rst:78

    Add a note here indicating that escaping on all parts of the condition and the then/else parts is required?
  18. Stefan Bürk uploaded patch set 6 CR +1 V +1 07/26/24, 07:30

  19. Stefan Bürk commented on patch set 6 07/26/24, 07:30

    ExpressionBuilder.php:1004 Reply

    ExpressionBuilder->literal() is just calling QueryBuilder->quote() anyway. Both legit. Personally I never use ExpressionBuilder->literal().

    ExpressionBuilder.php:1013 Reply

    Done

    Feature-104482-IfSupportInExpressionBuilder.rst:78 Reply

    Done
  20. core-ci voted on patch set 6 V +1 07/26/24, 07:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62256

  21. Anja Leichsenring voted on patch set 6 CR +1 V +1 07/26/24, 07:40

  22. Georg Ringer voted on patch set 6 CR +1 V +1 07/26/24, 07:46

  23. Stefan Bürk voted on patch set 6 CR +2 V +2 07/26/24, 07:46

  24. Stefan Bürk merged patch set 7 07/26/24, 07:47

  25. Georg Ringer voted on patch set 6 CR +2 V +2 07/26/24, 07:49