[sqlalchemy] mysql dialect and contains

2013-04-17 Thread Randy Shults
Can't seem to find any reference to anyone else having this issue, so it must be something I'm doing incorrectly. In Mysql, the contains operator doesnt seem to be translated properly by the dialect. Docs state the following: contains(other, **kwargs)¶ Implement the ‘contains’

Re: [sqlalchemy] mysql dialect and contains

2013-04-17 Thread Michael Bayer
concat is a function that's specific to MySQL. So if you create an expression against contains() without any specification that MySQL is in use, you get a LIKE. When the construct is compiled against the MySQL dialect, same as if it is invoked by an engine that's associated with MySQL, you

Re: [sqlalchemy] mysql dialect and contains

2013-04-17 Thread Randy Shults
Awesome thank you. So even though the Table object is attached to the metadata that was bound to the engine that uses a mysql connection, I have to explicitly set the dialect and compile when printing out the literal sql. When I execute, is this handled seamlessly by the engine? Or do I need

Re: [sqlalchemy] mysql dialect and contains

2013-04-17 Thread Michael Bayer
On Apr 17, 2013, at 3:37 PM, Randy Shults randy.c.shu...@gmail.com wrote: Awesome thank you. So even though the Table object is attached to the metadata that was bound to the engine that uses a mysql connection, I have to explicitly set the dialect and compile when printing out the

Re: [sqlalchemy] mysql dialect and contains

2013-04-17 Thread Randy Shults
Thank you. That makes sense. On Wednesday, April 17, 2013 at 4:27 PM, Michael Bayer wrote: On Apr 17, 2013, at 3:37 PM, Randy Shults randy.c.shu...@gmail.com (mailto:randy.c.shu...@gmail.com) wrote: Awesome thank you. So even though the Table object is attached to the metadata