I have simple query using SqlAlchemy ORM:
query = DBsession.query(AssetsItem).filter_by(
AssetsItem.id > 10,
AssetsItem.country = 'England'
)
How can i get length of my query result. I want to know how much AssetsItem i would get by this query
query = DBsession.query(AssetsItem).filter_by(
AssetsItem.id > 10,
AssetsItem.country = 'England'
)
your_count = query.count()
Documentation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With