spine-tools / Spine-Database-API

Database interface to Spine generic data model
https://www.tools-for-energy-system-modelling.org/
GNU Lesser General Public License v3.0
6 stars 5 forks source link

Query.filter() should accept multiple criteria #267

Closed soininen closed 11 months ago

soininen commented 11 months ago

This used to work:

with DatabaseMapping(url) as db_map:
    db_map.query(db_map.wide_entity_sq).filter(db_map.entity_sq.c.name == "my entity", db_map.entity_sq.c.entity_class_name == "the other class").all()

Currently, it does not since filter() accepts only a single criterion.