Próbuję wykonać proste działanie filtru na kwerendzie w SQLAlchemy, tak:SQLAlchemy operator filtr in_
q = session.query(Genotypes).filter(Genotypes.rsid.in_(inall))
gdzie
inall jest listą ciągów genotypy są odwzorowywane na stole : klasy genotypy (object): wprost
Genotypes.mapper = mapper(Genotypes, kg_table, properties={'rsid': getattr(kg_table.c, 'rs#')})
To wydaje się dość proste do mnie, ale ja dostaję f ollowing błąd podczas wykonywania powyższej kwerendy wykonując q.first()
:
"sqlalchemy.exc.OperationalError: (OperationalError) too many SQL variables u'SELECT" followed by a list of the 1M items in the inall list. But they aren't supposed to be SQL variables, just a list whose membership is the filtering criteria.
robię filtrowanie nieprawidłowo?
(db jest SQLite)