Re: [sqlalchemy] self relationship via intermediate table

2019-03-22 Thread Konstantin Naumov
Great, thank you! I thought that I can use a field of relationship() - “invited_by" in User model for emitting the similar query, but I'm getting an empty list. > On Mar 20, 2019, at 12:55 AM, Mike Bayer wrote: > > On Tue, Mar 19, 2019 at 10:23 AM kosta > wrote:

Re: [sqlalchemy] self relationship via intermediate table

2019-03-22 Thread Mike Bayer
On Fri, Mar 22, 2019 at 10:53 AM Konstantin Naumov wrote: > > Great, thank you! > > I thought that I can use a field of relationship() - “invited_by" in User > model for emitting the similar query, but I'm getting an empty list. take a look at SQL being emitted with echo=True > > > On Mar 20,

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-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