Sto cercando di fare un'operazione semplice filtro su una query in SQLAlchemy, in questo modo:SQLAlchemy operatore di filtro IN_
q = session.query(Genotypes).filter(Genotypes.rsid.in_(inall))
dove
inall è una lista di stringhe genotipi è mappato a un tavolo : genotipi di classe (oggetto): passaggio
Genotypes.mapper = mapper(Genotypes, kg_table, properties={'rsid': getattr(kg_table.c, 'rs#')})
Questo sembra abbastanza semplice per me, ma ho la f Errore di opo quando eseguo la query precedente facendo 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.
sto facendo il filtraggio in modo errato?
(il db è sqlite)