yohanboniface/redis-limpyd — pull request #53 by twidi (2012-10-06 23:44:31+00:00)
Title: Enhance collections

A lot of stuff here...

The update of the main collection.py file is mainly to enhance speed when possible, and to allow overriding (more methods, but shorter)

New functionnalities:

- add a way to skip PK existence in collections (to avoid one query by result item when calling "instances")
- add `values` and `values_list` to collections
- we can now use another `CollectionManager` in a model
- slice without end now works
- add a way to cancel instances/values(_list) calls (useful for chaining, to finally return pk)
- speed up `len` calls of collections

And a new `ExtendedCollection`:
- `filter` method to chain filters
- `intersect` method, to intersect filtered result with a set/list/zset (limpyd, redis or python)
- allow sorting collections by a zset's score (will be enhanced later with the new RC of redis 2.6, see antirez/redis#98)
- add a `store` method, to store results in redis

All of this is fully tested and documented