(note:  please keep answering the emails!  this is great, I just happen to have 
a little bit of net access here..)

here's how you can turn any expression into any other type for Python-side 
operator or data coercion purposes (that is, like a CAST but doesn't render 
CAST on the database):

from sqlalchemy import type_coerce

type_coerce(any_expression, String) + type_coerce(any_other_expression, String)

you'll get <any expression> || <any other expression> no matter what the two 
sides are.

(if you don't, then *that's* the bug)


On Aug 30, 2013, at 1:34 PM, Jonathan Vanasco <jonat...@findmeon.com> wrote:

> This might be a bug then.
> 
> String || Integer ; Integer || String
> - PostgreSQL and sqlite both allow for a sting & integer to be concat 
> together into a string.  Order does not matter.
> 
> Integer || Integer
> - PostgreSQL will error if 2 ints are concat together.
> - sqlite seems to cast both into a string, and returns a string ( i.e. 
> "Select 1 || 2" == "12" == str(12) )
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sqlalchemy" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sqlalchemy+unsubscr...@googlegroups.com.
> To post to this group, send email to sqlalchemy@googlegroups.com.
> Visit this group at http://groups.google.com/group/sqlalchemy.
> For more options, visit https://groups.google.com/groups/opt_out.

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

Reply via email to