All Versions
14
Latest Version
Avg Release Cycle
97 days
Latest Release
31 days ago

Changelog History
Page 1

  • v0.13.0

    October 14, 2019

    🛠 Fixes and improvements

    • 💥 Breaking change: rename parse_async to parse_redis_value_async for consistency (ce59cecb).
    • ⚙ Run clippy over the entire codebase (#238)
    • 💥 Breaking change: Make Script#invoke_async generic over aio::ConnectionLike (#242)

    💥 BREAKING CHANGES

    📜 Rename parse_async to parse_redis_value_async for consistency (ce59cecb).

    📜 If you used redis::parse_async before, you now need to change this to redis::parse_redis_value_async or import the method under the new name: use redis::parse_redis_value_async.

    👉 Make Script#invoke_async generic over aio::ConnectionLike (#242)

    👍 Script#invoke_async was changed to be generic over aio::ConnectionLike in order to support wrapping a SharedConnection in user code. This required adding a new generic parameter to the method, causing an error when the return type is defined using the turbofish syntax.

    Old:

    redis::Script::new("return ...")
      .key("key1")
      .arg("an argument")
      .invoke_async::<String>()
    

    🆕 New:

    redis::Script::new("return ...")
      .key("key1")
      .arg("an argument")
      .invoke_async::<_, String>()
    
  • v0.12.0

    August 26, 2019

    🛠 Fixes and improvements

    • 💥 Breaking change: Use dyn keyword to avoid deprecation warning (#223)
    • 💥 Breaking change: Update url dependency to v2 (#234)
    • 💥 Breaking change: (async) Fix Script::invoke_async return type error (#233)
    • ➕ Add GETRANGE and SETRANGE commands (#202)
    • 🛠 Fix SINTERSTORE wrapper name, it's now correctly sinterstore (#225)
    • 👍 Allow running SharedConnection with any other runtime (#229)
    • Reformatted as Edition 2018 code (#235)

    💥 BREAKING CHANGES

    🗄 Use dyn keyword to avoid deprecation warning (#223)

    🗄 Rust nightly deprecated bare trait objects. ⚠ This PR adds the dyn keyword to all trait objects in order to get rid of the warning. 👍 This bumps the minimal supported Rust version to Rust 1.27.

    ⚡️ Update url dependency to v2 (#234)

    We updated the url dependency to v2. We do expose this on our public API on the redis::parse_redis_url function. If you depend on that, make sure to also upgrade your direct dependency.

    (async) Fix Script::invoke_async return type error (#233)

    Previously, invoking a script with a complex return type would cause the following error:

    Response was of incompatible type: "Not a bulk response" (response was string data('"4b98bef92b171357ddc437b395c7c1a5145ca2bd"'))
    

    This was because the Future returned when loading the script into the database returns the hash of the script, and thus the return type of String would not match the intended return type.

    This commit adds an enum to account for the different Future return types.

  • v0.11.0

    July 19, 2019

    🚀 This release includes all fixes & improvements from the two beta releases listed below. 🚀 This release contains breaking changes.

    🛠 Fixes and improvements

    • 🐎 (async) Fix performance problem for SharedConnection (#222)
  • v0.11.0-beta.2

    July 14, 2019

    🛠 Fixes and improvements

    • (async) Don't block the executor from shutting down (#217)
  • v0.11.0-beta.1

    May 30, 2019

    🛠 Fixes and improvements

    • (async) Simplify implicit pipeline handling (#182)
    • (async) Use tokio_sync's channels instead of futures (#195)
    • (async) Only allocate one oneshot per request (#194)
    • ✂ Remove redundant BufReader when parsing (#197)
    • 📜 Hide actual type returned from async parser (#193)
    • 📜 Use more performant operations for line parsing (#198)
    • 💥 Optimize the command encoding, see below for breaking changes (#165)
    • ➕ Add support for geospatial commands (#130)
    • 👍 (async) Add support for async Script invocation (#206)

    💥 BREAKING CHANGES

    📇 Renamed the async module to aio (#189)

    async is a reserved keyword in Rust 2018, so this avoids the need to write r#async in it.

    Old code:

    use redis::async::SharedConnection;
    

    🆕 New code:

    use redis::aio::SharedConnection;
    

    The trait ToRedisArgs was changed (#165)

    ToRedisArgs has been changed to take take an instance of RedisWrite instead of Vec<Vec<u8>>. Use the write_arg method instead of Vec::push.

    Minimum Rust version is now 1.26 (#165)

    ⬆️ Upgrade your compiler. impl Iterator is used, requiring a more recent version of the Rust compiler.

    iter now takes self by value (#165)

    iter now takes self by value instead of cloning self inside the method.

    Old code:

    let mut iter : redis::Iter<isize> = cmd.arg("my_set").cursor_arg(0).iter(&con).unwrap();
    

    🆕 New code:

    let mut iter : redis::Iter<isize> = cmd.arg("my_set").cursor_arg(0).clone().iter(&con).unwrap();
    

    👯 (The above line calls clone().)

    A mutable connection object is now required (#148)

    🚚 We removed the internal usage of RefCell and Cell and instead require a mutable reference, &mut ConnectionLike, on all command calls.

    Old code:

    let client = redis::Client::open("redis://127.0.0.1/")?;
    let con = client.get_connection()?;
    redis::cmd("SET").arg("my_key").arg(42).execute(&con);
    

    🆕 New code:

    let client = redis::Client::open("redis://127.0.0.1/")?;
    let mut con = client.get_connection()?;
    redis::cmd("SET").arg("my_key").arg(42).execute(&mut con);
    

    Due to this, transaction has changed. The callback now also receives a mutable reference to the used connection.

    Old code:

    let client = redis::Client::open("redis://127.0.0.1/").unwrap();
    let con = client.get_connection().unwrap();
    let key = "the_key";
    let (new_val,) : (isize,) = redis::transaction(&con, &[key], |pipe| {
        let old_val : isize = con.get(key)?;
        pipe
            .set(key, old_val + 1).ignore()
            .get(key).query(&con)
    })?;
    

    🆕 New code:

    let client = redis::Client::open("redis://127.0.0.1/").unwrap();
    let mut con = client.get_connection().unwrap();
    let key = "the_key";
    let (new_val,) : (isize,) = redis::transaction(&mut con, &[key], |con, pipe| {
        let old_val : isize = con.get(key)?;
        pipe
            .set(key, old_val + 1).ignore()
            .get(key).query(&con)
    })?;
    

    ✂ Remove rustc-serialize feature (#200)

    🚚 We removed serialization to/from JSON. The underlying library is deprecated for a long time.

    Old code in Cargo.toml:

    [dependencies.redis]
    version = "0.9.1"
    features = ["with-rustc-json"]
    

    There's no replacement for the feature. 👉 Use serde and handle the serialization/deserialization in your own code.

    ✂ Remove with-unix-sockets feature (#201)

    🚚 We removed the Unix socket feature. It is now always enabled. 🚚 We also removed auto-detection.

    Old code in Cargo.toml:

    [dependencies.redis]
    version = "0.9.1"
    features = ["with-unix-sockets"]
    

    0️⃣ There's no replacement for the feature. Unix sockets will continue to work by default.

  • v0.10.0

    February 19, 2019
    • 🛠 Fix handling of passwords with special characters (#163)
    • 👍 Better performance for async code due to less boxing (#167)
      • CAUTION: redis-rs will now require Rust 1.26
    • ➕ Add clear method to the pipeline (#176)
    • 👍 Better benchmarking (#179)
    • Fully formatted source code (#181)
  • v0.9.1

    September 10, 2018
    • ➕ Add ttl command
  • v0.9.0

    August 08, 2018

    🚀 Some time has passed since the last release.
    🚀 This new release will bring less bugs, more commands, experimental async support and better performance.

    Highlights:

    • Implement flexible PubSub API (#136)
    • Avoid allocating some redundant Vec's during encoding (#140)
    • ➕ Add an async interface using futures-rs (#141)
    • 👍 Allow the async connection to have multiple in flight requests (#143)

    👍 The async support is currently experimental.

  • v0.8.0

    December 26, 2016
    • ➕ Add publish command
  • v0.7.1

    December 16, 2016
    • 🛠 Fix unix socket builds
    • 😌 Relax lifetimes for scripts