Re: [sqlalchemy] Parallel connection attempts in QueuePool

2013-12-07 Thread Sunil
On Saturday 07 December 2013 06:32 AM, Michael Bayer wrote: [...] OK more or less that, please review my commit at https://github.com/zzzeek/sqlalchemy/commit/d1cc78479d988bd9acbcf395483d2130b0873b1c which moves handling of “overflow” into _inc_overflow() and _dec_overflow() methods - the

RE: [sqlalchemy] Re: Many2many, referential integrity and introspection

2013-12-07 Thread Alexey Vihorev
Here is the full code: from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import * from sqlalchemy.orm import relationship, sessionmaker Base = declarative_base() product_tags = Table( 'product_tags', Base.metadata, Column('product_id', Integer,

Re: [sqlalchemy] Many2many, referential integrity and introspection

2013-12-07 Thread Michael Bayer
On Dec 7, 2013, at 2:22 PM, Alexey Vihorev viho...@gmail.com wrote: Here is the full code: from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import * from sqlalchemy.orm import relationship, sessionmaker Base = declarative_base() product_tags = Table(

RE: [sqlalchemy] Many2many, referential integrity and introspection

2013-12-07 Thread Alexey Vihorev
In my case, table 'tags' is editable by users, so I want to avoid them deleting a tag that's in use by any product. As it is now, they can delete the tag and the system just erases all traces of it from all products. From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com] On

Re: [sqlalchemy] Many2many, referential integrity and introspection

2013-12-07 Thread Michael Bayer
On Dec 7, 2013, at 6:18 PM, Alexey Vihorev viho...@gmail.com wrote: In my case, table ‘tags’ is editable by users, so I want to avoid them deleting a tag that’s in use by any product. deleting….using a SQL DELETE statement directly? If you use real foreign keys then the database will