Re: [sqlalchemy] Global pre-filter of queries containing a given model.

2018-10-17 Thread Mike Bayer
On Wed, Oct 17, 2018 at 11:57 AM Daniel Cardin wrote: > > I would like add a global filter to all queries emitted against a particular > table. In particular, its important that it doesn't require changes to > existing queries; and it would be nice if there was an escape hatch. > > I'm aware of

[sqlalchemy] Global pre-filter of queries containing a given model.

2018-10-17 Thread Daniel Cardin
I would like add a global filter to all queries emitted against a particular table. In particular, its important that it doesn't *require* changes to existing queries; and it would be nice if there was an escape hatch. I'm aware of the following 2 recipes that googling this returns:

[sqlalchemy] Cannot create primary key on JSONB column in Sqlalchemy with postgres

2018-10-17 Thread Vipin M
Hello! below is my script class User(Base): __tablename__ = "users" __table_args__ = ( PrimaryKeyConstraint('date', 'country', 'product', 'info'), {"schema":"shm"} ) date = Column('date', Date) pipeline_versions = Column('pipeline_versions', ARRAY(TEXT)) country =

[sqlalchemy] Cannot create primary key on JSONB column in Sqlalchemy with postgres

2018-10-17 Thread Vipin M
Hello! below is my script class User(Base): __table_args__ = {"schema":"shm"} __tablename__ = "users" __table_args__ = ( PrimaryKeyConstraint('date', 'country', 'product', 'info'), {"schema":"royalty_input"} ) date = Column('date', Date) pipeline_versions =

[sqlalchemy] Cannot create primary key on JSONB column in Sqlalchemy with postgres

2018-10-17 Thread Vipin M
Hello! below is my script class User(Base): __table_args__ = {"schema":"shm"} __tablename__ = "users" __table_args__ = ( PrimaryKeyConstraint('date', 'country', 'product', 'info'), {"schema":"royalty_input"} ) date = Column('date', Date) pipeline_versions =