Jaymon / prom

A PostgreSQL or SQLite orm for Python
MIT License
22 stars 4 forks source link

Cleanup Iterator api #25

Closed Jaymon closed 8 years ago

Jaymon commented 8 years ago

Merge AllIterator and Iterator into one with a flag, I think I've thought of doing this before and it was hairy, but I think it is worth it so we can have iterators on top of those iterators like a UniqueIterator that will skip over certain rows if they've been seen before or FilterIterator which could have a filter callback.

Basically, right now we can't do cool iterators because we have 2 distinct paths that can be followed (get() and all()) and both would need to be supported.