Custom DQL functions in ORDER BY clause

Showing 1-2 of 2 messages
Custom DQL functions in ORDER BY clause carstep 3/29/12 12:47 PM
Hi there,

I've made a custom lpad implementation for MySQL and PgSQL platform
and would like to use them in the ORDER BY clause (statement) of a
SELECT statement. I couldn't run it because the Parser always gave me
Syntax error on the opening parentesis of the LPAD function.

By the way how to provide an integer value to a custom function? I
currently use StringPrimary but as of PgSQL is more strict on that so
any hints would be appretiated.

Is there any progress in this direction or have to use a workaround by
doing an lpad column and referencing on that in the ORDER BY clause?

Are there any hints to extend the lexer or parser in this direction?

wbr
Sandor
Hungary
Re: [doctrine-user] Custom DQL functions in ORDER BY clause Marco Pivetta 3/29/12 1:31 PM
For the ORDER BY, you can SELECT that field and then reuse it in the ORDER BY clause...

Not sure about the problem with int values...

Marco Pivetta

http://twitter.com/Ocramius     

http://marco-pivetta.com    




--
You received this message because you are subscribed to the Google Groups "doctrine-user" group.
To post to this group, send email to doctri...@googlegroups.com.
To unsubscribe from this group, send email to doctrine-use...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/doctrine-user?hl=en.