Uploaded image for project: 'Doctrine 2 - ORM'
  1. Doctrine 2 - ORM
  2. DDC-3

Support for CASE expressions in DQL

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.2
    • Component/s: ORM
    • Security Level: All
    • Labels:
      None

      Description

      CASE expressions should be supported in DQL similarly to the definition found in 4.6.17.3 of the JPA 2.0 specification.

      Steps: 1) Adjust the BNF
      2) Adjust the Parser according to the changed BNF
      3) Adjust the SqlWalker? to produce the correct SQL

        Issue Links

          Activity

          Hide
          romanb Roman S. Borschel added a comment -

          test

          Show
          romanb Roman S. Borschel added a comment - test
          Hide
          romanb Roman S. Borschel added a comment -

          The BNF and Parser has already been largely prepared for that.

          Show
          romanb Roman S. Borschel added a comment - The BNF and Parser has already been largely prepared for that.
          Hide
          guilhermeblanco Guilherme Blanco added a comment -

          Added all Lexer keywords to it. It was breaking some use cases.

          Parsing can be easily done. How far is Walker generation far from an acceptable state?

          Show
          guilhermeblanco Guilherme Blanco added a comment - Added all Lexer keywords to it. It was breaking some use cases. Parsing can be easily done. How far is Walker generation far from an acceptable state?
          Hide
          beberlei Benjamin Eberlei added a comment -

          its a 2.1 change, so we can delay that for now or not? adding the keyword is a good idea though, maybe we should think about some other keywords that we potentially need in the future?

          Show
          beberlei Benjamin Eberlei added a comment - its a 2.1 change, so we can delay that for now or not? adding the keyword is a good idea though, maybe we should think about some other keywords that we potentially need in the future?
          Hide
          romanb Roman S. Borschel added a comment -

          I will try to finish this for 2.1.

          Show
          romanb Roman S. Borschel added a comment - I will try to finish this for 2.1.
          Show
          guilhermeblanco Guilherme Blanco added a comment - In this commit: https://github.com/doctrine/doctrine2/commit/816ce41f638d28934c79a12ef27f954124b2639e And documented in this commit: https://github.com/doctrine/orm-documentation/commit/189c729f15d2fafecf92662cad9553c2ec3dccd7 This support was FINALLY included. =)

            People

            • Assignee:
              guilhermeblanco Guilherme Blanco
              Reporter:
              romanb Roman S. Borschel
            • Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: