[sqlalchemy] Re: Hybrid expressions and element in arrays ala lists in Python

2016-12-27 Thread Alexander O'Donovan-Jones
I worked out a solution that allowed me to get the behaviour I was looking for, but instead of using func.array() I ended up using the postgresql.dialect module and it's array class: from sqlalchemy.dialects.postgresql import TIMESTAMP, array @travel_dates.expression def travel_dates(cls):

Re: [sqlalchemy] Limiting queries from single-table inheritance declarative models

2016-12-27 Thread Tucker Beck
Mike (or whoever else might have insight): I used the pattern above, and it worked great until I tried use it for a really large table that I was querying and filtering by the hybrid property. Something like this: query(HybridModel).filter_by(hybrid_type_name='alpha') The resulting query does a s