pygtfs icon indicating copy to clipboard operation
pygtfs copied to clipboard

Add making queries to documentation

Open Permafacture opened this issue 10 years ago • 2 comments

Sorry if I missed this (and I didn't find a mailing list). Looping through entities is very convenient, but I'd like to specify queries for performance. Trying to make a query did not work as expected:

Stop = pygtfs.gtfs_entities.Stop
stops = schedule.session.query(Stop).all()

[...]

ArgumentError: Column-based expression object expected for argument 'order_by'; got: 'stop_sequence', type <type 'str'>     

Is there support for specifying SQLalchemy queries is pygtfs? How do I use it?

Thanks. Elliot

Permafacture avatar Aug 01 '14 22:08 Permafacture

Edit: this must actually be a bug somewhere, or I am misusing the ORM, as it works with Routes...

Permafacture avatar Aug 02 '14 00:08 Permafacture

Does this still happen? Or was it fixed by the recent changes?

jarondl avatar Dec 08 '18 02:12 jarondl