Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add type checking #166

Merged
merged 5 commits into from
Mar 22, 2018
Merged

Add type checking #166

merged 5 commits into from
Mar 22, 2018

Commits on Nov 10, 2017

  1. Add type checks on ZSET operations

    Any operation that queries or mutates a ZSET will raise an appropriate
    redis.ResponseError if the key is already present with a different type.
    New tests are included to test this. ZINTERSTORE and ZUNIONSTORE have
    special treatment to allow SET types as well (undocumented feature of
    redis).
    
    The goal is to later extend this to other types as well.
    bmerry committed Nov 10, 2017
    Configuration menu
    Copy the full SHA
    adb5547 View commit details
    Browse the repository at this point in the history
  2. Add type checks for sets

    This extends the previous commit to also raise a ResponseError when
    running a set operation on a non-set.
    bmerry committed Nov 10, 2017
    Configuration menu
    Copy the full SHA
    c7e9fe8 View commit details
    Browse the repository at this point in the history
  3. Add type checking to string operations

    This also fixes a bug in `decr`: it would set the internal value to
    the integer value, without wrapping it in to_bytes.
    bmerry committed Nov 10, 2017
    Configuration menu
    Copy the full SHA
    ba48de3 View commit details
    Browse the repository at this point in the history
  4. Add type checking to list operations.

    Also fixed up the linsert implementation (with tests). It only handled
    "before", not "after", and it did not handle the case where the pivot is
    missing.
    
    The brpoplpush implementation was simplified to just call rpoplpush,
    since the implementations were identical.
    bmerry committed Nov 10, 2017
    Configuration menu
    Copy the full SHA
    2cc4d3e View commit details
    Browse the repository at this point in the history
  5. Add type checking to hash operations

    Also fixed a bug where HINCRBY and HINCRBYFLOAT wrote the integer/float
    value back into the Python dict rather than the string form.
    bmerry committed Nov 10, 2017
    Configuration menu
    Copy the full SHA
    9a70011 View commit details
    Browse the repository at this point in the history