On 06/28/13 11:55, Simon King wrote:
> When you write this:
>>>> e.execute(t.select(t.c.a.like('\\')))
> ...the pattern that you are sending to SA is a single backslash, and
> SA is forwarding that directly to PG. What do you think the behaviour
> should be in this case?
>
Well, I'd prefer sqlalchemy did not leak such quirks and escape strings
sent to .like() accordingly.
In other words, I want the two to be equivalent:
>>> e.execute(t.select(t.c.a.like('\\')))
>>> e.execute(t.select(t.c.a == '\\'))
Otherwise, I'll have to implement a psql_escape_for_like function and
make it run like so:
>>> e.execute(t.select(t.c.a.like(psql_escape_for_like(whatever))))
I wouldn't really prefer to go down this route -- it's ugly!..
Best,
Burak
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/groups/opt_out.