9 Replies Latest reply on Mar 25, 2002 5:33 AM by henniges

    JBossQL feature requests

    dsundstrom

      I would like to open up the floor to request for features to JBossQL. Now, before you go hog wild, please consider the following:

      What is the BNF for the feature?

      How will it map to SQL?

      Do all the major database vendors support the mapping?

      Can your feature be implemented using a k look-ahead parser (with a reasonable sized k)?

      Can your feature be implemented using standard EJB-QL or DynamicQL (i.e., is it syntactic sugar)?


      I will implement the most requested features, that I don't hate (I get veto power).

        • 1. Re: JBossQL feature requests
          henniges

          Can you please, please implement LIKE for parameters?
          Most appservers support it ...

          • 2. Re: JBossQL feature requests
            pazu

            LIKE parameters! I know I already suggested this in another thread and someone else already did it here. I'm just voting it more and more :)

            • 3. Re: JBossQL feature requests
              dsundstrom

              Please be more detailed.

              So this would be some thing like:

              user.name like ?1


              I assume that the parameter would have to be a sting value. What about the optional excape clause of the like opperator would that also allow a parameter?

              Would the sql generate be like this:
              to_u.name like ?


              Can I use a standard JDBC prepared statement parameter?



              • 4. Re: JBossQL feature requests
                henniges

                I dont know the details of the implementation, but can´t you simply replace the fixed String-Literal "something" in
                LIKE 'something'
                with a String variable(e.g. ?1) ?

                The variable has to be a String.

                The Borland Enterprise Server 5 interprets
                LIKE ?1
                as if it would be a fixed String-Literal in the EJB-QL

                The optional escape clause may also be a parameter

                • 5. Re: JBossQL feature requests
                  dsundstrom

                  > I dont know the details of the implementation, but
                  > can´t you simply replace the fixed String-Literal
                  > "something" in
                  > LIKE 'something'
                  > with a String variable(e.g. ?1) ?

                  What should the sql that I use to create the prepared statement look like? Should it just be:

                  LIKE ? ESCAPE ?


                  > The Borland Enterprise Server 5 interprets
                  > LIKE ?1
                  > as if it would be a fixed String-Literal in the
                  > EJB-QL

                  Great, go look up what the sql the generate looks like.

                  • 6. Re: JBossQL feature requests
                    henniges

                    > What should the sql that I use to create the prepared
                    > statement look like? Should it just be:

                    > LIKE ? ESCAPE ?

                    yes.

                    I just set up a test projekt to determine what BES5 executes. Already working.
                    Please give me a hint how to trace the SQL it is executing on the hsqldb.
                    No SELECT in default.script ...

                    • 7. Re: JBossQL feature requests
                      dsundstrom

                      > > What should the sql that I use to create the
                      > prepared
                      > > statement look like? Should it just be:
                      >
                      > > LIKE ? ESCAPE ?
                      >
                      > yes.

                      Looks good to me.

                      > I just set up a test projekt to determine what BES5
                      > executes. Already working.
                      > Please give me a hint how to trace the SQL it is
                      > executing on the hsqldb.
                      > No SELECT in default.script ...

                      I don't know to do it from borland. I use jboss to show me the sql it is executing.

                      • 8. Re: JBossQL feature requests
                        henniges

                        I use the hypersonic db within jboss.
                        The BES connects it.
                        My idea was to trace on db side.
                        JBoss logs only SQL statements it creates.
                        Borland has certainly no way to trace internals.

                        • 9. Re: JBossQL feature requests
                          henniges

                          Hi again,

                          I just want to ask if there is a reason why the LIKE feature is still not implemented. This is a very critical point in our development right now. I have to switch to an other appserver if the customer is not able to do a wildcard search.

                          Best regards,
                          Fabian