Re: [sqlalchemy] binding parameters in quotes

2019-03-22 Thread Mike Bayer
On Fri, Mar 22, 2019 at 1:59 PM Victor Olex wrote: > > It will however produce parameter for certain string literals in a valid > query. It may be a minute detail, but since you have that regex for detecting > parameters it might well avoid that (unless there is a case). > > >>> from

Re: [sqlalchemy] binding parameters in quotes

2019-03-22 Thread Victor Olex
It will however produce parameter for certain string literals in a valid query. It may be a minute detail, but since you have that regex for detecting parameters it might well avoid that (unless there is a case). >>> from sqlalchemy.sql import text >>> q = text("SELECT * from T WHERE C1 =

Re: [sqlalchemy] binding parameters in quotes

2019-03-21 Thread Mike Bayer
On Thu, Mar 21, 2019 at 3:33 PM Victor Olex wrote: > > Thanks Mike, though the question is valid - why does regex in SQLAlchemy > allow for discovering parameter token inside quotes? Have you seen a > legitimate case for that? the regex in SQLAlchemy is not a SQL parser, it's just putting

Re: [sqlalchemy] binding parameters in quotes

2019-03-21 Thread Victor Olex
Thanks Mike, though the question is valid - why does regex in SQLAlchemy allow for discovering parameter token inside quotes? Have you seen a legitimate case for that? On Wednesday, March 20, 2019 at 9:58:58 AM UTC-4, Mike Bayer wrote: > > On Wed, Mar 20, 2019 at 7:59 AM mdob > > wrote: > >

Re: [sqlalchemy] binding parameters in quotes

2019-03-20 Thread Mike Bayer
On Wed, Mar 20, 2019 at 7:59 AM mdob wrote: > > Hi, > > > Is it correct behavior that parameter placeholders in quotes e.g. SELECT * > FROM Artist WHERE Name LIKE "%:pattern%" are recognized as valid parameters? > > > from sqlalchemy.sql import text > from sqlalchemy.dialects import sqlite >

[sqlalchemy] binding parameters in quotes

2019-03-20 Thread mdob
Hi, Is it correct behavior that parameter placeholders *in quotes* e.g. SELECT * FROM Artist WHERE Name LIKE "%:pattern%" are recognized as valid parameters? from sqlalchemy.sql import text from sqlalchemy.dialects import sqlite from sqlalchemy import create_engine engine =