Skip to content

Commit

Permalink
Small tweaks.
Browse files Browse the repository at this point in the history
  • Loading branch information
coleifer committed Jan 12, 2015
1 parent f64ddbc commit 3828df3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Walrus

![](http://media.charlesleifer.com/blog/photos/p1420698394.77.jpg)
![](http://media.charlesleifer.com/blog/photos/walrus-logo.png)

Lightweight Python utilities for working with [Redis](http://redis.io).

Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ walrus

.. py:module:: walrus
.. image:: http://media.charlesleifer.com/blog/photos/p1420698394.77.jpg
.. image:: http://media.charlesleifer.com/blog/photos/walrus-logo.png

Lightweight Python utilities for working with `Redis <http://redis.io>`_.

Expand Down
6 changes: 4 additions & 2 deletions walrus/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
OP_MATCH = 'match'

ABSOLUTE = set([OP_EQ, OP_NE])
CONTINUOUS = set([OP_LT, OP_LTE, OP_GT, OP_GTE])
CONTINUOUS = set([OP_LT, OP_LTE, OP_GT, OP_GTE, OP_BETWEEN])
FTS = set([OP_MATCH])


Expand Down Expand Up @@ -181,7 +181,7 @@ def _zset_score_filter(self, zset, low, high):
return tmp_set

def execute_between(self, lhs, rhs):
index = lhs.get_index(OP_LT)
index = lhs.get_index(OP_BETWEEN)
low, high = map(lhs.db_value, rhs)
zset = index.get_key(None) # No value necessary.
return self._zset_score_filter(zset, low, high)
Expand Down Expand Up @@ -220,6 +220,8 @@ def execute_match(self, lhs, rhs):

results = self.database.ZSet(self.database.get_temp_key())
self.database.zinterstore(results.key, index_keys)
results.expire(self.temp_key_expire)

return results

def _combine_sets(self, lhs, rhs, operation):
Expand Down

0 comments on commit 3828df3

Please sign in to comment.