Re: [sqlalchemy] LIKE operator and double percent signs

2016-06-15 Thread Jonathan Rogers
On 06/15/2016 01:37 PM, Mike Bayer wrote: > > > On 06/15/2016 01:34 PM, Mike Bayer wrote: >> >> >> On 06/15/2016 12:40 PM, Jonathan Rogers wrote: >>> On Friday, February 25, 2011 at 10:27:34 AM UTC-5, Michael Bayer wrote: >>> >>> >>> On Feb 25, 2011, at 10:20 AM, Jon Nelson wrote: >>> >>>

Re: [sqlalchemy] LIKE operator and double percent signs

2016-06-15 Thread Mike Bayer
On 06/15/2016 01:34 PM, Mike Bayer wrote: On 06/15/2016 12:40 PM, Jonathan Rogers wrote: On Friday, February 25, 2011 at 10:27:34 AM UTC-5, Michael Bayer wrote: On Feb 25, 2011, at 10:20 AM, Jon Nelson wrote: > On Fri, Feb 25, 2011 at 9:15 AM, Michael Bayer

Re: [sqlalchemy] LIKE operator and double percent signs

2016-06-15 Thread Mike Bayer
On 06/15/2016 12:40 PM, Jonathan Rogers wrote: On Friday, February 25, 2011 at 10:27:34 AM UTC-5, Michael Bayer wrote: On Feb 25, 2011, at 10:20 AM, Jon Nelson wrote: > On Fri, Feb 25, 2011 at 9:15 AM, Michael Bayer wrote: >> % is significant in

Re: [sqlalchemy] LIKE operator and double percent signs

2016-06-15 Thread Jonathan Rogers
On Friday, February 25, 2011 at 10:27:34 AM UTC-5, Michael Bayer wrote: > > > On Feb 25, 2011, at 10:20 AM, Jon Nelson wrote: > > > On Fri, Feb 25, 2011 at 9:15 AM, Michael Bayer > wrote: > >> % is significant in DBAPIs like postgresql and mysqldb where pyformat > and

[sqlalchemy] LIKE operator and double percent signs

2011-02-25 Thread Jon Nelson
I've been wondering something about sqlalchemy - let's say I have a text column foo. Being able to do foo.startswith(some_value), foo.endswith, foo.like and so on is really nice. However, I've noticed that the SQL that is emitted contains two percent signs. However, I thought only one was

Re: [sqlalchemy] LIKE operator and double percent signs

2011-02-25 Thread Michael Bayer
% is significant in DBAPIs like postgresql and mysqldb where pyformat and format: %(foo)s and %s, are allowed, so % must be doubled. On Feb 25, 2011, at 8:53 AM, Jon Nelson wrote: I've been wondering something about sqlalchemy - let's say I have a text column foo. Being able to do

Re: [sqlalchemy] LIKE operator and double percent signs

2011-02-25 Thread Jon Nelson
On Fri, Feb 25, 2011 at 9:15 AM, Michael Bayer mike...@zzzcomputing.com wrote: % is significant in DBAPIs like postgresql and mysqldb where pyformat and format:  %(foo)s and %s, are allowed, so % must be doubled. So does psycopg2 send '%' or '%%' ? It seems to me that if the strings are held

Re: [sqlalchemy] LIKE operator and double percent signs

2011-02-25 Thread Michael Bayer
On Feb 25, 2011, at 10:20 AM, Jon Nelson wrote: On Fri, Feb 25, 2011 at 9:15 AM, Michael Bayer mike...@zzzcomputing.com wrote: % is significant in DBAPIs like postgresql and mysqldb where pyformat and format: %(foo)s and %s, are allowed, so % must be doubled. So does psycopg2 send