diff --git a/docs/Redis.html b/docs/Redis.html index 7afff66..797e81c 100644 --- a/docs/Redis.html +++ b/docs/Redis.html @@ -183,35 +183,35 @@

Included Modules

Defined in:

- + redis/commands.cr
- + redis/command_execution/value_oriented.cr
- + redis.cr
- + redis/command_execution/future_oriented.cr
- + redis/strategy/base.cr @@ -329,6 +329,11 @@

Instance methods inherited from module Redis::CommandExecution::ValueO string_array_or_string_command, + + string_array_or_string_or_integer_command(request : Request) : Array(RedisValue) | String | Int64 + string_array_or_string_or_integer_command, + + string_array_or_string_or_nil_command(request : Request) : Array(RedisValue) | String? string_array_or_string_or_nil_command, @@ -553,8 +558,8 @@

Instance methods inherited from module R hlen, - - hmget(key, fields : Array(String)) : Array(RedisValue)
hmget(key, *fields : String) : Array(RedisValue)
+
+ hmget(key, fields : Array(String))
hmget(key, *fields : String)
hmget
, @@ -1140,7 +1145,7 @@

Constructor Detail


- [View source] + [View source]
@@ -1173,7 +1178,7 @@

Class Method Detail


- [View source] + [View source]
@@ -1196,7 +1201,7 @@

Instance Method Detail


- [View source] + [View source]
@@ -1232,7 +1237,7 @@

Instance Method Detail


- [View source] + [View source]
@@ -1267,7 +1272,7 @@

Instance Method Detail


- [View source] + [View source]
@@ -1285,7 +1290,7 @@

Instance Method Detail


- [View source] + [View source]
diff --git a/docs/Redis/CannotConnectError.html b/docs/Redis/CannotConnectError.html index c48bdb3..c1f6973 100644 --- a/docs/Redis/CannotConnectError.html +++ b/docs/Redis/CannotConnectError.html @@ -150,7 +150,7 @@

Overview

Defined in:

- + redis/error.cr diff --git a/docs/Redis/CommandTimeoutError.html b/docs/Redis/CommandTimeoutError.html index 1bf5830..cea5a46 100644 --- a/docs/Redis/CommandTimeoutError.html +++ b/docs/Redis/CommandTimeoutError.html @@ -150,7 +150,7 @@

Overview

Defined in:

- + redis/error.cr diff --git a/docs/Redis/Commands.html b/docs/Redis/Commands.html index d076cb5..dd7df27 100644 --- a/docs/Redis/Commands.html +++ b/docs/Redis/Commands.html @@ -159,7 +159,7 @@

Direct including types

Defined in:

- + redis/commands.cr @@ -458,14 +458,14 @@

Instance Method Summary

  • - #hmget(key, fields : Array(String)) : Array(RedisValue) + #hmget(key, fields : Array(String))

    Returns the values associated with the specified fields in the hash stored at key.

  • - #hmget(key, *fields : String) : Array(RedisValue) + #hmget(key, *fields : String)

    Returns the values associated with the specified fields in the hash stored at key.

    @@ -1362,7 +1362,7 @@

    Instance Method Detail


    @@ -1382,7 +1382,7 @@

    Instance Method Detail


    @@ -1411,7 +1411,7 @@

    Instance Method Detail


    @@ -1435,7 +1435,7 @@

    Instance Method Detail


    @@ -1459,7 +1459,7 @@

    Instance Method Detail


    @@ -1488,7 +1488,7 @@

    Instance Method Detail


    @@ -1520,7 +1520,7 @@

    Instance Method Detail


    @@ -1553,7 +1553,7 @@

    Instance Method Detail


    @@ -1585,7 +1585,7 @@

    Instance Method Detail


    @@ -1605,7 +1605,7 @@

    Instance Method Detail


    @@ -1625,7 +1625,7 @@

    Instance Method Detail


    @@ -1649,7 +1649,7 @@

    Instance Method Detail


    @@ -1673,7 +1673,7 @@

    Instance Method Detail


    @@ -1693,7 +1693,7 @@

    Instance Method Detail


    @@ -1715,7 +1715,7 @@

    Instance Method Detail


    @@ -1731,7 +1731,7 @@

    Instance Method Detail

    EVAL and EVALSHA are used to evaluate scripts using the Lua interpreter built into Redis starting from version 2.6.0.

    -

    Return value: Array(String), depends on the executed script

    +

    Return value: Depends on the executed script

    Example:

    @@ -1740,7 +1740,7 @@

    Instance Method Detail


    @@ -1756,12 +1756,12 @@

    Instance Method Detail

    EVAL and EVALSHA are used to evaluate scripts using the Lua interpreter built into Redis starting from version 2.6.0.

    -

    Return value: Array(String), depends on the executed script

    +

    Return value: Depends on the executed script


    @@ -1783,7 +1783,7 @@

    Instance Method Detail


    @@ -1809,7 +1809,7 @@

    Instance Method Detail


    @@ -1833,7 +1833,7 @@

    Instance Method Detail


    @@ -1853,7 +1853,7 @@

    Instance Method Detail


    @@ -1873,7 +1873,7 @@

    Instance Method Detail


    @@ -1893,7 +1893,7 @@

    Instance Method Detail


    @@ -1914,7 +1914,7 @@

    Instance Method Detail


    @@ -1935,7 +1935,7 @@

    Instance Method Detail


    @@ -1956,7 +1956,7 @@

    Instance Method Detail


    @@ -1978,7 +1978,7 @@

    Instance Method Detail


    @@ -2000,7 +2000,7 @@

    Instance Method Detail


    @@ -2025,7 +2025,7 @@

    Instance Method Detail


    @@ -2045,7 +2045,7 @@

    Instance Method Detail


    @@ -2069,7 +2069,7 @@

    Instance Method Detail


    @@ -2093,7 +2093,7 @@

    Instance Method Detail


    @@ -2114,7 +2114,7 @@

    Instance Method Detail


    @@ -2136,7 +2136,7 @@

    Instance Method Detail


    @@ -2160,7 +2160,7 @@

    Instance Method Detail


    @@ -2181,7 +2181,7 @@

    Instance Method Detail


    @@ -2205,7 +2205,7 @@

    Instance Method Detail


    @@ -2226,7 +2226,7 @@

    Instance Method Detail


    @@ -2246,7 +2246,7 @@

    Instance Method Detail


    @@ -2266,17 +2266,17 @@

    Instance Method Detail


    -
    +
    - def hmget(key, fields : Array(String)) : Array(RedisValue) + def hmget(key, fields : Array(String)) - # + #

    Returns the values associated with the specified fields in the hash stored at key.

    @@ -2286,17 +2286,17 @@

    Instance Method Detail


    -
    +
    - def hmget(key, *fields : String) : Array(RedisValue) + def hmget(key, *fields : String) - # + #

    Returns the values associated with the specified fields in the hash stored at key.

    @@ -2306,7 +2306,7 @@

    Instance Method Detail


    @@ -2326,7 +2326,7 @@

    Instance Method Detail


    @@ -2346,7 +2346,7 @@

    Instance Method Detail


    @@ -2372,7 +2372,7 @@

    Instance Method Detail


    @@ -2394,7 +2394,7 @@

    Instance Method Detail


    @@ -2414,7 +2414,7 @@

    Instance Method Detail


    @@ -2439,7 +2439,7 @@

    Instance Method Detail


    @@ -2463,7 +2463,7 @@

    Instance Method Detail


    @@ -2487,7 +2487,7 @@

    Instance Method Detail


    @@ -2507,7 +2507,7 @@

    Instance Method Detail


    @@ -2531,7 +2531,7 @@

    Instance Method Detail


    @@ -2551,7 +2551,7 @@

    Instance Method Detail


    @@ -2575,7 +2575,7 @@

    Instance Method Detail


    @@ -2595,7 +2595,7 @@

    Instance Method Detail


    @@ -2619,7 +2619,7 @@

    Instance Method Detail


    @@ -2639,7 +2639,7 @@

    Instance Method Detail


    @@ -2659,7 +2659,7 @@

    Instance Method Detail


    @@ -2679,7 +2679,7 @@

    Instance Method Detail


    @@ -2703,7 +2703,7 @@

    Instance Method Detail


    @@ -2727,7 +2727,7 @@

    Instance Method Detail


    @@ -2747,7 +2747,7 @@

    Instance Method Detail


    @@ -2767,7 +2767,7 @@

    Instance Method Detail


    @@ -2783,7 +2783,7 @@

    Instance Method Detail


    @@ -2810,7 +2810,7 @@

    Instance Method Detail


    @@ -2834,7 +2834,7 @@

    Instance Method Detail


    @@ -2861,7 +2861,7 @@

    Instance Method Detail


    @@ -2883,7 +2883,7 @@

    Instance Method Detail


    @@ -2906,7 +2906,7 @@

    Instance Method Detail


    @@ -2928,7 +2928,7 @@

    Instance Method Detail


    @@ -2952,7 +2952,7 @@

    Instance Method Detail


    @@ -2975,7 +2975,7 @@

    Instance Method Detail


    @@ -2998,7 +2998,7 @@

    Instance Method Detail


    @@ -3023,7 +3023,7 @@

    Instance Method Detail


    @@ -3048,7 +3048,7 @@

    Instance Method Detail


    @@ -3071,7 +3071,7 @@

    Instance Method Detail


    @@ -3094,7 +3094,7 @@

    Instance Method Detail


    @@ -3114,7 +3114,7 @@

    Instance Method Detail


    @@ -3134,7 +3134,7 @@

    Instance Method Detail


    @@ -3156,7 +3156,7 @@

    Instance Method Detail


    @@ -3176,7 +3176,7 @@

    Instance Method Detail


    @@ -3199,7 +3199,7 @@

    Instance Method Detail


    @@ -3217,7 +3217,7 @@

    Instance Method Detail


    @@ -3233,7 +3233,7 @@

    Instance Method Detail


    @@ -3255,7 +3255,7 @@

    Instance Method Detail


    @@ -3279,7 +3279,7 @@

    Instance Method Detail


    @@ -3297,7 +3297,7 @@

    Instance Method Detail


    @@ -3315,7 +3315,7 @@

    Instance Method Detail


    @@ -3335,7 +3335,7 @@

    Instance Method Detail


    @@ -3353,7 +3353,7 @@

    Instance Method Detail


    @@ -3377,7 +3377,7 @@

    Instance Method Detail


    @@ -3401,7 +3401,7 @@

    Instance Method Detail


    @@ -3421,7 +3421,7 @@

    Instance Method Detail


    @@ -3441,7 +3441,7 @@

    Instance Method Detail


    @@ -3462,7 +3462,7 @@

    Instance Method Detail


    @@ -3486,7 +3486,7 @@

    Instance Method Detail


    @@ -3510,7 +3510,7 @@

    Instance Method Detail


    @@ -3530,7 +3530,7 @@

    Instance Method Detail


    @@ -3550,7 +3550,7 @@

    Instance Method Detail


    @@ -3566,7 +3566,7 @@

    Instance Method Detail


    @@ -3596,7 +3596,7 @@

    Instance Method Detail


    @@ -3614,7 +3614,7 @@

    Instance Method Detail


    @@ -3637,7 +3637,7 @@

    Instance Method Detail


    @@ -3657,7 +3657,7 @@

    Instance Method Detail


    @@ -3678,7 +3678,7 @@

    Instance Method Detail


    @@ -3703,7 +3703,7 @@

    Instance Method Detail


    @@ -3723,7 +3723,7 @@

    Instance Method Detail


    @@ -3739,7 +3739,7 @@

    Instance Method Detail


    @@ -3759,7 +3759,7 @@

    Instance Method Detail


    @@ -3779,7 +3779,7 @@

    Instance Method Detail


    @@ -3799,7 +3799,7 @@

    Instance Method Detail


    @@ -3830,7 +3830,7 @@

    Instance Method Detail


    @@ -3854,7 +3854,7 @@

    Instance Method Detail


    @@ -3878,7 +3878,7 @@

    Instance Method Detail


    @@ -3900,7 +3900,7 @@

    Instance Method Detail


    @@ -3924,7 +3924,7 @@

    Instance Method Detail


    @@ -3944,7 +3944,7 @@

    Instance Method Detail


    @@ -3964,7 +3964,7 @@

    Instance Method Detail


    @@ -3988,7 +3988,7 @@

    Instance Method Detail


    @@ -4012,7 +4012,7 @@

    Instance Method Detail


    @@ -4034,7 +4034,7 @@

    Instance Method Detail


    @@ -4054,7 +4054,7 @@

    Instance Method Detail


    @@ -4076,7 +4076,7 @@

    Instance Method Detail


    @@ -4105,7 +4105,7 @@

    Instance Method Detail


    @@ -4127,7 +4127,7 @@

    Instance Method Detail


    @@ -4153,7 +4153,7 @@

    Instance Method Detail


    @@ -4177,7 +4177,7 @@

    Instance Method Detail


    @@ -4193,7 +4193,7 @@

    Instance Method Detail


    @@ -4223,7 +4223,7 @@

    Instance Method Detail


    @@ -4243,7 +4243,7 @@

    Instance Method Detail


    @@ -4261,7 +4261,7 @@

    Instance Method Detail


    @@ -4298,7 +4298,7 @@

    Instance Method Detail


    @@ -4316,7 +4316,7 @@

    Instance Method Detail


    @@ -4336,7 +4336,7 @@

    Instance Method Detail


    @@ -4356,7 +4356,7 @@

    Instance Method Detail


    @@ -4376,7 +4376,7 @@

    Instance Method Detail


    @@ -4396,7 +4396,7 @@

    Instance Method Detail


    @@ -4417,7 +4417,7 @@

    Instance Method Detail


    @@ -4442,7 +4442,7 @@

    Instance Method Detail


    @@ -4460,7 +4460,7 @@

    Instance Method Detail


    @@ -4478,7 +4478,7 @@

    Instance Method Detail


    @@ -4498,7 +4498,7 @@

    Instance Method Detail


    @@ -4518,7 +4518,7 @@

    Instance Method Detail


    @@ -4534,7 +4534,7 @@

    Instance Method Detail


    @@ -4550,7 +4550,7 @@

    Instance Method Detail


    @@ -4575,7 +4575,7 @@

    Instance Method Detail


    @@ -4595,7 +4595,7 @@

    Instance Method Detail


    @@ -4615,7 +4615,7 @@

    Instance Method Detail


    @@ -4635,7 +4635,7 @@

    Instance Method Detail


    @@ -4664,7 +4664,7 @@

    Instance Method Detail


    @@ -4684,7 +4684,7 @@

    Instance Method Detail


    @@ -4712,7 +4712,7 @@

    Instance Method Detail


    @@ -4738,7 +4738,7 @@

    Instance Method Detail


    @@ -4763,7 +4763,7 @@

    Instance Method Detail


    @@ -4785,7 +4785,7 @@

    Instance Method Detail


    @@ -4805,7 +4805,7 @@

    Instance Method Detail


    @@ -4828,7 +4828,7 @@

    Instance Method Detail


    @@ -4848,7 +4848,7 @@

    Instance Method Detail


    @@ -4869,7 +4869,7 @@

    Instance Method Detail


    @@ -4893,7 +4893,7 @@

    Instance Method Detail


    @@ -4919,7 +4919,7 @@

    Instance Method Detail


    @@ -4944,7 +4944,7 @@

    Instance Method Detail


    @@ -4967,7 +4967,7 @@

    Instance Method Detail


    @@ -4997,7 +4997,7 @@

    Instance Method Detail


    @@ -5017,7 +5017,7 @@

    Instance Method Detail


    @@ -5041,7 +5041,7 @@

    Instance Method Detail


    diff --git a/docs/Redis/ConnectionError.html b/docs/Redis/ConnectionError.html index 344163f..54456ef 100644 --- a/docs/Redis/ConnectionError.html +++ b/docs/Redis/ConnectionError.html @@ -159,7 +159,7 @@

    Direct Known Subclasses

    Defined in:

    - + redis/error.cr diff --git a/docs/Redis/ConnectionLostError.html b/docs/Redis/ConnectionLostError.html index a77468e..4011b49 100644 --- a/docs/Redis/ConnectionLostError.html +++ b/docs/Redis/ConnectionLostError.html @@ -150,7 +150,7 @@

    Overview

    Defined in:

    - + redis/error.cr diff --git a/docs/Redis/Error.html b/docs/Redis/Error.html index e3638e5..f0e3985 100644 --- a/docs/Redis/Error.html +++ b/docs/Redis/Error.html @@ -161,7 +161,7 @@

    Direct Known Subclasses

    Defined in:

    - + redis/error.cr diff --git a/docs/Redis/Future.html b/docs/Redis/Future.html index 87434f0..87fb1dc 100644 --- a/docs/Redis/Future.html +++ b/docs/Redis/Future.html @@ -154,7 +154,7 @@

    Overview

    Defined in:

    - + redis/future.cr @@ -236,7 +236,7 @@

    Constructor Detail


    @@ -259,7 +259,7 @@

    Instance Method Detail


    @@ -275,7 +275,7 @@

    Instance Method Detail


    diff --git a/docs/Redis/PipelineApi.html b/docs/Redis/PipelineApi.html index 687803c..c1ddcc9 100644 --- a/docs/Redis/PipelineApi.html +++ b/docs/Redis/PipelineApi.html @@ -171,7 +171,7 @@

    Included Modules

    Defined in:

    - + redis/pipeline_api.cr @@ -242,6 +242,11 @@

    Instance methods inherited from module Redis::CommandExecution::Future string_array_or_string_command, + + string_array_or_string_or_integer_command(request : Request) : Redis::Future + string_array_or_string_or_integer_command, + + string_array_or_string_or_nil_command(request : Request) : Redis::Future string_array_or_string_or_nil_command, @@ -466,8 +471,8 @@

    Instance methods inherited from module - hmget(key, fields : Array(String)) : Array(RedisValue)
    hmget(key, *fields : String) : Array(RedisValue)
    +
    + hmget(key, fields : Array(String))
    hmget(key, *fields : String)
    hmget
    , @@ -1026,7 +1031,7 @@

    Constructor Detail


    diff --git a/docs/Redis/PoolTimeoutError.html b/docs/Redis/PoolTimeoutError.html index 4dea1cc..27c3e9f 100644 --- a/docs/Redis/PoolTimeoutError.html +++ b/docs/Redis/PoolTimeoutError.html @@ -150,7 +150,7 @@

    Overview

    Defined in:

    - + redis/error.cr diff --git a/docs/Redis/PooledClient.html b/docs/Redis/PooledClient.html index 0fcc4d1..7a0fba7 100644 --- a/docs/Redis/PooledClient.html +++ b/docs/Redis/PooledClient.html @@ -163,7 +163,7 @@

    Overview

    Defined in:

    - + redis/pooled_client.cr @@ -268,7 +268,7 @@

    Constructor Detail


    @@ -294,7 +294,7 @@

    Instance Method Detail


    @@ -310,7 +310,7 @@

    Instance Method Detail


    @@ -326,7 +326,7 @@

    Instance Method Detail


    @@ -347,7 +347,7 @@

    Macro Detail


    diff --git a/docs/Redis/SocketWrapper.html b/docs/Redis/SocketWrapper.html index c5b52ff..96a1082 100644 --- a/docs/Redis/SocketWrapper.html +++ b/docs/Redis/SocketWrapper.html @@ -152,7 +152,7 @@

    Overview

    Defined in:

    - + redis/socket_wrapper.cr @@ -254,7 +254,7 @@

    Constructor Detail


    @@ -270,7 +270,7 @@

    Constructor Detail


    @@ -293,7 +293,7 @@

    Instance Method Detail


    @@ -314,7 +314,7 @@

    Macro Detail


    diff --git a/docs/Redis/Subscription.html b/docs/Redis/Subscription.html index e0e3a1d..4ab597c 100644 --- a/docs/Redis/Subscription.html +++ b/docs/Redis/Subscription.html @@ -153,7 +153,7 @@

    Overview

    Defined in:

    - + redis/subscription.cr @@ -263,7 +263,7 @@

    Instance Method Detail


    @@ -281,7 +281,7 @@

    Instance Method Detail


    @@ -299,7 +299,7 @@

    Instance Method Detail


    @@ -317,7 +317,7 @@

    Instance Method Detail


    @@ -335,7 +335,7 @@

    Instance Method Detail


    @@ -353,7 +353,7 @@

    Instance Method Detail


    diff --git a/docs/Redis/TransactionApi.html b/docs/Redis/TransactionApi.html index 75b5b58..cf18f61 100644 --- a/docs/Redis/TransactionApi.html +++ b/docs/Redis/TransactionApi.html @@ -171,7 +171,7 @@

    Included Modules

    Defined in:

    - + redis/transaction_api.cr @@ -254,6 +254,11 @@

    Instance methods inherited from module Redis::CommandExecution::Future string_array_or_string_command, + + string_array_or_string_or_integer_command(request : Request) : Redis::Future + string_array_or_string_or_integer_command, + + string_array_or_string_or_nil_command(request : Request) : Redis::Future string_array_or_string_or_nil_command, @@ -478,8 +483,8 @@

    Instance methods inherited from module - hmget(key, fields : Array(String)) : Array(RedisValue)
    hmget(key, *fields : String) : Array(RedisValue)
    +
    + hmget(key, fields : Array(String))
    hmget(key, *fields : String)
    hmget
    , @@ -1038,7 +1043,7 @@

    Constructor Detail


    @@ -1070,7 +1075,7 @@

    Instance Method Detail


    diff --git a/docs/index.html b/docs/index.html index a24fcca..3874fed 100644 --- a/docs/index.html +++ b/docs/index.html @@ -135,7 +135,7 @@

    Installation

    dependencies:
       redis:
         github: stefanwille/crystal-redis
    -    version: ~> 2.4.1
    + version: ~> 2.5.2

    and then install the library into your project:

    diff --git a/docs/index.json b/docs/index.json index bbd76e6..b28efdb 100644 --- a/docs/index.json +++ b/docs/index.json @@ -1 +1 @@ -{"repository_name":"github.com/stefanwille/crystal-redis","body":"# Redis Client for Crystal\n\n[![Build Status](https://img.shields.io/travis/stefanwille/crystal-redis/master.svg?style=flat)](https://travis-ci.org/stefanwille/crystal-redis) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md#pull-requests)\n\nA Redis client for the Crystal programming language.\n\n## Features\n\n- Performance (> 680,000 commands per second using pipeline on a MacBook Air with a single client thread)\n- Pipelining\n- Transactions\n- LUA Scripting\n- All string commands\n- All hash commands\n- All list commands\n- All set commands\n- All hyperloglog commands\n- All commands for bit operations\n- All sorted set commands\n- All geo commands\n- Publish/subscribe\n\n## Installation\n\nAdd it to your `shard.yml`:\n\n```crystal\ndependencies:\n redis:\n github: stefanwille/crystal-redis\n version: ~> 2.4.1\n```\n\nand then install the library into your project:\n\n```bash\n$ shards install\n```\n\n### Installation on MacOS X\n\nOn MacOS X you may get this error:\n\n```\nld: library not found for -lssl (this usually means you need to install the development package for libssl)\nclang: error: linker command failed with exit code 1 (use -v to see invocation)\n...\n```\n\nOr this warning:\n\n```\nPackage libssl was not found in the pkg-config search path.\nPerhaps you should add the directory containing `libssl.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'libssl' found\nPackage libcrypto was not found in the pkg-config search path.\nPerhaps you should add the directory containing `libcrypto.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'libcrypto' found\n```\n\nThe problem is that Crystal can't find openssl, because it is not installed by default on MacOS X.\n\nThe fix:\n\n1. Install openssl via [Homebrew](https://brew.sh/):\n\n```bash\n$ brew install openssl\n```\n\n2. Set the environment variable `PKG_CONFIG_PATH`:\n\n```bash\n$ export PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig\n```\n\nNote: Please write me if you know a better way!\n\n## Required Crystal Version\n\nThis library needs Crystal version >= 0.25.0\n\nI haven't tested older Crystal versions.\n\n## Usage\n\nRequire the package:\n\n```crystal\n require \"redis\"\n```\n\nthen\n\n```crystal\n redis = Redis.new\n```\n\nThen you can call Redis commands on the `redis` object:\n\n```crystal\n redis.set(\"foo\", \"bar\")\n redis.get(\"foo\")\n```\n\n#### Connection Pooling\n\nSince version 2.0.0, a connection pool is built in. It is used implicitly through `Redis::PooledClient`:\n\n```Crystal\nredis = Redis::PooledClient.new\n10.times do |i|\n spawn do\n redis.set(\"foo#{i}\", \"bar\")\n redis.get(\"foo#{i}\") # => \"bar\"\n end\nend\n```\n\nThis `redis` instance can be shared across fibers, and accepts the same Redis commands as the `Redis` class.\nIt automatically allocates and frees connections from/to the pool, per command.\n\n## Examples\n\nTo get started, see the examples:\n\n- There is a separate git repository [crystal-redis-examples](https://github.com/stefanwille/crystal-redis-examples) with examples.\n- start with this [basic example](https://github.com/stefanwille/crystal-redis-examples/blob/master/src/basic.cr)\n- look at [the other examples](https://github.com/stefanwille/crystal-redis-examples/blob/master/src/)\n- the [spec](https://github.com/stefanwille/crystal-redis/blob/master/spec/redis_spec.cr) contains even more usage examples\n\n## Documentation\n\n- [API documentation](http://stefanwille.github.io/crystal-redis) -\n start reading it at the class `Redis`.\n- [Redis commands documentation](http://redis.io/commands) - the original Redis documentation is necessary, as the API documentation above is just a quick reference\n- [Redis documentation page](http://redis.io/documentation) - general information about Redis and its concepts\n\n## Performance\n\nI have benchmarked Crystal-Redis against several other client libraries in various programming languages in this [blog article](http://www.stefanwille.com/2015/05/redis-clients-crystal-vs-ruby-vs-c-vs-go/).\n\nHere are some results:\n\n- Crystal: With this library I get > 680,000 commands per second using pipeline on a MacBook Air with a single client thread.\n\n- C: The equivalent program written in C with Hiredis gets me 340,000 commands per second.\n\n- Ruby: Ruby 2.2.1 with the [redis-rb](https://github.com/redis/redis-rb) and Hiredis driver handles 150,000 commands per second.\n\n[Read more results](http://www.stefanwille.com/2015/05/redis-clients-crystal-vs-ruby-vs-c-vs-go/) for Go, Java, Node.js.\n\n## Status\n\nI have exercised every API method in the spec and built some example programs. Some people report production usage.\n\nI took great care to make this library very usable with respect to API, reliability and documentation.\n\n## Development\n\nThis project requires a locally running redis server running on port 6379 and with a Unix socket located at /tmp/redis.sock. In Homebrew's default redis.config the Unix domain socket option is disabled. To enable, edit `/usr/local/etc/redis.conf` or whatever your `redis.conf` is and uncomment this line:\n\n```\n# unixsocket /tmp/redis.sock\n```\n\nso that it reads\n\n```\nunixsocket /tmp/redis.sock\n```\n\nThen you can run the specs via\n\n`$ crystal spec`\n\n[See more information](https://github.com/stefanwille/crystal-redis/blob/master/CONTRIBUTING.md).\n\n### WARNING\n\nRunning the spec will delete database number 0!\n\n## Questions, Bugs & Support\n\nIf you have questions or need help, please open a ticket in the [GitHub issue tracker](https://github.com/stefanwille/crystal-redis/issues). This way others can benefit from the discussion.\n","program":{"html_id":"github.com/stefanwille/crystal-redis/toplevel","path":"toplevel.html","kind":"module","full_name":"Top Level Namespace","name":"Top Level Namespace","abstract":false,"superclass":null,"ancestors":[],"locations":[],"repository_name":"github.com/stefanwille/crystal-redis","program":true,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":null,"doc":null,"summary":null,"class_methods":[],"constructors":[],"instance_methods":[],"macros":[],"types":[{"html_id":"github.com/stefanwille/crystal-redis/Redis","path":"Redis.html","kind":"class","full_name":"Redis","name":"Redis","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/CommandExecution/ValueOriented","kind":"module","full_name":"Redis::CommandExecution::ValueOriented","name":"ValueOriented"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/commands.cr","line_number":1,"url":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr"},{"filename":"redis/command_execution/value_oriented.cr","line_number":1,"url":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/command_execution/value_oriented.cr"},{"filename":"redis.cr","line_number":37,"url":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis.cr"},{"filename":"redis/command_execution/future_oriented.cr","line_number":1,"url":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/command_execution/future_oriented.cr"},{"filename":"redis/strategy/base.cr","line_number":1,"url":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/strategy/base.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/CommandExecution/ValueOriented","kind":"module","full_name":"Redis::CommandExecution::ValueOriented","name":"ValueOriented"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":null,"doc":"The class is the main entry point for the Redis client.\n\n**How to use**:\n\nRequire the package:\n\n```crystal\nrequire \"redis\"\n```\n\nThen instantiate this client class:\n\n```crystal\nredis = Redis.new\n```\n\nThen you can call Redis commands on the `redis` object:\n\n```crystal\nredis.set(\"foo\", \"bar\")\nredis.get(\"foo\")\nredis.incr(\"visitors\")\n```\n\nSee the mixin module [Commands](Redis/Commands.html) for most\nof the available Redis commands such as #incr, #rename, and so on.\n\n**Multithreading / Coroutines**\n\nPlease mind that a Redis object can't be shared across multiple threads/coroutines!\nEach thread/coroutine that wants to talk to Redis needs its own Redis object instance.","summary":"

    The class is the main entry point for the Redis client.

    ","class_methods":[{"id":"open(host="localhost",port=6379,unixsocket=nil,password=nil,database=nil,url=nil,ssl=false,ssl_context=nil,dns_timeout=nil,connect_timeout=nil,reconnect=true,command_timeout=nil,namespace:String?="",&block)-class-method","html_id":"open(host="localhost",port=6379,unixsocket=nil,password=nil,database=nil,url=nil,ssl=false,ssl_context=nil,dns_timeout=nil,connect_timeout=nil,reconnect=true,command_timeout=nil,namespace:String?="",&block)-class-method","name":"open","doc":"Opens a Redis connection, yields the given block with a Redis object and closes the connection.\n\n**Options**:\n* host - the host to connect to\n* port - the port to connect to\n* unixsocket - instead of using TCP, you can connect to Redis via a Unix domain socket by passing its path here (e.g. \"/tmp/redis.sock\")\n* password - the password for authentication against the server. This is a convenience which saves you the extra call to the Redis `auth` command.\n* database - the number of the database to select. This a convenience which saves you a call a call to `#select`.\n* ssl - whether SSL should be enabled.\n* ssl_context - a OpenSSL::SSL::Context::Client.\n* dns_timeout - the dns timeout.\n* connect_timeout - the connect timeout.\n* command_timeout - the command timeout - applies when a command takes too long because the Redis-server is blocked by another command or by a dump.\n* reconnect - whether we should reconnect when we encounter a disconnected Redis connection.\n* url - Redis url. If this is given, it overrides all others.\n\nExample:\n\n```\nRedis.open do |redis|\n redis.incr(\"counter\")\nend\n```","summary":"

    Opens a Redis connection, yields the given block with a Redis object and closes the connection.

    ","abstract":false,"args":[{"name":"host","doc":null,"default_value":"\"localhost\"","external_name":"host","restriction":""},{"name":"port","doc":null,"default_value":"6379","external_name":"port","restriction":""},{"name":"unixsocket","doc":null,"default_value":"nil","external_name":"unixsocket","restriction":""},{"name":"password","doc":null,"default_value":"nil","external_name":"password","restriction":""},{"name":"database","doc":null,"default_value":"nil","external_name":"database","restriction":""},{"name":"url","doc":null,"default_value":"nil","external_name":"url","restriction":""},{"name":"ssl","doc":null,"default_value":"false","external_name":"ssl","restriction":""},{"name":"ssl_context","doc":null,"default_value":"nil","external_name":"ssl_context","restriction":""},{"name":"dns_timeout","doc":null,"default_value":"nil","external_name":"dns_timeout","restriction":""},{"name":"connect_timeout","doc":null,"default_value":"nil","external_name":"connect_timeout","restriction":""},{"name":"reconnect","doc":null,"default_value":"true","external_name":"reconnect","restriction":""},{"name":"command_timeout","doc":null,"default_value":"nil","external_name":"command_timeout","restriction":""},{"name":"namespace","doc":null,"default_value":"\"\"","external_name":"namespace","restriction":"String | ::Nil"}],"args_string":"(host = "localhost", port = 6379, unixsocket = nil, password = nil, database = nil, url = nil, ssl = false, ssl_context = nil, dns_timeout = nil, connect_timeout = nil, reconnect = true, command_timeout = nil, namespace : String? = "", &block)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis.cr#L194","def":{"name":"open","args":[{"name":"host","doc":null,"default_value":"\"localhost\"","external_name":"host","restriction":""},{"name":"port","doc":null,"default_value":"6379","external_name":"port","restriction":""},{"name":"unixsocket","doc":null,"default_value":"nil","external_name":"unixsocket","restriction":""},{"name":"password","doc":null,"default_value":"nil","external_name":"password","restriction":""},{"name":"database","doc":null,"default_value":"nil","external_name":"database","restriction":""},{"name":"url","doc":null,"default_value":"nil","external_name":"url","restriction":""},{"name":"ssl","doc":null,"default_value":"false","external_name":"ssl","restriction":""},{"name":"ssl_context","doc":null,"default_value":"nil","external_name":"ssl_context","restriction":""},{"name":"dns_timeout","doc":null,"default_value":"nil","external_name":"dns_timeout","restriction":""},{"name":"connect_timeout","doc":null,"default_value":"nil","external_name":"connect_timeout","restriction":""},{"name":"reconnect","doc":null,"default_value":"true","external_name":"reconnect","restriction":""},{"name":"command_timeout","doc":null,"default_value":"nil","external_name":"command_timeout","restriction":""},{"name":"namespace","doc":null,"default_value":"\"\"","external_name":"namespace","restriction":"String | ::Nil"}],"double_splat":null,"splat_index":null,"yields":1,"block_arg":null,"return_type":"","visibility":"Public","body":"redis = Redis.new(host, port, unixsocket, password, database, url, ssl, ssl_context, dns_timeout, connect_timeout, reconnect, command_timeout, namespace)\nbegin\n yield redis\nensure\n redis.close\nend\n"}}],"constructors":[{"id":"new(host="localhost",port=6379,unixsocket:String?=nil,password:String?=nil,database:Int32?=nil,url=nil,ssl=false,ssl_context:OpenSSL::SSL::Context::Client?=nil,dns_timeout:Time::Span?=nil,connect_timeout:Time::Span?=nil,reconnect=true,command_timeout:Time::Span?=nil,namespace:String?="")-class-method","html_id":"new(host="localhost",port=6379,unixsocket:String?=nil,password:String?=nil,database:Int32?=nil,url=nil,ssl=false,ssl_context:OpenSSL::SSL::Context::Client?=nil,dns_timeout:Time::Span?=nil,connect_timeout:Time::Span?=nil,reconnect=true,command_timeout:Time::Span?=nil,namespace:String?="")-class-method","name":"new","doc":"Opens a Redis connection\n\n**Options**:\n* host - the host to connect to\n* port - the port to connect to\n* unixsocket - instead of using TCP, you can connect to Redis via a Unix domain socket by passing its path here (e.g. \"/tmp/redis.sock\")\n* password - the password for authentication against the server. This is a convenience which saves you the extra call to the Redis `auth` command.\n* database - the number of the database to select. This a convenience which saves you a call a call to `#select`.\n* ssl - whether SSL should be enabled.\n* ssl_context - a OpenSSL::SSL::Context::Client.\n* dns_timeout - the dns timeout.\n* connect_timeout - the connect timeout.\n* command_timeout - the command timeout - applies when a command takes too long because the Redis-server is blocked by another command or by a dump.\n* reconnect - whether we should reconnect when we encounter a disconnected Redis connection.\n* url - Redis url. If this is given, it overrides all others.\n\nExample:\n\n```\nredis = Redis.new\nredis.incr(\"counter\")\nredis.close\n```\n\nExample:\n\n```\nredis = Redis.new(host: \"localhost\", port: 6379)\n...\n```\n\nExample:\n\n```\nredis = Redis.new(unixsocket: \"/tmp/redis.sock\")\n...\n```\n\nExample:\n\n```\nredis = Redis.new(url: \"redis://:my-secret-pw@my.redis.com:6380/my-database\")\n...\n```","summary":"

    Opens a Redis connection

    ","abstract":false,"args":[{"name":"host","doc":null,"default_value":"\"localhost\"","external_name":"host","restriction":""},{"name":"port","doc":null,"default_value":"6379","external_name":"port","restriction":""},{"name":"unixsocket","doc":null,"default_value":"nil","external_name":"unixsocket","restriction":"String | ::Nil"},{"name":"password","doc":null,"default_value":"nil","external_name":"password","restriction":"String | ::Nil"},{"name":"database","doc":null,"default_value":"nil","external_name":"database","restriction":"Int32 | ::Nil"},{"name":"url","doc":null,"default_value":"nil","external_name":"url","restriction":""},{"name":"ssl","doc":null,"default_value":"false","external_name":"ssl","restriction":""},{"name":"ssl_context","doc":null,"default_value":"nil","external_name":"ssl_context","restriction":"OpenSSL::SSL::Context::Client | ::Nil"},{"name":"dns_timeout","doc":null,"default_value":"nil","external_name":"dns_timeout","restriction":"Time::Span | ::Nil"},{"name":"connect_timeout","doc":null,"default_value":"nil","external_name":"connect_timeout","restriction":"Time::Span | ::Nil"},{"name":"reconnect","doc":null,"default_value":"true","external_name":"reconnect","restriction":""},{"name":"command_timeout","doc":null,"default_value":"nil","external_name":"command_timeout","restriction":"Time::Span | ::Nil"},{"name":"namespace","doc":null,"default_value":"\"\"","external_name":"namespace","restriction":"String | ::Nil"}],"args_string":"(host = "localhost", port = 6379, unixsocket : String? = nil, password : String? = nil, database : Int32? = nil, url = nil, ssl = false, ssl_context : OpenSSL::SSL::Context::Client? = nil, dns_timeout : Time::Span? = nil, connect_timeout : Time::Span? = nil, reconnect = true, command_timeout : Time::Span? = nil, namespace : String? = "")","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis.cr#L95","def":{"name":"new","args":[{"name":"host","doc":null,"default_value":"\"localhost\"","external_name":"host","restriction":""},{"name":"port","doc":null,"default_value":"6379","external_name":"port","restriction":""},{"name":"unixsocket","doc":null,"default_value":"nil","external_name":"unixsocket","restriction":"String | ::Nil"},{"name":"password","doc":null,"default_value":"nil","external_name":"password","restriction":"String | ::Nil"},{"name":"database","doc":null,"default_value":"nil","external_name":"database","restriction":"Int32 | ::Nil"},{"name":"url","doc":null,"default_value":"nil","external_name":"url","restriction":""},{"name":"ssl","doc":null,"default_value":"false","external_name":"ssl","restriction":""},{"name":"ssl_context","doc":null,"default_value":"nil","external_name":"ssl_context","restriction":"OpenSSL::SSL::Context::Client | ::Nil"},{"name":"dns_timeout","doc":null,"default_value":"nil","external_name":"dns_timeout","restriction":"Time::Span | ::Nil"},{"name":"connect_timeout","doc":null,"default_value":"nil","external_name":"connect_timeout","restriction":"Time::Span | ::Nil"},{"name":"reconnect","doc":null,"default_value":"true","external_name":"reconnect","restriction":""},{"name":"command_timeout","doc":null,"default_value":"nil","external_name":"command_timeout","restriction":"Time::Span | ::Nil"},{"name":"namespace","doc":null,"default_value":"\"\"","external_name":"namespace","restriction":"String | ::Nil"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"_ = allocate\n_.initialize(host, port, unixsocket, password, database, url, ssl, ssl_context, dns_timeout, connect_timeout, reconnect, command_timeout, namespace)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"id":"close-instance-method","html_id":"close-instance-method","name":"close","doc":"Closes the Redis connection.","summary":"

    Closes the Redis connection.

    ","abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis.cr#L207","def":{"name":"close","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"@connection.try(&.close)\n@connection = nil\n@strategy = nil\n"}},{"id":"multi(&block)-instance-method","html_id":"multi(&block)-instance-method","name":"multi","doc":"Sends Redis commands in transaction mode.\n\nYields its block. The block receives as argument\nan object that has the same API as this class, except:\n * it participates in the transaction\n * all the Redis commands return Futures\n * there is an additional method #discard that will abort the transaction.\n\n**Return value**: an array with all the responses\n- one element for each executed command.\n\nExample:\n\n```\nredis.multi do |multi|\n multi.set(\"foo1\", \"first\")\n multi.set(\"foo2\", \"second\")\nend\n```\n\nSee the [examples repository](https://github.com/stefanwille/crystal-redis-examples) for more examples.","summary":"

    Sends Redis commands in transaction mode.

    ","abstract":false,"args":[],"args_string":"(&block)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis.cr#L286","def":{"name":"multi","args":[],"double_splat":null,"splat_index":null,"yields":1,"block_arg":null,"return_type":"","visibility":"Public","body":"begin\n @strategy = Redis::Strategy::PauseDuringTransaction.new\n transaction_strategy = Redis::Strategy::Transaction.new(connection)\n transaction_strategy.begin\n transaction_api = Redis::TransactionApi.new(transaction_strategy, @namespace.to_s)\n yield transaction_api\n transaction_strategy.commit.as(Array(RedisValue))\nrescue ex : Redis::ConnectionError | Redis::CommandTimeoutError\n close\n raise(ex)\nensure\n if @connection\n @strategy = Redis::Strategy::SingleStatement.new(@connection.not_nil!)\n end\nend"}},{"id":"pipelined(&block)-instance-method","html_id":"pipelined(&block)-instance-method","name":"pipelined","doc":"Sends Redis commands in pipeline mode.\n\nYields its block. The block receives as argument\nan object that has the same API as this class, except\nit participates in pipelining and all Redis commands return Futures.\n\n**Return value**: an array with all the responses\n- one element for each executed command.\n\nExample:\n\n```\nredis.pipelined do |pipeline|\n pipeline.set(\"foo1\", \"first\")\n pipeline.set(\"foo2\", \"second\")\nend\n```\n\nSee the [examples repository](https://github.com/stefanwille/crystal-redis-examples) for more examples.","summary":"

    Sends Redis commands in pipeline mode.

    ","abstract":false,"args":[],"args_string":"(&block)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis.cr#L250","def":{"name":"pipelined","args":[],"double_splat":null,"splat_index":null,"yields":1,"block_arg":null,"return_type":"","visibility":"Public","body":"begin\n @strategy = Redis::Strategy::PauseDuringPipeline.new\n pipeline_strategy = Redis::Strategy::Pipeline.new(connection)\n pipeline_api = Redis::PipelineApi.new(pipeline_strategy, @namespace.to_s)\n yield pipeline_api\n pipeline_strategy.commit.as(Array(RedisValue))\nrescue ex : Redis::ConnectionError | Redis::CommandTimeoutError\n close\n raise(ex)\nensure\n if @connection\n @strategy = Redis::Strategy::SingleStatement.new(@connection.not_nil!)\n end\nend"}},{"id":"url-instance-method","html_id":"url-instance-method","name":"url","doc":"Returns the server URL for this client.","summary":"

    Returns the server URL for this client.

    ","abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis.cr#L214","def":{"name":"url","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"scheme = @ssl ? \"rediss\" : \"redis\"\nif @unixsocket\n \"#{scheme}://#{@unixsocket}/#{@database || 0}\"\nelse\n \"#{scheme}://#{@host}:#{@port}/#{@database || 0}\"\nend\n"}}],"macros":[],"types":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/CannotConnectError","path":"Redis/CannotConnectError.html","kind":"class","full_name":"Redis::CannotConnectError","name":"CannotConnectError","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Redis/ConnectionError","kind":"class","full_name":"Redis::ConnectionError","name":"ConnectionError"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/ConnectionError","kind":"class","full_name":"Redis::ConnectionError","name":"ConnectionError"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"github.com/stefanwille/crystal-redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/error.cr","line_number":10,"url":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/error.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"Raised when connecting to the Redis server is not possible.","summary":"

    Raised when connecting to the Redis server is not possible.

    ","class_methods":[],"constructors":[],"instance_methods":[],"macros":[],"types":[]},{"html_id":"github.com/stefanwille/crystal-redis/Redis/Commands","path":"Redis/Commands.html","kind":"module","full_name":"Redis::Commands","name":"Commands","abstract":false,"superclass":null,"ancestors":[],"locations":[{"filename":"redis/commands.cr","line_number":4,"url":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[],"including_types":[{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/PipelineApi","kind":"class","full_name":"Redis::PipelineApi","name":"PipelineApi"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/TransactionApi","kind":"class","full_name":"Redis::TransactionApi","name":"TransactionApi"}],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"Definition of all Redis commands except pipelining and transactions.\n","summary":"

    Definition of all Redis commands except pipelining and transactions.

    ","class_methods":[],"constructors":[],"instance_methods":[{"id":"append(key,value)-instance-method","html_id":"append(key,value)-instance-method","name":"append","doc":"If key already exists and is a string, this command appends the value at the end of the string.\nIf key does not exist it is created and set as an empty string, so APPEND will be similar to SET in this special case.\n\n**Return value**: Integer, the length of the string after the append operation.\n\nExample:\n\n```\nredis.append(\"foo\", \" world\")\n```","summary":"

    If key already exists and is a string, this command appends the value at the end of the string.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L375","def":{"name":"append","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"APPEND\", namespaced(key), value.to_s])"}},{"id":"auth(password)-instance-method","html_id":"auth(password)-instance-method","name":"auth","doc":"Request for authentication in a password-protected Redis server.\n\n**Return value**: \"OK\"","summary":"

    Request for authentication in a password-protected Redis server.

    ","abstract":false,"args":[{"name":"password","doc":null,"default_value":"","external_name":"password","restriction":""}],"args_string":"(password)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L87","def":{"name":"auth","args":[{"name":"password","doc":null,"default_value":"","external_name":"password","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"AUTH\", password])"}},{"id":"bitcount(key,from=nil,to=nil)-instance-method","html_id":"bitcount(key,from=nil,to=nil)-instance-method","name":"bitcount","doc":"Count the number of set bits (population counting) in a string.\nBy default all the bytes contained in the string are examined.\n\n**Options**:\n\n* from / to - It is possible to specify the counting operation only in an interval passing the additional arguments from and to.\n\n**Return value** Integer, the number of bits set to 1.\n\nExample:\n\n```\nredis.bitcount(\"foo\", 0, 0)\n```","summary":"

    Count the number of set bits (population counting) in a string.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"from","doc":null,"default_value":"nil","external_name":"from","restriction":""},{"name":"to","doc":null,"default_value":"nil","external_name":"to","restriction":""}],"args_string":"(key, from = nil, to = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L427","def":{"name":"bitcount","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"from","doc":null,"default_value":"nil","external_name":"from","restriction":""},{"name":"to","doc":null,"default_value":"nil","external_name":"to","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"BITCOUNT\", namespaced(key)]\nif from\n if to\n q << from.to_s\n q << to.to_s\n else\n raise(Redis::Error.new(\"from specified, but not to\"))\n end\nend\ninteger_command(q)\n"}},{"id":"bitop(operation,key,*keys:String):Int64-instance-method","html_id":"bitop(operation,key,*keys:String):Int64-instance-method","name":"bitop","doc":"Perform a bitwise operation between multiple keys (containing string values) and store the result in the destination key.\n\n**Return value**: Integer, the size of the string stored in the destination key, that is equal to the size of the longest input string.\n\nExample:\n\n```\nredis.bitop(\"and\", \"dest\", \"key1\", \"key2\")\n```","summary":"

    Perform a bitwise operation between multiple keys (containing string values) and store the result in the destination key.

    ","abstract":false,"args":[{"name":"operation","doc":null,"default_value":"","external_name":"operation","restriction":""},{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"args_string":"(operation, key, *keys : String) : Int64","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L454","def":{"name":"bitop","args":[{"name":"operation","doc":null,"default_value":"","external_name":"operation","restriction":""},{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"double_splat":null,"splat_index":2,"yields":null,"block_arg":null,"return_type":"Int64","visibility":"Public","body":"bitop(operation, key, keys.to_a)"}},{"id":"bitop(operation,key,keys:Array(String)):Int64-instance-method","html_id":"bitop(operation,key,keys:Array(String)):Int64-instance-method","name":"bitop","doc":"Perform a bitwise operation between multiple keys (containing string values) and store the result in the destination key.\n\n**Return value**: Integer, the size of the string stored in the destination key, that is equal to the size of the longest input string.\n\nExample:\n\n```\nredis.bitop(\"and\", \"dest\", \"key1\", \"key2\")\n```","summary":"

    Perform a bitwise operation between multiple keys (containing string values) and store the result in the destination key.

    ","abstract":false,"args":[{"name":"operation","doc":null,"default_value":"","external_name":"operation","restriction":""},{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"args_string":"(operation, key, keys : Array(String)) : Int64","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L449","def":{"name":"bitop","args":[{"name":"operation","doc":null,"default_value":"","external_name":"operation","restriction":""},{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Int64","visibility":"Public","body":"integer_command(concat([\"BITOP\", operation.to_s, namespaced(key)], namespaced(keys)))"}},{"id":"bitpos(key,bit,start=nil,to=nil)-instance-method","html_id":"bitpos(key,bit,start=nil,to=nil)-instance-method","name":"bitpos","doc":"Return the position of the first bit set to 1 or 0 in a string.\n\n**Options**:\n\n* start / to - By default, all the bytes contained in the string are examined. It is possible to look for bits only in a specified interval passing the additional arguments start and to (it is possible to just pass start, the operation will assume that the to is the last byte of the string.\n\n**Return value**: Integer, the command returns the position of the first bit set to 1 or 0 according to the request.\n\nExample:\n\n```\nredis.set(\"mykey\", \"0\")\nredis.bitpos(\"mykey\", 1) # => 2\n```","summary":"

    Return the position of the first bit set to 1 or 0 in a string.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"bit","doc":null,"default_value":"","external_name":"bit","restriction":""},{"name":"start","doc":null,"default_value":"nil","external_name":"start","restriction":""},{"name":"to","doc":null,"default_value":"nil","external_name":"to","restriction":""}],"args_string":"(key, bit, start = nil, to = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L492","def":{"name":"bitpos","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"bit","doc":null,"default_value":"","external_name":"bit","restriction":""},{"name":"start","doc":null,"default_value":"nil","external_name":"start","restriction":""},{"name":"to","doc":null,"default_value":"nil","external_name":"to","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"BITPOS\", namespaced(key), bit.to_s] of RedisValue\nif start\n q << start.to_s\n if to\n q << to\n end\nend\ninteger_command(q)\n"}},{"id":"blpop(keys,timeout_in_seconds)-instance-method","html_id":"blpop(keys,timeout_in_seconds)-instance-method","name":"blpop","doc":"BLPOP is a blocking list pop primitive.\nIt is the blocking version of LPOP because it blocks the connection when there\nare no elements to pop from any of the given lists.\nAn element is popped from the head of the first list that is non-empty,\nwith the given keys being checked in the order that they are given.\n\nThe timeout_in_seconds argument is interpreted as an integer value specifying the maximum number of seconds to block\n\n**Return value**: Array, specifically:\n* An array of nils when no element could be popped and the timeout expired.\n* An array of two-element arrays with the first element being the name of the key where an element was popped and the second element being the value of the popped element.\n\nExample:\n\n```\nredis.blpop([\"myotherlist\", \"mylist\"], 1) # => [\"mylist\", \"hello\"]\n```","summary":"

    BLPOP is a blocking list pop primitive.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":""},{"name":"timeout_in_seconds","doc":null,"default_value":"","external_name":"timeout_in_seconds","restriction":""}],"args_string":"(keys, timeout_in_seconds)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L910","def":{"name":"blpop","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":""},{"name":"timeout_in_seconds","doc":null,"default_value":"","external_name":"timeout_in_seconds","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = concat([\"BLPOP\"], namespaced(keys))\nq << timeout_in_seconds.to_s\nresult = array_or_nil_command(q)\nif result\nelse\n return result\nend\nresult[0] = without_namespace(\"#{result.first}\")\nresult\n"}},{"id":"brpop(keys,timeout_in_seconds)-instance-method","html_id":"brpop(keys,timeout_in_seconds)-instance-method","name":"brpop","doc":"BRPOP is a blocking list pop primitive.\nIt is the blocking version of RPOP because it blocks the connection when there\nare no elements to pop from any of the given lists.\nAn element is popped from the tail of the first list that is non-empty,\nwith the given keys being checked in the order that they are given.\n\nThe timeout_in_seconds argument is interpreted as an integer value specifying the maximum\nnumber of seconds to block.\n\n**Return value**: Array, specifically:\n* An array of nils when no element could be popped and the timeout expired.\n* An array of two-element arrays with the first element being the name of the key where an element was popped and the second element being the value of the popped element.\n\nExample:\n\n```\nredis.brpop([\"myotherlist\", \"mylist\"], 1) # => [\"mylist\", \"world\"]\n```","summary":"

    BRPOP is a blocking list pop primitive.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":""},{"name":"timeout_in_seconds","doc":null,"default_value":"","external_name":"timeout_in_seconds","restriction":""}],"args_string":"(keys, timeout_in_seconds)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L939","def":{"name":"brpop","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":""},{"name":"timeout_in_seconds","doc":null,"default_value":"","external_name":"timeout_in_seconds","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = concat([\"BRPOP\"], namespaced(keys))\nq << timeout_in_seconds.to_s\nresult = array_or_nil_command(q)\nif result\nelse\n return result\nend\nresult[0] = without_namespace(\"#{result.first}\")\nresult\n"}},{"id":"brpoplpush(source,destination,timeout_in_seconds=nil)-instance-method","html_id":"brpoplpush(source,destination,timeout_in_seconds=nil)-instance-method","name":"brpoplpush","doc":"BRPOPLPUSH is the blocking variant of RPOPLPUSH.\nWhen source contains elements, this command behaves exactly like RPOPLPUSH.\n\n**Options**:\n\n* timeout_in_seconds - interpreted as an integer value specifying the maximum number of seconds to block\n\nSee RPOPLPUSH for more information.\n\n**Return value**: String, the element being popped from source and pushed to destination.\nIf timeout is reached, nil is returned.\n\nExample:\n\n```\nredis.brpoplpush(\"source\", \"destination\", 0)\n```","summary":"

    BRPOPLPUSH is the blocking variant of RPOPLPUSH.

    ","abstract":false,"args":[{"name":"source","doc":null,"default_value":"","external_name":"source","restriction":""},{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"timeout_in_seconds","doc":null,"default_value":"nil","external_name":"timeout_in_seconds","restriction":""}],"args_string":"(source, destination, timeout_in_seconds = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L975","def":{"name":"brpoplpush","args":[{"name":"source","doc":null,"default_value":"","external_name":"source","restriction":""},{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"timeout_in_seconds","doc":null,"default_value":"nil","external_name":"timeout_in_seconds","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"BRPOPLPUSH\", source.to_s, destination.to_s]\nif timeout_in_seconds\n q << timeout_in_seconds.to_s\nend\nstring_or_nil_command(q)\n"}},{"id":"decr(key)-instance-method","html_id":"decr(key)-instance-method","name":"decr","doc":"Decrements the number stored at key by one.\n\n**Return value**: Integer, the value of key after the decrement","summary":"

    Decrements the number stored at key by one.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L328","def":{"name":"decr","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"DECR\", namespaced(key)])"}},{"id":"decrby(key,decrement)-instance-method","html_id":"decrby(key,decrement)-instance-method","name":"decrby","doc":"Decrements the number stored at key by decrement.\n\n**Return value**: Integer, the value of key after the decrement","summary":"

    Decrements the number stored at key by decrement.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"decrement","doc":null,"default_value":"","external_name":"decrement","restriction":""}],"args_string":"(key, decrement)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L361","def":{"name":"decrby","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"decrement","doc":null,"default_value":"","external_name":"decrement","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"DECRBY\", namespaced(key), decrement.to_s])"}},{"id":"del(keys:Array)-instance-method","html_id":"del(keys:Array)-instance-method","name":"del","doc":"Removes the specified keys.\n\n**Return value**: Integer, the number of keys that were removed.\n\nExample:\n\n```\nredis.del([\"some\", \"keys\", \"to\", \"delete\"])\n```","summary":"

    Removes the specified keys.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array"}],"args_string":"(keys : Array)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L155","def":{"name":"del","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command(concat([\"DEL\"], namespaced(keys)))"}},{"id":"del(*keys)-instance-method","html_id":"del(*keys)-instance-method","name":"del","doc":"Removes the specified keys.\n\n**Return value**: Integer, the number of keys that were removed.\n\nExample:\n\n```\nredis.del(\"some\", \"keys\", \"to\", \"delete\")\n```","summary":"

    Removes the specified keys.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":""}],"args_string":"(*keys)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L142","def":{"name":"del","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":""}],"double_splat":null,"splat_index":0,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"del(keys.to_a)"}},{"id":"dump(key)-instance-method","html_id":"dump(key)-instance-method","name":"dump","doc":"Serialize the value stored at key in a Redis-specific format and return it to the user.\n\n**Return value**: String, the serialized value.","summary":"

    Serialize the value stored at key in a Redis-specific format and return it to the user.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L506","def":{"name":"dump","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"DUMP\", namespaced(key)])"}},{"id":"echo(message)-instance-method","html_id":"echo(message)-instance-method","name":"echo","doc":"Returns the given message.\n\nExample:\n\n```\nredis.echo(\"Hello Redis\") # => \"Hello Redis\"\n```","summary":"

    Returns the given message.

    ","abstract":false,"args":[{"name":"message","doc":null,"default_value":"","external_name":"message","restriction":""}],"args_string":"(message)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L12","def":{"name":"echo","args":[{"name":"message","doc":null,"default_value":"","external_name":"message","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"ECHO\", message.to_s])"}},{"id":"eval(script:String,keys=[]ofRedisValue,args=[]ofRedisValue)-instance-method","html_id":"eval(script:String,keys=[]ofRedisValue,args=[]ofRedisValue)-instance-method","name":"eval","doc":"EVAL and EVALSHA are used to evaluate scripts using the Lua interpreter\nbuilt into Redis starting from version 2.6.0.\n\n**Return value**: Array(String), depends on the executed script\n\nExample:\n\n```\nredis.eval(\"return {KEYS[1],KEYS[2],ARGV[1],ARGV[2]}\", [\"key1\", \"key2\"], [\"first art\", \"second arg\"])\n```","summary":"

    EVAL and EVALSHA are used to evaluate scripts using the Lua interpreter built into Redis starting from version 2.6.0.

    ","abstract":false,"args":[{"name":"script","doc":null,"default_value":"","external_name":"script","restriction":"String"},{"name":"keys","doc":null,"default_value":"[] of RedisValue","external_name":"keys","restriction":""},{"name":"args","doc":null,"default_value":"[] of RedisValue","external_name":"args","restriction":""}],"args_string":"(script : String, keys = [] of RedisValue, args = [] of RedisValue)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1480","def":{"name":"eval","args":[{"name":"script","doc":null,"default_value":"","external_name":"script","restriction":"String"},{"name":"keys","doc":null,"default_value":"[] of RedisValue","external_name":"keys","restriction":""},{"name":"args","doc":null,"default_value":"[] of RedisValue","external_name":"args","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_array_command(concat([\"EVAL\", script, keys.size.to_s], keys, args))"}},{"id":"evalsha(sha1,keys=[]ofRedisValue,args=[]ofRedisValue)-instance-method","html_id":"evalsha(sha1,keys=[]ofRedisValue,args=[]ofRedisValue)-instance-method","name":"evalsha","doc":"EVAL and EVALSHA are used to evaluate scripts using the Lua interpreter\nbuilt into Redis starting from version 2.6.0.\n\n**Return value**: Array(String), depends on the executed script","summary":"

    EVAL and EVALSHA are used to evaluate scripts using the Lua interpreter built into Redis starting from version 2.6.0.

    ","abstract":false,"args":[{"name":"sha1","doc":null,"default_value":"","external_name":"sha1","restriction":""},{"name":"keys","doc":null,"default_value":"[] of RedisValue","external_name":"keys","restriction":""},{"name":"args","doc":null,"default_value":"[] of RedisValue","external_name":"args","restriction":""}],"args_string":"(sha1, keys = [] of RedisValue, args = [] of RedisValue)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1488","def":{"name":"evalsha","args":[{"name":"sha1","doc":null,"default_value":"","external_name":"sha1","restriction":""},{"name":"keys","doc":null,"default_value":"[] of RedisValue","external_name":"keys","restriction":""},{"name":"args","doc":null,"default_value":"[] of RedisValue","external_name":"args","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_array_command(concat([\"EVALSHA\", sha1.to_s, keys.size.to_s], keys, args))"}},{"id":"exists(key)-instance-method","html_id":"exists(key)-instance-method","name":"exists","doc":"Returns if key exists.\n\n**Return value**:\n* 1 if the key exists.\n* 0 if the key does not exist.","summary":"

    Returns if key exists.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L558","def":{"name":"exists","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"EXISTS\", namespaced(key)])"}},{"id":"expire(key,seconds)-instance-method","html_id":"expire(key,seconds)-instance-method","name":"expire","doc":"Set a timeout on key.\n\n**Return value**: Integeger, specifically:\n* 1 if the timeout was set.\n* 0 if key does not exist or the timeout could not be set.\n\nExample:\n\n```\nredis.expire(\"temp\", 2)\n```","summary":"

    Set a timeout on key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"seconds","doc":null,"default_value":"","external_name":"seconds","restriction":""}],"args_string":"(key, seconds)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1556","def":{"name":"expire","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"seconds","doc":null,"default_value":"","external_name":"seconds","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"EXPIRE\", namespaced(key), seconds.to_s])"}},{"id":"expireat(key,unix_date)-instance-method","html_id":"expireat(key,unix_date)-instance-method","name":"expireat","doc":"EXPIREAT has the same effect and semantic as EXPIRE, but instead of\nspecifying the number of seconds representing the TTL (time to live),\nit takes an absolute Unix timestamp (seconds since January 1, 1970).\n\n**Return value**: Integeger, specifically:\n* 1 if the timeout was set.\n* 0 if key does not exist or the timeout could not be set.","summary":"

    EXPIREAT has the same effect and semantic as EXPIRE, but instead of specifying the number of seconds representing the TTL (time to live), it takes an absolute Unix timestamp (seconds since January 1, 1970).

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"unix_date","doc":null,"default_value":"","external_name":"unix_date","restriction":""}],"args_string":"(key, unix_date)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1577","def":{"name":"expireat","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"unix_date","doc":null,"default_value":"","external_name":"unix_date","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"EXPIREAT\", namespaced(key), unix_date.to_s])"}},{"id":"flushall-instance-method","html_id":"flushall-instance-method","name":"flushall","doc":"Flush all databases.\n\n**Return value**: \"OK\"","summary":"

    Flush all databases.

    ","abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1534","def":{"name":"flushall","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"FLUSHALL\"])"}},{"id":"flushdb-instance-method","html_id":"flushdb-instance-method","name":"flushdb","doc":"Flush the current database.\n\n**Return value**: \"OK\"","summary":"

    Flush the current database.

    ","abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1527","def":{"name":"flushdb","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"FLUSHDB\"])"}},{"id":"geoadd(key,longitude,latitude,place)-instance-method","html_id":"geoadd(key,longitude,latitude,place)-instance-method","name":"geoadd","doc":"Adds the specified geospatial items (latitude, longitude, name) to the specified key.\n\n**Return value**: Integer: The number of elements added to the sorted set, not including elements already existing for which the score was updated.","summary":"

    Adds the specified geospatial items (latitude, longitude, name) to the specified key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"longitude","doc":null,"default_value":"","external_name":"longitude","restriction":""},{"name":"latitude","doc":null,"default_value":"","external_name":"latitude","restriction":""},{"name":"place","doc":null,"default_value":"","external_name":"place","restriction":""}],"args_string":"(key, longitude, latitude, place)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1822","def":{"name":"geoadd","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"longitude","doc":null,"default_value":"","external_name":"longitude","restriction":""},{"name":"latitude","doc":null,"default_value":"","external_name":"latitude","restriction":""},{"name":"place","doc":null,"default_value":"","external_name":"place","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"GEOADD\", namespaced(key), longitude.to_s, latitude.to_s, place.to_s])"}},{"id":"geodist(key,member1,member2,unit=nil)-instance-method","html_id":"geodist(key,member1,member2,unit=nil)-instance-method","name":"geodist","doc":"Return the distance between two members in the geospatial index represented by the sorted set.\n\n**Return value**: String: returns the distance as a double (represented as a string) in the specified unit,\nor NULL if one or both the elements are missing","summary":"

    Return the distance between two members in the geospatial index represented by the sorted set.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"member1","doc":null,"default_value":"","external_name":"member1","restriction":""},{"name":"member2","doc":null,"default_value":"","external_name":"member2","restriction":""},{"name":"unit","doc":null,"default_value":"nil","external_name":"unit","restriction":""}],"args_string":"(key, member1, member2, unit = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1830","def":{"name":"geodist","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"member1","doc":null,"default_value":"","external_name":"member1","restriction":""},{"name":"member2","doc":null,"default_value":"","external_name":"member2","restriction":""},{"name":"unit","doc":null,"default_value":"nil","external_name":"unit","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"GEODIST\", namespaced(key), member1.to_s, member2.to_s]\nif unit\n q << unit.to_s\nend\nstring_or_nil_command(q)\n"}},{"id":"geohash(key,*args)-instance-method","html_id":"geohash(key,*args)-instance-method","name":"geohash","doc":"Return valid Geohash strings representing the position of one or more elements in a sorted set value representing a geospatial index\n\n**Return value**: Array(String): returns an array where each element is the Geohash corresponding to each\nmember name passed as argument to the command","summary":"

    Return valid Geohash strings representing the position of one or more elements in a sorted set value representing a geospatial index

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"args","doc":null,"default_value":"","external_name":"args","restriction":""}],"args_string":"(key, *args)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1840","def":{"name":"geohash","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"args","doc":null,"default_value":"","external_name":"args","restriction":""}],"double_splat":null,"splat_index":1,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"GEOHASH\", namespaced(key)]\nargs.each do |arg|\n q << arg.to_s\nend\nstring_array_command(q)\n"}},{"id":"geopos(key,*args)-instance-method","html_id":"geopos(key,*args)-instance-method","name":"geopos","doc":"Return the positions (longitude,latitude) of all the specified members of the geospatial index represented by the sorted set at key\n\n**Return value**: Array(String): returns an array where each element is a two elements array representing\nlongitude and latitude (x,y) of each member name passed as argument to the command","summary":"

    Return the positions (longitude,latitude) of all the specified members of the geospatial index represented by the sorted set at key

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"args","doc":null,"default_value":"","external_name":"args","restriction":""}],"args_string":"(key, *args)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1852","def":{"name":"geopos","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"args","doc":null,"default_value":"","external_name":"args","restriction":""}],"double_splat":null,"splat_index":1,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"GEOPOS\", namespaced(key)]\nargs.each do |arg|\n q << arg.to_s\nend\nstring_array_command(q)\n"}},{"id":"georadius(key,longitude,latitude,radius,unit,withcoord=nil,withdist=nil,withhash=nil,count=nil,sort=nil)-instance-method","html_id":"georadius(key,longitude,latitude,radius,unit,withcoord=nil,withdist=nil,withhash=nil,count=nil,sort=nil)-instance-method","name":"georadius","doc":"Return the members of a sorted set populated with geospatial information using GEOADD, which are within the borders\nof the area specified with the center location and the maximum distance from the center (the radius).\n\n**Return value**: Array(String): Returns a simple array or array of arrays, depending on the options passed\nhttps://redis.io/commands/georadius#return-value","summary":"

    Return the members of a sorted set populated with geospatial information using GEOADD, which are within the borders of the area specified with the center location and the maximum distance from the center (the radius).

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"longitude","doc":null,"default_value":"","external_name":"longitude","restriction":""},{"name":"latitude","doc":null,"default_value":"","external_name":"latitude","restriction":""},{"name":"radius","doc":null,"default_value":"","external_name":"radius","restriction":""},{"name":"unit","doc":null,"default_value":"","external_name":"unit","restriction":""},{"name":"withcoord","doc":null,"default_value":"nil","external_name":"withcoord","restriction":""},{"name":"withdist","doc":null,"default_value":"nil","external_name":"withdist","restriction":""},{"name":"withhash","doc":null,"default_value":"nil","external_name":"withhash","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""},{"name":"sort","doc":null,"default_value":"nil","external_name":"sort","restriction":""}],"args_string":"(key, longitude, latitude, radius, unit, withcoord = nil, withdist = nil, withhash = nil, count = nil, sort = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1865","def":{"name":"georadius","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"longitude","doc":null,"default_value":"","external_name":"longitude","restriction":""},{"name":"latitude","doc":null,"default_value":"","external_name":"latitude","restriction":""},{"name":"radius","doc":null,"default_value":"","external_name":"radius","restriction":""},{"name":"unit","doc":null,"default_value":"","external_name":"unit","restriction":""},{"name":"withcoord","doc":null,"default_value":"nil","external_name":"withcoord","restriction":""},{"name":"withdist","doc":null,"default_value":"nil","external_name":"withdist","restriction":""},{"name":"withhash","doc":null,"default_value":"nil","external_name":"withhash","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""},{"name":"sort","doc":null,"default_value":"nil","external_name":"sort","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"GEORADIUS\", namespaced(key), longitude.to_s, latitude.to_s, radius.to_s, unit.to_s]\nif withcoord\n q << \"WITHCOORD\"\nend\nif withdist\n q << \"WITHDIST\"\nend\nif withhash\n q << \"WITHHASH\"\nend\nif count\n q << count.to_s\nend\nif sort\n q << sort.to_s\nend\nstring_array_command(q)\n"}},{"id":"georadiusbymember(key,member,radius,unit,withcoord=nil,withdist=nil,withhash=nil,count=nil,sort=nil)-instance-method","html_id":"georadiusbymember(key,member,radius,unit,withcoord=nil,withdist=nil,withhash=nil,count=nil,sort=nil)-instance-method","name":"georadiusbymember","doc":"Exactly like GEORADIUS with the sole difference that instead of taking, as the center of the area to query, a longitude\nand latitude value, it takes the name of a member already existing inside the geospatial index represented by the sorted set\n\n**Return value**: Array(String): Returns a simple array or array of arrays, depending on the options passed\nhttps://redis.io/commands/georadius#return-value","summary":"

    Exactly like GEORADIUS with the sole difference that instead of taking, as the center of the area to query, a longitude and latitude value, it takes the name of a member already existing inside the geospatial index represented by the sorted set

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""},{"name":"radius","doc":null,"default_value":"","external_name":"radius","restriction":""},{"name":"unit","doc":null,"default_value":"","external_name":"unit","restriction":""},{"name":"withcoord","doc":null,"default_value":"nil","external_name":"withcoord","restriction":""},{"name":"withdist","doc":null,"default_value":"nil","external_name":"withdist","restriction":""},{"name":"withhash","doc":null,"default_value":"nil","external_name":"withhash","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""},{"name":"sort","doc":null,"default_value":"nil","external_name":"sort","restriction":""}],"args_string":"(key, member, radius, unit, withcoord = nil, withdist = nil, withhash = nil, count = nil, sort = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1880","def":{"name":"georadiusbymember","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""},{"name":"radius","doc":null,"default_value":"","external_name":"radius","restriction":""},{"name":"unit","doc":null,"default_value":"","external_name":"unit","restriction":""},{"name":"withcoord","doc":null,"default_value":"nil","external_name":"withcoord","restriction":""},{"name":"withdist","doc":null,"default_value":"nil","external_name":"withdist","restriction":""},{"name":"withhash","doc":null,"default_value":"nil","external_name":"withhash","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""},{"name":"sort","doc":null,"default_value":"nil","external_name":"sort","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"GEORADIUSBYMEMBER\", namespaced(key), member.to_s, radius.to_s, unit.to_s]\nif withcoord\n q << \"WITHCOORD\"\nend\nif withdist\n q << \"WITHDIST\"\nend\nif withhash\n q << \"WITHHASH\"\nend\nif count\n q << count.to_s\nend\nif sort\n q << sort.to_s\nend\nstring_array_command(q)\n"}},{"id":"get(key)-instance-method","html_id":"get(key)-instance-method","name":"get","doc":"Get the value of key.\n\n**Return value**: a String or nil\n\nExample:\n\n```\nredis.set(\"foo\", \"test\")\nredis.get(\"foo\") # => \"test\"\n```","summary":"

    Get the value of key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L66","def":{"name":"get","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_or_nil_command([\"GET\", namespaced(key)])"}},{"id":"getbit(key,index)-instance-method","html_id":"getbit(key,index)-instance-method","name":"getbit","doc":"Returns the bit value at offset in the string value stored at key.\n\n**Return value**: Integer, the bit value stored at offset.","summary":"

    Returns the bit value at offset in the string value stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"index","doc":null,"default_value":"","external_name":"index","restriction":""}],"args_string":"(key, index)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L461","def":{"name":"getbit","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"index","doc":null,"default_value":"","external_name":"index","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"GETBIT\", namespaced(key), index.to_s])"}},{"id":"getrange(key,start_index,end_index)-instance-method","html_id":"getrange(key,start_index,end_index)-instance-method","name":"getrange","doc":"Returns the substring of the string value stored at key, determined by the offsets start and end (both are inclusive).\n\n\nExample:\n\n```\nredis.set(\"foo\", \"This is a string\")\nredis.getrange(\"foo\", 0, 3) # => \"This\"\nredis.getrange(\"foo\", -3, -1) # => \"ing\"\n```","summary":"

    Returns the substring of the string value stored at key, determined by the offsets start and end (both are inclusive).

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start_index","doc":null,"default_value":"","external_name":"start_index","restriction":""},{"name":"end_index","doc":null,"default_value":"","external_name":"end_index","restriction":""}],"args_string":"(key, start_index, end_index)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L396","def":{"name":"getrange","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start_index","doc":null,"default_value":"","external_name":"start_index","restriction":""},{"name":"end_index","doc":null,"default_value":"","external_name":"end_index","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"GETRANGE\", namespaced(key), start_index.to_s, end_index.to_s])"}},{"id":"getset(key,value)-instance-method","html_id":"getset(key,value)-instance-method","name":"getset","doc":"Atomically sets key to value and returns the old value stored at key.\n\n**Return value**: String, the old value stored at key, or nil when key did not exist.\n\nExample:\n\n```\nredis.getset(\"foo\", \"new\") # => (the old value)\n```","summary":"

    Atomically sets key to value and returns the old value stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L260","def":{"name":"getset","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_or_nil_command([\"GETSET\", namespaced(key), value])"}},{"id":"hdel(key,field)-instance-method","html_id":"hdel(key,field)-instance-method","name":"hdel","doc":"Removes the specified fields from the hash stored at key.\n\n**Return value**: Integer, the number of fields that were removed from the hash,\nnot including specified but non existing fields.","summary":"

    Removes the specified fields from the hash stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""}],"args_string":"(key, field)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1023","def":{"name":"hdel","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"HDEL\", namespaced(key), field.to_s])"}},{"id":"hexists(key,field)-instance-method","html_id":"hexists(key,field)-instance-method","name":"hexists","doc":"Returns if field is an existing field in the hash stored at key.\n\n**Return value**: Integer, specifically:\n* 1 if the hash contains field.\n* 0 if the hash does not contain field, or key does not exist.","summary":"

    Returns if field is an existing field in the hash stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""}],"args_string":"(key, field)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1032","def":{"name":"hexists","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"HEXISTS\", namespaced(key), field.to_s])"}},{"id":"hget(key,field)-instance-method","html_id":"hget(key,field)-instance-method","name":"hget","doc":"Returns the value associated with field in the hash stored at key.\n\n**Return value**: String, the value associated with field, or nil\n\nExample:\n\n```\nredis.hget(\"myhash\", \"a\") # => \"434\"\n```","summary":"

    Returns the value associated with field in the hash stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""}],"args_string":"(key, field)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1007","def":{"name":"hget","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_or_nil_command([\"HGET\", namespaced(key), field.to_s])"}},{"id":"hgetall(key)-instance-method","html_id":"hgetall(key)-instance-method","name":"hgetall","doc":"Returns all fields and values of the hash stored at key.\n\n**Return value**: Array(String) of fields and their values stored in the hash,\nor an empty array when key does not exist.","summary":"

    Returns all fields and values of the hash stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1015","def":{"name":"hgetall","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_array_command([\"HGETALL\", namespaced(key)])"}},{"id":"hincrby(key,field,increment)-instance-method","html_id":"hincrby(key,field,increment)-instance-method","name":"hincrby","doc":"Increments the number stored at field in the hash stored at key by increment.\n\n**Return value**: Integer, the value at field after the increment operation.\n\nExample:\n\n```\nredis.hincrby(\"myhash\", \"field1\", \"3\") # => 4\n```","summary":"

    Increments the number stored at field in the hash stored at key by increment.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""},{"name":"increment","doc":null,"default_value":"","external_name":"increment","restriction":""}],"args_string":"(key, field, increment)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1045","def":{"name":"hincrby","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""},{"name":"increment","doc":null,"default_value":"","external_name":"increment","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"HINCRBY\", namespaced(key), field.to_s, increment.to_s])"}},{"id":"hincrbyfloat(key,field,increment)-instance-method","html_id":"hincrbyfloat(key,field,increment)-instance-method","name":"hincrbyfloat","doc":"Increment the specified field of an hash stored at key,\nand representing a floating point number, by the specified increment.\n\n**Return value**: String, the value at field after the increment operation.","summary":"

    Increment the specified field of an hash stored at key, and representing a floating point number, by the specified increment.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""},{"name":"increment","doc":null,"default_value":"","external_name":"increment","restriction":""}],"args_string":"(key, field, increment)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1053","def":{"name":"hincrbyfloat","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""},{"name":"increment","doc":null,"default_value":"","external_name":"increment","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"HINCRBYFLOAT\", namespaced(key), field.to_s, increment.to_s])"}},{"id":"hkeys(key)-instance-method","html_id":"hkeys(key)-instance-method","name":"hkeys","doc":"Returns all field names in the hash stored at key.\n\n**Return value**: Array(String) - list of fields in the hash, or an empty list when key does not exist.","summary":"

    Returns all field names in the hash stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1060","def":{"name":"hkeys","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_array_command([\"HKEYS\", namespaced(key)])"}},{"id":"hlen(key)-instance-method","html_id":"hlen(key)-instance-method","name":"hlen","doc":"Returns the number of fields contained in the hash stored at key.\n\n**Return value**: Integer, the number of fields in the hash, or 0 when key does not exist.","summary":"

    Returns the number of fields contained in the hash stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1067","def":{"name":"hlen","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"HLEN\", namespaced(key)])"}},{"id":"hmget(key,fields:Array(String)):Array(RedisValue)-instance-method","html_id":"hmget(key,fields:Array(String)):Array(RedisValue)-instance-method","name":"hmget","doc":"Returns the values associated with the specified fields in the hash stored at key.\n\n**Return value**: Array(RedisValue), the list of values associated with the given fields, in the same order as they are requested.","summary":"

    Returns the values associated with the specified fields in the hash stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"fields","doc":null,"default_value":"","external_name":"fields","restriction":"Array(String)"}],"args_string":"(key, fields : Array(String)) : Array(RedisValue)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1074","def":{"name":"hmget","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"fields","doc":null,"default_value":"","external_name":"fields","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Array(RedisValue)","visibility":"Public","body":"string_array_command(concat([\"HMGET\", namespaced(key)], fields))"}},{"id":"hmget(key,*fields:String):Array(RedisValue)-instance-method","html_id":"hmget(key,*fields:String):Array(RedisValue)-instance-method","name":"hmget","doc":"Returns the values associated with the specified fields in the hash stored at key.\n\n**Return value**: Array(RedisValue), the list of values associated with the given fields, in the same order as they are requested.","summary":"

    Returns the values associated with the specified fields in the hash stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"fields","doc":null,"default_value":"","external_name":"fields","restriction":"String"}],"args_string":"(key, *fields : String) : Array(RedisValue)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1079","def":{"name":"hmget","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"fields","doc":null,"default_value":"","external_name":"fields","restriction":"String"}],"double_splat":null,"splat_index":1,"yields":null,"block_arg":null,"return_type":"Array(RedisValue)","visibility":"Public","body":"hmget(key, fields.to_a)"}},{"id":"hmset(key,hash)-instance-method","html_id":"hmset(key,hash)-instance-method","name":"hmset","doc":"Sets the specified fields to their respective values in the hash stored at key.\n\n**Return value**: \"OK\"","summary":"

    Sets the specified fields to their respective values in the hash stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"hash","doc":null,"default_value":"","external_name":"hash","restriction":""}],"args_string":"(key, hash)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1086","def":{"name":"hmset","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"hash","doc":null,"default_value":"","external_name":"hash","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"HMSET\", namespaced(key)] of RedisValue\nhash.each do |field, value|\n (q << field.to_s) << value.to_s\nend\nstring_command(q)\n"}},{"id":"hscan(key,cursor,match=nil,count=nil)-instance-method","html_id":"hscan(key,cursor,match=nil,count=nil)-instance-method","name":"hscan","doc":"```\nredis.hscan(\"myhash\", 0)\nredis.hscan(\"myhash\", 0, \"foo*\")\nredis.hscan(\"myhash\", 0, \"foo*\", 1024)\n```","summary":"

    ` redis.hscan(\"myhash\", 0) redis.hscan(\"myhash\", 0, \"foo\") redis.hscan(\"myhash\", 0, \"foo\", 1024) `

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"cursor","doc":null,"default_value":"","external_name":"cursor","restriction":""},{"name":"match","doc":null,"default_value":"nil","external_name":"match","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""}],"args_string":"(key, cursor, match = nil, count = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1106","def":{"name":"hscan","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"cursor","doc":null,"default_value":"","external_name":"cursor","restriction":""},{"name":"match","doc":null,"default_value":"nil","external_name":"match","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"HSCAN\", namespaced(key), cursor.to_s]\nif match\n (q << \"MATCH\") << match.to_s\nend\nif count\n (q << \"COUNT\") << count.to_s\nend\nstring_array_command(q)\n"}},{"id":"hset(key,field,value)-instance-method","html_id":"hset(key,field,value)-instance-method","name":"hset","doc":"Sets field in the hash stored at key to value.\n\n**Return value**: Integer, specifically:\n* 1 if field is a new field in the hash and value was set.\n* 0 if field already exists in the hash and the value was updated.\n\nExample:\n\n```\nredis.hset(\"myhash\", \"a\", \"434\")\n```","summary":"

    Sets field in the hash stored at key to value.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, field, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L994","def":{"name":"hset","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"HSET\", namespaced(key), field.to_s, value.to_s])"}},{"id":"hsetnx(key,field,value)-instance-method","html_id":"hsetnx(key,field,value)-instance-method","name":"hsetnx","doc":"Sets field in the hash stored at key to value, only if field does not yet exist.\n\n**Return value**: Integer, specifically:\n* 1 if field is a new field in the hash and value was set.\n* 0 if field already exists in the hash and no operation was performed.","summary":"

    Sets field in the hash stored at key to value, only if field does not yet exist.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, field, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1118","def":{"name":"hsetnx","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"HSETNX\", namespaced(key), field.to_s, value.to_s])"}},{"id":"hvals(key)-instance-method","html_id":"hvals(key)-instance-method","name":"hvals","doc":"Returns all values in the hash stored at key.\n\n**Return value**: Array(String), the list of values in the hash, or an empty list when key does not exist.","summary":"

    Returns all values in the hash stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1125","def":{"name":"hvals","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_array_command([\"HVALS\", namespaced(key)])"}},{"id":"incr(key)-instance-method","html_id":"incr(key)-instance-method","name":"incr","doc":"Increments the number stored at key by one.\n\n**Return value**: Integer: the value of key after the increment\n\nExample:\n\n```\nredis.set(\"foo\", \"3\")\nredis.incr(\"foo\") # => 4\n```","summary":"

    Increments the number stored at key by one.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L321","def":{"name":"incr","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"INCR\", namespaced(key)])"}},{"id":"incrby(key,increment)-instance-method","html_id":"incrby(key,increment)-instance-method","name":"incrby","doc":"Increments the number stored at key by increment.\n\n**Return value**: Integer, the value of key after the increment\n\nExample:\n\n```\nredis.incrby(\"foo\", 4)\n```","summary":"

    Increments the number stored at key by increment.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"increment","doc":null,"default_value":"","external_name":"increment","restriction":""}],"args_string":"(key, increment)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L341","def":{"name":"incrby","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"increment","doc":null,"default_value":"","external_name":"increment","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"INCRBY\", namespaced(key), increment.to_s])"}},{"id":"incrbyfloat(key,increment)-instance-method","html_id":"incrbyfloat(key,increment)-instance-method","name":"incrbyfloat","doc":"Increment the string representing a floating point number stored at key by the specified increment.\n\n**Return value**: Integer, the value of key after the increment\n\nExample:\n\n```\nredis.incrbyfloat(\"foo\", 2.5)\n```","summary":"

    Increment the string representing a floating point number stored at key by the specified increment.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"increment","doc":null,"default_value":"","external_name":"increment","restriction":""}],"args_string":"(key, increment)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L354","def":{"name":"incrbyfloat","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"increment","doc":null,"default_value":"","external_name":"increment","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"INCRBYFLOAT\", namespaced(key), increment.to_s])"}},{"id":"info(section:String?=nil)-instance-method","html_id":"info(section:String?=nil)-instance-method","name":"info","doc":"The INFO command returns information and statistics about the server.\n\n**Return value**: A hash with the server information","summary":"

    The INFO command returns information and statistics about the server.

    ","abstract":false,"args":[{"name":"section","doc":null,"default_value":"nil","external_name":"section","restriction":"String | ::Nil"}],"args_string":"(section : String? = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1778","def":{"name":"info","args":[{"name":"section","doc":null,"default_value":"nil","external_name":"section","restriction":"String | ::Nil"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"arr = [\"INFO\"]\nif section\n arr << section\nend\nbulk = string_command(arr)\nresults = Hash(String, String).new\n(bulk.split(\"\\r\\n\")).each do |line|\n if line.empty? || (line[0] == '#')\n next\n end\n key, val = line.split(\":\")\n results[key] = val\nend\nresults\n"}},{"id":"keys(pattern)-instance-method","html_id":"keys(pattern)-instance-method","name":"keys","doc":"Returns all keys matching pattern.\n\n**Return value**: Array(String), array of keys matching pattern.\n\nExample:\n\n```\nredis.keys(\"callmemaybe\")\n```","summary":"

    Returns all keys matching pattern.

    ","abstract":false,"args":[{"name":"pattern","doc":null,"default_value":"","external_name":"pattern","restriction":""}],"args_string":"(pattern)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L571","def":{"name":"keys","args":[{"name":"pattern","doc":null,"default_value":"","external_name":"pattern","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"(string_array_command([\"KEYS\", namespaced(pattern)])).map do |key|\n without_namespace(\"#{key}\")\nend"}},{"id":"lindex(key,index)-instance-method","html_id":"lindex(key,index)-instance-method","name":"lindex","doc":"Returns the element at index index in the list stored at key.\n\n**Return value**: String, the requested element, or nil when index is out of range.","summary":"

    Returns the element at index index in the list stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"index","doc":null,"default_value":"","external_name":"index","restriction":""}],"args_string":"(key, index)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L642","def":{"name":"lindex","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"index","doc":null,"default_value":"","external_name":"index","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_or_nil_command([\"LINDEX\", namespaced(key), index.to_s])"}},{"id":"linsert(key,where,pivot,value)-instance-method","html_id":"linsert(key,where,pivot,value)-instance-method","name":"linsert","doc":"Inserts value in the list stored at key either before or after the reference value pivot.\n\n**Options**:\n\n* where - either \"BEFORE\" or \"AFTER\"\n\n**Return value**: Integer, the length of the list after the insert operation, or -1 when the value pivot was not found.","summary":"

    Inserts value in the list stored at key either before or after the reference value pivot.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"where","doc":null,"default_value":"","external_name":"where","restriction":""},{"name":"pivot","doc":null,"default_value":"","external_name":"pivot","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, where, pivot, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L680","def":{"name":"linsert","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"where","doc":null,"default_value":"","external_name":"where","restriction":""},{"name":"pivot","doc":null,"default_value":"","external_name":"pivot","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"LINSERT\", namespaced(key), where.to_s, pivot.to_s, value.to_s])"}},{"id":"llen(key)-instance-method","html_id":"llen(key)-instance-method","name":"llen","doc":"Returns the length of the list stored at key.\n\n**Return value**: Integer, the length of the list at key.","summary":"

    Returns the length of the list stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L635","def":{"name":"llen","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"LLEN\", namespaced(key)])"}},{"id":"lpop(key)-instance-method","html_id":"lpop(key)-instance-method","name":"lpop","doc":"Removes and returns the first element of the list stored at key.\n\n**Return value**: String, the value of the first element, or nil when key does not exist.\n\nExample:\n\n```\nredis.lpop(\"mylist\")\n```","summary":"

    Removes and returns the first element of the list stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L662","def":{"name":"lpop","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_or_nil_command([\"LPOP\", namespaced(key)])"}},{"id":"lpush(key,*values)-instance-method","html_id":"lpush(key,*values)-instance-method","name":"lpush","doc":"Insert all the specified values at the head of the list stored at key.\n\n**Return value**: Integer, the length of the list after the push operation.","summary":"

    Insert all the specified values at the head of the list stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":""}],"args_string":"(key, *values)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L596","def":{"name":"lpush","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":""}],"double_splat":null,"splat_index":1,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"lpush(key, values.to_a)"}},{"id":"lpush(key,values:Array(RedisValue))-instance-method","html_id":"lpush(key,values:Array(RedisValue))-instance-method","name":"lpush","doc":"Insert all the specified values at the head of the list stored at key.\n\n**Return value**: Integer, the length of the list after the push operation.","summary":"

    Insert all the specified values at the head of the list stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"Array(RedisValue)"}],"args_string":"(key, values : Array(RedisValue))","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L601","def":{"name":"lpush","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"Array(RedisValue)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command(concat([\"LPUSH\", namespaced(key)], values))"}},{"id":"lpushx(key,value)-instance-method","html_id":"lpushx(key,value)-instance-method","name":"lpushx","doc":"Inserts value at the head of the list stored at key, only if key already exists and holds a list.\n\n**Return value**: Integer, the length of the list after the push operation.","summary":"

    Inserts value at the head of the list stored at key, only if key already exists and holds a list.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L608","def":{"name":"lpushx","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"LPUSHX\", namespaced(key), value.to_s])"}},{"id":"lrange(key,from,to)-instance-method","html_id":"lrange(key,from,to)-instance-method","name":"lrange","doc":"Returns the specified elements of the list stored at key.\n\n**Return value**: Array(String), the list of elements in the specified range.\n\nExample:\n\n```\nredis.lrange(\"mylist\", 0, 2)\n```","summary":"

    Returns the specified elements of the list stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"from","doc":null,"default_value":"","external_name":"from","restriction":""},{"name":"to","doc":null,"default_value":"","external_name":"to","restriction":""}],"args_string":"(key, from, to)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L693","def":{"name":"lrange","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"from","doc":null,"default_value":"","external_name":"from","restriction":""},{"name":"to","doc":null,"default_value":"","external_name":"to","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_array_command([\"LRANGE\", namespaced(key), from.to_s, to.to_s])"}},{"id":"lrem(key,count,value)-instance-method","html_id":"lrem(key,count,value)-instance-method","name":"lrem","doc":"Removes the first count occurrences of elements equal to value from the list stored at key.\n\n**Return value**: Integer, the number of removed elements.\n\nExample:\n\n```\nredis.lrem(\"mylist\", 1, \"my\")\n```","summary":"

    Removes the first count occurrences of elements equal to value from the list stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"count","doc":null,"default_value":"","external_name":"count","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, count, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L628","def":{"name":"lrem","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"count","doc":null,"default_value":"","external_name":"count","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"LREM\", namespaced(key), count.to_s, value.to_s])"}},{"id":"lset(key,index,value)-instance-method","html_id":"lset(key,index,value)-instance-method","name":"lset","doc":"Sets the list element at index to value.\n\n**Return value**: \"OK\"","summary":"

    Sets the list element at index to value.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"index","doc":null,"default_value":"","external_name":"index","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, index, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L649","def":{"name":"lset","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"index","doc":null,"default_value":"","external_name":"index","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"LSET\", namespaced(key), index.to_s, value.to_s])"}},{"id":"ltrim(key,start,stop)-instance-method","html_id":"ltrim(key,start,stop)-instance-method","name":"ltrim","doc":"Trim an existing list so that it will contain only the specified range of elements specified.\n\n**Return value**: \"OK\"","summary":"

    Trim an existing list so that it will contain only the specified range of elements specified.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start","doc":null,"default_value":"","external_name":"start","restriction":""},{"name":"stop","doc":null,"default_value":"","external_name":"stop","restriction":""}],"args_string":"(key, start, stop)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L700","def":{"name":"ltrim","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start","doc":null,"default_value":"","external_name":"start","restriction":""},{"name":"stop","doc":null,"default_value":"","external_name":"stop","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"LTRIM\", namespaced(key), start.to_s, stop.to_s])"}},{"id":"mget(keys:Array(String)):Array(RedisValue)-instance-method","html_id":"mget(keys:Array(String)):Array(RedisValue)-instance-method","name":"mget","doc":null,"summary":null,"abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"args_string":"(keys : Array(String)) : Array(RedisValue)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L232","def":{"name":"mget","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Array(RedisValue)","visibility":"Public","body":"string_array_command(concat([\"MGET\"], namespaced(keys)))"}},{"id":"mget(*keys)-instance-method","html_id":"mget(*keys)-instance-method","name":"mget","doc":"Returns the values of all specified keys.\n\n**Return value**: Array(String), the list of values at the specified keys.\nFor every key that does not hold a string value or does not exist, nil is returned.\n\nExample:\n\n```\nredis.set(\"foo1\", \"test1\")\nredis.set(\"foo2\", \"test2\")\nredis.mget(\"foo1\", \"foo2\") # => [\"test1\", \"test2\"]\n```","summary":"

    Returns the values of all specified keys.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":""}],"args_string":"(*keys)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L228","def":{"name":"mget","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":""}],"double_splat":null,"splat_index":0,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_array_command(concat([\"MGET\"], namespaced(keys)))"}},{"id":"mset(hash:Hash)-instance-method","html_id":"mset(hash:Hash)-instance-method","name":"mset","doc":"Sets the given keys to their respective values as defined in the hash.\n\n**Return value**: \"OK\"\n\nExample:\n\n```\nredis.mset({\"foo1\": \"bar1\", \"foo2\": \"bar2\"})\n```","summary":"

    Sets the given keys to their respective values as defined in the hash.

    ","abstract":false,"args":[{"name":"hash","doc":null,"default_value":"","external_name":"hash","restriction":"Hash"}],"args_string":"(hash : Hash)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L245","def":{"name":"mset","args":[{"name":"hash","doc":null,"default_value":"","external_name":"hash","restriction":"Hash"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"MSET\"] of RedisValue\nhash.each do |key, value|\n (q << (namespaced(key))) << value.to_s\nend\nstring_command(q)\n"}},{"id":"msetnx(hash)-instance-method","html_id":"msetnx(hash)-instance-method","name":"msetnx","doc":"Sets the given keys to their respective values as defined in the hash.\nMSETNX will not perform any operation at all even if just a single key already exists.\n\n**Return value**: Integer, specifically:\n* 1 if the all the keys were set.\n* 0 if no key was set (at least one key already existed).\n\nExample:\n\n```\nredis.msetnx({\"key1\": \"hello\", \"key2\": \"there\"})\n```","summary":"

    Sets the given keys to their respective values as defined in the hash.

    ","abstract":false,"args":[{"name":"hash","doc":null,"default_value":"","external_name":"hash","restriction":""}],"args_string":"(hash)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L305","def":{"name":"msetnx","args":[{"name":"hash","doc":null,"default_value":"","external_name":"hash","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"MSETNX\"] of RedisValue\nhash.each do |key, value|\n (q << (namespaced(key))) << value\nend\ninteger_command(q)\n"}},{"id":"object_encoding(key)-instance-method","html_id":"object_encoding(key)-instance-method","name":"object_encoding","doc":"Returns the kind of internal representation used in order to store\nthe value associated with a key.\n\n**Return value**: String: returns the kind of internal representation\nused in order to store the value associated with a key.","summary":"

    Returns the kind of internal representation used in order to store the value associated with a key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1805","def":{"name":"object_encoding","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_or_nil_command([\"OBJECT\", \"ENCODING\", namespaced(key)])"}},{"id":"object_idletime(key)-instance-method","html_id":"object_idletime(key)-instance-method","name":"object_idletime","doc":"Returns the number of seconds since the object stored at the specified key\nis idle (not requested by read or write operations).\n\n**Return value**: Integer: returns the number of seconds\nsince the object stored at the specified key is idle\n(not requested by read or write operations).","summary":"

    Returns the number of seconds since the object stored at the specified key is idle (not requested by read or write operations).

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1815","def":{"name":"object_idletime","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_or_nil_command([\"OBJECT\", \"IDLETIME\", namespaced(key)])"}},{"id":"object_refcount(key)-instance-method","html_id":"object_refcount(key)-instance-method","name":"object_refcount","doc":"Returns the number of references of the value associated\nwith the specified key.\n\n**Return value**: Integer: returns the number of references\nof the value associated with the specified key.","summary":"

    Returns the number of references of the value associated with the specified key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1796","def":{"name":"object_refcount","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_or_nil_command([\"OBJECT\", \"REFCOUNT\", namespaced(key)])"}},{"id":"persist(key)-instance-method","html_id":"persist(key)-instance-method","name":"persist","doc":"Remove the existing timeout on key, turning the key from volatile\n(a key with an expire set) to persistent (a key that will never expire\nas no timeout is associated).\n\n**Return value**: Integer, specifically:\n* 1 if the timeout was removed.\n* 0 if key does not exist or does not have an associated timeout.","summary":"

    Remove the existing timeout on key, turning the key from volatile (a key with an expire set) to persistent (a key that will never expire as no timeout is associated).

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1598","def":{"name":"persist","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"PERSIST\", namespaced(key)])"}},{"id":"pexpire(key,milis)-instance-method","html_id":"pexpire(key,milis)-instance-method","name":"pexpire","doc":"This command works exactly like EXPIRE but the time to live of the key is\nspecified in milliseconds instead of seconds.\n\n**Return value**: Integeger, specifically:\n* 1 if the timeout was set.\n* 0 if key does not exist or the timeout could not be set.","summary":"

    This command works exactly like EXPIRE but the time to live of the key is specified in milliseconds instead of seconds.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"milis","doc":null,"default_value":"","external_name":"milis","restriction":""}],"args_string":"(key, milis)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1566","def":{"name":"pexpire","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"milis","doc":null,"default_value":"","external_name":"milis","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"PEXPIRE\", namespaced(key), milis.to_s])"}},{"id":"pexpireat(key,unix_date_in_millis)-instance-method","html_id":"pexpireat(key,unix_date_in_millis)-instance-method","name":"pexpireat","doc":"PEXPIREAT has the same effect and semantic as EXPIREAT, but the Unix time\nat which the key will expire is specified in milliseconds instead of seconds.\n\n**Return value**: Integeger, specifically:\n* 1 if the timeout was set.\n* 0 if key does not exist or the timeout could not be set.","summary":"

    PEXPIREAT has the same effect and semantic as EXPIREAT, but the Unix time at which the key will expire is specified in milliseconds instead of seconds.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"unix_date_in_millis","doc":null,"default_value":"","external_name":"unix_date_in_millis","restriction":""}],"args_string":"(key, unix_date_in_millis)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1587","def":{"name":"pexpireat","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"unix_date_in_millis","doc":null,"default_value":"","external_name":"unix_date_in_millis","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"PEXPIREAT\", namespaced(key), unix_date_in_millis.to_s])"}},{"id":"pfadd(key,*values:String):Int64-instance-method","html_id":"pfadd(key,*values:String):Int64-instance-method","name":"pfadd","doc":"Adds all the element arguments to the HyperLogLog data structure stored at\nthe variable name specified as first argument.\n\n**Return value**: Integer: 1 if at least 1 HyperLogLog internal register was altered. 0 otherwise.\n\nExample:\n\n```\nredis.pfadd(\"hll\", \"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\") # => 1\n```","summary":"

    Adds all the element arguments to the HyperLogLog data structure stored at the variable name specified as first argument.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"String"}],"args_string":"(key, *values : String) : Int64","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1439","def":{"name":"pfadd","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"String"}],"double_splat":null,"splat_index":1,"yields":null,"block_arg":null,"return_type":"Int64","visibility":"Public","body":"pfadd(key, values.to_a)"}},{"id":"pfadd(key,values:Array(String)):Int64-instance-method","html_id":"pfadd(key,values:Array(String)):Int64-instance-method","name":"pfadd","doc":"Adds all the element arguments to the HyperLogLog data structure stored at\nthe variable name specified as first argument.\n\n**Return value**: Integer: 1 if at least 1 HyperLogLog internal register was altered. 0 otherwise.\n\nExample:\n\n```\nredis.pfadd(\"hll\", \"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\") # => 1\n```","summary":"

    Adds all the element arguments to the HyperLogLog data structure stored at the variable name specified as first argument.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"Array(String)"}],"args_string":"(key, values : Array(String)) : Int64","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1434","def":{"name":"pfadd","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Int64","visibility":"Public","body":"integer_command(concat([\"PFADD\", namespaced(key)], values))"}},{"id":"pfcount(keys:Array(String)):Int64-instance-method","html_id":"pfcount(keys:Array(String)):Int64-instance-method","name":"pfcount","doc":"When called with a single key, returns the approximated cardinality computed\nby the HyperLogLog data structure stored at the specified variable,\nwhich is 0 if the variable does not exist.\n\n**Return value**: Integer, the approximated number of unique elements\nobserved via PFADD.","summary":"

    When called with a single key, returns the approximated cardinality computed by the HyperLogLog data structure stored at the specified variable, which is 0 if the variable does not exist.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"args_string":"(keys : Array(String)) : Int64","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1461","def":{"name":"pfcount","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Int64","visibility":"Public","body":"integer_command(concat([\"PFCOUNT\"], namespaced(keys)))"}},{"id":"pfcount(*keys:String):Int64-instance-method","html_id":"pfcount(*keys:String):Int64-instance-method","name":"pfcount","doc":"When called with a single key, returns the approximated cardinality computed\nby the HyperLogLog data structure stored at the specified variable,\nwhich is 0 if the variable does not exist.\n\n**Return value**: Integer, the approximated number of unique elements\nobserved via PFADD.","summary":"

    When called with a single key, returns the approximated cardinality computed by the HyperLogLog data structure stored at the specified variable, which is 0 if the variable does not exist.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"args_string":"(*keys : String) : Int64","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1466","def":{"name":"pfcount","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"double_splat":null,"splat_index":0,"yields":null,"block_arg":null,"return_type":"Int64","visibility":"Public","body":"pfcount(keys.to_a)"}},{"id":"pfmerge(*keys:String)-instance-method","html_id":"pfmerge(*keys:String)-instance-method","name":"pfmerge","doc":"Merge multiple HyperLogLog values into an unique value that will\napproximate the cardinality of the union of the observed Sets of the\nsource HyperLogLog structures.","summary":"

    Merge multiple HyperLogLog values into an unique value that will approximate the cardinality of the union of the observed Sets of the source HyperLogLog structures.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"args_string":"(*keys : String)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1451","def":{"name":"pfmerge","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"double_splat":null,"splat_index":0,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"pfmerge(keys.to_a)"}},{"id":"pfmerge(keys:Array(String))-instance-method","html_id":"pfmerge(keys:Array(String))-instance-method","name":"pfmerge","doc":"Merge multiple HyperLogLog values into an unique value that will\napproximate the cardinality of the union of the observed Sets of the\nsource HyperLogLog structures.","summary":"

    Merge multiple HyperLogLog values into an unique value that will approximate the cardinality of the union of the observed Sets of the source HyperLogLog structures.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"args_string":"(keys : Array(String))","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1446","def":{"name":"pfmerge","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command(concat([\"PFMERGE\"], namespaced(keys)))"}},{"id":"ping-instance-method","html_id":"ping-instance-method","name":"ping","doc":"Returns PONG. This command is often used to test if a connection is still alive, or to measure latency.\n\nExample:\n\n```\nredis.ping # => \"PONG\"\n```","summary":"

    Returns PONG.

    ","abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L23","def":{"name":"ping","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"PING\"])"}},{"id":"psetex(key,expire_in_milis,value)-instance-method","html_id":"psetex(key,expire_in_milis,value)-instance-method","name":"psetex","doc":"PSETEX works exactly like SETEX with the sole difference that the expire time is specified in milliseconds instead of seconds.\n\n**Return value**: \"OK\"","summary":"

    PSETEX works exactly like SETEX with the sole difference that the expire time is specified in milliseconds instead of seconds.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"expire_in_milis","doc":null,"default_value":"","external_name":"expire_in_milis","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, expire_in_milis, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L280","def":{"name":"psetex","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"expire_in_milis","doc":null,"default_value":"","external_name":"expire_in_milis","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"PSETEX\", namespaced(key), expire_in_milis.to_s, value.to_s])"}},{"id":"psubscribe(*channel_patterns,&callback_setup_block:Subscription->)-instance-method","html_id":"psubscribe(*channel_patterns,&callback_setup_block:Subscription->)-instance-method","name":"psubscribe","doc":"Subscribes to channel patterns and enters a subscription loop, waiting for events.\n\nThe method yields to the given block and passes a Subscription object, on\nwhich you can set your callbacks for the event subscription.\n\nThe subscription loop will end once you unsubscribe.","summary":"

    Subscribes to channel patterns and enters a subscription loop, waiting for events.

    ","abstract":false,"args":[{"name":"channel_patterns","doc":null,"default_value":"","external_name":"channel_patterns","restriction":""}],"args_string":"(*channel_patterns, &callback_setup_block : Subscription -> )","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1691","def":{"name":"psubscribe","args":[{"name":"channel_patterns","doc":null,"default_value":"","external_name":"channel_patterns","restriction":""}],"double_splat":null,"splat_index":0,"yields":1,"block_arg":{"name":"callback_setup_block","doc":null,"default_value":"","external_name":"callback_setup_block","restriction":"(Subscription -> )"},"return_type":"","visibility":"Public","body":"if already_in_subscription_loop?\n raise(Redis::Error.new(\"Must call psubscribe without a subscription block when inside a subscription loop\"))\nend\nsubscription = Subscription.new\ncallback_setup_block.call(subscription)\n@strategy = Redis::Strategy::SubscriptionLoop.new(connection, subscription)\npsubscribe(*channel_patterns)\n"}},{"id":"psubscribe(channel_patterns:Array(String))-instance-method","html_id":"psubscribe(channel_patterns:Array(String))-instance-method","name":"psubscribe","doc":"Subscribes to more channel patterns while already being in a subscription loop.","summary":"

    Subscribes to more channel patterns while already being in a subscription loop.

    ","abstract":false,"args":[{"name":"channel_patterns","doc":null,"default_value":"","external_name":"channel_patterns","restriction":"Array(String)"}],"args_string":"(channel_patterns : Array(String))","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1707","def":{"name":"psubscribe","args":[{"name":"channel_patterns","doc":null,"default_value":"","external_name":"channel_patterns","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"if already_in_subscription_loop?\nelse\n raise(Redis::Error.new(\"Must call psubscribe with a subscription block\"))\nend\nvoid_command(concat([\"PSUBSCRIBE\"], channel_patterns))\n"}},{"id":"psubscribe(*channel_patterns)-instance-method","html_id":"psubscribe(*channel_patterns)-instance-method","name":"psubscribe","doc":null,"summary":null,"abstract":false,"args":[{"name":"channel_patterns","doc":null,"default_value":"","external_name":"channel_patterns","restriction":""}],"args_string":"(*channel_patterns)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1716","def":{"name":"psubscribe","args":[{"name":"channel_patterns","doc":null,"default_value":"","external_name":"channel_patterns","restriction":""}],"double_splat":null,"splat_index":0,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"psubscribe(channel_patterns.to_a)"}},{"id":"pttl(key)-instance-method","html_id":"pttl(key)-instance-method","name":"pttl","doc":"Like TTL this command returns the remaining time to live of a key that has\nan expire set, with the sole difference that TTL returns the amount of\nremaining time in seconds while PTTL returns it in milliseconds.\n\n**Return value**: Integer, the TTL in milliseconds, or a negative value in order to signal an error.","summary":"

    Like TTL this command returns the remaining time to live of a key that has an expire set, with the sole difference that TTL returns the amount of remaining time in seconds while PTTL returns it in milliseconds.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1615","def":{"name":"pttl","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"PTTL\", namespaced(key)])"}},{"id":"publish(channel,message)-instance-method","html_id":"publish(channel,message)-instance-method","name":"publish","doc":"Posts a message to the given channel.\n\n**Return value**: Integer, the number of clients that received the message.\n\nExample:\n\n```\nredis.publish(\"mychannel\", \"some message\")\n```","summary":"

    Posts a message to the given channel.

    ","abstract":false,"args":[{"name":"channel","doc":null,"default_value":"","external_name":"channel","restriction":""},{"name":"message","doc":null,"default_value":"","external_name":"message","restriction":""}],"args_string":"(channel, message)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1753","def":{"name":"publish","args":[{"name":"channel","doc":null,"default_value":"","external_name":"channel","restriction":""},{"name":"message","doc":null,"default_value":"","external_name":"message","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"PUBLISH\", channel.to_s, message.to_s])"}},{"id":"punsubscribe(*channel_patterns)-instance-method","html_id":"punsubscribe(*channel_patterns)-instance-method","name":"punsubscribe","doc":"Unsubscribes the client from the given patterns, or from all of them if none is given.","summary":"

    Unsubscribes the client from the given patterns, or from all of them if none is given.

    ","abstract":false,"args":[{"name":"channel_patterns","doc":null,"default_value":"","external_name":"channel_patterns","restriction":""}],"args_string":"(*channel_patterns)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1740","def":{"name":"punsubscribe","args":[{"name":"channel_patterns","doc":null,"default_value":"","external_name":"channel_patterns","restriction":""}],"double_splat":null,"splat_index":0,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"punsubscribe(channel_patterns.to_a)"}},{"id":"punsubscribe(channel_patterns:Array(String))-instance-method","html_id":"punsubscribe(channel_patterns:Array(String))-instance-method","name":"punsubscribe","doc":"Unsubscribes the client from the given patterns, or from all of them if none is given.","summary":"

    Unsubscribes the client from the given patterns, or from all of them if none is given.

    ","abstract":false,"args":[{"name":"channel_patterns","doc":null,"default_value":"","external_name":"channel_patterns","restriction":"Array(String)"}],"args_string":"(channel_patterns : Array(String))","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1735","def":{"name":"punsubscribe","args":[{"name":"channel_patterns","doc":null,"default_value":"","external_name":"channel_patterns","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"void_command(concat([\"PUNSUBSCRIBE\"], channel_patterns))"}},{"id":"quit-instance-method","html_id":"quit-instance-method","name":"quit","doc":"Ask the server to close the connection. The connection is closed as soon as all pending replies have been written to the client.\n\n**Return value**: \"OK\"","summary":"

    Ask the server to close the connection.

    ","abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L73","def":{"name":"quit","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"QUIT\"])"}},{"id":"randomkey-instance-method","html_id":"randomkey-instance-method","name":"randomkey","doc":"Return a random key from the currently selected database.","summary":"

    Return a random key from the currently selected database.

    ","abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L549","def":{"name":"randomkey","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"RANDOMKEY\"])"}},{"id":"rename(old_key,new_key)-instance-method","html_id":"rename(old_key,new_key)-instance-method","name":"rename","doc":"Renames old_key to newkey.\n\n**Return value**: \"OK\"\n\nExample:\n\n```\nredis.rename(\"old_name\", \"new_name\")\n```","summary":"

    Renames old_key to newkey.

    ","abstract":false,"args":[{"name":"old_key","doc":null,"default_value":"","external_name":"old_key","restriction":""},{"name":"new_key","doc":null,"default_value":"","external_name":"new_key","restriction":""}],"args_string":"(old_key, new_key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L116","def":{"name":"rename","args":[{"name":"old_key","doc":null,"default_value":"","external_name":"old_key","restriction":""},{"name":"new_key","doc":null,"default_value":"","external_name":"new_key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"RENAME\", namespaced(old_key), namespaced(new_key)])"}},{"id":"renamenx(old_key,new_key)-instance-method","html_id":"renamenx(old_key,new_key)-instance-method","name":"renamenx","doc":"Renames old_key to newkey if newkey does not yet exist.\n\n**Return value**: \"OK\"\n\nExample:\n\n```\nredis.renamenx(\"old_name\", \"new_name\")\n```","summary":"

    Renames old_key to newkey if newkey does not yet exist.

    ","abstract":false,"args":[{"name":"old_key","doc":null,"default_value":"","external_name":"old_key","restriction":""},{"name":"new_key","doc":null,"default_value":"","external_name":"new_key","restriction":""}],"args_string":"(old_key, new_key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L129","def":{"name":"renamenx","args":[{"name":"old_key","doc":null,"default_value":"","external_name":"old_key","restriction":""},{"name":"new_key","doc":null,"default_value":"","external_name":"new_key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"RENAMENX\", namespaced(old_key), namespaced(new_key)])"}},{"id":"restore(key,ttl_in_milis:Int,serialized_value:String,replace=false)-instance-method","html_id":"restore(key,ttl_in_milis:Int,serialized_value:String,replace=false)-instance-method","name":"restore","doc":"Create a key associated with a value that is obtained by deserializing the provided serialized value (obtained via DUMP).\n\n**Return value**: The command returns \"OK\" on success.","summary":"

    Create a key associated with a value that is obtained by deserializing the provided serialized value (obtained via DUMP).

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"ttl_in_milis","doc":null,"default_value":"","external_name":"ttl_in_milis","restriction":"Int"},{"name":"serialized_value","doc":null,"default_value":"","external_name":"serialized_value","restriction":"String"},{"name":"replace","doc":null,"default_value":"false","external_name":"replace","restriction":""}],"args_string":"(key, ttl_in_milis : Int, serialized_value : String, replace = false)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L513","def":{"name":"restore","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"ttl_in_milis","doc":null,"default_value":"","external_name":"ttl_in_milis","restriction":"Int"},{"name":"serialized_value","doc":null,"default_value":"","external_name":"serialized_value","restriction":"String"},{"name":"replace","doc":null,"default_value":"false","external_name":"replace","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"RESTORE\", namespaced(key), ttl_in_milis.to_s, serialized_value]\nif replace\n q << \"REPLACE\"\nend\nstring_command(q)\n"}},{"id":"rpop(key)-instance-method","html_id":"rpop(key)-instance-method","name":"rpop","doc":"Removes and returns the last element of the list stored at key.\n\n**Return value**: \"OK\"","summary":"

    Removes and returns the last element of the list stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L669","def":{"name":"rpop","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_or_nil_command([\"RPOP\", namespaced(key)])"}},{"id":"rpoplpush(source,destination)-instance-method","html_id":"rpoplpush(source,destination)-instance-method","name":"rpoplpush","doc":"Atomically returns and removes the last element (tail) of the list stored at source,\nand pushes the element at the first element (head) of the list stored at destination.\n\n**Return value**: String, the element being popped and pushed.","summary":"

    Atomically returns and removes the last element (tail) of the list stored at source, and pushes the element at the first element (head) of the list stored at destination.

    ","abstract":false,"args":[{"name":"source","doc":null,"default_value":"","external_name":"source","restriction":""},{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""}],"args_string":"(source, destination)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L954","def":{"name":"rpoplpush","args":[{"name":"source","doc":null,"default_value":"","external_name":"source","restriction":""},{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_or_nil_command([\"RPOPLPUSH\", namespaced(source), namespaced(destination)])"}},{"id":"rpush(key,*values:String)-instance-method","html_id":"rpush(key,*values:String)-instance-method","name":"rpush","doc":"Insert all the specified values at the tail of the list stored at key.\n\n**Return value**: Integer, the length of the list after the push operation.\n\nExample:\n\n```\nredis.rpush(\"mylist\", \"1\", \"2\", \"3\")\n```","summary":"

    Insert all the specified values at the tail of the list stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"String"}],"args_string":"(key, *values : String)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L589","def":{"name":"rpush","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"String"}],"double_splat":null,"splat_index":1,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"rpush(key, values.to_a)"}},{"id":"rpush(key,values:Array(RedisValue))-instance-method","html_id":"rpush(key,values:Array(RedisValue))-instance-method","name":"rpush","doc":"Insert all the specified values at the tail of the list stored at key.\n\n**Return value**: Integer, the length of the list after the push operation.\n\nExample:\n\n```\nredis.rpush(\"mylist\", \"1\", \"2\", \"3\")\n```","summary":"

    Insert all the specified values at the tail of the list stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"Array(RedisValue)"}],"args_string":"(key, values : Array(RedisValue))","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L584","def":{"name":"rpush","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"Array(RedisValue)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command(concat([\"RPUSH\", namespaced(key)], values))"}},{"id":"rpushx(key,value)-instance-method","html_id":"rpushx(key,value)-instance-method","name":"rpushx","doc":"Inserts value at the tail of the list stored at key, only if key already exists and holds a list.\n\n**Return value**: Integer, the length of the list after the push operation.","summary":"

    Inserts value at the tail of the list stored at key, only if key already exists and holds a list.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L615","def":{"name":"rpushx","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"RPUSHX\", namespaced(key), value.to_s])"}},{"id":"sadd(key,*values)-instance-method","html_id":"sadd(key,*values)-instance-method","name":"sadd","doc":"Add the specified members to the set stored at key.\n\n**Return value**: Integer, the number of elements that were added to the set, not including all the elements already present into the set.","summary":"

    Add the specified members to the set stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":""}],"args_string":"(key, *values)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L707","def":{"name":"sadd","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":""}],"double_splat":null,"splat_index":1,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"sadd(key, values.to_a)"}},{"id":"sadd(key,values:Array(RedisValue))-instance-method","html_id":"sadd(key,values:Array(RedisValue))-instance-method","name":"sadd","doc":null,"summary":null,"abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"Array(RedisValue)"}],"args_string":"(key, values : Array(RedisValue))","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L711","def":{"name":"sadd","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"Array(RedisValue)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command(concat([\"SADD\", namespaced(key)], values))"}},{"id":"scan(cursor,match=nil,count=nil)-instance-method","html_id":"scan(cursor,match=nil,count=nil)-instance-method","name":"scan","doc":"The SCAN command and the closely related commands SSCAN, HSCAN and ZSCAN are used in order to incrementally iterate over a collection of elements.\n\n**Options**:\n\n* match - It is possible to only iterate elements matching a given glob-style pattern, similarly to the behavior of the KEYS command that takes a pattern as only argument.\n* count - While SCAN does not provide guarantees about the number of elements returned at every iteration, it is possible to empirically adjust the behavior of SCAN using the COUNT option.\n\n**Return value**: Array of String, a list of keys.\n\nExample:\n\n```\nredis.scan(0)\nredis.scan(0, \"foo*\")\nredis.scan(0, \"foo*\", 1024)\n```","summary":"

    The SCAN command and the closely related commands SSCAN, HSCAN and ZSCAN are used in order to incrementally iterate over a collection of elements.

    ","abstract":false,"args":[{"name":"cursor","doc":null,"default_value":"","external_name":"cursor","restriction":""},{"name":"match","doc":null,"default_value":"nil","external_name":"match","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""}],"args_string":"(cursor, match = nil, count = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L537","def":{"name":"scan","args":[{"name":"cursor","doc":null,"default_value":"","external_name":"cursor","restriction":""},{"name":"match","doc":null,"default_value":"nil","external_name":"match","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"SCAN\", cursor.to_s]\nif match\n (q << \"MATCH\") << (namespaced(match))\nend\nif count\n (q << \"COUNT\") << count.to_s\nend\nresult = string_array_command(q)\nresult[1] = array_without_namespace(result[1])\nresult\n"}},{"id":"scard(key)-instance-method","html_id":"scard(key)-instance-method","name":"scard","doc":"Returns the set cardinality (number of elements) of the set stored at key.","summary":"

    Returns the set cardinality (number of elements) of the set stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L749","def":{"name":"scard","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"SCARD\", namespaced(key)])"}},{"id":"script_exists(sha1_array:Array(Reference))-instance-method","html_id":"script_exists(sha1_array:Array(Reference))-instance-method","name":"script_exists","doc":"Returns information about the existence of the scripts in the script cache.\n\n**Return value**: The command returns an array of integers that correspond\nto the specified SHA1 digest arguments.\nFor every corresponding SHA1 digest of a script that actually exists\nin the script cache, an 1 is returned, otherwise 0 is returned.","summary":"

    Returns information about the existence of the scripts in the script cache.

    ","abstract":false,"args":[{"name":"sha1_array","doc":null,"default_value":"","external_name":"sha1_array","restriction":"Array(Reference)"}],"args_string":"(sha1_array : Array(Reference))","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1520","def":{"name":"script_exists","args":[{"name":"sha1_array","doc":null,"default_value":"","external_name":"sha1_array","restriction":"Array(Reference)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_array_command(concat([\"SCRIPT\", \"EXISTS\"], sha1_array))"}},{"id":"script_flush-instance-method","html_id":"script_flush-instance-method","name":"script_flush","doc":"Flush the Lua scripts cache.\n\n**Return value**: \"OK\"","summary":"

    Flush the Lua scripts cache.

    ","abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1541","def":{"name":"script_flush","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"SCRIPT\", \"FLUSH\"])"}},{"id":"script_kill-instance-method","html_id":"script_kill-instance-method","name":"script_kill","doc":"Kills the currently executing Lua script, assuming no write operation was\nyet performed by the script.\n\n**Return value**: \"OK\"","summary":"

    Kills the currently executing Lua script, assuming no write operation was yet performed by the script.

    ","abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1510","def":{"name":"script_kill","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"SCRIPT\", \"KILL\"])"}},{"id":"script_load(script:String)-instance-method","html_id":"script_load(script:String)-instance-method","name":"script_load","doc":"Load a script into the scripts cache, without executing it.\n\n**Return value**: String, the SHA1 digest of the script\nadded into the script cache.\n\nExample:\n\n```\nredis.script_load(\"return {KEYS[1],ARGV[1]}\") # => \"a191862bfe0bd3bec995befcd060582bf4bdbd77\"\n```","summary":"

    Load a script into the scripts cache, without executing it.

    ","abstract":false,"args":[{"name":"script","doc":null,"default_value":"","external_name":"script","restriction":"String"}],"args_string":"(script : String)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1502","def":{"name":"script_load","args":[{"name":"script","doc":null,"default_value":"","external_name":"script","restriction":"String"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"SCRIPT\", \"LOAD\", script])"}},{"id":"sdiff(keys:Array(String)):Array(RedisValue)-instance-method","html_id":"sdiff(keys:Array(String)):Array(RedisValue)-instance-method","name":"sdiff","doc":"Returns the members of the set resulting from the difference between the first set and all the successive sets.\n\n**Return value**: Array(String), a list with members of the resulting set.","summary":"

    Returns the members of the set resulting from the difference between the first set and all the successive sets.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"args_string":"(keys : Array(String)) : Array(RedisValue)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L756","def":{"name":"sdiff","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Array(RedisValue)","visibility":"Public","body":"string_array_command(concat([\"SDIFF\"], namespaced(keys)))"}},{"id":"sdiff(*keys:String):Array(RedisValue)-instance-method","html_id":"sdiff(*keys:String):Array(RedisValue)-instance-method","name":"sdiff","doc":null,"summary":null,"abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"args_string":"(*keys : String) : Array(RedisValue)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L760","def":{"name":"sdiff","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"double_splat":null,"splat_index":0,"yields":null,"block_arg":null,"return_type":"Array(RedisValue)","visibility":"Public","body":"sdiff(keys.to_a)"}},{"id":"sdiffstore(destination,*keys:String):Int64-instance-method","html_id":"sdiffstore(destination,*keys:String):Int64-instance-method","name":"sdiffstore","doc":"This command is equal to SDIFF, but instead of returning the resulting set, it is stored in destination.\n\n**Return value**: Integer, the number of elements in the resulting set.","summary":"

    This command is equal to SDIFF, but instead of returning the resulting set, it is stored in destination.

    ","abstract":false,"args":[{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"args_string":"(destination, *keys : String) : Int64","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L772","def":{"name":"sdiffstore","args":[{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"double_splat":null,"splat_index":1,"yields":null,"block_arg":null,"return_type":"Int64","visibility":"Public","body":"sdiffstore(destination, keys.to_a)"}},{"id":"sdiffstore(destination,keys:Array(String)):Int64-instance-method","html_id":"sdiffstore(destination,keys:Array(String)):Int64-instance-method","name":"sdiffstore","doc":"This command is equal to SDIFF, but instead of returning the resulting set, it is stored in destination.\n\n**Return value**: Integer, the number of elements in the resulting set.","summary":"

    This command is equal to SDIFF, but instead of returning the resulting set, it is stored in destination.

    ","abstract":false,"args":[{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"args_string":"(destination, keys : Array(String)) : Int64","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L767","def":{"name":"sdiffstore","args":[{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Int64","visibility":"Public","body":"integer_command(concat([\"SDIFFSTORE\", namespaced(destination)], namespaced(keys)))"}},{"id":"select(database_number)-instance-method","html_id":"select(database_number)-instance-method","name":"select","doc":"Select the DB with having the specified zero-based numeric index.\n\n**Return value**: \"OK\"","summary":"

    Select the DB with having the specified zero-based numeric index.

    ","abstract":false,"args":[{"name":"database_number","doc":null,"default_value":"","external_name":"database_number","restriction":""}],"args_string":"(database_number)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L94","def":{"name":"select","args":[{"name":"database_number","doc":null,"default_value":"","external_name":"database_number","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"if !database_number\n raise(Redis::Error.new(\"ERR database number could not be Nil\"))\nend\nif database_number == @database\n return \"OK\"\nend\nres = string_command([\"SELECT\", database_number.to_s])\n@database = database_number\nres\n"}},{"id":"set(key,value,ex=nil,px=nil,nx=nil,xx=nil)-instance-method","html_id":"set(key,value,ex=nil,px=nil,nx=nil,xx=nil)-instance-method","name":"set","doc":"Set key to hold the string value. If key already holds a value, it is overwritten, regardless of its type. Any previous time to live associated with the key is discarded on successful SET operation.\n\n**Options**:\n\n* Starting with Redis 2.6.12 SET supports a set of options that modify its behavior:\n* ex -- Set the specified expire time, in seconds.\n* px -- Set the specified expire time, in milliseconds.\n* nx -- Only set the key if it does not already exist.\n* xx -- Only set the key if it already exist.\n\n**Return value**:\n* OK if SET was executed correctly.\n* Null reply: nil is returned if the SET operation was not performed because the user specified the NX or XX option but the condition was not met.\n\nExample:\n\n```\nredis.set(\"foo\", \"test\")\nredis.set(\"bar\", \"test\", ex: 7)\n```","summary":"

    Set key to hold the string value.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""},{"name":"ex","doc":null,"default_value":"nil","external_name":"ex","restriction":""},{"name":"px","doc":null,"default_value":"nil","external_name":"px","restriction":""},{"name":"nx","doc":null,"default_value":"nil","external_name":"nx","restriction":""},{"name":"xx","doc":null,"default_value":"nil","external_name":"xx","restriction":""}],"args_string":"(key, value, ex = nil, px = nil, nx = nil, xx = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L47","def":{"name":"set","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""},{"name":"ex","doc":null,"default_value":"nil","external_name":"ex","restriction":""},{"name":"px","doc":null,"default_value":"nil","external_name":"px","restriction":""},{"name":"nx","doc":null,"default_value":"nil","external_name":"nx","restriction":""},{"name":"xx","doc":null,"default_value":"nil","external_name":"xx","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"SET\", namespaced(key), value.to_s]\nif ex\n (q << \"EX\") << ex.to_s\nend\nif px\n (q << \"PX\") << px.to_s\nend\nif nx\n q << \"NX\"\nend\nif xx\n q << \"XX\"\nend\nstring_or_nil_command(q)\n"}},{"id":"setbit(key,index,value)-instance-method","html_id":"setbit(key,index,value)-instance-method","name":"setbit","doc":"Sets or clears the bit at offset in the string value stored at key.\n\n**Return value**: Integer: the original bit value stored at offset.\n\nExample:\n\n```\nredis.setbit(\"mykey\", 7, 1)\n```","summary":"

    Sets or clears the bit at offset in the string value stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"index","doc":null,"default_value":"","external_name":"index","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, index, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L474","def":{"name":"setbit","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"index","doc":null,"default_value":"","external_name":"index","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"SETBIT\", namespaced(key), index.to_s, value.to_s])"}},{"id":"setex(key,expire_in_seconds,value)-instance-method","html_id":"setex(key,expire_in_seconds,value)-instance-method","name":"setex","doc":"Set key to hold the string value and set key to timeout after a given number of seconds.\n\n**Return value**: \"OK\"\n\nExample:\n\n```\nredis.setex(\"foo\", 3, \"bar\")\n```","summary":"

    Set key to hold the string value and set key to timeout after a given number of seconds.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"expire_in_seconds","doc":null,"default_value":"","external_name":"expire_in_seconds","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, expire_in_seconds, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L273","def":{"name":"setex","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"expire_in_seconds","doc":null,"default_value":"","external_name":"expire_in_seconds","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"SETEX\", namespaced(key), expire_in_seconds.to_s, value.to_s])"}},{"id":"setnx(key,value)-instance-method","html_id":"setnx(key,value)-instance-method","name":"setnx","doc":"Set key to hold string value if key does not exist.\n\n**Return value**: Integer, specifically:\n* 1 if the key was set\n* 0 if the key was not set","summary":"

    Set key to hold string value if key does not exist.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L289","def":{"name":"setnx","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"SETNX\", namespaced(key), value.to_s])"}},{"id":"setrange(key,start_index,value)-instance-method","html_id":"setrange(key,start_index,value)-instance-method","name":"setrange","doc":"Overwrites part of the string stored at key, starting at the specified offset, for the entire length of value.\n\n**Return value**: Integer, the length of the string after it was modified by the command.\n\nExample:\n\n```\nredis.setrange(\"foo\", 6, \"Redis\")\n```","summary":"

    Overwrites part of the string stored at key, starting at the specified offset, for the entire length of value.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start_index","doc":null,"default_value":"","external_name":"start_index","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, start_index, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L409","def":{"name":"setrange","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start_index","doc":null,"default_value":"","external_name":"start_index","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"SETRANGE\", namespaced(key), start_index.to_s, value.to_s])"}},{"id":"sinter(keys:Array(String)):Array(RedisValue)-instance-method","html_id":"sinter(keys:Array(String)):Array(RedisValue)-instance-method","name":"sinter","doc":"Returns the members of the set resulting from the intersection of all the given sets.\n\n**Return value**: Array(String), an array with members of the resulting set.","summary":"

    Returns the members of the set resulting from the intersection of all the given sets.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"args_string":"(keys : Array(String)) : Array(RedisValue)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L779","def":{"name":"sinter","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Array(RedisValue)","visibility":"Public","body":"string_array_command(concat([\"SINTER\"], namespaced(keys)))"}},{"id":"sinter(*keys:String):Array(RedisValue)-instance-method","html_id":"sinter(*keys:String):Array(RedisValue)-instance-method","name":"sinter","doc":"Returns the members of the set resulting from the intersection of all the given sets.\n\n**Return value**: Array(String), an array with members of the resulting set.","summary":"

    Returns the members of the set resulting from the intersection of all the given sets.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"args_string":"(*keys : String) : Array(RedisValue)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L784","def":{"name":"sinter","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"double_splat":null,"splat_index":0,"yields":null,"block_arg":null,"return_type":"Array(RedisValue)","visibility":"Public","body":"sinter(keys.to_a)"}},{"id":"sinterstore(destination_key,*keys:String):Int64-instance-method","html_id":"sinterstore(destination_key,*keys:String):Int64-instance-method","name":"sinterstore","doc":"This command is equal to SINTER, but instead of returning the resulting set, it is stored in destination.\n\n**Return value**: Integer, the number of elements in the resulting set.\n\nExample:\n\n```\nredis.sinterstore(\"destination\", \"key1\", \"key2\")\n```","summary":"

    This command is equal to SINTER, but instead of returning the resulting set, it is stored in destination.

    ","abstract":false,"args":[{"name":"destination_key","doc":null,"default_value":"","external_name":"destination_key","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"args_string":"(destination_key, *keys : String) : Int64","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L802","def":{"name":"sinterstore","args":[{"name":"destination_key","doc":null,"default_value":"","external_name":"destination_key","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"double_splat":null,"splat_index":1,"yields":null,"block_arg":null,"return_type":"Int64","visibility":"Public","body":"sinterstore(destination_key, keys.to_a)"}},{"id":"sinterstore(destination_key,keys:Array(String)):Int64-instance-method","html_id":"sinterstore(destination_key,keys:Array(String)):Int64-instance-method","name":"sinterstore","doc":"This command is equal to SINTER, but instead of returning the resulting set, it is stored in destination.\n\n**Return value**: Integer, the number of elements in the resulting set.\n\nExample:\n\n```\nredis.sinterstore(\"destination\", \"key1\", \"key2\")\n```","summary":"

    This command is equal to SINTER, but instead of returning the resulting set, it is stored in destination.

    ","abstract":false,"args":[{"name":"destination_key","doc":null,"default_value":"","external_name":"destination_key","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"args_string":"(destination_key, keys : Array(String)) : Int64","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L797","def":{"name":"sinterstore","args":[{"name":"destination_key","doc":null,"default_value":"","external_name":"destination_key","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Int64","visibility":"Public","body":"integer_command(concat([\"SINTERSTORE\", namespaced(destination_key)], namespaced(keys)))"}},{"id":"sismember(key,value)-instance-method","html_id":"sismember(key,value)-instance-method","name":"sismember","doc":"Returns if member is a member of the set stored at key.\n\n**Return value**: Integer, specifically:\n* 1 if the element is a member of the set.\n* 0 if the element is not a member of the set, or if key does not exist.","summary":"

    Returns if member is a member of the set stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L727","def":{"name":"sismember","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"SISMEMBER\", namespaced(key), value.to_s])"}},{"id":"smembers(key)-instance-method","html_id":"smembers(key)-instance-method","name":"smembers","doc":"Returns all the members of the set value stored at key.\n\n**Return value**: Array(String), all elements of the set.","summary":"

    Returns all the members of the set value stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L718","def":{"name":"smembers","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_array_command([\"SMEMBERS\", namespaced(key)])"}},{"id":"smove(source,destination,member)-instance-method","html_id":"smove(source,destination,member)-instance-method","name":"smove","doc":"Move member from the set at source to the set at destination.\n\n**Return value**: Integer, specifically:\n* 1 if the element is moved.\n* 0 if the element is not a member of source and no operation was performed.","summary":"

    Move member from the set at source to the set at destination.

    ","abstract":false,"args":[{"name":"source","doc":null,"default_value":"","external_name":"source","restriction":""},{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""}],"args_string":"(source, destination, member)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L811","def":{"name":"smove","args":[{"name":"source","doc":null,"default_value":"","external_name":"source","restriction":""},{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"SMOVE\", namespaced(source), namespaced(destination), member.to_s])"}},{"id":"sort(key,by=nil,limit=nil,get:Array(RedisValue)?=nil,order="ASC",alpha=false,store=nil)-instance-method","html_id":"sort(key,by=nil,limit=nil,get:Array(RedisValue)?=nil,order=&quot;ASC&quot;,alpha=false,store=nil)-instance-method","name":"sort","doc":"Returns or stores the elements contained in the list, set or sorted set at key.\n\n**Options**:\n\n* by - pattern for sorting by external keys\n* limit - Array of 2 strings [offset, count]\n* get - pattern for retrieving external keys\n* order - either 'ASC' or 'DESC'\n* alpha - true to sort lexicographically\n* store - key of destination list to store the result in\n\n**Return value**: Array(String), the list of sorted elements.\n\nExample:\n\n```\nredis.sort(\"mylist\") # => [...]\nredis.sort(\"mylist\", order: \"DESC\") # => [...]\n```","summary":"

    Returns or stores the elements contained in the list, set or sorted set at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"by","doc":null,"default_value":"nil","external_name":"by","restriction":""},{"name":"limit","doc":null,"default_value":"nil","external_name":"limit","restriction":""},{"name":"get","doc":null,"default_value":"nil","external_name":"get","restriction":"Array(RedisValue) | ::Nil"},{"name":"order","doc":null,"default_value":"\"ASC\"","external_name":"order","restriction":""},{"name":"alpha","doc":null,"default_value":"false","external_name":"alpha","restriction":""},{"name":"store","doc":null,"default_value":"nil","external_name":"store","restriction":""}],"args_string":"(key, by = nil, limit = nil, get : Array(RedisValue)? = nil, order = "ASC", alpha = false, store = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L178","def":{"name":"sort","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"by","doc":null,"default_value":"nil","external_name":"by","restriction":""},{"name":"limit","doc":null,"default_value":"nil","external_name":"limit","restriction":""},{"name":"get","doc":null,"default_value":"nil","external_name":"get","restriction":"Array(RedisValue) | ::Nil"},{"name":"order","doc":null,"default_value":"\"ASC\"","external_name":"order","restriction":""},{"name":"alpha","doc":null,"default_value":"false","external_name":"alpha","restriction":""},{"name":"store","doc":null,"default_value":"nil","external_name":"store","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"SORT\", namespaced(key)]\nif by\n (q << \"BY\") << by.to_s\nend\nif limit\n if limit.size != 2\n raise(Error.new(\"limit must be an array of 2 elements (offset, count)\"))\n end\n offset, count = limit\n ((q << \"LIMIT\") << offset.to_s) << count.to_s\nend\nif get\n get.each do |pattern|\n (q << \"GET\") << pattern\n end\nend\nif order\n _order = order.upcase\n if [\"ASC\", \"DESC\"].includes?(_order)\n else\n raise(Error.new(\"Bad order #{order}\"))\n end\n q << _order\nend\nif alpha\n q << \"ALPHA\"\nend\nif store\n (q << \"STORE\") << (namespaced(store))\nend\nstring_array_or_integer_command(q)\n"}},{"id":"spop(key,count=nil)-instance-method","html_id":"spop(key,count=nil)-instance-method","name":"spop","doc":"Removes and returns one or more random elements from the set value store at key.\n\nThe count argument will be available in a later Redis version and is not available in 2.6, 2.8, 3.0\n\n**Return value**: The removed element, or nil when key does not exist.","summary":"

    Removes and returns one or more random elements from the set value store at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""}],"args_string":"(key, count = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L820","def":{"name":"spop","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"SPOP\", namespaced(key)]\nif count\n q << count.to_s\nend\nstring_array_or_string_or_nil_command(q)\n"}},{"id":"srandmember(key,count=nil)-instance-method","html_id":"srandmember(key,count=nil)-instance-method","name":"srandmember","doc":"When called with just the key argument, return a random element from the set value stored at key.\n\n**Options**:\n\n* count - Starting from Redis version 2.6, when called with the additional count argument, return an array of count distinct elements if count is positive. If called with a negative count the behavior changes and the command is allowed to return the same element multiple times.\n\n**Return value**:\n* String: without the additional count argument the command returns a Bulk Reply with the randomly selected element, or nil when key does not exist.\n* Array: when the additional count argument is passed the command returns an array of elements, or an empty array when key does not exist.","summary":"

    When called with just the key argument, return a random element from the set value stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""}],"args_string":"(key, count = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L838","def":{"name":"srandmember","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"SRANDMEMBER\", namespaced(key)]\nif count\n q << count.to_s\nend\nstring_array_or_string_or_nil_command(q)\n"}},{"id":"srem(key,*values)-instance-method","html_id":"srem(key,*values)-instance-method","name":"srem","doc":"Remove the specified members from the set stored at key.\n\n**Return value**: Integer, The number of members that were removed from the set, not including non existing members.\n\nExample:\n\n```\nredis.srem(\"myset\", \"Hello\")\n```","summary":"

    Remove the specified members from the set stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":""}],"args_string":"(key, *values)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L740","def":{"name":"srem","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":""}],"double_splat":null,"splat_index":1,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"srem(key, values.to_a)"}},{"id":"srem(key,values:Array(RedisValue))-instance-method","html_id":"srem(key,values:Array(RedisValue))-instance-method","name":"srem","doc":null,"summary":null,"abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"Array(RedisValue)"}],"args_string":"(key, values : Array(RedisValue))","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L744","def":{"name":"srem","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"Array(RedisValue)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command(concat([\"SREM\", namespaced(key)], values))"}},{"id":"sscan(key,cursor,match=nil,count=nil)-instance-method","html_id":"sscan(key,cursor,match=nil,count=nil)-instance-method","name":"sscan","doc":"The SCAN command and the closely related commands SSCAN, HSCAN and ZSCAN are used in order to incrementally iterate over a collection of elements.\n\n**Options**:\n\n* match - It is possible to only iterate elements matching a given glob-style pattern, similarly to the behavior of the KEYS command that takes a pattern as only argument.\n* count - While SCAN does not provide guarantees about the number of elements returned at every iteration, it is possible to empirically adjust the behavior of SCAN using the COUNT option.\n\n**Return value**: Array(String), a list of Set members.\n\nExample:\n\n```\nredis.sscan(\"myset\", 0)\nredis.sscan(\"myset\", 0, \"foo*\")\nredis.sscan(\"myset\", 0, \"foo*\", 1024)\n```","summary":"

    The SCAN command and the closely related commands SSCAN, HSCAN and ZSCAN are used in order to incrementally iterate over a collection of elements.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"cursor","doc":null,"default_value":"","external_name":"cursor","restriction":""},{"name":"match","doc":null,"default_value":"nil","external_name":"match","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""}],"args_string":"(key, cursor, match = nil, count = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L862","def":{"name":"sscan","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"cursor","doc":null,"default_value":"","external_name":"cursor","restriction":""},{"name":"match","doc":null,"default_value":"nil","external_name":"match","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"SSCAN\", namespaced(key), cursor.to_s]\nif match\n (q << \"MATCH\") << match.to_s\nend\nif count\n (q << \"COUNT\") << count.to_s\nend\nstring_array_command(q)\n"}},{"id":"strlen(key)-instance-method","html_id":"strlen(key)-instance-method","name":"strlen","doc":"Returns the length of the string value stored at key.\n\n**Return value**: Integer, the length of the string at key, or 0 when key does not exist.","summary":"

    Returns the length of the string value stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L382","def":{"name":"strlen","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"STRLEN\", namespaced(key)])"}},{"id":"subscribe(*channels:String)-instance-method","html_id":"subscribe(*channels:String)-instance-method","name":"subscribe","doc":"Subscribes to more channels while already being in a subscription loop.","summary":"

    Subscribes to more channels while already being in a subscription loop.

    ","abstract":false,"args":[{"name":"channels","doc":null,"default_value":"","external_name":"channels","restriction":"String"}],"args_string":"(*channels : String)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1681","def":{"name":"subscribe","args":[{"name":"channels","doc":null,"default_value":"","external_name":"channels","restriction":"String"}],"double_splat":null,"splat_index":0,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"subscribe(channels.to_a)"}},{"id":"subscribe(*channels,&callback_setup_block:Subscription->)-instance-method","html_id":"subscribe(*channels,&callback_setup_block:Subscription->)-instance-method","name":"subscribe","doc":"Subscribes to channels and enters a subscription loop, waiting for events.\n\nThe method yields to the given block and passes a Subscription object, on\nwhich you can set your callbacks for the event subscription.\n\nThe subscription loop will end once you unsubscribe.\n\nSee also: `Subscription` class\nSee also: Example `subscribe.cr`\n\nExample:\n\n```\nredis.subscribe(\"mychannel\") do |on|\n on.message do |channel, message|\n puts \"Received message: #{message}\"\n if message == \"goodbye pal\"\n redis.unsubscribe\n end\n end\nend\n```","summary":"

    Subscribes to channels and enters a subscription loop, waiting for events.

    ","abstract":false,"args":[{"name":"channels","doc":null,"default_value":"","external_name":"channels","restriction":""}],"args_string":"(*channels, &callback_setup_block : Subscription -> )","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1655","def":{"name":"subscribe","args":[{"name":"channels","doc":null,"default_value":"","external_name":"channels","restriction":""}],"double_splat":null,"splat_index":0,"yields":1,"block_arg":{"name":"callback_setup_block","doc":null,"default_value":"","external_name":"callback_setup_block","restriction":"(Subscription -> )"},"return_type":"","visibility":"Public","body":"if already_in_subscription_loop?\n raise(Redis::Error.new(\"Must call subscribe without a subscription block when already inside a subscription loop\"))\nend\nsubscription = Subscription.new\ncallback_setup_block.call(subscription)\n@strategy = Redis::Strategy::SubscriptionLoop.new(connection, subscription)\nsubscribe(*channels)\n"}},{"id":"subscribe(channels:Array(String)):Void-instance-method","html_id":"subscribe(channels:Array(String)):Void-instance-method","name":"subscribe","doc":"Subscribes to more channels while already being in a subscription loop.","summary":"

    Subscribes to more channels while already being in a subscription loop.

    ","abstract":false,"args":[{"name":"channels","doc":null,"default_value":"","external_name":"channels","restriction":"Array(String)"}],"args_string":"(channels : Array(String)) : Void","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1671","def":{"name":"subscribe","args":[{"name":"channels","doc":null,"default_value":"","external_name":"channels","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Void","visibility":"Public","body":"if already_in_subscription_loop?\nelse\n raise(Redis::Error.new(\"Must call subscribe with a subscription block\"))\nend\nvoid_command(concat([\"SUBSCRIBE\"], channels))\n"}},{"id":"sunion(*keys:String)-instance-method","html_id":"sunion(*keys:String)-instance-method","name":"sunion","doc":"Returns the members of the set resulting from the union of all the given sets.\n\n**Return value**: Array(String), with members of the resulting set.","summary":"

    Returns the members of the set resulting from the union of all the given sets.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"args_string":"(*keys : String)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L877","def":{"name":"sunion","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"double_splat":null,"splat_index":0,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"sunion(keys.to_a)"}},{"id":"sunion(keys:Array(String))-instance-method","html_id":"sunion(keys:Array(String))-instance-method","name":"sunion","doc":"Returns the members of the set resulting from the union of all the given sets.\n\n**Return value**: Array(String), with members of the resulting set.","summary":"

    Returns the members of the set resulting from the union of all the given sets.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"args_string":"(keys : Array(String))","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L872","def":{"name":"sunion","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_array_command(concat([\"SUNION\"], namespaced(keys)))"}},{"id":"sunionstore(destination,keys:Array(String)):Int64-instance-method","html_id":"sunionstore(destination,keys:Array(String)):Int64-instance-method","name":"sunionstore","doc":"This command is equal to SUNION, but instead of returning the resulting set, it is stored in destination.\n\n**Return value**: Integer, the number of elements in the resulting set.","summary":"

    This command is equal to SUNION, but instead of returning the resulting set, it is stored in destination.

    ","abstract":false,"args":[{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"args_string":"(destination, keys : Array(String)) : Int64","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L884","def":{"name":"sunionstore","args":[{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Int64","visibility":"Public","body":"integer_command(concat([\"SUNIONSTORE\", namespaced(destination)], namespaced(keys)))"}},{"id":"sunionstore(destination,*keys:String):Int64-instance-method","html_id":"sunionstore(destination,*keys:String):Int64-instance-method","name":"sunionstore","doc":"This command is equal to SUNION, but instead of returning the resulting set, it is stored in destination.\n\n**Return value**: Integer, the number of elements in the resulting set.","summary":"

    This command is equal to SUNION, but instead of returning the resulting set, it is stored in destination.

    ","abstract":false,"args":[{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"args_string":"(destination, *keys : String) : Int64","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L889","def":{"name":"sunionstore","args":[{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"double_splat":null,"splat_index":1,"yields":null,"block_arg":null,"return_type":"Int64","visibility":"Public","body":"sunionstore(destination, keys.to_a)"}},{"id":"ttl(key)-instance-method","html_id":"ttl(key)-instance-method","name":"ttl","doc":"Returns the remaining time to live of a key that has a timeout.\n\n**Return value**: Integer: TTL in seconds, or a negative value in order to\nsignal an error (see the description above).","summary":"

    Returns the remaining time to live of a key that has a timeout.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1606","def":{"name":"ttl","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"TTL\", namespaced(key)])"}},{"id":"type(key)-instance-method","html_id":"type(key)-instance-method","name":"type","doc":"Returns the string representation of the type of the value stored at key.\n\n**Return value**: String, the type of key, or none when key does not exist.\n\nExample:\n\n```\nredis.set(\"foo\", 3)\nredis.type(\"foo\") # => \"string\"\n```","summary":"

    Returns the string representation of the type of the value stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1629","def":{"name":"type","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"TYPE\", namespaced(key)])"}},{"id":"unsubscribe(*channels)-instance-method","html_id":"unsubscribe(*channels)-instance-method","name":"unsubscribe","doc":"Unsubscribes the client from the given channels, or from all of them if none is given.","summary":"

    Unsubscribes the client from the given channels, or from all of them if none is given.

    ","abstract":false,"args":[{"name":"channels","doc":null,"default_value":"","external_name":"channels","restriction":""}],"args_string":"(*channels)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1730","def":{"name":"unsubscribe","args":[{"name":"channels","doc":null,"default_value":"","external_name":"channels","restriction":""}],"double_splat":null,"splat_index":0,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"unsubscribe(channels.to_a)"}},{"id":"unsubscribe(channels:Array(String)):Nil-instance-method","html_id":"unsubscribe(channels:Array(String)):Nil-instance-method","name":"unsubscribe","doc":"Unsubscribes the client from the given channels, or from all of them if none is given.","summary":"

    Unsubscribes the client from the given channels, or from all of them if none is given.

    ","abstract":false,"args":[{"name":"channels","doc":null,"default_value":"","external_name":"channels","restriction":"Array(String)"}],"args_string":"(channels : Array(String)) : Nil","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1725","def":{"name":"unsubscribe","args":[{"name":"channels","doc":null,"default_value":"","external_name":"channels","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Nil","visibility":"Public","body":"void_command(concat([\"UNSUBSCRIBE\"], channels))"}},{"id":"unwatch-instance-method","html_id":"unwatch-instance-method","name":"unwatch","doc":"Flushes all the previously watched keys for a transaction.\n\n**Return value**: \"OK\"","summary":"

    Flushes all the previously watched keys for a transaction.

    ","abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1771","def":{"name":"unwatch","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"UNWATCH\"])"}},{"id":"watch(keys:Array(String))-instance-method","html_id":"watch(keys:Array(String))-instance-method","name":"watch","doc":"Marks the given keys to be watched for conditional execution of a transaction.\n\n**Return value**: \"OK\"","summary":"

    Marks the given keys to be watched for conditional execution of a transaction.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"args_string":"(keys : Array(String))","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1760","def":{"name":"watch","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command(concat([\"WATCH\"], namespaced(keys)))"}},{"id":"watch(*keys)-instance-method","html_id":"watch(*keys)-instance-method","name":"watch","doc":null,"summary":null,"abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":""}],"args_string":"(*keys)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1764","def":{"name":"watch","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":""}],"double_splat":null,"splat_index":0,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"watch(keys.to_a)"}},{"id":"zadd(key,scores_and_members:Array(RedisValue))-instance-method","html_id":"zadd(key,scores_and_members:Array(RedisValue))-instance-method","name":"zadd","doc":null,"summary":null,"abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"scores_and_members","doc":null,"default_value":"","external_name":"scores_and_members","restriction":"Array(RedisValue)"}],"args_string":"(key, scores_and_members : Array(RedisValue))","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1147","def":{"name":"zadd","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"scores_and_members","doc":null,"default_value":"","external_name":"scores_and_members","restriction":"Array(RedisValue)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"if (scores_and_members.size % 2) > 0\n raise(Error.new(\"zadd expects an array of scores mapped to members\"))\nend\ninteger_command(concat([\"ZADD\", namespaced(key)], scores_and_members))\n"}},{"id":"zadd(key,*scores_and_members)-instance-method","html_id":"zadd(key,*scores_and_members)-instance-method","name":"zadd","doc":"Adds all the specified members with the specified scores to the sorted set stored at key.\n\n**Return value**: Integer, the number of elements added to the sorted sets, not including elements already existing for which the score was updated.\n\nExample:\n\n```\nredis.zadd(\"myzset\", 1, \"one\")\nredis.zadd(\"myzset\", 2, \"two\", 3, \"three\")\n```","summary":"

    Adds all the specified members with the specified scores to the sorted set stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"scores_and_members","doc":null,"default_value":"","external_name":"scores_and_members","restriction":""}],"args_string":"(key, *scores_and_members)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1139","def":{"name":"zadd","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"scores_and_members","doc":null,"default_value":"","external_name":"scores_and_members","restriction":""}],"double_splat":null,"splat_index":1,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"if (scores_and_members.size % 2) > 0\n raise(Error.new(\"zadd expects an array of scores mapped to members\"))\nend\ninteger_command(concat([\"ZADD\", namespaced(key)], scores_and_members))\n"}},{"id":"zcard(key)-instance-method","html_id":"zcard(key)-instance-method","name":"zcard","doc":"Returns the sorted set cardinality (number of elements) of the sorted set stored at key.\n\n**Return value**: Integer, the cardinality (number of elements) of the sorted set, or 0 if key does not exist.","summary":"

    Returns the sorted set cardinality (number of elements) of the sorted set stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1179","def":{"name":"zcard","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"ZCARD\", namespaced(key)])"}},{"id":"zcount(key,min,max)-instance-method","html_id":"zcount(key,min,max)-instance-method","name":"zcount","doc":"Returns the number of elements in the sorted set at key with a score between min and max.\n\n**Return value**: Integer, the number of elements in the specified score range.","summary":"

    Returns the number of elements in the sorted set at key with a score between min and max.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""}],"args_string":"(key, min, max)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1193","def":{"name":"zcount","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"ZCOUNT\", namespaced(key), min.to_s, max.to_s])"}},{"id":"zincrby(key,increment,member)-instance-method","html_id":"zincrby(key,increment,member)-instance-method","name":"zincrby","doc":"Increments the score of member in the sorted set stored at key by increment.\n\n**Return value**: String, the new score of member (a double precision floating point number represented as String).","summary":"

    Increments the score of member in the sorted set stored at key by increment.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"increment","doc":null,"default_value":"","external_name":"increment","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""}],"args_string":"(key, increment, member)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1207","def":{"name":"zincrby","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"increment","doc":null,"default_value":"","external_name":"increment","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"ZINCRBY\", namespaced(key), increment.to_s, member.to_s])"}},{"id":"zinterstore(destination,keys:Array,weights=nil,aggregate=nil)-instance-method","html_id":"zinterstore(destination,keys:Array,weights=nil,aggregate=nil)-instance-method","name":"zinterstore","doc":"Computes the intersection of numkeys sorted sets given by the specified keys,\nand stores the result in destination.\n\n**Options**:\n\n* weights - nil or Array(String): Using the WEIGHTS option, it is possible to specify a multiplication factor for each input sorted set.\n* aggregate - With the AGGREGATE option, it is possible to specify how the results of the union are aggregated.\n\n**Return value**: Integer, the number of elements in the resulting sorted set at destination.\n\nExample:\n\n```\nredis.zinterstore(\"zset3\", [\"zset1\", \"zset2\"], weights: [2, 3])\n```","summary":"

    Computes the intersection of numkeys sorted sets given by the specified keys, and stores the result in destination.

    ","abstract":false,"args":[{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array"},{"name":"weights","doc":null,"default_value":"nil","external_name":"weights","restriction":""},{"name":"aggregate","doc":null,"default_value":"nil","external_name":"aggregate","restriction":""}],"args_string":"(destination, keys : Array, weights = nil, aggregate = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1252","def":{"name":"zinterstore","args":[{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array"},{"name":"weights","doc":null,"default_value":"nil","external_name":"weights","restriction":""},{"name":"aggregate","doc":null,"default_value":"nil","external_name":"aggregate","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"numkeys = keys.size\nq = concat([\"ZINTERSTORE\", namespaced(destination), numkeys.to_s], namespaced(keys))\nif weights\n q << \"WEIGHTS\"\n concat(q, weights)\nend\nif aggregate\n (q << \"AGGREGATE\") << aggregate.to_s\nend\ninteger_command(q)\n"}},{"id":"zlexcount(key,min,max)-instance-method","html_id":"zlexcount(key,min,max)-instance-method","name":"zlexcount","doc":"When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering, this command returns the number of elements in the sorted set at key with a value between min and max.\n\n**Return value**: Integer, the number of elements in the specified score range.","summary":"

    When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering, this command returns the number of elements in the sorted set at key with a value between min and max.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""}],"args_string":"(key, min, max)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1200","def":{"name":"zlexcount","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"ZLEXCOUNT\", namespaced(key), min.to_s, max.to_s])"}},{"id":"zrange(key,start,stop,with_scores=false)-instance-method","html_id":"zrange(key,start,stop,with_scores=false)-instance-method","name":"zrange","doc":"Returns the specified range of elements in the sorted set stored at key.\n\n**Options**:\n\n* with_scores - true to return the scores of the elements together with the elements.\n\n**Return value**: Array(String), list of elements in the specified range (optionally with their scores, in case the with_scores option is true).\n\nExample:\n\n```\nredis.zrange(\"myzset\", 0, -1, with_scores: true) # => [\"one\", \"1\", \"uno\", \"1\", \"two\", \"2\", \"three\", \"3\"]\n```","summary":"

    Returns the specified range of elements in the sorted set stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start","doc":null,"default_value":"","external_name":"start","restriction":""},{"name":"stop","doc":null,"default_value":"","external_name":"stop","restriction":""},{"name":"with_scores","doc":null,"default_value":"false","external_name":"with_scores","restriction":""}],"args_string":"(key, start, stop, with_scores = false)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1168","def":{"name":"zrange","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start","doc":null,"default_value":"","external_name":"start","restriction":""},{"name":"stop","doc":null,"default_value":"","external_name":"stop","restriction":""},{"name":"with_scores","doc":null,"default_value":"false","external_name":"with_scores","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"ZRANGE\", namespaced(key), start.to_s, stop.to_s]\nif with_scores\n q << \"WITHSCORES\"\nend\nstring_array_command(q)\n"}},{"id":"zrangebylex(key,min,max,limit=nil)-instance-method","html_id":"zrangebylex(key,min,max,limit=nil)-instance-method","name":"zrangebylex","doc":"When all the elements in a sorted set are inserted with the same score,\nin order to force lexicographical ordering, this command returns all the\nelements in the sorted set at key with a value between min and max.\n\n**Options**:\n\n* limit - an array of [offset, count]. Skip offset members, return a maximum of count members.\n\n**Return value**:","summary":"

    When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering, this command returns all the elements in the sorted set at key with a value between min and max.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""},{"name":"limit","doc":null,"default_value":"nil","external_name":"limit","restriction":""}],"args_string":"(key, min, max, limit = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1295","def":{"name":"zrangebylex","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""},{"name":"limit","doc":null,"default_value":"nil","external_name":"limit","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"ZRANGEBYLEX\", namespaced(key), min.to_s, max.to_s]\nif limit\n ((q << \"LIMIT\") << limit[0].to_s) << limit[1].to_s\nend\nstring_array_command(q)\n"}},{"id":"zrangebyscore(key,min,max,limit=nil,with_scores=false)-instance-method","html_id":"zrangebyscore(key,min,max,limit=nil,with_scores=false)-instance-method","name":"zrangebyscore","doc":"Returns all the elements in the sorted set at key with a score between\nmax and min (including elements with score equal to max or min).\n\n**Options**:\n\n* limit - an array of [offset, count]. Skip offset members, return a maximum of count members.\n* with_scores - true to return the scores of the elements together with the elements.\n\n**Return value**: Array(String), the list of elements in the specified score range (optionally with their scores).","summary":"

    Returns all the elements in the sorted set at key with a score between max and min (including elements with score equal to max or min).

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""},{"name":"limit","doc":null,"default_value":"nil","external_name":"limit","restriction":""},{"name":"with_scores","doc":null,"default_value":"false","external_name":"with_scores","restriction":""}],"args_string":"(key, min, max, limit = nil, with_scores = false)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1312","def":{"name":"zrangebyscore","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""},{"name":"limit","doc":null,"default_value":"nil","external_name":"limit","restriction":""},{"name":"with_scores","doc":null,"default_value":"false","external_name":"with_scores","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"ZRANGEBYSCORE\", namespaced(key), min.to_s, max.to_s]\nif limit\n ((q << \"LIMIT\") << limit[0].to_s) << limit[1].to_s\nend\nif with_scores\n q << \"WITHSCORES\"\nend\nstring_array_command(q)\n"}},{"id":"zrank(key,member)-instance-method","html_id":"zrank(key,member)-instance-method","name":"zrank","doc":"Returns the rank of member in the sorted set stored at key, with the scores ordered from low to high.\n\n**Return value**:\n* If member exists in the sorted set, Integer: the rank of member.\n* If member does not exist in the sorted set or key does not exist: nil.","summary":"

    Returns the rank of member in the sorted set stored at key, with the scores ordered from low to high.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""}],"args_string":"(key, member)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1223","def":{"name":"zrank","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_or_nil_command([\"ZRANK\", namespaced(key), member.to_s])"}},{"id":"zrem(key,member)-instance-method","html_id":"zrem(key,member)-instance-method","name":"zrem","doc":"Removes the specified members from the sorted set stored at key.\n\n**Return value**: Integer, the number of members removed from the sorted set, not including non existing members.","summary":"

    Removes the specified members from the sorted set stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""}],"args_string":"(key, member)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1214","def":{"name":"zrem","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"ZREM\", namespaced(key), member.to_s])"}},{"id":"zremrangebylex(key,min,max)-instance-method","html_id":"zremrangebylex(key,min,max)-instance-method","name":"zremrangebylex","doc":"When all the elements in a sorted set are inserted with the same score,\nin order to force lexicographical ordering, this command removes all\nelements in the sorted set stored at key between the lexicographical range\nspecified by min and max.\n\n**Return value**: Integer, the number of elements removed.","summary":"

    When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering, this command removes all elements in the sorted set stored at key between the lexicographical range specified by min and max.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""}],"args_string":"(key, min, max)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1382","def":{"name":"zremrangebylex","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"ZREMRANGEBYLEX\", namespaced(key), min.to_s, max.to_s])"}},{"id":"zremrangebyrank(key,start,stop)-instance-method","html_id":"zremrangebyrank(key,start,stop)-instance-method","name":"zremrangebyrank","doc":"Removes all elements in the sorted set stored at key with rank between start and stop.\n\n**Return value**: Integer, the number of elements removed.","summary":"

    Removes all elements in the sorted set stored at key with rank between start and stop.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start","doc":null,"default_value":"","external_name":"start","restriction":""},{"name":"stop","doc":null,"default_value":"","external_name":"stop","restriction":""}],"args_string":"(key, start, stop)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1389","def":{"name":"zremrangebyrank","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start","doc":null,"default_value":"","external_name":"start","restriction":""},{"name":"stop","doc":null,"default_value":"","external_name":"stop","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"ZREMRANGEBYRANK\", namespaced(key), start.to_s, stop.to_s])"}},{"id":"zremrangebyscore(key,start,stop)-instance-method","html_id":"zremrangebyscore(key,start,stop)-instance-method","name":"zremrangebyscore","doc":"Removes all elements in the sorted set stored at key with a score\nbetween min and max (inclusive).\n\n**Return value**: Integer, the number of elements removed.","summary":"

    Removes all elements in the sorted set stored at key with a score between min and max (inclusive).

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start","doc":null,"default_value":"","external_name":"start","restriction":""},{"name":"stop","doc":null,"default_value":"","external_name":"stop","restriction":""}],"args_string":"(key, start, stop)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1397","def":{"name":"zremrangebyscore","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start","doc":null,"default_value":"","external_name":"start","restriction":""},{"name":"stop","doc":null,"default_value":"","external_name":"stop","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"ZREMRANGEBYSCORE\", namespaced(key), start.to_s, stop.to_s])"}},{"id":"zrevrange(key,start,stop,with_scores=false)-instance-method","html_id":"zrevrange(key,start,stop,with_scores=false)-instance-method","name":"zrevrange","doc":"Returns the specified range of elements in the sorted set stored at key.\n\n**Options**:\n\n* with_scores - true to return the scores of the elements together with the elements.\n\n**Return value**: Array(String), the list of elements in the specified range (optionally with their scores, in case the with_scores option is true).","summary":"

    Returns the specified range of elements in the sorted set stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start","doc":null,"default_value":"","external_name":"start","restriction":""},{"name":"stop","doc":null,"default_value":"","external_name":"stop","restriction":""},{"name":"with_scores","doc":null,"default_value":"false","external_name":"with_scores","restriction":""}],"args_string":"(key, start, stop, with_scores = false)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1330","def":{"name":"zrevrange","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start","doc":null,"default_value":"","external_name":"start","restriction":""},{"name":"stop","doc":null,"default_value":"","external_name":"stop","restriction":""},{"name":"with_scores","doc":null,"default_value":"false","external_name":"with_scores","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"ZREVRANGE\", namespaced(key), start.to_s, stop.to_s]\nif with_scores\n q << \"WITHSCORES\"\nend\nstring_array_command(q)\n"}},{"id":"zrevrangebylex(key,min,max,limit=nil)-instance-method","html_id":"zrevrangebylex(key,min,max,limit=nil)-instance-method","name":"zrevrangebylex","doc":"When all the elements in a sorted set are inserted with the same score,\nin order to force lexicographical ordering, this command returns all the\nelements in the sorted set at key with a value between min and max.\n\n**Options**:\n\n* limit - an array of [offset, count]. Skip offset members, return a maximum of count members.\n\n**Return value**:","summary":"

    When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering, this command returns all the elements in the sorted set at key with a value between min and max.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""},{"name":"limit","doc":null,"default_value":"nil","external_name":"limit","restriction":""}],"args_string":"(key, min, max, limit = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1348","def":{"name":"zrevrangebylex","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""},{"name":"limit","doc":null,"default_value":"nil","external_name":"limit","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"ZREVRANGEBYLEX\", namespaced(key), min.to_s, max.to_s]\nif limit\n ((q << \"LIMIT\") << limit[0].to_s) << limit[1].to_s\nend\nstring_array_command(q)\n"}},{"id":"zrevrangebyscore(key,min,max,limit=nil,with_scores=false)-instance-method","html_id":"zrevrangebyscore(key,min,max,limit=nil,with_scores=false)-instance-method","name":"zrevrangebyscore","doc":"Returns all the elements in the sorted set at key with a score between\nmax and min (including elements with score equal to max or min).\n\n**Options**:\n\n* limit - an array of [offset, count]. Skip offset members, return a maximum of count members.\n* with_scores - true to return the scores of the elements together with the elements.\n\n**Return value**: Array(String), the list of elements in the specified score range (optionally with their scores).","summary":"

    Returns all the elements in the sorted set at key with a score between max and min (including elements with score equal to max or min).

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""},{"name":"limit","doc":null,"default_value":"nil","external_name":"limit","restriction":""},{"name":"with_scores","doc":null,"default_value":"false","external_name":"with_scores","restriction":""}],"args_string":"(key, min, max, limit = nil, with_scores = false)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1365","def":{"name":"zrevrangebyscore","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""},{"name":"limit","doc":null,"default_value":"nil","external_name":"limit","restriction":""},{"name":"with_scores","doc":null,"default_value":"false","external_name":"with_scores","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"ZREVRANGEBYSCORE\", namespaced(key), min.to_s, max.to_s]\nif limit\n ((q << \"LIMIT\") << limit[0].to_s) << limit[1].to_s\nend\nif with_scores\n q << \"WITHSCORES\"\nend\nstring_array_command(q)\n"}},{"id":"zrevrank(key,member)-instance-method","html_id":"zrevrank(key,member)-instance-method","name":"zrevrank","doc":"Returns the rank of member in the sorted set stored at key,\nwith the scores ordered from high to low.\n\n**Return value**:\n* If member exists in the sorted set, Integer: the rank of member.\n* If member does not exist in the sorted set or key does not exist: nil.","summary":"

    Returns the rank of member in the sorted set stored at key, with the scores ordered from high to low.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""}],"args_string":"(key, member)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1233","def":{"name":"zrevrank","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_or_nil_command([\"ZREVRANK\", namespaced(key), member.to_s])"}},{"id":"zscan(key,cursor,match=nil,count=nil)-instance-method","html_id":"zscan(key,cursor,match=nil,count=nil)-instance-method","name":"zscan","doc":"The SCAN command and the closely related commands SSCAN, HSCAN and ZSCAN are used in order to incrementally iterate over a collection of elements.\n\n**Options**:\n\n* match - It is possible to only iterate elements matching a given glob-style pattern, similarly to the behavior of the KEYS command that takes a pattern as only argument.\n* count - While SCAN does not provide guarantees about the number of elements returned at every iteration, it is possible to empirically adjust the behavior of SCAN using the COUNT option.\n\n**Return value**: Array(String), contains two elements, a member and its associated score, for every returned element of the sorted set.\n\nExample:\n\n```\nredis.zscan(\"myzset\", 0)\nredis.zscan(\"myzset\", 0, \"foo*\")\nredis.zscan(\"myzset\", 0, \"foo*\", 1024)\n```","summary":"

    The SCAN command and the closely related commands SSCAN, HSCAN and ZSCAN are used in order to incrementally iterate over a collection of elements.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"cursor","doc":null,"default_value":"","external_name":"cursor","restriction":""},{"name":"match","doc":null,"default_value":"nil","external_name":"match","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""}],"args_string":"(key, cursor, match = nil, count = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1417","def":{"name":"zscan","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"cursor","doc":null,"default_value":"","external_name":"cursor","restriction":""},{"name":"match","doc":null,"default_value":"nil","external_name":"match","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"ZSCAN\", namespaced(key), cursor.to_s]\nif match\n (q << \"MATCH\") << match.to_s\nend\nif count\n (q << \"COUNT\") << count.to_s\nend\nstring_array_command(q)\n"}},{"id":"zscore(key,member)-instance-method","html_id":"zscore(key,member)-instance-method","name":"zscore","doc":"Returns the score of member in the sorted set at key.\n\n**Return value**: String, the score of member (a double precision floating point number).","summary":"

    Returns the score of member in the sorted set at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""}],"args_string":"(key, member)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1186","def":{"name":"zscore","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_or_nil_command([\"ZSCORE\", namespaced(key), member.to_s])"}},{"id":"zunionstore(destination,keys:Array,weights=nil,aggregate=nil)-instance-method","html_id":"zunionstore(destination,keys:Array,weights=nil,aggregate=nil)-instance-method","name":"zunionstore","doc":"Computes the union of numkeys sorted sets given by the specified keys, and stores the result in destination.\n\n**Options**:\n\n* weights - nil or Array(String): Using the WEIGHTS option, it is possible to specify a multiplication factor for each input sorted set.\n* aggregate - With the AGGREGATE option, it is possible to specify how the results of the union are aggregated.\n\n**Return value**: Integer, the number of elements in the resulting sorted set at destination.","summary":"

    Computes the union of numkeys sorted sets given by the specified keys, and stores the result in destination.

    ","abstract":false,"args":[{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array"},{"name":"weights","doc":null,"default_value":"nil","external_name":"weights","restriction":""},{"name":"aggregate","doc":null,"default_value":"nil","external_name":"aggregate","restriction":""}],"args_string":"(destination, keys : Array, weights = nil, aggregate = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1273","def":{"name":"zunionstore","args":[{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array"},{"name":"weights","doc":null,"default_value":"nil","external_name":"weights","restriction":""},{"name":"aggregate","doc":null,"default_value":"nil","external_name":"aggregate","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"numkeys = keys.size\nq = concat([\"ZUNIONSTORE\", namespaced(destination), numkeys.to_s], namespaced(keys))\nif weights\n q << \"WEIGHTS\"\n concat(q, weights)\nend\nif aggregate\n (q << \"AGGREGATE\") << aggregate.to_s\nend\ninteger_command(q)\n"}}],"macros":[],"types":[]},{"html_id":"github.com/stefanwille/crystal-redis/Redis/CommandTimeoutError","path":"Redis/CommandTimeoutError.html","kind":"class","full_name":"Redis::CommandTimeoutError","name":"CommandTimeoutError","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"github.com/stefanwille/crystal-redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/error.cr","line_number":18,"url":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/error.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"Raised when the `command_timeout` option triggers - a command took too long because the Redis-server is blocked by another command or by a dump.","summary":"

    Raised when the command_timeout option triggers - a command took too long because the Redis-server is blocked by another command or by a dump.

    ","class_methods":[],"constructors":[],"instance_methods":[],"macros":[],"types":[]},{"html_id":"github.com/stefanwille/crystal-redis/Redis/ConnectionError","path":"Redis/ConnectionError.html","kind":"class","full_name":"Redis::ConnectionError","name":"ConnectionError","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"github.com/stefanwille/crystal-redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/error.cr","line_number":6,"url":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/error.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/CannotConnectError","kind":"class","full_name":"Redis::CannotConnectError","name":"CannotConnectError"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/ConnectionLostError","kind":"class","full_name":"Redis::ConnectionLostError","name":"ConnectionLostError"}],"including_types":[],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"An error that makes the connection unusable.","summary":"

    An error that makes the connection unusable.

    ","class_methods":[],"constructors":[],"instance_methods":[],"macros":[],"types":[]},{"html_id":"github.com/stefanwille/crystal-redis/Redis/ConnectionLostError","path":"Redis/ConnectionLostError.html","kind":"class","full_name":"Redis::ConnectionLostError","name":"ConnectionLostError","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Redis/ConnectionError","kind":"class","full_name":"Redis::ConnectionError","name":"ConnectionError"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/ConnectionError","kind":"class","full_name":"Redis::ConnectionError","name":"ConnectionError"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"github.com/stefanwille/crystal-redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/error.cr","line_number":14,"url":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/error.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"Raised when the connection to the Redis server is lost.","summary":"

    Raised when the connection to the Redis server is lost.

    ","class_methods":[],"constructors":[],"instance_methods":[],"macros":[],"types":[]},{"html_id":"github.com/stefanwille/crystal-redis/Redis/Error","path":"Redis/Error.html","kind":"class","full_name":"Redis::Error","name":"Error","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/error.cr","line_number":2,"url":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/error.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/CommandTimeoutError","kind":"class","full_name":"Redis::CommandTimeoutError","name":"CommandTimeoutError"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/ConnectionError","kind":"class","full_name":"Redis::ConnectionError","name":"ConnectionError"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/PoolTimeoutError","kind":"class","full_name":"Redis::PoolTimeoutError","name":"PoolTimeoutError"}],"including_types":[],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"Exception for errors raised by this shard.","summary":"

    Exception for errors raised by this shard.

    ","class_methods":[],"constructors":[],"instance_methods":[],"macros":[],"types":[]},{"html_id":"github.com/stefanwille/crystal-redis/Redis/Future","path":"Redis/Future.html","kind":"class","full_name":"Redis::Future","name":"Future","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/future.cr","line_number":6,"url":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/future.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"Futures are handles for values that will become available at a later point in time.\n\nThe API methods Redis#pipelined and Redis#multi make commands return futures instead of actual values.\n\nSee this [example](https://github.com/stefanwille/crystal-redis-examples/blob/master/src/pipelining.cr).","summary":"

    Futures are handles for values that will become available at a later point in time.

    ","class_methods":[],"constructors":[{"id":"new-class-method","html_id":"new-class-method","name":"new","doc":null,"summary":null,"abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/future.cr#L9","def":{"name":"new","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"_ = allocate\n_.initialize\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"id":"value-instance-method","html_id":"value-instance-method","name":"value","doc":null,"summary":null,"abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/future.cr#L14","def":{"name":"value","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"if @ready\n @value\nelse\n raise(Redis::Error.new(\"Future value not ready yet\"))\nend"}},{"id":"value=(new_value)-instance-method","html_id":"value=(new_value)-instance-method","name":"value=","doc":null,"summary":null,"abstract":false,"args":[{"name":"new_value","doc":null,"default_value":"","external_name":"new_value","restriction":""}],"args_string":"(new_value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/future.cr#L22","def":{"name":"value=","args":[{"name":"new_value","doc":null,"default_value":"","external_name":"new_value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"@value = new_value\n@ready = true\n"}}],"macros":[],"types":[]},{"html_id":"github.com/stefanwille/crystal-redis/Redis/PipelineApi","path":"Redis/PipelineApi.html","kind":"class","full_name":"Redis::PipelineApi","name":"PipelineApi","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/CommandExecution/FutureOriented","kind":"module","full_name":"Redis::CommandExecution::FutureOriented","name":"FutureOriented"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/pipeline_api.cr","line_number":18,"url":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/pipeline_api.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/CommandExecution/FutureOriented","kind":"module","full_name":"Redis::CommandExecution::FutureOriented","name":"FutureOriented"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"API for sending commands in pipelined mode.\n\nUsed in Redis#pipelined.\n\nExample:\n\n```\nredis.pipelined do |pipeline|\n pipeline.set(\"foo1\", \"first\")\n pipeline.set(\"foo2\", \"second\")\nend\n```\n\nIn this example, the `pipeline` object passed to the block is a PipelineApi\nobject.","summary":"

    API for sending commands in pipelined mode.

    ","class_methods":[],"constructors":[{"id":"new(strategy,namespace="")-class-method","html_id":"new(strategy,namespace=&quot;&quot;)-class-method","name":"new","doc":null,"summary":null,"abstract":false,"args":[{"name":"strategy","doc":null,"default_value":"","external_name":"strategy","restriction":""},{"name":"namespace","doc":null,"default_value":"\"\"","external_name":"namespace","restriction":""}],"args_string":"(strategy, namespace = "")","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/pipeline_api.cr#L22","def":{"name":"new","args":[{"name":"strategy","doc":null,"default_value":"","external_name":"strategy","restriction":""},{"name":"namespace","doc":null,"default_value":"\"\"","external_name":"namespace","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"_ = allocate\n_.initialize(strategy, namespace)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[],"macros":[],"types":[]},{"html_id":"github.com/stefanwille/crystal-redis/Redis/PooledClient","path":"Redis/PooledClient.html","kind":"class","full_name":"Redis::PooledClient","name":"PooledClient","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/pooled_client.cr","line_number":20,"url":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/pooled_client.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"A Redis client object that can be shared across multiple fibers.\nIt is backed by a connection pool of `Redis` instances and will automatically allocate and free these instances from/to the pool, per command.\n\nExample usage:\n\n```Crystal\nredis = Redis::PooledClient.new(host: ..., port: ..., ..., pool_size: 5)\n10.times do |i|\n spawn do\n redis.set(\"foo#{i}\", \"bar\")\n redis.get(\"foo#{i}\") # => \"bar\"\n end\nend\n```\n\nHere 10 fibers access the same `Redis::PooledClient` instance while automatically sharing 5 Redis connections.\n","summary":"

    A Redis client object that can be shared across multiple fibers.

    ","class_methods":[],"constructors":[{"id":"new(*args,pool_size=5,pool_timeout=5.0,**args2)-class-method","html_id":"new(*args,pool_size=5,pool_timeout=5.0,**args2)-class-method","name":"new","doc":"Accepts the same connection parameters like a `Redis` instance, plus the documented ones.\n\n* pool_size - the number of `Redis` to hold in the connection pool.\n* pool_timeout - the time to wait for a `Redis` instance to become available from the pool before dying with `Redis::PoolTimeoutError`.","summary":"

    Accepts the same connection parameters like a Redis instance, plus the documented ones.

    ","abstract":false,"args":[{"name":"args","doc":null,"default_value":"","external_name":"args","restriction":""},{"name":"pool_size","doc":null,"default_value":"5","external_name":"pool_size","restriction":""},{"name":"pool_timeout","doc":null,"default_value":"5.0","external_name":"pool_timeout","restriction":""}],"args_string":"(*args, pool_size = 5, pool_timeout = 5.0, **args2)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/pooled_client.cr#L29","def":{"name":"new","args":[{"name":"args","doc":null,"default_value":"","external_name":"args","restriction":""},{"name":"pool_size","doc":null,"default_value":"5","external_name":"pool_size","restriction":""},{"name":"pool_timeout","doc":null,"default_value":"5.0","external_name":"pool_timeout","restriction":""}],"double_splat":{"name":"args2","doc":null,"default_value":"","external_name":"args2","restriction":""},"splat_index":0,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"_ = allocate\n_.initialize(*args, **args2, pool_size: pool_size, pool_timeout: pool_timeout)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"id":"pool:ConnectionPool(Redis)-instance-method","html_id":"pool:ConnectionPool(Redis)-instance-method","name":"pool","doc":"The connection pool.\nSee [https://github.com/ysbaddaden/pool](https://github.com/ysbaddaden/pool)","summary":"

    The connection pool.

    ","abstract":false,"args":[],"args_string":" : ConnectionPool(Redis)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/pooled_client.cr#L23","def":{"name":"pool","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"@pool"}},{"id":"psubscribe(*channel_patterns,&callback_setup_block:Redis::Subscription->)-instance-method","html_id":"psubscribe(*channel_patterns,&callback_setup_block:Redis::Subscription->)-instance-method","name":"psubscribe","doc":null,"summary":null,"abstract":false,"args":[{"name":"channel_patterns","doc":null,"default_value":"","external_name":"channel_patterns","restriction":""}],"args_string":"(*channel_patterns, &callback_setup_block : Redis::Subscription -> )","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/pooled_client.cr#L59","def":{"name":"psubscribe","args":[{"name":"channel_patterns","doc":null,"default_value":"","external_name":"channel_patterns","restriction":""}],"double_splat":null,"splat_index":0,"yields":1,"block_arg":{"name":"callback_setup_block","doc":null,"default_value":"","external_name":"callback_setup_block","restriction":"(Redis::Subscription -> )"},"return_type":"","visibility":"Public","body":"with_pool_connection(&.psubscribe(*channel_patterns) do |s|\n callback_setup_block.call(s)\nend)"}},{"id":"subscribe(*channels,&callback_setup_block:Redis::Subscription->)-instance-method","html_id":"subscribe(*channels,&callback_setup_block:Redis::Subscription->)-instance-method","name":"subscribe","doc":null,"summary":null,"abstract":false,"args":[{"name":"channels","doc":null,"default_value":"","external_name":"channels","restriction":""}],"args_string":"(*channels, &callback_setup_block : Redis::Subscription -> )","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/pooled_client.cr#L55","def":{"name":"subscribe","args":[{"name":"channels","doc":null,"default_value":"","external_name":"channels","restriction":""}],"double_splat":null,"splat_index":0,"yields":1,"block_arg":{"name":"callback_setup_block","doc":null,"default_value":"","external_name":"callback_setup_block","restriction":"(Redis::Subscription -> )"},"return_type":"","visibility":"Public","body":"with_pool_connection(&.subscribe(*channels) do |s|\n callback_setup_block.call(s)\nend)"}}],"macros":[{"id":"method_missing(call)-macro","html_id":"method_missing(call)-macro","name":"method_missing","doc":null,"summary":null,"abstract":false,"args":[{"name":"call","doc":null,"default_value":"","external_name":"call","restriction":""}],"args_string":"(call)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/pooled_client.cr#L35","def":{"name":"method_missing","args":[{"name":"call","doc":null,"default_value":"","external_name":"call","restriction":""}],"double_splat":null,"splat_index":null,"block_arg":null,"visibility":"Public","body":" \n# Delegates all Redis commands to a `Redis` instance from the connection pool.\n\n with_pool_connection \n{ |conn| conn.\n{{ call }}\n }\n \n"}}],"types":[]},{"html_id":"github.com/stefanwille/crystal-redis/Redis/PoolTimeoutError","path":"Redis/PoolTimeoutError.html","kind":"class","full_name":"Redis::PoolTimeoutError","name":"PoolTimeoutError","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"github.com/stefanwille/crystal-redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/error.cr","line_number":22,"url":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/error.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"Raised when no free connection became available in the pool within a certain time.","summary":"

    Raised when no free connection became available in the pool within a certain time.

    ","class_methods":[],"constructors":[],"instance_methods":[],"macros":[],"types":[]},{"html_id":"github.com/stefanwille/crystal-redis/Redis/SocketWrapper","path":"Redis/SocketWrapper.html","kind":"struct","full_name":"Redis::SocketWrapper","name":"SocketWrapper","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"github.com/stefanwille/crystal-redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/socket_wrapper.cr","line_number":4,"url":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/socket_wrapper.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"Wraps an open socket connection.\n\nThe purpose is to be able to convert all exceptions to Redis:Error's.","summary":"

    Wraps an open socket connection.

    ","class_methods":[],"constructors":[{"id":"new(socket:TCPSocket|UNIXSocket|OpenSSL::SSL::Socket::Client)-class-method","html_id":"new(socket:TCPSocket|UNIXSocket|OpenSSL::SSL::Socket::Client)-class-method","name":"new","doc":null,"summary":null,"abstract":false,"args":[{"name":"socket","doc":null,"default_value":"","external_name":"socket","restriction":"TCPSocket | UNIXSocket | OpenSSL::SSL::Socket::Client"}],"args_string":"(socket : TCPSocket | UNIXSocket | OpenSSL::SSL::Socket::Client)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/socket_wrapper.cr#L5","def":{"name":"new","args":[{"name":"socket","doc":null,"default_value":"","external_name":"socket","restriction":"TCPSocket | UNIXSocket | OpenSSL::SSL::Socket::Client"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"_ = allocate\n_.initialize(socket)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}},{"id":"new(&block)-class-method","html_id":"new(&block)-class-method","name":"new","doc":null,"summary":null,"abstract":false,"args":[],"args_string":"(&block)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/socket_wrapper.cr#L9","def":{"name":"new","args":[],"double_splat":null,"splat_index":null,"yields":0,"block_arg":null,"return_type":"","visibility":"Public","body":"begin\n self.new(yield)\nrescue ex : IO::Timeout | Errno | Socket::Error | OpenSSL::Error\n raise(Redis::CannotConnectError.new(\"#{ex.class}: #{ex.message}\"))\nend"}}],"instance_methods":[{"id":"close-instance-method","html_id":"close-instance-method","name":"close","doc":null,"summary":null,"abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/socket_wrapper.cr#L27","def":{"name":"close","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"begin\n if @connected\n @connected = false\n @socket.close\n end\nrescue Errno\nend"}}],"macros":[{"id":"method_missing(call)-macro","html_id":"method_missing(call)-macro","name":"method_missing","doc":null,"summary":null,"abstract":false,"args":[{"name":"call","doc":null,"default_value":"","external_name":"call","restriction":""}],"args_string":"(call)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/socket_wrapper.cr#L15","def":{"name":"method_missing","args":[{"name":"call","doc":null,"default_value":"","external_name":"call","restriction":""}],"double_splat":null,"splat_index":null,"block_arg":null,"visibility":"Public","body":" catch_errors \n{ @socket.\n{{ call }}\n }\n \n"}}],"types":[]},{"html_id":"github.com/stefanwille/crystal-redis/Redis/Subscription","path":"Redis/Subscription.html","kind":"class","full_name":"Redis::Subscription","name":"Subscription","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/subscription.cr","line_number":5,"url":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/subscription.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"Models a subscription to one or more publish/subscribe channels.\n\nThe caller sets callbacks on this object that the Redis client will\ntrigger for the matching events.","summary":"

    Models a subscription to one or more publish/subscribe channels.

    ","class_methods":[],"constructors":[],"instance_methods":[{"id":"message(&message_callback:String,String->)-instance-method","html_id":"message(&message_callback:String,String->)-instance-method","name":"message","doc":"Sets the 'message' callback.","summary":"

    Sets the 'message' callback.

    ","abstract":false,"args":[],"args_string":"(&message_callback : String, String -> )","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/subscription.cr#L28","def":{"name":"message","args":[],"double_splat":null,"splat_index":null,"yields":2,"block_arg":{"name":"message_callback","doc":null,"default_value":"","external_name":"message_callback","restriction":"(String, String -> )"},"return_type":"","visibility":"Public","body":"@message_callback = message_callback"}},{"id":"pmessage(&pmessage_callback:String,String,String->)-instance-method","html_id":"pmessage(&pmessage_callback:String,String,String->)-instance-method","name":"pmessage","doc":"Sets the 'pmessage' callback.","summary":"

    Sets the 'pmessage' callback.

    ","abstract":false,"args":[],"args_string":"(&pmessage_callback : String, String, String -> )","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/subscription.cr#L32","def":{"name":"pmessage","args":[],"double_splat":null,"splat_index":null,"yields":3,"block_arg":{"name":"pmessage_callback","doc":null,"default_value":"","external_name":"pmessage_callback","restriction":"(String, String, String -> )"},"return_type":"","visibility":"Public","body":"@pmessage_callback = pmessage_callback"}},{"id":"psubscribe(&psubscribe_callback:String,Int64->)-instance-method","html_id":"psubscribe(&psubscribe_callback:String,Int64->)-instance-method","name":"psubscribe","doc":"Sets the 'psubscribe' callback.","summary":"

    Sets the 'psubscribe' callback.

    ","abstract":false,"args":[],"args_string":"(&psubscribe_callback : String, Int64 -> )","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/subscription.cr#L24","def":{"name":"psubscribe","args":[],"double_splat":null,"splat_index":null,"yields":2,"block_arg":{"name":"psubscribe_callback","doc":null,"default_value":"","external_name":"psubscribe_callback","restriction":"(String, Int64 -> )"},"return_type":"","visibility":"Public","body":"@psubscribe_callback = psubscribe_callback"}},{"id":"punsubscribe(&punsubscribe_callback:String,Int64->)-instance-method","html_id":"punsubscribe(&punsubscribe_callback:String,Int64->)-instance-method","name":"punsubscribe","doc":"Sets the 'punsubscribe' callback.","summary":"

    Sets the 'punsubscribe' callback.

    ","abstract":false,"args":[],"args_string":"(&punsubscribe_callback : String, Int64 -> )","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/subscription.cr#L40","def":{"name":"punsubscribe","args":[],"double_splat":null,"splat_index":null,"yields":2,"block_arg":{"name":"punsubscribe_callback","doc":null,"default_value":"","external_name":"punsubscribe_callback","restriction":"(String, Int64 -> )"},"return_type":"","visibility":"Public","body":"@punsubscribe_callback = punsubscribe_callback"}},{"id":"subscribe(&subscribe_callback:String,Int64->)-instance-method","html_id":"subscribe(&subscribe_callback:String,Int64->)-instance-method","name":"subscribe","doc":"Sets the 'subscribe' callback.","summary":"

    Sets the 'subscribe' callback.

    ","abstract":false,"args":[],"args_string":"(&subscribe_callback : String, Int64 -> )","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/subscription.cr#L20","def":{"name":"subscribe","args":[],"double_splat":null,"splat_index":null,"yields":2,"block_arg":{"name":"subscribe_callback","doc":null,"default_value":"","external_name":"subscribe_callback","restriction":"(String, Int64 -> )"},"return_type":"","visibility":"Public","body":"@subscribe_callback = subscribe_callback"}},{"id":"unsubscribe(&unsubscribe_callback:String,Int64->)-instance-method","html_id":"unsubscribe(&unsubscribe_callback:String,Int64->)-instance-method","name":"unsubscribe","doc":"Sets the 'unsubscribe' callback.","summary":"

    Sets the 'unsubscribe' callback.

    ","abstract":false,"args":[],"args_string":"(&unsubscribe_callback : String, Int64 -> )","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/subscription.cr#L36","def":{"name":"unsubscribe","args":[],"double_splat":null,"splat_index":null,"yields":2,"block_arg":{"name":"unsubscribe_callback","doc":null,"default_value":"","external_name":"unsubscribe_callback","restriction":"(String, Int64 -> )"},"return_type":"","visibility":"Public","body":"@unsubscribe_callback = unsubscribe_callback"}}],"macros":[],"types":[]},{"html_id":"github.com/stefanwille/crystal-redis/Redis/TransactionApi","path":"Redis/TransactionApi.html","kind":"class","full_name":"Redis::TransactionApi","name":"TransactionApi","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/CommandExecution/FutureOriented","kind":"module","full_name":"Redis::CommandExecution::FutureOriented","name":"FutureOriented"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/transaction_api.cr","line_number":19,"url":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/transaction_api.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/CommandExecution/FutureOriented","kind":"module","full_name":"Redis::CommandExecution::FutureOriented","name":"FutureOriented"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"API for sending commands in a transaction.\n\nUsed in Redis#multi.\n\n\nExample:\n\n```\nredis.multi do |multi|\n multi.set(\"foo1\", \"first\")\n multi.set(\"foo2\", \"second\")\nend\n```\n\nIn this example, the `multi` object passed to the block is a TransactionApi\nobject.","summary":"

    API for sending commands in a transaction.

    ","class_methods":[],"constructors":[{"id":"new(strategy,namespace="")-class-method","html_id":"new(strategy,namespace=&quot;&quot;)-class-method","name":"new","doc":null,"summary":null,"abstract":false,"args":[{"name":"strategy","doc":null,"default_value":"","external_name":"strategy","restriction":""},{"name":"namespace","doc":null,"default_value":"\"\"","external_name":"namespace","restriction":""}],"args_string":"(strategy, namespace = "")","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/transaction_api.cr#L23","def":{"name":"new","args":[{"name":"strategy","doc":null,"default_value":"","external_name":"strategy","restriction":""},{"name":"namespace","doc":null,"default_value":"\"\"","external_name":"namespace","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"_ = allocate\n_.initialize(strategy, namespace)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"id":"discard-instance-method","html_id":"discard-instance-method","name":"discard","doc":"Aborts the current transaction.\n\n**Example**:\n\n```\nredis.multi do |multi|\n multi.set(\"foo\", \"the new value\")\n multi.discard\nend\n```","summary":"

    Aborts the current transaction.

    ","abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/transaction_api.cr#L40","def":{"name":"discard","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"@strategy.discard"}}],"macros":[],"types":[]}]}]}} \ No newline at end of file +{"repository_name":"github.com/stefanwille/crystal-redis","body":"# Redis Client for Crystal\n\n[![Build Status](https://img.shields.io/travis/stefanwille/crystal-redis/master.svg?style=flat)](https://travis-ci.org/stefanwille/crystal-redis) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md#pull-requests)\n\nA Redis client for the Crystal programming language.\n\n## Features\n\n- Performance (> 680,000 commands per second using pipeline on a MacBook Air with a single client thread)\n- Pipelining\n- Transactions\n- LUA Scripting\n- All string commands\n- All hash commands\n- All list commands\n- All set commands\n- All hyperloglog commands\n- All commands for bit operations\n- All sorted set commands\n- All geo commands\n- Publish/subscribe\n\n## Installation\n\nAdd it to your `shard.yml`:\n\n```crystal\ndependencies:\n redis:\n github: stefanwille/crystal-redis\n version: ~> 2.5.2\n```\n\nand then install the library into your project:\n\n```bash\n$ shards install\n```\n\n### Installation on MacOS X\n\nOn MacOS X you may get this error:\n\n```\nld: library not found for -lssl (this usually means you need to install the development package for libssl)\nclang: error: linker command failed with exit code 1 (use -v to see invocation)\n...\n```\n\nOr this warning:\n\n```\nPackage libssl was not found in the pkg-config search path.\nPerhaps you should add the directory containing `libssl.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'libssl' found\nPackage libcrypto was not found in the pkg-config search path.\nPerhaps you should add the directory containing `libcrypto.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'libcrypto' found\n```\n\nThe problem is that Crystal can't find openssl, because it is not installed by default on MacOS X.\n\nThe fix:\n\n1. Install openssl via [Homebrew](https://brew.sh/):\n\n```bash\n$ brew install openssl\n```\n\n2. Set the environment variable `PKG_CONFIG_PATH`:\n\n```bash\n$ export PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig\n```\n\nNote: Please write me if you know a better way!\n\n## Required Crystal Version\n\nThis library needs Crystal version >= 0.25.0\n\nI haven't tested older Crystal versions.\n\n## Usage\n\nRequire the package:\n\n```crystal\n require \"redis\"\n```\n\nthen\n\n```crystal\n redis = Redis.new\n```\n\nThen you can call Redis commands on the `redis` object:\n\n```crystal\n redis.set(\"foo\", \"bar\")\n redis.get(\"foo\")\n```\n\n#### Connection Pooling\n\nSince version 2.0.0, a connection pool is built in. It is used implicitly through `Redis::PooledClient`:\n\n```Crystal\nredis = Redis::PooledClient.new\n10.times do |i|\n spawn do\n redis.set(\"foo#{i}\", \"bar\")\n redis.get(\"foo#{i}\") # => \"bar\"\n end\nend\n```\n\nThis `redis` instance can be shared across fibers, and accepts the same Redis commands as the `Redis` class.\nIt automatically allocates and frees connections from/to the pool, per command.\n\n## Examples\n\nTo get started, see the examples:\n\n- There is a separate git repository [crystal-redis-examples](https://github.com/stefanwille/crystal-redis-examples) with examples.\n- start with this [basic example](https://github.com/stefanwille/crystal-redis-examples/blob/master/src/basic.cr)\n- look at [the other examples](https://github.com/stefanwille/crystal-redis-examples/blob/master/src/)\n- the [spec](https://github.com/stefanwille/crystal-redis/blob/master/spec/redis_spec.cr) contains even more usage examples\n\n## Documentation\n\n- [API documentation](http://stefanwille.github.io/crystal-redis) -\n start reading it at the class `Redis`.\n- [Redis commands documentation](http://redis.io/commands) - the original Redis documentation is necessary, as the API documentation above is just a quick reference\n- [Redis documentation page](http://redis.io/documentation) - general information about Redis and its concepts\n\n## Performance\n\nI have benchmarked Crystal-Redis against several other client libraries in various programming languages in this [blog article](http://www.stefanwille.com/2015/05/redis-clients-crystal-vs-ruby-vs-c-vs-go/).\n\nHere are some results:\n\n- Crystal: With this library I get > 680,000 commands per second using pipeline on a MacBook Air with a single client thread.\n\n- C: The equivalent program written in C with Hiredis gets me 340,000 commands per second.\n\n- Ruby: Ruby 2.2.1 with the [redis-rb](https://github.com/redis/redis-rb) and Hiredis driver handles 150,000 commands per second.\n\n[Read more results](http://www.stefanwille.com/2015/05/redis-clients-crystal-vs-ruby-vs-c-vs-go/) for Go, Java, Node.js.\n\n## Status\n\nI have exercised every API method in the spec and built some example programs. Some people report production usage.\n\nI took great care to make this library very usable with respect to API, reliability and documentation.\n\n## Development\n\nThis project requires a locally running redis server running on port 6379 and with a Unix socket located at /tmp/redis.sock. In Homebrew's default redis.config the Unix domain socket option is disabled. To enable, edit `/usr/local/etc/redis.conf` or whatever your `redis.conf` is and uncomment this line:\n\n```\n# unixsocket /tmp/redis.sock\n```\n\nso that it reads\n\n```\nunixsocket /tmp/redis.sock\n```\n\nThen you can run the specs via\n\n`$ crystal spec`\n\n[See more information](https://github.com/stefanwille/crystal-redis/blob/master/CONTRIBUTING.md).\n\n### WARNING\n\nRunning the spec will delete database number 0!\n\n## Questions, Bugs & Support\n\nIf you have questions or need help, please open a ticket in the [GitHub issue tracker](https://github.com/stefanwille/crystal-redis/issues). This way others can benefit from the discussion.\n","program":{"html_id":"github.com/stefanwille/crystal-redis/toplevel","path":"toplevel.html","kind":"module","full_name":"Top Level Namespace","name":"Top Level Namespace","abstract":false,"superclass":null,"ancestors":[],"locations":[],"repository_name":"github.com/stefanwille/crystal-redis","program":true,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":null,"doc":null,"summary":null,"class_methods":[],"constructors":[],"instance_methods":[],"macros":[],"types":[{"html_id":"github.com/stefanwille/crystal-redis/Redis","path":"Redis.html","kind":"class","full_name":"Redis","name":"Redis","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/CommandExecution/ValueOriented","kind":"module","full_name":"Redis::CommandExecution::ValueOriented","name":"ValueOriented"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/commands.cr","line_number":1,"url":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr"},{"filename":"redis/command_execution/value_oriented.cr","line_number":1,"url":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/command_execution/value_oriented.cr"},{"filename":"redis.cr","line_number":37,"url":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis.cr"},{"filename":"redis/command_execution/future_oriented.cr","line_number":1,"url":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/command_execution/future_oriented.cr"},{"filename":"redis/strategy/base.cr","line_number":1,"url":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/strategy/base.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/CommandExecution/ValueOriented","kind":"module","full_name":"Redis::CommandExecution::ValueOriented","name":"ValueOriented"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":null,"doc":"The class is the main entry point for the Redis client.\n\n**How to use**:\n\nRequire the package:\n\n```crystal\nrequire \"redis\"\n```\n\nThen instantiate this client class:\n\n```crystal\nredis = Redis.new\n```\n\nThen you can call Redis commands on the `redis` object:\n\n```crystal\nredis.set(\"foo\", \"bar\")\nredis.get(\"foo\")\nredis.incr(\"visitors\")\n```\n\nSee the mixin module [Commands](Redis/Commands.html) for most\nof the available Redis commands such as #incr, #rename, and so on.\n\n**Multithreading / Coroutines**\n\nPlease mind that a Redis object can't be shared across multiple threads/coroutines!\nEach thread/coroutine that wants to talk to Redis needs its own Redis object instance.","summary":"

    The class is the main entry point for the Redis client.

    ","class_methods":[{"id":"open(host="localhost",port=6379,unixsocket=nil,password=nil,database=nil,url=nil,ssl=false,ssl_context=nil,dns_timeout=nil,connect_timeout=nil,reconnect=true,command_timeout=nil,namespace:String?="",&block)-class-method","html_id":"open(host=&quot;localhost&quot;,port=6379,unixsocket=nil,password=nil,database=nil,url=nil,ssl=false,ssl_context=nil,dns_timeout=nil,connect_timeout=nil,reconnect=true,command_timeout=nil,namespace:String?=&quot;&quot;,&block)-class-method","name":"open","doc":"Opens a Redis connection, yields the given block with a Redis object and closes the connection.\n\n**Options**:\n* host - the host to connect to\n* port - the port to connect to\n* unixsocket - instead of using TCP, you can connect to Redis via a Unix domain socket by passing its path here (e.g. \"/tmp/redis.sock\")\n* password - the password for authentication against the server. This is a convenience which saves you the extra call to the Redis `auth` command.\n* database - the number of the database to select. This a convenience which saves you a call a call to `#select`.\n* ssl - whether SSL should be enabled.\n* ssl_context - a OpenSSL::SSL::Context::Client.\n* dns_timeout - the dns timeout.\n* connect_timeout - the connect timeout.\n* command_timeout - the command timeout - applies when a command takes too long because the Redis-server is blocked by another command or by a dump.\n* reconnect - whether we should reconnect when we encounter a disconnected Redis connection.\n* url - Redis url. If this is given, it overrides all others.\n\nExample:\n\n```\nRedis.open do |redis|\n redis.incr(\"counter\")\nend\n```","summary":"

    Opens a Redis connection, yields the given block with a Redis object and closes the connection.

    ","abstract":false,"args":[{"name":"host","doc":null,"default_value":"\"localhost\"","external_name":"host","restriction":""},{"name":"port","doc":null,"default_value":"6379","external_name":"port","restriction":""},{"name":"unixsocket","doc":null,"default_value":"nil","external_name":"unixsocket","restriction":""},{"name":"password","doc":null,"default_value":"nil","external_name":"password","restriction":""},{"name":"database","doc":null,"default_value":"nil","external_name":"database","restriction":""},{"name":"url","doc":null,"default_value":"nil","external_name":"url","restriction":""},{"name":"ssl","doc":null,"default_value":"false","external_name":"ssl","restriction":""},{"name":"ssl_context","doc":null,"default_value":"nil","external_name":"ssl_context","restriction":""},{"name":"dns_timeout","doc":null,"default_value":"nil","external_name":"dns_timeout","restriction":""},{"name":"connect_timeout","doc":null,"default_value":"nil","external_name":"connect_timeout","restriction":""},{"name":"reconnect","doc":null,"default_value":"true","external_name":"reconnect","restriction":""},{"name":"command_timeout","doc":null,"default_value":"nil","external_name":"command_timeout","restriction":""},{"name":"namespace","doc":null,"default_value":"\"\"","external_name":"namespace","restriction":"String | ::Nil"}],"args_string":"(host = "localhost", port = 6379, unixsocket = nil, password = nil, database = nil, url = nil, ssl = false, ssl_context = nil, dns_timeout = nil, connect_timeout = nil, reconnect = true, command_timeout = nil, namespace : String? = "", &block)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis.cr#L194","def":{"name":"open","args":[{"name":"host","doc":null,"default_value":"\"localhost\"","external_name":"host","restriction":""},{"name":"port","doc":null,"default_value":"6379","external_name":"port","restriction":""},{"name":"unixsocket","doc":null,"default_value":"nil","external_name":"unixsocket","restriction":""},{"name":"password","doc":null,"default_value":"nil","external_name":"password","restriction":""},{"name":"database","doc":null,"default_value":"nil","external_name":"database","restriction":""},{"name":"url","doc":null,"default_value":"nil","external_name":"url","restriction":""},{"name":"ssl","doc":null,"default_value":"false","external_name":"ssl","restriction":""},{"name":"ssl_context","doc":null,"default_value":"nil","external_name":"ssl_context","restriction":""},{"name":"dns_timeout","doc":null,"default_value":"nil","external_name":"dns_timeout","restriction":""},{"name":"connect_timeout","doc":null,"default_value":"nil","external_name":"connect_timeout","restriction":""},{"name":"reconnect","doc":null,"default_value":"true","external_name":"reconnect","restriction":""},{"name":"command_timeout","doc":null,"default_value":"nil","external_name":"command_timeout","restriction":""},{"name":"namespace","doc":null,"default_value":"\"\"","external_name":"namespace","restriction":"String | ::Nil"}],"double_splat":null,"splat_index":null,"yields":1,"block_arg":null,"return_type":"","visibility":"Public","body":"redis = Redis.new(host, port, unixsocket, password, database, url, ssl, ssl_context, dns_timeout, connect_timeout, reconnect, command_timeout, namespace)\nbegin\n yield redis\nensure\n redis.close\nend\n"}}],"constructors":[{"id":"new(host="localhost",port=6379,unixsocket:String?=nil,password:String?=nil,database:Int32?=nil,url=nil,ssl=false,ssl_context:OpenSSL::SSL::Context::Client?=nil,dns_timeout:Time::Span?=nil,connect_timeout:Time::Span?=nil,reconnect=true,command_timeout:Time::Span?=nil,namespace:String?="")-class-method","html_id":"new(host=&quot;localhost&quot;,port=6379,unixsocket:String?=nil,password:String?=nil,database:Int32?=nil,url=nil,ssl=false,ssl_context:OpenSSL::SSL::Context::Client?=nil,dns_timeout:Time::Span?=nil,connect_timeout:Time::Span?=nil,reconnect=true,command_timeout:Time::Span?=nil,namespace:String?=&quot;&quot;)-class-method","name":"new","doc":"Opens a Redis connection\n\n**Options**:\n* host - the host to connect to\n* port - the port to connect to\n* unixsocket - instead of using TCP, you can connect to Redis via a Unix domain socket by passing its path here (e.g. \"/tmp/redis.sock\")\n* password - the password for authentication against the server. This is a convenience which saves you the extra call to the Redis `auth` command.\n* database - the number of the database to select. This a convenience which saves you a call a call to `#select`.\n* ssl - whether SSL should be enabled.\n* ssl_context - a OpenSSL::SSL::Context::Client.\n* dns_timeout - the dns timeout.\n* connect_timeout - the connect timeout.\n* command_timeout - the command timeout - applies when a command takes too long because the Redis-server is blocked by another command or by a dump.\n* reconnect - whether we should reconnect when we encounter a disconnected Redis connection.\n* url - Redis url. If this is given, it overrides all others.\n\nExample:\n\n```\nredis = Redis.new\nredis.incr(\"counter\")\nredis.close\n```\n\nExample:\n\n```\nredis = Redis.new(host: \"localhost\", port: 6379)\n...\n```\n\nExample:\n\n```\nredis = Redis.new(unixsocket: \"/tmp/redis.sock\")\n...\n```\n\nExample:\n\n```\nredis = Redis.new(url: \"redis://:my-secret-pw@my.redis.com:6380/my-database\")\n...\n```","summary":"

    Opens a Redis connection

    ","abstract":false,"args":[{"name":"host","doc":null,"default_value":"\"localhost\"","external_name":"host","restriction":""},{"name":"port","doc":null,"default_value":"6379","external_name":"port","restriction":""},{"name":"unixsocket","doc":null,"default_value":"nil","external_name":"unixsocket","restriction":"String | ::Nil"},{"name":"password","doc":null,"default_value":"nil","external_name":"password","restriction":"String | ::Nil"},{"name":"database","doc":null,"default_value":"nil","external_name":"database","restriction":"Int32 | ::Nil"},{"name":"url","doc":null,"default_value":"nil","external_name":"url","restriction":""},{"name":"ssl","doc":null,"default_value":"false","external_name":"ssl","restriction":""},{"name":"ssl_context","doc":null,"default_value":"nil","external_name":"ssl_context","restriction":"OpenSSL::SSL::Context::Client | ::Nil"},{"name":"dns_timeout","doc":null,"default_value":"nil","external_name":"dns_timeout","restriction":"Time::Span | ::Nil"},{"name":"connect_timeout","doc":null,"default_value":"nil","external_name":"connect_timeout","restriction":"Time::Span | ::Nil"},{"name":"reconnect","doc":null,"default_value":"true","external_name":"reconnect","restriction":""},{"name":"command_timeout","doc":null,"default_value":"nil","external_name":"command_timeout","restriction":"Time::Span | ::Nil"},{"name":"namespace","doc":null,"default_value":"\"\"","external_name":"namespace","restriction":"String | ::Nil"}],"args_string":"(host = "localhost", port = 6379, unixsocket : String? = nil, password : String? = nil, database : Int32? = nil, url = nil, ssl = false, ssl_context : OpenSSL::SSL::Context::Client? = nil, dns_timeout : Time::Span? = nil, connect_timeout : Time::Span? = nil, reconnect = true, command_timeout : Time::Span? = nil, namespace : String? = "")","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis.cr#L95","def":{"name":"new","args":[{"name":"host","doc":null,"default_value":"\"localhost\"","external_name":"host","restriction":""},{"name":"port","doc":null,"default_value":"6379","external_name":"port","restriction":""},{"name":"unixsocket","doc":null,"default_value":"nil","external_name":"unixsocket","restriction":"String | ::Nil"},{"name":"password","doc":null,"default_value":"nil","external_name":"password","restriction":"String | ::Nil"},{"name":"database","doc":null,"default_value":"nil","external_name":"database","restriction":"Int32 | ::Nil"},{"name":"url","doc":null,"default_value":"nil","external_name":"url","restriction":""},{"name":"ssl","doc":null,"default_value":"false","external_name":"ssl","restriction":""},{"name":"ssl_context","doc":null,"default_value":"nil","external_name":"ssl_context","restriction":"OpenSSL::SSL::Context::Client | ::Nil"},{"name":"dns_timeout","doc":null,"default_value":"nil","external_name":"dns_timeout","restriction":"Time::Span | ::Nil"},{"name":"connect_timeout","doc":null,"default_value":"nil","external_name":"connect_timeout","restriction":"Time::Span | ::Nil"},{"name":"reconnect","doc":null,"default_value":"true","external_name":"reconnect","restriction":""},{"name":"command_timeout","doc":null,"default_value":"nil","external_name":"command_timeout","restriction":"Time::Span | ::Nil"},{"name":"namespace","doc":null,"default_value":"\"\"","external_name":"namespace","restriction":"String | ::Nil"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"_ = allocate\n_.initialize(host, port, unixsocket, password, database, url, ssl, ssl_context, dns_timeout, connect_timeout, reconnect, command_timeout, namespace)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"id":"close-instance-method","html_id":"close-instance-method","name":"close","doc":"Closes the Redis connection.","summary":"

    Closes the Redis connection.

    ","abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis.cr#L207","def":{"name":"close","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"@connection.try(&.close)\n@connection = nil\n@strategy = nil\n"}},{"id":"multi(&block)-instance-method","html_id":"multi(&block)-instance-method","name":"multi","doc":"Sends Redis commands in transaction mode.\n\nYields its block. The block receives as argument\nan object that has the same API as this class, except:\n * it participates in the transaction\n * all the Redis commands return Futures\n * there is an additional method #discard that will abort the transaction.\n\n**Return value**: an array with all the responses\n- one element for each executed command.\n\nExample:\n\n```\nredis.multi do |multi|\n multi.set(\"foo1\", \"first\")\n multi.set(\"foo2\", \"second\")\nend\n```\n\nSee the [examples repository](https://github.com/stefanwille/crystal-redis-examples) for more examples.","summary":"

    Sends Redis commands in transaction mode.

    ","abstract":false,"args":[],"args_string":"(&block)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis.cr#L286","def":{"name":"multi","args":[],"double_splat":null,"splat_index":null,"yields":1,"block_arg":null,"return_type":"","visibility":"Public","body":"begin\n @strategy = Redis::Strategy::PauseDuringTransaction.new\n transaction_strategy = Redis::Strategy::Transaction.new(connection)\n transaction_strategy.begin\n transaction_api = Redis::TransactionApi.new(transaction_strategy, @namespace.to_s)\n yield transaction_api\n transaction_strategy.commit.as(Array(RedisValue))\nrescue ex : Redis::ConnectionError | Redis::CommandTimeoutError\n close\n raise(ex)\nensure\n if @connection\n @strategy = Redis::Strategy::SingleStatement.new(@connection.not_nil!)\n end\nend"}},{"id":"pipelined(&block)-instance-method","html_id":"pipelined(&block)-instance-method","name":"pipelined","doc":"Sends Redis commands in pipeline mode.\n\nYields its block. The block receives as argument\nan object that has the same API as this class, except\nit participates in pipelining and all Redis commands return Futures.\n\n**Return value**: an array with all the responses\n- one element for each executed command.\n\nExample:\n\n```\nredis.pipelined do |pipeline|\n pipeline.set(\"foo1\", \"first\")\n pipeline.set(\"foo2\", \"second\")\nend\n```\n\nSee the [examples repository](https://github.com/stefanwille/crystal-redis-examples) for more examples.","summary":"

    Sends Redis commands in pipeline mode.

    ","abstract":false,"args":[],"args_string":"(&block)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis.cr#L250","def":{"name":"pipelined","args":[],"double_splat":null,"splat_index":null,"yields":1,"block_arg":null,"return_type":"","visibility":"Public","body":"begin\n @strategy = Redis::Strategy::PauseDuringPipeline.new\n pipeline_strategy = Redis::Strategy::Pipeline.new(connection)\n pipeline_api = Redis::PipelineApi.new(pipeline_strategy, @namespace.to_s)\n yield pipeline_api\n pipeline_strategy.commit.as(Array(RedisValue))\nrescue ex : Redis::ConnectionError | Redis::CommandTimeoutError\n close\n raise(ex)\nensure\n if @connection\n @strategy = Redis::Strategy::SingleStatement.new(@connection.not_nil!)\n end\nend"}},{"id":"url-instance-method","html_id":"url-instance-method","name":"url","doc":"Returns the server URL for this client.","summary":"

    Returns the server URL for this client.

    ","abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis.cr#L214","def":{"name":"url","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"scheme = @ssl ? \"rediss\" : \"redis\"\nif @unixsocket\n \"#{scheme}://#{@unixsocket}/#{@database || 0}\"\nelse\n \"#{scheme}://#{@host}:#{@port}/#{@database || 0}\"\nend\n"}}],"macros":[],"types":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/CannotConnectError","path":"Redis/CannotConnectError.html","kind":"class","full_name":"Redis::CannotConnectError","name":"CannotConnectError","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Redis/ConnectionError","kind":"class","full_name":"Redis::ConnectionError","name":"ConnectionError"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/ConnectionError","kind":"class","full_name":"Redis::ConnectionError","name":"ConnectionError"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"github.com/stefanwille/crystal-redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/error.cr","line_number":10,"url":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/error.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"Raised when connecting to the Redis server is not possible.","summary":"

    Raised when connecting to the Redis server is not possible.

    ","class_methods":[],"constructors":[],"instance_methods":[],"macros":[],"types":[]},{"html_id":"github.com/stefanwille/crystal-redis/Redis/Commands","path":"Redis/Commands.html","kind":"module","full_name":"Redis::Commands","name":"Commands","abstract":false,"superclass":null,"ancestors":[],"locations":[{"filename":"redis/commands.cr","line_number":4,"url":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[],"including_types":[{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/PipelineApi","kind":"class","full_name":"Redis::PipelineApi","name":"PipelineApi"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/TransactionApi","kind":"class","full_name":"Redis::TransactionApi","name":"TransactionApi"}],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"Definition of all Redis commands except pipelining and transactions.\n","summary":"

    Definition of all Redis commands except pipelining and transactions.

    ","class_methods":[],"constructors":[],"instance_methods":[{"id":"append(key,value)-instance-method","html_id":"append(key,value)-instance-method","name":"append","doc":"If key already exists and is a string, this command appends the value at the end of the string.\nIf key does not exist it is created and set as an empty string, so APPEND will be similar to SET in this special case.\n\n**Return value**: Integer, the length of the string after the append operation.\n\nExample:\n\n```\nredis.append(\"foo\", \" world\")\n```","summary":"

    If key already exists and is a string, this command appends the value at the end of the string.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L375","def":{"name":"append","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"APPEND\", namespaced(key), value.to_s])"}},{"id":"auth(password)-instance-method","html_id":"auth(password)-instance-method","name":"auth","doc":"Request for authentication in a password-protected Redis server.\n\n**Return value**: \"OK\"","summary":"

    Request for authentication in a password-protected Redis server.

    ","abstract":false,"args":[{"name":"password","doc":null,"default_value":"","external_name":"password","restriction":""}],"args_string":"(password)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L87","def":{"name":"auth","args":[{"name":"password","doc":null,"default_value":"","external_name":"password","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"AUTH\", password])"}},{"id":"bitcount(key,from=nil,to=nil)-instance-method","html_id":"bitcount(key,from=nil,to=nil)-instance-method","name":"bitcount","doc":"Count the number of set bits (population counting) in a string.\nBy default all the bytes contained in the string are examined.\n\n**Options**:\n\n* from / to - It is possible to specify the counting operation only in an interval passing the additional arguments from and to.\n\n**Return value** Integer, the number of bits set to 1.\n\nExample:\n\n```\nredis.bitcount(\"foo\", 0, 0)\n```","summary":"

    Count the number of set bits (population counting) in a string.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"from","doc":null,"default_value":"nil","external_name":"from","restriction":""},{"name":"to","doc":null,"default_value":"nil","external_name":"to","restriction":""}],"args_string":"(key, from = nil, to = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L427","def":{"name":"bitcount","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"from","doc":null,"default_value":"nil","external_name":"from","restriction":""},{"name":"to","doc":null,"default_value":"nil","external_name":"to","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"BITCOUNT\", namespaced(key)]\nif from\n if to\n q << from.to_s\n q << to.to_s\n else\n raise(Redis::Error.new(\"from specified, but not to\"))\n end\nend\ninteger_command(q)\n"}},{"id":"bitop(operation,key,*keys:String):Int64-instance-method","html_id":"bitop(operation,key,*keys:String):Int64-instance-method","name":"bitop","doc":"Perform a bitwise operation between multiple keys (containing string values) and store the result in the destination key.\n\n**Return value**: Integer, the size of the string stored in the destination key, that is equal to the size of the longest input string.\n\nExample:\n\n```\nredis.bitop(\"and\", \"dest\", \"key1\", \"key2\")\n```","summary":"

    Perform a bitwise operation between multiple keys (containing string values) and store the result in the destination key.

    ","abstract":false,"args":[{"name":"operation","doc":null,"default_value":"","external_name":"operation","restriction":""},{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"args_string":"(operation, key, *keys : String) : Int64","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L454","def":{"name":"bitop","args":[{"name":"operation","doc":null,"default_value":"","external_name":"operation","restriction":""},{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"double_splat":null,"splat_index":2,"yields":null,"block_arg":null,"return_type":"Int64","visibility":"Public","body":"bitop(operation, key, keys.to_a)"}},{"id":"bitop(operation,key,keys:Array(String)):Int64-instance-method","html_id":"bitop(operation,key,keys:Array(String)):Int64-instance-method","name":"bitop","doc":"Perform a bitwise operation between multiple keys (containing string values) and store the result in the destination key.\n\n**Return value**: Integer, the size of the string stored in the destination key, that is equal to the size of the longest input string.\n\nExample:\n\n```\nredis.bitop(\"and\", \"dest\", \"key1\", \"key2\")\n```","summary":"

    Perform a bitwise operation between multiple keys (containing string values) and store the result in the destination key.

    ","abstract":false,"args":[{"name":"operation","doc":null,"default_value":"","external_name":"operation","restriction":""},{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"args_string":"(operation, key, keys : Array(String)) : Int64","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L449","def":{"name":"bitop","args":[{"name":"operation","doc":null,"default_value":"","external_name":"operation","restriction":""},{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Int64","visibility":"Public","body":"integer_command(concat([\"BITOP\", operation.to_s, namespaced(key)], namespaced(keys)))"}},{"id":"bitpos(key,bit,start=nil,to=nil)-instance-method","html_id":"bitpos(key,bit,start=nil,to=nil)-instance-method","name":"bitpos","doc":"Return the position of the first bit set to 1 or 0 in a string.\n\n**Options**:\n\n* start / to - By default, all the bytes contained in the string are examined. It is possible to look for bits only in a specified interval passing the additional arguments start and to (it is possible to just pass start, the operation will assume that the to is the last byte of the string.\n\n**Return value**: Integer, the command returns the position of the first bit set to 1 or 0 according to the request.\n\nExample:\n\n```\nredis.set(\"mykey\", \"0\")\nredis.bitpos(\"mykey\", 1) # => 2\n```","summary":"

    Return the position of the first bit set to 1 or 0 in a string.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"bit","doc":null,"default_value":"","external_name":"bit","restriction":""},{"name":"start","doc":null,"default_value":"nil","external_name":"start","restriction":""},{"name":"to","doc":null,"default_value":"nil","external_name":"to","restriction":""}],"args_string":"(key, bit, start = nil, to = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L492","def":{"name":"bitpos","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"bit","doc":null,"default_value":"","external_name":"bit","restriction":""},{"name":"start","doc":null,"default_value":"nil","external_name":"start","restriction":""},{"name":"to","doc":null,"default_value":"nil","external_name":"to","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"BITPOS\", namespaced(key), bit.to_s] of RedisValue\nif start\n q << start.to_s\n if to\n q << to\n end\nend\ninteger_command(q)\n"}},{"id":"blpop(keys,timeout_in_seconds)-instance-method","html_id":"blpop(keys,timeout_in_seconds)-instance-method","name":"blpop","doc":"BLPOP is a blocking list pop primitive.\nIt is the blocking version of LPOP because it blocks the connection when there\nare no elements to pop from any of the given lists.\nAn element is popped from the head of the first list that is non-empty,\nwith the given keys being checked in the order that they are given.\n\nThe timeout_in_seconds argument is interpreted as an integer value specifying the maximum number of seconds to block\n\n**Return value**: Array, specifically:\n* An array of nils when no element could be popped and the timeout expired.\n* An array of two-element arrays with the first element being the name of the key where an element was popped and the second element being the value of the popped element.\n\nExample:\n\n```\nredis.blpop([\"myotherlist\", \"mylist\"], 1) # => [\"mylist\", \"hello\"]\n```","summary":"

    BLPOP is a blocking list pop primitive.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":""},{"name":"timeout_in_seconds","doc":null,"default_value":"","external_name":"timeout_in_seconds","restriction":""}],"args_string":"(keys, timeout_in_seconds)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L910","def":{"name":"blpop","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":""},{"name":"timeout_in_seconds","doc":null,"default_value":"","external_name":"timeout_in_seconds","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = concat([\"BLPOP\"], namespaced(keys))\nq << timeout_in_seconds.to_s\nresult = array_or_nil_command(q)\nif result\nelse\n return result\nend\nresult[0] = without_namespace(\"#{result.first}\")\nresult\n"}},{"id":"brpop(keys,timeout_in_seconds)-instance-method","html_id":"brpop(keys,timeout_in_seconds)-instance-method","name":"brpop","doc":"BRPOP is a blocking list pop primitive.\nIt is the blocking version of RPOP because it blocks the connection when there\nare no elements to pop from any of the given lists.\nAn element is popped from the tail of the first list that is non-empty,\nwith the given keys being checked in the order that they are given.\n\nThe timeout_in_seconds argument is interpreted as an integer value specifying the maximum\nnumber of seconds to block.\n\n**Return value**: Array, specifically:\n* An array of nils when no element could be popped and the timeout expired.\n* An array of two-element arrays with the first element being the name of the key where an element was popped and the second element being the value of the popped element.\n\nExample:\n\n```\nredis.brpop([\"myotherlist\", \"mylist\"], 1) # => [\"mylist\", \"world\"]\n```","summary":"

    BRPOP is a blocking list pop primitive.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":""},{"name":"timeout_in_seconds","doc":null,"default_value":"","external_name":"timeout_in_seconds","restriction":""}],"args_string":"(keys, timeout_in_seconds)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L939","def":{"name":"brpop","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":""},{"name":"timeout_in_seconds","doc":null,"default_value":"","external_name":"timeout_in_seconds","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = concat([\"BRPOP\"], namespaced(keys))\nq << timeout_in_seconds.to_s\nresult = array_or_nil_command(q)\nif result\nelse\n return result\nend\nresult[0] = without_namespace(\"#{result.first}\")\nresult\n"}},{"id":"brpoplpush(source,destination,timeout_in_seconds=nil)-instance-method","html_id":"brpoplpush(source,destination,timeout_in_seconds=nil)-instance-method","name":"brpoplpush","doc":"BRPOPLPUSH is the blocking variant of RPOPLPUSH.\nWhen source contains elements, this command behaves exactly like RPOPLPUSH.\n\n**Options**:\n\n* timeout_in_seconds - interpreted as an integer value specifying the maximum number of seconds to block\n\nSee RPOPLPUSH for more information.\n\n**Return value**: String, the element being popped from source and pushed to destination.\nIf timeout is reached, nil is returned.\n\nExample:\n\n```\nredis.brpoplpush(\"source\", \"destination\", 0)\n```","summary":"

    BRPOPLPUSH is the blocking variant of RPOPLPUSH.

    ","abstract":false,"args":[{"name":"source","doc":null,"default_value":"","external_name":"source","restriction":""},{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"timeout_in_seconds","doc":null,"default_value":"nil","external_name":"timeout_in_seconds","restriction":""}],"args_string":"(source, destination, timeout_in_seconds = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L975","def":{"name":"brpoplpush","args":[{"name":"source","doc":null,"default_value":"","external_name":"source","restriction":""},{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"timeout_in_seconds","doc":null,"default_value":"nil","external_name":"timeout_in_seconds","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"BRPOPLPUSH\", source.to_s, destination.to_s]\nif timeout_in_seconds\n q << timeout_in_seconds.to_s\nend\nstring_or_nil_command(q)\n"}},{"id":"decr(key)-instance-method","html_id":"decr(key)-instance-method","name":"decr","doc":"Decrements the number stored at key by one.\n\n**Return value**: Integer, the value of key after the decrement","summary":"

    Decrements the number stored at key by one.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L328","def":{"name":"decr","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"DECR\", namespaced(key)])"}},{"id":"decrby(key,decrement)-instance-method","html_id":"decrby(key,decrement)-instance-method","name":"decrby","doc":"Decrements the number stored at key by decrement.\n\n**Return value**: Integer, the value of key after the decrement","summary":"

    Decrements the number stored at key by decrement.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"decrement","doc":null,"default_value":"","external_name":"decrement","restriction":""}],"args_string":"(key, decrement)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L361","def":{"name":"decrby","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"decrement","doc":null,"default_value":"","external_name":"decrement","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"DECRBY\", namespaced(key), decrement.to_s])"}},{"id":"del(keys:Array)-instance-method","html_id":"del(keys:Array)-instance-method","name":"del","doc":"Removes the specified keys.\n\n**Return value**: Integer, the number of keys that were removed.\n\nExample:\n\n```\nredis.del([\"some\", \"keys\", \"to\", \"delete\"])\n```","summary":"

    Removes the specified keys.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array"}],"args_string":"(keys : Array)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L155","def":{"name":"del","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command(concat([\"DEL\"], namespaced(keys)))"}},{"id":"del(*keys)-instance-method","html_id":"del(*keys)-instance-method","name":"del","doc":"Removes the specified keys.\n\n**Return value**: Integer, the number of keys that were removed.\n\nExample:\n\n```\nredis.del(\"some\", \"keys\", \"to\", \"delete\")\n```","summary":"

    Removes the specified keys.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":""}],"args_string":"(*keys)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L142","def":{"name":"del","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":""}],"double_splat":null,"splat_index":0,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"del(keys.to_a)"}},{"id":"dump(key)-instance-method","html_id":"dump(key)-instance-method","name":"dump","doc":"Serialize the value stored at key in a Redis-specific format and return it to the user.\n\n**Return value**: String, the serialized value.","summary":"

    Serialize the value stored at key in a Redis-specific format and return it to the user.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L506","def":{"name":"dump","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"DUMP\", namespaced(key)])"}},{"id":"echo(message)-instance-method","html_id":"echo(message)-instance-method","name":"echo","doc":"Returns the given message.\n\nExample:\n\n```\nredis.echo(\"Hello Redis\") # => \"Hello Redis\"\n```","summary":"

    Returns the given message.

    ","abstract":false,"args":[{"name":"message","doc":null,"default_value":"","external_name":"message","restriction":""}],"args_string":"(message)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L12","def":{"name":"echo","args":[{"name":"message","doc":null,"default_value":"","external_name":"message","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"ECHO\", message.to_s])"}},{"id":"eval(script:String,keys=[]ofRedisValue,args=[]ofRedisValue)-instance-method","html_id":"eval(script:String,keys=[]ofRedisValue,args=[]ofRedisValue)-instance-method","name":"eval","doc":"EVAL and EVALSHA are used to evaluate scripts using the Lua interpreter\nbuilt into Redis starting from version 2.6.0.\n\n**Return value**: Depends on the executed script\n\nExample:\n\n```\nredis.eval(\"return {KEYS[1],KEYS[2],ARGV[1],ARGV[2]}\", [\"key1\", \"key2\"], [\"first art\", \"second arg\"])\n```","summary":"

    EVAL and EVALSHA are used to evaluate scripts using the Lua interpreter built into Redis starting from version 2.6.0.

    ","abstract":false,"args":[{"name":"script","doc":null,"default_value":"","external_name":"script","restriction":"String"},{"name":"keys","doc":null,"default_value":"[] of RedisValue","external_name":"keys","restriction":""},{"name":"args","doc":null,"default_value":"[] of RedisValue","external_name":"args","restriction":""}],"args_string":"(script : String, keys = [] of RedisValue, args = [] of RedisValue)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1480","def":{"name":"eval","args":[{"name":"script","doc":null,"default_value":"","external_name":"script","restriction":"String"},{"name":"keys","doc":null,"default_value":"[] of RedisValue","external_name":"keys","restriction":""},{"name":"args","doc":null,"default_value":"[] of RedisValue","external_name":"args","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_array_or_string_or_integer_command(concat([\"EVAL\", script, keys.size.to_s], keys, args))"}},{"id":"evalsha(sha1,keys=[]ofRedisValue,args=[]ofRedisValue)-instance-method","html_id":"evalsha(sha1,keys=[]ofRedisValue,args=[]ofRedisValue)-instance-method","name":"evalsha","doc":"EVAL and EVALSHA are used to evaluate scripts using the Lua interpreter\nbuilt into Redis starting from version 2.6.0.\n\n**Return value**: Depends on the executed script","summary":"

    EVAL and EVALSHA are used to evaluate scripts using the Lua interpreter built into Redis starting from version 2.6.0.

    ","abstract":false,"args":[{"name":"sha1","doc":null,"default_value":"","external_name":"sha1","restriction":""},{"name":"keys","doc":null,"default_value":"[] of RedisValue","external_name":"keys","restriction":""},{"name":"args","doc":null,"default_value":"[] of RedisValue","external_name":"args","restriction":""}],"args_string":"(sha1, keys = [] of RedisValue, args = [] of RedisValue)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1488","def":{"name":"evalsha","args":[{"name":"sha1","doc":null,"default_value":"","external_name":"sha1","restriction":""},{"name":"keys","doc":null,"default_value":"[] of RedisValue","external_name":"keys","restriction":""},{"name":"args","doc":null,"default_value":"[] of RedisValue","external_name":"args","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_array_or_string_or_integer_command(concat([\"EVALSHA\", sha1.to_s, keys.size.to_s], keys, args))"}},{"id":"exists(key)-instance-method","html_id":"exists(key)-instance-method","name":"exists","doc":"Returns if key exists.\n\n**Return value**:\n* 1 if the key exists.\n* 0 if the key does not exist.","summary":"

    Returns if key exists.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L558","def":{"name":"exists","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"EXISTS\", namespaced(key)])"}},{"id":"expire(key,seconds)-instance-method","html_id":"expire(key,seconds)-instance-method","name":"expire","doc":"Set a timeout on key.\n\n**Return value**: Integeger, specifically:\n* 1 if the timeout was set.\n* 0 if key does not exist or the timeout could not be set.\n\nExample:\n\n```\nredis.expire(\"temp\", 2)\n```","summary":"

    Set a timeout on key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"seconds","doc":null,"default_value":"","external_name":"seconds","restriction":""}],"args_string":"(key, seconds)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1556","def":{"name":"expire","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"seconds","doc":null,"default_value":"","external_name":"seconds","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"EXPIRE\", namespaced(key), seconds.to_s])"}},{"id":"expireat(key,unix_date)-instance-method","html_id":"expireat(key,unix_date)-instance-method","name":"expireat","doc":"EXPIREAT has the same effect and semantic as EXPIRE, but instead of\nspecifying the number of seconds representing the TTL (time to live),\nit takes an absolute Unix timestamp (seconds since January 1, 1970).\n\n**Return value**: Integeger, specifically:\n* 1 if the timeout was set.\n* 0 if key does not exist or the timeout could not be set.","summary":"

    EXPIREAT has the same effect and semantic as EXPIRE, but instead of specifying the number of seconds representing the TTL (time to live), it takes an absolute Unix timestamp (seconds since January 1, 1970).

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"unix_date","doc":null,"default_value":"","external_name":"unix_date","restriction":""}],"args_string":"(key, unix_date)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1577","def":{"name":"expireat","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"unix_date","doc":null,"default_value":"","external_name":"unix_date","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"EXPIREAT\", namespaced(key), unix_date.to_s])"}},{"id":"flushall-instance-method","html_id":"flushall-instance-method","name":"flushall","doc":"Flush all databases.\n\n**Return value**: \"OK\"","summary":"

    Flush all databases.

    ","abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1534","def":{"name":"flushall","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"FLUSHALL\"])"}},{"id":"flushdb-instance-method","html_id":"flushdb-instance-method","name":"flushdb","doc":"Flush the current database.\n\n**Return value**: \"OK\"","summary":"

    Flush the current database.

    ","abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1527","def":{"name":"flushdb","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"FLUSHDB\"])"}},{"id":"geoadd(key,longitude,latitude,place)-instance-method","html_id":"geoadd(key,longitude,latitude,place)-instance-method","name":"geoadd","doc":"Adds the specified geospatial items (latitude, longitude, name) to the specified key.\n\n**Return value**: Integer: The number of elements added to the sorted set, not including elements already existing for which the score was updated.","summary":"

    Adds the specified geospatial items (latitude, longitude, name) to the specified key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"longitude","doc":null,"default_value":"","external_name":"longitude","restriction":""},{"name":"latitude","doc":null,"default_value":"","external_name":"latitude","restriction":""},{"name":"place","doc":null,"default_value":"","external_name":"place","restriction":""}],"args_string":"(key, longitude, latitude, place)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1822","def":{"name":"geoadd","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"longitude","doc":null,"default_value":"","external_name":"longitude","restriction":""},{"name":"latitude","doc":null,"default_value":"","external_name":"latitude","restriction":""},{"name":"place","doc":null,"default_value":"","external_name":"place","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"GEOADD\", namespaced(key), longitude.to_s, latitude.to_s, place.to_s])"}},{"id":"geodist(key,member1,member2,unit=nil)-instance-method","html_id":"geodist(key,member1,member2,unit=nil)-instance-method","name":"geodist","doc":"Return the distance between two members in the geospatial index represented by the sorted set.\n\n**Return value**: String: returns the distance as a double (represented as a string) in the specified unit,\nor NULL if one or both the elements are missing","summary":"

    Return the distance between two members in the geospatial index represented by the sorted set.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"member1","doc":null,"default_value":"","external_name":"member1","restriction":""},{"name":"member2","doc":null,"default_value":"","external_name":"member2","restriction":""},{"name":"unit","doc":null,"default_value":"nil","external_name":"unit","restriction":""}],"args_string":"(key, member1, member2, unit = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1830","def":{"name":"geodist","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"member1","doc":null,"default_value":"","external_name":"member1","restriction":""},{"name":"member2","doc":null,"default_value":"","external_name":"member2","restriction":""},{"name":"unit","doc":null,"default_value":"nil","external_name":"unit","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"GEODIST\", namespaced(key), member1.to_s, member2.to_s]\nif unit\n q << unit.to_s\nend\nstring_or_nil_command(q)\n"}},{"id":"geohash(key,*args)-instance-method","html_id":"geohash(key,*args)-instance-method","name":"geohash","doc":"Return valid Geohash strings representing the position of one or more elements in a sorted set value representing a geospatial index\n\n**Return value**: Array(String): returns an array where each element is the Geohash corresponding to each\nmember name passed as argument to the command","summary":"

    Return valid Geohash strings representing the position of one or more elements in a sorted set value representing a geospatial index

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"args","doc":null,"default_value":"","external_name":"args","restriction":""}],"args_string":"(key, *args)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1840","def":{"name":"geohash","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"args","doc":null,"default_value":"","external_name":"args","restriction":""}],"double_splat":null,"splat_index":1,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"GEOHASH\", namespaced(key)]\nargs.each do |arg|\n q << arg.to_s\nend\nstring_array_command(q)\n"}},{"id":"geopos(key,*args)-instance-method","html_id":"geopos(key,*args)-instance-method","name":"geopos","doc":"Return the positions (longitude,latitude) of all the specified members of the geospatial index represented by the sorted set at key\n\n**Return value**: Array(String): returns an array where each element is a two elements array representing\nlongitude and latitude (x,y) of each member name passed as argument to the command","summary":"

    Return the positions (longitude,latitude) of all the specified members of the geospatial index represented by the sorted set at key

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"args","doc":null,"default_value":"","external_name":"args","restriction":""}],"args_string":"(key, *args)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1852","def":{"name":"geopos","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"args","doc":null,"default_value":"","external_name":"args","restriction":""}],"double_splat":null,"splat_index":1,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"GEOPOS\", namespaced(key)]\nargs.each do |arg|\n q << arg.to_s\nend\nstring_array_command(q)\n"}},{"id":"georadius(key,longitude,latitude,radius,unit,withcoord=nil,withdist=nil,withhash=nil,count=nil,sort=nil)-instance-method","html_id":"georadius(key,longitude,latitude,radius,unit,withcoord=nil,withdist=nil,withhash=nil,count=nil,sort=nil)-instance-method","name":"georadius","doc":"Return the members of a sorted set populated with geospatial information using GEOADD, which are within the borders\nof the area specified with the center location and the maximum distance from the center (the radius).\n\n**Return value**: Array(String): Returns a simple array or array of arrays, depending on the options passed\nhttps://redis.io/commands/georadius#return-value","summary":"

    Return the members of a sorted set populated with geospatial information using GEOADD, which are within the borders of the area specified with the center location and the maximum distance from the center (the radius).

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"longitude","doc":null,"default_value":"","external_name":"longitude","restriction":""},{"name":"latitude","doc":null,"default_value":"","external_name":"latitude","restriction":""},{"name":"radius","doc":null,"default_value":"","external_name":"radius","restriction":""},{"name":"unit","doc":null,"default_value":"","external_name":"unit","restriction":""},{"name":"withcoord","doc":null,"default_value":"nil","external_name":"withcoord","restriction":""},{"name":"withdist","doc":null,"default_value":"nil","external_name":"withdist","restriction":""},{"name":"withhash","doc":null,"default_value":"nil","external_name":"withhash","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""},{"name":"sort","doc":null,"default_value":"nil","external_name":"sort","restriction":""}],"args_string":"(key, longitude, latitude, radius, unit, withcoord = nil, withdist = nil, withhash = nil, count = nil, sort = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1865","def":{"name":"georadius","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"longitude","doc":null,"default_value":"","external_name":"longitude","restriction":""},{"name":"latitude","doc":null,"default_value":"","external_name":"latitude","restriction":""},{"name":"radius","doc":null,"default_value":"","external_name":"radius","restriction":""},{"name":"unit","doc":null,"default_value":"","external_name":"unit","restriction":""},{"name":"withcoord","doc":null,"default_value":"nil","external_name":"withcoord","restriction":""},{"name":"withdist","doc":null,"default_value":"nil","external_name":"withdist","restriction":""},{"name":"withhash","doc":null,"default_value":"nil","external_name":"withhash","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""},{"name":"sort","doc":null,"default_value":"nil","external_name":"sort","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"GEORADIUS\", namespaced(key), longitude.to_s, latitude.to_s, radius.to_s, unit.to_s]\nif withcoord\n q << \"WITHCOORD\"\nend\nif withdist\n q << \"WITHDIST\"\nend\nif withhash\n q << \"WITHHASH\"\nend\nif count\n q << \"COUNT\"\n q << count.to_s\nend\nif sort\n q << sort.to_s\nend\nstring_array_command(q)\n"}},{"id":"georadiusbymember(key,member,radius,unit,withcoord=nil,withdist=nil,withhash=nil,count=nil,sort=nil)-instance-method","html_id":"georadiusbymember(key,member,radius,unit,withcoord=nil,withdist=nil,withhash=nil,count=nil,sort=nil)-instance-method","name":"georadiusbymember","doc":"Exactly like GEORADIUS with the sole difference that instead of taking, as the center of the area to query, a longitude\nand latitude value, it takes the name of a member already existing inside the geospatial index represented by the sorted set\n\n**Return value**: Array(String): Returns a simple array or array of arrays, depending on the options passed\nhttps://redis.io/commands/georadius#return-value","summary":"

    Exactly like GEORADIUS with the sole difference that instead of taking, as the center of the area to query, a longitude and latitude value, it takes the name of a member already existing inside the geospatial index represented by the sorted set

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""},{"name":"radius","doc":null,"default_value":"","external_name":"radius","restriction":""},{"name":"unit","doc":null,"default_value":"","external_name":"unit","restriction":""},{"name":"withcoord","doc":null,"default_value":"nil","external_name":"withcoord","restriction":""},{"name":"withdist","doc":null,"default_value":"nil","external_name":"withdist","restriction":""},{"name":"withhash","doc":null,"default_value":"nil","external_name":"withhash","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""},{"name":"sort","doc":null,"default_value":"nil","external_name":"sort","restriction":""}],"args_string":"(key, member, radius, unit, withcoord = nil, withdist = nil, withhash = nil, count = nil, sort = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1883","def":{"name":"georadiusbymember","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""},{"name":"radius","doc":null,"default_value":"","external_name":"radius","restriction":""},{"name":"unit","doc":null,"default_value":"","external_name":"unit","restriction":""},{"name":"withcoord","doc":null,"default_value":"nil","external_name":"withcoord","restriction":""},{"name":"withdist","doc":null,"default_value":"nil","external_name":"withdist","restriction":""},{"name":"withhash","doc":null,"default_value":"nil","external_name":"withhash","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""},{"name":"sort","doc":null,"default_value":"nil","external_name":"sort","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"GEORADIUSBYMEMBER\", namespaced(key), member.to_s, radius.to_s, unit.to_s]\nif withcoord\n q << \"WITHCOORD\"\nend\nif withdist\n q << \"WITHDIST\"\nend\nif withhash\n q << \"WITHHASH\"\nend\nif count\n q << \"COUNT\"\n q << count.to_s\nend\nif sort\n q << sort.to_s\nend\nstring_array_command(q)\n"}},{"id":"get(key)-instance-method","html_id":"get(key)-instance-method","name":"get","doc":"Get the value of key.\n\n**Return value**: a String or nil\n\nExample:\n\n```\nredis.set(\"foo\", \"test\")\nredis.get(\"foo\") # => \"test\"\n```","summary":"

    Get the value of key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L66","def":{"name":"get","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_or_nil_command([\"GET\", namespaced(key)])"}},{"id":"getbit(key,index)-instance-method","html_id":"getbit(key,index)-instance-method","name":"getbit","doc":"Returns the bit value at offset in the string value stored at key.\n\n**Return value**: Integer, the bit value stored at offset.","summary":"

    Returns the bit value at offset in the string value stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"index","doc":null,"default_value":"","external_name":"index","restriction":""}],"args_string":"(key, index)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L461","def":{"name":"getbit","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"index","doc":null,"default_value":"","external_name":"index","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"GETBIT\", namespaced(key), index.to_s])"}},{"id":"getrange(key,start_index,end_index)-instance-method","html_id":"getrange(key,start_index,end_index)-instance-method","name":"getrange","doc":"Returns the substring of the string value stored at key, determined by the offsets start and end (both are inclusive).\n\n\nExample:\n\n```\nredis.set(\"foo\", \"This is a string\")\nredis.getrange(\"foo\", 0, 3) # => \"This\"\nredis.getrange(\"foo\", -3, -1) # => \"ing\"\n```","summary":"

    Returns the substring of the string value stored at key, determined by the offsets start and end (both are inclusive).

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start_index","doc":null,"default_value":"","external_name":"start_index","restriction":""},{"name":"end_index","doc":null,"default_value":"","external_name":"end_index","restriction":""}],"args_string":"(key, start_index, end_index)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L396","def":{"name":"getrange","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start_index","doc":null,"default_value":"","external_name":"start_index","restriction":""},{"name":"end_index","doc":null,"default_value":"","external_name":"end_index","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"GETRANGE\", namespaced(key), start_index.to_s, end_index.to_s])"}},{"id":"getset(key,value)-instance-method","html_id":"getset(key,value)-instance-method","name":"getset","doc":"Atomically sets key to value and returns the old value stored at key.\n\n**Return value**: String, the old value stored at key, or nil when key did not exist.\n\nExample:\n\n```\nredis.getset(\"foo\", \"new\") # => (the old value)\n```","summary":"

    Atomically sets key to value and returns the old value stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L260","def":{"name":"getset","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_or_nil_command([\"GETSET\", namespaced(key), value])"}},{"id":"hdel(key,field)-instance-method","html_id":"hdel(key,field)-instance-method","name":"hdel","doc":"Removes the specified fields from the hash stored at key.\n\n**Return value**: Integer, the number of fields that were removed from the hash,\nnot including specified but non existing fields.","summary":"

    Removes the specified fields from the hash stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""}],"args_string":"(key, field)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1023","def":{"name":"hdel","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"HDEL\", namespaced(key), field.to_s])"}},{"id":"hexists(key,field)-instance-method","html_id":"hexists(key,field)-instance-method","name":"hexists","doc":"Returns if field is an existing field in the hash stored at key.\n\n**Return value**: Integer, specifically:\n* 1 if the hash contains field.\n* 0 if the hash does not contain field, or key does not exist.","summary":"

    Returns if field is an existing field in the hash stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""}],"args_string":"(key, field)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1032","def":{"name":"hexists","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"HEXISTS\", namespaced(key), field.to_s])"}},{"id":"hget(key,field)-instance-method","html_id":"hget(key,field)-instance-method","name":"hget","doc":"Returns the value associated with field in the hash stored at key.\n\n**Return value**: String, the value associated with field, or nil\n\nExample:\n\n```\nredis.hget(\"myhash\", \"a\") # => \"434\"\n```","summary":"

    Returns the value associated with field in the hash stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""}],"args_string":"(key, field)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1007","def":{"name":"hget","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_or_nil_command([\"HGET\", namespaced(key), field.to_s])"}},{"id":"hgetall(key)-instance-method","html_id":"hgetall(key)-instance-method","name":"hgetall","doc":"Returns all fields and values of the hash stored at key.\n\n**Return value**: Array(String) of fields and their values stored in the hash,\nor an empty array when key does not exist.","summary":"

    Returns all fields and values of the hash stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1015","def":{"name":"hgetall","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_array_command([\"HGETALL\", namespaced(key)])"}},{"id":"hincrby(key,field,increment)-instance-method","html_id":"hincrby(key,field,increment)-instance-method","name":"hincrby","doc":"Increments the number stored at field in the hash stored at key by increment.\n\n**Return value**: Integer, the value at field after the increment operation.\n\nExample:\n\n```\nredis.hincrby(\"myhash\", \"field1\", \"3\") # => 4\n```","summary":"

    Increments the number stored at field in the hash stored at key by increment.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""},{"name":"increment","doc":null,"default_value":"","external_name":"increment","restriction":""}],"args_string":"(key, field, increment)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1045","def":{"name":"hincrby","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""},{"name":"increment","doc":null,"default_value":"","external_name":"increment","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"HINCRBY\", namespaced(key), field.to_s, increment.to_s])"}},{"id":"hincrbyfloat(key,field,increment)-instance-method","html_id":"hincrbyfloat(key,field,increment)-instance-method","name":"hincrbyfloat","doc":"Increment the specified field of an hash stored at key,\nand representing a floating point number, by the specified increment.\n\n**Return value**: String, the value at field after the increment operation.","summary":"

    Increment the specified field of an hash stored at key, and representing a floating point number, by the specified increment.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""},{"name":"increment","doc":null,"default_value":"","external_name":"increment","restriction":""}],"args_string":"(key, field, increment)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1053","def":{"name":"hincrbyfloat","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""},{"name":"increment","doc":null,"default_value":"","external_name":"increment","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"HINCRBYFLOAT\", namespaced(key), field.to_s, increment.to_s])"}},{"id":"hkeys(key)-instance-method","html_id":"hkeys(key)-instance-method","name":"hkeys","doc":"Returns all field names in the hash stored at key.\n\n**Return value**: Array(String) - list of fields in the hash, or an empty list when key does not exist.","summary":"

    Returns all field names in the hash stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1060","def":{"name":"hkeys","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_array_command([\"HKEYS\", namespaced(key)])"}},{"id":"hlen(key)-instance-method","html_id":"hlen(key)-instance-method","name":"hlen","doc":"Returns the number of fields contained in the hash stored at key.\n\n**Return value**: Integer, the number of fields in the hash, or 0 when key does not exist.","summary":"

    Returns the number of fields contained in the hash stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1067","def":{"name":"hlen","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"HLEN\", namespaced(key)])"}},{"id":"hmget(key,fields:Array(String))-instance-method","html_id":"hmget(key,fields:Array(String))-instance-method","name":"hmget","doc":"Returns the values associated with the specified fields in the hash stored at key.\n\n**Return value**: Array(RedisValue), the list of values associated with the given fields, in the same order as they are requested.","summary":"

    Returns the values associated with the specified fields in the hash stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"fields","doc":null,"default_value":"","external_name":"fields","restriction":"Array(String)"}],"args_string":"(key, fields : Array(String))","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1074","def":{"name":"hmget","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"fields","doc":null,"default_value":"","external_name":"fields","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_array_command(concat([\"HMGET\", namespaced(key)], fields))"}},{"id":"hmget(key,*fields:String)-instance-method","html_id":"hmget(key,*fields:String)-instance-method","name":"hmget","doc":"Returns the values associated with the specified fields in the hash stored at key.\n\n**Return value**: Array(RedisValue), the list of values associated with the given fields, in the same order as they are requested.","summary":"

    Returns the values associated with the specified fields in the hash stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"fields","doc":null,"default_value":"","external_name":"fields","restriction":"String"}],"args_string":"(key, *fields : String)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1079","def":{"name":"hmget","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"fields","doc":null,"default_value":"","external_name":"fields","restriction":"String"}],"double_splat":null,"splat_index":1,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"hmget(key, fields.to_a)"}},{"id":"hmset(key,hash)-instance-method","html_id":"hmset(key,hash)-instance-method","name":"hmset","doc":"Sets the specified fields to their respective values in the hash stored at key.\n\n**Return value**: \"OK\"","summary":"

    Sets the specified fields to their respective values in the hash stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"hash","doc":null,"default_value":"","external_name":"hash","restriction":""}],"args_string":"(key, hash)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1086","def":{"name":"hmset","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"hash","doc":null,"default_value":"","external_name":"hash","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"HMSET\", namespaced(key)] of RedisValue\nhash.each do |field, value|\n (q << field.to_s) << value.to_s\nend\nstring_command(q)\n"}},{"id":"hscan(key,cursor,match=nil,count=nil)-instance-method","html_id":"hscan(key,cursor,match=nil,count=nil)-instance-method","name":"hscan","doc":"```\nredis.hscan(\"myhash\", 0)\nredis.hscan(\"myhash\", 0, \"foo*\")\nredis.hscan(\"myhash\", 0, \"foo*\", 1024)\n```","summary":"

    ` redis.hscan(\"myhash\", 0) redis.hscan(\"myhash\", 0, \"foo\") redis.hscan(\"myhash\", 0, \"foo\", 1024) `

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"cursor","doc":null,"default_value":"","external_name":"cursor","restriction":""},{"name":"match","doc":null,"default_value":"nil","external_name":"match","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""}],"args_string":"(key, cursor, match = nil, count = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1106","def":{"name":"hscan","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"cursor","doc":null,"default_value":"","external_name":"cursor","restriction":""},{"name":"match","doc":null,"default_value":"nil","external_name":"match","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"HSCAN\", namespaced(key), cursor.to_s]\nif match\n (q << \"MATCH\") << match.to_s\nend\nif count\n (q << \"COUNT\") << count.to_s\nend\nstring_array_command(q)\n"}},{"id":"hset(key,field,value)-instance-method","html_id":"hset(key,field,value)-instance-method","name":"hset","doc":"Sets field in the hash stored at key to value.\n\n**Return value**: Integer, specifically:\n* 1 if field is a new field in the hash and value was set.\n* 0 if field already exists in the hash and the value was updated.\n\nExample:\n\n```\nredis.hset(\"myhash\", \"a\", \"434\")\n```","summary":"

    Sets field in the hash stored at key to value.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, field, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L994","def":{"name":"hset","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"HSET\", namespaced(key), field.to_s, value.to_s])"}},{"id":"hsetnx(key,field,value)-instance-method","html_id":"hsetnx(key,field,value)-instance-method","name":"hsetnx","doc":"Sets field in the hash stored at key to value, only if field does not yet exist.\n\n**Return value**: Integer, specifically:\n* 1 if field is a new field in the hash and value was set.\n* 0 if field already exists in the hash and no operation was performed.","summary":"

    Sets field in the hash stored at key to value, only if field does not yet exist.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, field, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1118","def":{"name":"hsetnx","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"HSETNX\", namespaced(key), field.to_s, value.to_s])"}},{"id":"hvals(key)-instance-method","html_id":"hvals(key)-instance-method","name":"hvals","doc":"Returns all values in the hash stored at key.\n\n**Return value**: Array(String), the list of values in the hash, or an empty list when key does not exist.","summary":"

    Returns all values in the hash stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1125","def":{"name":"hvals","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_array_command([\"HVALS\", namespaced(key)])"}},{"id":"incr(key)-instance-method","html_id":"incr(key)-instance-method","name":"incr","doc":"Increments the number stored at key by one.\n\n**Return value**: Integer: the value of key after the increment\n\nExample:\n\n```\nredis.set(\"foo\", \"3\")\nredis.incr(\"foo\") # => 4\n```","summary":"

    Increments the number stored at key by one.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L321","def":{"name":"incr","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"INCR\", namespaced(key)])"}},{"id":"incrby(key,increment)-instance-method","html_id":"incrby(key,increment)-instance-method","name":"incrby","doc":"Increments the number stored at key by increment.\n\n**Return value**: Integer, the value of key after the increment\n\nExample:\n\n```\nredis.incrby(\"foo\", 4)\n```","summary":"

    Increments the number stored at key by increment.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"increment","doc":null,"default_value":"","external_name":"increment","restriction":""}],"args_string":"(key, increment)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L341","def":{"name":"incrby","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"increment","doc":null,"default_value":"","external_name":"increment","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"INCRBY\", namespaced(key), increment.to_s])"}},{"id":"incrbyfloat(key,increment)-instance-method","html_id":"incrbyfloat(key,increment)-instance-method","name":"incrbyfloat","doc":"Increment the string representing a floating point number stored at key by the specified increment.\n\n**Return value**: Integer, the value of key after the increment\n\nExample:\n\n```\nredis.incrbyfloat(\"foo\", 2.5)\n```","summary":"

    Increment the string representing a floating point number stored at key by the specified increment.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"increment","doc":null,"default_value":"","external_name":"increment","restriction":""}],"args_string":"(key, increment)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L354","def":{"name":"incrbyfloat","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"increment","doc":null,"default_value":"","external_name":"increment","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"INCRBYFLOAT\", namespaced(key), increment.to_s])"}},{"id":"info(section:String?=nil)-instance-method","html_id":"info(section:String?=nil)-instance-method","name":"info","doc":"The INFO command returns information and statistics about the server.\n\n**Return value**: A hash with the server information","summary":"

    The INFO command returns information and statistics about the server.

    ","abstract":false,"args":[{"name":"section","doc":null,"default_value":"nil","external_name":"section","restriction":"String | ::Nil"}],"args_string":"(section : String? = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1778","def":{"name":"info","args":[{"name":"section","doc":null,"default_value":"nil","external_name":"section","restriction":"String | ::Nil"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"arr = [\"INFO\"]\nif section\n arr << section\nend\nbulk = string_command(arr)\nresults = Hash(String, String).new\n(bulk.split(\"\\r\\n\")).each do |line|\n if line.empty? || (line[0] == '#')\n next\n end\n key, val = line.split(\":\")\n results[key] = val\nend\nresults\n"}},{"id":"keys(pattern)-instance-method","html_id":"keys(pattern)-instance-method","name":"keys","doc":"Returns all keys matching pattern.\n\n**Return value**: Array(String), array of keys matching pattern.\n\nExample:\n\n```\nredis.keys(\"callmemaybe\")\n```","summary":"

    Returns all keys matching pattern.

    ","abstract":false,"args":[{"name":"pattern","doc":null,"default_value":"","external_name":"pattern","restriction":""}],"args_string":"(pattern)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L571","def":{"name":"keys","args":[{"name":"pattern","doc":null,"default_value":"","external_name":"pattern","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"(string_array_command([\"KEYS\", namespaced(pattern)])).map do |key|\n without_namespace(\"#{key}\")\nend"}},{"id":"lindex(key,index)-instance-method","html_id":"lindex(key,index)-instance-method","name":"lindex","doc":"Returns the element at index index in the list stored at key.\n\n**Return value**: String, the requested element, or nil when index is out of range.","summary":"

    Returns the element at index index in the list stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"index","doc":null,"default_value":"","external_name":"index","restriction":""}],"args_string":"(key, index)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L642","def":{"name":"lindex","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"index","doc":null,"default_value":"","external_name":"index","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_or_nil_command([\"LINDEX\", namespaced(key), index.to_s])"}},{"id":"linsert(key,where,pivot,value)-instance-method","html_id":"linsert(key,where,pivot,value)-instance-method","name":"linsert","doc":"Inserts value in the list stored at key either before or after the reference value pivot.\n\n**Options**:\n\n* where - either \"BEFORE\" or \"AFTER\"\n\n**Return value**: Integer, the length of the list after the insert operation, or -1 when the value pivot was not found.","summary":"

    Inserts value in the list stored at key either before or after the reference value pivot.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"where","doc":null,"default_value":"","external_name":"where","restriction":""},{"name":"pivot","doc":null,"default_value":"","external_name":"pivot","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, where, pivot, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L680","def":{"name":"linsert","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"where","doc":null,"default_value":"","external_name":"where","restriction":""},{"name":"pivot","doc":null,"default_value":"","external_name":"pivot","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"LINSERT\", namespaced(key), where.to_s, pivot.to_s, value.to_s])"}},{"id":"llen(key)-instance-method","html_id":"llen(key)-instance-method","name":"llen","doc":"Returns the length of the list stored at key.\n\n**Return value**: Integer, the length of the list at key.","summary":"

    Returns the length of the list stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L635","def":{"name":"llen","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"LLEN\", namespaced(key)])"}},{"id":"lpop(key)-instance-method","html_id":"lpop(key)-instance-method","name":"lpop","doc":"Removes and returns the first element of the list stored at key.\n\n**Return value**: String, the value of the first element, or nil when key does not exist.\n\nExample:\n\n```\nredis.lpop(\"mylist\")\n```","summary":"

    Removes and returns the first element of the list stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L662","def":{"name":"lpop","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_or_nil_command([\"LPOP\", namespaced(key)])"}},{"id":"lpush(key,*values)-instance-method","html_id":"lpush(key,*values)-instance-method","name":"lpush","doc":"Insert all the specified values at the head of the list stored at key.\n\n**Return value**: Integer, the length of the list after the push operation.","summary":"

    Insert all the specified values at the head of the list stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":""}],"args_string":"(key, *values)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L596","def":{"name":"lpush","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":""}],"double_splat":null,"splat_index":1,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"lpush(key, values.to_a)"}},{"id":"lpush(key,values:Array(RedisValue))-instance-method","html_id":"lpush(key,values:Array(RedisValue))-instance-method","name":"lpush","doc":"Insert all the specified values at the head of the list stored at key.\n\n**Return value**: Integer, the length of the list after the push operation.","summary":"

    Insert all the specified values at the head of the list stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"Array(RedisValue)"}],"args_string":"(key, values : Array(RedisValue))","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L601","def":{"name":"lpush","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"Array(RedisValue)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command(concat([\"LPUSH\", namespaced(key)], values))"}},{"id":"lpushx(key,value)-instance-method","html_id":"lpushx(key,value)-instance-method","name":"lpushx","doc":"Inserts value at the head of the list stored at key, only if key already exists and holds a list.\n\n**Return value**: Integer, the length of the list after the push operation.","summary":"

    Inserts value at the head of the list stored at key, only if key already exists and holds a list.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L608","def":{"name":"lpushx","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"LPUSHX\", namespaced(key), value.to_s])"}},{"id":"lrange(key,from,to)-instance-method","html_id":"lrange(key,from,to)-instance-method","name":"lrange","doc":"Returns the specified elements of the list stored at key.\n\n**Return value**: Array(String), the list of elements in the specified range.\n\nExample:\n\n```\nredis.lrange(\"mylist\", 0, 2)\n```","summary":"

    Returns the specified elements of the list stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"from","doc":null,"default_value":"","external_name":"from","restriction":""},{"name":"to","doc":null,"default_value":"","external_name":"to","restriction":""}],"args_string":"(key, from, to)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L693","def":{"name":"lrange","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"from","doc":null,"default_value":"","external_name":"from","restriction":""},{"name":"to","doc":null,"default_value":"","external_name":"to","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_array_command([\"LRANGE\", namespaced(key), from.to_s, to.to_s])"}},{"id":"lrem(key,count,value)-instance-method","html_id":"lrem(key,count,value)-instance-method","name":"lrem","doc":"Removes the first count occurrences of elements equal to value from the list stored at key.\n\n**Return value**: Integer, the number of removed elements.\n\nExample:\n\n```\nredis.lrem(\"mylist\", 1, \"my\")\n```","summary":"

    Removes the first count occurrences of elements equal to value from the list stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"count","doc":null,"default_value":"","external_name":"count","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, count, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L628","def":{"name":"lrem","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"count","doc":null,"default_value":"","external_name":"count","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"LREM\", namespaced(key), count.to_s, value.to_s])"}},{"id":"lset(key,index,value)-instance-method","html_id":"lset(key,index,value)-instance-method","name":"lset","doc":"Sets the list element at index to value.\n\n**Return value**: \"OK\"","summary":"

    Sets the list element at index to value.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"index","doc":null,"default_value":"","external_name":"index","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, index, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L649","def":{"name":"lset","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"index","doc":null,"default_value":"","external_name":"index","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"LSET\", namespaced(key), index.to_s, value.to_s])"}},{"id":"ltrim(key,start,stop)-instance-method","html_id":"ltrim(key,start,stop)-instance-method","name":"ltrim","doc":"Trim an existing list so that it will contain only the specified range of elements specified.\n\n**Return value**: \"OK\"","summary":"

    Trim an existing list so that it will contain only the specified range of elements specified.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start","doc":null,"default_value":"","external_name":"start","restriction":""},{"name":"stop","doc":null,"default_value":"","external_name":"stop","restriction":""}],"args_string":"(key, start, stop)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L700","def":{"name":"ltrim","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start","doc":null,"default_value":"","external_name":"start","restriction":""},{"name":"stop","doc":null,"default_value":"","external_name":"stop","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"LTRIM\", namespaced(key), start.to_s, stop.to_s])"}},{"id":"mget(keys:Array(String)):Array(RedisValue)-instance-method","html_id":"mget(keys:Array(String)):Array(RedisValue)-instance-method","name":"mget","doc":null,"summary":null,"abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"args_string":"(keys : Array(String)) : Array(RedisValue)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L232","def":{"name":"mget","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Array(RedisValue)","visibility":"Public","body":"string_array_command(concat([\"MGET\"], namespaced(keys)))"}},{"id":"mget(*keys)-instance-method","html_id":"mget(*keys)-instance-method","name":"mget","doc":"Returns the values of all specified keys.\n\n**Return value**: Array(String), the list of values at the specified keys.\nFor every key that does not hold a string value or does not exist, nil is returned.\n\nExample:\n\n```\nredis.set(\"foo1\", \"test1\")\nredis.set(\"foo2\", \"test2\")\nredis.mget(\"foo1\", \"foo2\") # => [\"test1\", \"test2\"]\n```","summary":"

    Returns the values of all specified keys.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":""}],"args_string":"(*keys)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L228","def":{"name":"mget","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":""}],"double_splat":null,"splat_index":0,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_array_command(concat([\"MGET\"], namespaced(keys)))"}},{"id":"mset(hash:Hash)-instance-method","html_id":"mset(hash:Hash)-instance-method","name":"mset","doc":"Sets the given keys to their respective values as defined in the hash.\n\n**Return value**: \"OK\"\n\nExample:\n\n```\nredis.mset({\"foo1\": \"bar1\", \"foo2\": \"bar2\"})\n```","summary":"

    Sets the given keys to their respective values as defined in the hash.

    ","abstract":false,"args":[{"name":"hash","doc":null,"default_value":"","external_name":"hash","restriction":"Hash"}],"args_string":"(hash : Hash)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L245","def":{"name":"mset","args":[{"name":"hash","doc":null,"default_value":"","external_name":"hash","restriction":"Hash"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"MSET\"] of RedisValue\nhash.each do |key, value|\n (q << (namespaced(key))) << value.to_s\nend\nstring_command(q)\n"}},{"id":"msetnx(hash)-instance-method","html_id":"msetnx(hash)-instance-method","name":"msetnx","doc":"Sets the given keys to their respective values as defined in the hash.\nMSETNX will not perform any operation at all even if just a single key already exists.\n\n**Return value**: Integer, specifically:\n* 1 if the all the keys were set.\n* 0 if no key was set (at least one key already existed).\n\nExample:\n\n```\nredis.msetnx({\"key1\": \"hello\", \"key2\": \"there\"})\n```","summary":"

    Sets the given keys to their respective values as defined in the hash.

    ","abstract":false,"args":[{"name":"hash","doc":null,"default_value":"","external_name":"hash","restriction":""}],"args_string":"(hash)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L305","def":{"name":"msetnx","args":[{"name":"hash","doc":null,"default_value":"","external_name":"hash","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"MSETNX\"] of RedisValue\nhash.each do |key, value|\n (q << (namespaced(key))) << value\nend\ninteger_command(q)\n"}},{"id":"object_encoding(key)-instance-method","html_id":"object_encoding(key)-instance-method","name":"object_encoding","doc":"Returns the kind of internal representation used in order to store\nthe value associated with a key.\n\n**Return value**: String: returns the kind of internal representation\nused in order to store the value associated with a key.","summary":"

    Returns the kind of internal representation used in order to store the value associated with a key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1805","def":{"name":"object_encoding","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_or_nil_command([\"OBJECT\", \"ENCODING\", namespaced(key)])"}},{"id":"object_idletime(key)-instance-method","html_id":"object_idletime(key)-instance-method","name":"object_idletime","doc":"Returns the number of seconds since the object stored at the specified key\nis idle (not requested by read or write operations).\n\n**Return value**: Integer: returns the number of seconds\nsince the object stored at the specified key is idle\n(not requested by read or write operations).","summary":"

    Returns the number of seconds since the object stored at the specified key is idle (not requested by read or write operations).

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1815","def":{"name":"object_idletime","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_or_nil_command([\"OBJECT\", \"IDLETIME\", namespaced(key)])"}},{"id":"object_refcount(key)-instance-method","html_id":"object_refcount(key)-instance-method","name":"object_refcount","doc":"Returns the number of references of the value associated\nwith the specified key.\n\n**Return value**: Integer: returns the number of references\nof the value associated with the specified key.","summary":"

    Returns the number of references of the value associated with the specified key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1796","def":{"name":"object_refcount","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_or_nil_command([\"OBJECT\", \"REFCOUNT\", namespaced(key)])"}},{"id":"persist(key)-instance-method","html_id":"persist(key)-instance-method","name":"persist","doc":"Remove the existing timeout on key, turning the key from volatile\n(a key with an expire set) to persistent (a key that will never expire\nas no timeout is associated).\n\n**Return value**: Integer, specifically:\n* 1 if the timeout was removed.\n* 0 if key does not exist or does not have an associated timeout.","summary":"

    Remove the existing timeout on key, turning the key from volatile (a key with an expire set) to persistent (a key that will never expire as no timeout is associated).

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1598","def":{"name":"persist","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"PERSIST\", namespaced(key)])"}},{"id":"pexpire(key,milis)-instance-method","html_id":"pexpire(key,milis)-instance-method","name":"pexpire","doc":"This command works exactly like EXPIRE but the time to live of the key is\nspecified in milliseconds instead of seconds.\n\n**Return value**: Integeger, specifically:\n* 1 if the timeout was set.\n* 0 if key does not exist or the timeout could not be set.","summary":"

    This command works exactly like EXPIRE but the time to live of the key is specified in milliseconds instead of seconds.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"milis","doc":null,"default_value":"","external_name":"milis","restriction":""}],"args_string":"(key, milis)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1566","def":{"name":"pexpire","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"milis","doc":null,"default_value":"","external_name":"milis","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"PEXPIRE\", namespaced(key), milis.to_s])"}},{"id":"pexpireat(key,unix_date_in_millis)-instance-method","html_id":"pexpireat(key,unix_date_in_millis)-instance-method","name":"pexpireat","doc":"PEXPIREAT has the same effect and semantic as EXPIREAT, but the Unix time\nat which the key will expire is specified in milliseconds instead of seconds.\n\n**Return value**: Integeger, specifically:\n* 1 if the timeout was set.\n* 0 if key does not exist or the timeout could not be set.","summary":"

    PEXPIREAT has the same effect and semantic as EXPIREAT, but the Unix time at which the key will expire is specified in milliseconds instead of seconds.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"unix_date_in_millis","doc":null,"default_value":"","external_name":"unix_date_in_millis","restriction":""}],"args_string":"(key, unix_date_in_millis)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1587","def":{"name":"pexpireat","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"unix_date_in_millis","doc":null,"default_value":"","external_name":"unix_date_in_millis","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"PEXPIREAT\", namespaced(key), unix_date_in_millis.to_s])"}},{"id":"pfadd(key,*values:String):Int64-instance-method","html_id":"pfadd(key,*values:String):Int64-instance-method","name":"pfadd","doc":"Adds all the element arguments to the HyperLogLog data structure stored at\nthe variable name specified as first argument.\n\n**Return value**: Integer: 1 if at least 1 HyperLogLog internal register was altered. 0 otherwise.\n\nExample:\n\n```\nredis.pfadd(\"hll\", \"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\") # => 1\n```","summary":"

    Adds all the element arguments to the HyperLogLog data structure stored at the variable name specified as first argument.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"String"}],"args_string":"(key, *values : String) : Int64","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1439","def":{"name":"pfadd","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"String"}],"double_splat":null,"splat_index":1,"yields":null,"block_arg":null,"return_type":"Int64","visibility":"Public","body":"pfadd(key, values.to_a)"}},{"id":"pfadd(key,values:Array(String)):Int64-instance-method","html_id":"pfadd(key,values:Array(String)):Int64-instance-method","name":"pfadd","doc":"Adds all the element arguments to the HyperLogLog data structure stored at\nthe variable name specified as first argument.\n\n**Return value**: Integer: 1 if at least 1 HyperLogLog internal register was altered. 0 otherwise.\n\nExample:\n\n```\nredis.pfadd(\"hll\", \"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\") # => 1\n```","summary":"

    Adds all the element arguments to the HyperLogLog data structure stored at the variable name specified as first argument.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"Array(String)"}],"args_string":"(key, values : Array(String)) : Int64","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1434","def":{"name":"pfadd","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Int64","visibility":"Public","body":"integer_command(concat([\"PFADD\", namespaced(key)], values))"}},{"id":"pfcount(keys:Array(String)):Int64-instance-method","html_id":"pfcount(keys:Array(String)):Int64-instance-method","name":"pfcount","doc":"When called with a single key, returns the approximated cardinality computed\nby the HyperLogLog data structure stored at the specified variable,\nwhich is 0 if the variable does not exist.\n\n**Return value**: Integer, the approximated number of unique elements\nobserved via PFADD.","summary":"

    When called with a single key, returns the approximated cardinality computed by the HyperLogLog data structure stored at the specified variable, which is 0 if the variable does not exist.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"args_string":"(keys : Array(String)) : Int64","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1461","def":{"name":"pfcount","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Int64","visibility":"Public","body":"integer_command(concat([\"PFCOUNT\"], namespaced(keys)))"}},{"id":"pfcount(*keys:String):Int64-instance-method","html_id":"pfcount(*keys:String):Int64-instance-method","name":"pfcount","doc":"When called with a single key, returns the approximated cardinality computed\nby the HyperLogLog data structure stored at the specified variable,\nwhich is 0 if the variable does not exist.\n\n**Return value**: Integer, the approximated number of unique elements\nobserved via PFADD.","summary":"

    When called with a single key, returns the approximated cardinality computed by the HyperLogLog data structure stored at the specified variable, which is 0 if the variable does not exist.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"args_string":"(*keys : String) : Int64","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1466","def":{"name":"pfcount","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"double_splat":null,"splat_index":0,"yields":null,"block_arg":null,"return_type":"Int64","visibility":"Public","body":"pfcount(keys.to_a)"}},{"id":"pfmerge(*keys:String)-instance-method","html_id":"pfmerge(*keys:String)-instance-method","name":"pfmerge","doc":"Merge multiple HyperLogLog values into an unique value that will\napproximate the cardinality of the union of the observed Sets of the\nsource HyperLogLog structures.","summary":"

    Merge multiple HyperLogLog values into an unique value that will approximate the cardinality of the union of the observed Sets of the source HyperLogLog structures.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"args_string":"(*keys : String)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1451","def":{"name":"pfmerge","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"double_splat":null,"splat_index":0,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"pfmerge(keys.to_a)"}},{"id":"pfmerge(keys:Array(String))-instance-method","html_id":"pfmerge(keys:Array(String))-instance-method","name":"pfmerge","doc":"Merge multiple HyperLogLog values into an unique value that will\napproximate the cardinality of the union of the observed Sets of the\nsource HyperLogLog structures.","summary":"

    Merge multiple HyperLogLog values into an unique value that will approximate the cardinality of the union of the observed Sets of the source HyperLogLog structures.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"args_string":"(keys : Array(String))","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1446","def":{"name":"pfmerge","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command(concat([\"PFMERGE\"], namespaced(keys)))"}},{"id":"ping-instance-method","html_id":"ping-instance-method","name":"ping","doc":"Returns PONG. This command is often used to test if a connection is still alive, or to measure latency.\n\nExample:\n\n```\nredis.ping # => \"PONG\"\n```","summary":"

    Returns PONG.

    ","abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L23","def":{"name":"ping","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"PING\"])"}},{"id":"psetex(key,expire_in_milis,value)-instance-method","html_id":"psetex(key,expire_in_milis,value)-instance-method","name":"psetex","doc":"PSETEX works exactly like SETEX with the sole difference that the expire time is specified in milliseconds instead of seconds.\n\n**Return value**: \"OK\"","summary":"

    PSETEX works exactly like SETEX with the sole difference that the expire time is specified in milliseconds instead of seconds.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"expire_in_milis","doc":null,"default_value":"","external_name":"expire_in_milis","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, expire_in_milis, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L280","def":{"name":"psetex","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"expire_in_milis","doc":null,"default_value":"","external_name":"expire_in_milis","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"PSETEX\", namespaced(key), expire_in_milis.to_s, value.to_s])"}},{"id":"psubscribe(*channel_patterns,&callback_setup_block:Subscription->)-instance-method","html_id":"psubscribe(*channel_patterns,&callback_setup_block:Subscription->)-instance-method","name":"psubscribe","doc":"Subscribes to channel patterns and enters a subscription loop, waiting for events.\n\nThe method yields to the given block and passes a Subscription object, on\nwhich you can set your callbacks for the event subscription.\n\nThe subscription loop will end once you unsubscribe.","summary":"

    Subscribes to channel patterns and enters a subscription loop, waiting for events.

    ","abstract":false,"args":[{"name":"channel_patterns","doc":null,"default_value":"","external_name":"channel_patterns","restriction":""}],"args_string":"(*channel_patterns, &callback_setup_block : Subscription -> )","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1691","def":{"name":"psubscribe","args":[{"name":"channel_patterns","doc":null,"default_value":"","external_name":"channel_patterns","restriction":""}],"double_splat":null,"splat_index":0,"yields":1,"block_arg":{"name":"callback_setup_block","doc":null,"default_value":"","external_name":"callback_setup_block","restriction":"(Subscription -> )"},"return_type":"","visibility":"Public","body":"if already_in_subscription_loop?\n raise(Redis::Error.new(\"Must call psubscribe without a subscription block when inside a subscription loop\"))\nend\nsubscription = Subscription.new\ncallback_setup_block.call(subscription)\n@strategy = Redis::Strategy::SubscriptionLoop.new(connection, subscription)\npsubscribe(*channel_patterns)\n"}},{"id":"psubscribe(channel_patterns:Array(String))-instance-method","html_id":"psubscribe(channel_patterns:Array(String))-instance-method","name":"psubscribe","doc":"Subscribes to more channel patterns while already being in a subscription loop.","summary":"

    Subscribes to more channel patterns while already being in a subscription loop.

    ","abstract":false,"args":[{"name":"channel_patterns","doc":null,"default_value":"","external_name":"channel_patterns","restriction":"Array(String)"}],"args_string":"(channel_patterns : Array(String))","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1707","def":{"name":"psubscribe","args":[{"name":"channel_patterns","doc":null,"default_value":"","external_name":"channel_patterns","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"if already_in_subscription_loop?\nelse\n raise(Redis::Error.new(\"Must call psubscribe with a subscription block\"))\nend\nvoid_command(concat([\"PSUBSCRIBE\"], channel_patterns))\n"}},{"id":"psubscribe(*channel_patterns)-instance-method","html_id":"psubscribe(*channel_patterns)-instance-method","name":"psubscribe","doc":null,"summary":null,"abstract":false,"args":[{"name":"channel_patterns","doc":null,"default_value":"","external_name":"channel_patterns","restriction":""}],"args_string":"(*channel_patterns)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1716","def":{"name":"psubscribe","args":[{"name":"channel_patterns","doc":null,"default_value":"","external_name":"channel_patterns","restriction":""}],"double_splat":null,"splat_index":0,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"psubscribe(channel_patterns.to_a)"}},{"id":"pttl(key)-instance-method","html_id":"pttl(key)-instance-method","name":"pttl","doc":"Like TTL this command returns the remaining time to live of a key that has\nan expire set, with the sole difference that TTL returns the amount of\nremaining time in seconds while PTTL returns it in milliseconds.\n\n**Return value**: Integer, the TTL in milliseconds, or a negative value in order to signal an error.","summary":"

    Like TTL this command returns the remaining time to live of a key that has an expire set, with the sole difference that TTL returns the amount of remaining time in seconds while PTTL returns it in milliseconds.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1615","def":{"name":"pttl","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"PTTL\", namespaced(key)])"}},{"id":"publish(channel,message)-instance-method","html_id":"publish(channel,message)-instance-method","name":"publish","doc":"Posts a message to the given channel.\n\n**Return value**: Integer, the number of clients that received the message.\n\nExample:\n\n```\nredis.publish(\"mychannel\", \"some message\")\n```","summary":"

    Posts a message to the given channel.

    ","abstract":false,"args":[{"name":"channel","doc":null,"default_value":"","external_name":"channel","restriction":""},{"name":"message","doc":null,"default_value":"","external_name":"message","restriction":""}],"args_string":"(channel, message)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1753","def":{"name":"publish","args":[{"name":"channel","doc":null,"default_value":"","external_name":"channel","restriction":""},{"name":"message","doc":null,"default_value":"","external_name":"message","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"PUBLISH\", channel.to_s, message.to_s])"}},{"id":"punsubscribe(*channel_patterns)-instance-method","html_id":"punsubscribe(*channel_patterns)-instance-method","name":"punsubscribe","doc":"Unsubscribes the client from the given patterns, or from all of them if none is given.","summary":"

    Unsubscribes the client from the given patterns, or from all of them if none is given.

    ","abstract":false,"args":[{"name":"channel_patterns","doc":null,"default_value":"","external_name":"channel_patterns","restriction":""}],"args_string":"(*channel_patterns)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1740","def":{"name":"punsubscribe","args":[{"name":"channel_patterns","doc":null,"default_value":"","external_name":"channel_patterns","restriction":""}],"double_splat":null,"splat_index":0,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"punsubscribe(channel_patterns.to_a)"}},{"id":"punsubscribe(channel_patterns:Array(String))-instance-method","html_id":"punsubscribe(channel_patterns:Array(String))-instance-method","name":"punsubscribe","doc":"Unsubscribes the client from the given patterns, or from all of them if none is given.","summary":"

    Unsubscribes the client from the given patterns, or from all of them if none is given.

    ","abstract":false,"args":[{"name":"channel_patterns","doc":null,"default_value":"","external_name":"channel_patterns","restriction":"Array(String)"}],"args_string":"(channel_patterns : Array(String))","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1735","def":{"name":"punsubscribe","args":[{"name":"channel_patterns","doc":null,"default_value":"","external_name":"channel_patterns","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"void_command(concat([\"PUNSUBSCRIBE\"], channel_patterns))"}},{"id":"quit-instance-method","html_id":"quit-instance-method","name":"quit","doc":"Ask the server to close the connection. The connection is closed as soon as all pending replies have been written to the client.\n\n**Return value**: \"OK\"","summary":"

    Ask the server to close the connection.

    ","abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L73","def":{"name":"quit","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"QUIT\"])"}},{"id":"randomkey-instance-method","html_id":"randomkey-instance-method","name":"randomkey","doc":"Return a random key from the currently selected database.","summary":"

    Return a random key from the currently selected database.

    ","abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L549","def":{"name":"randomkey","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"RANDOMKEY\"])"}},{"id":"rename(old_key,new_key)-instance-method","html_id":"rename(old_key,new_key)-instance-method","name":"rename","doc":"Renames old_key to newkey.\n\n**Return value**: \"OK\"\n\nExample:\n\n```\nredis.rename(\"old_name\", \"new_name\")\n```","summary":"

    Renames old_key to newkey.

    ","abstract":false,"args":[{"name":"old_key","doc":null,"default_value":"","external_name":"old_key","restriction":""},{"name":"new_key","doc":null,"default_value":"","external_name":"new_key","restriction":""}],"args_string":"(old_key, new_key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L116","def":{"name":"rename","args":[{"name":"old_key","doc":null,"default_value":"","external_name":"old_key","restriction":""},{"name":"new_key","doc":null,"default_value":"","external_name":"new_key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"RENAME\", namespaced(old_key), namespaced(new_key)])"}},{"id":"renamenx(old_key,new_key)-instance-method","html_id":"renamenx(old_key,new_key)-instance-method","name":"renamenx","doc":"Renames old_key to newkey if newkey does not yet exist.\n\n**Return value**: \"OK\"\n\nExample:\n\n```\nredis.renamenx(\"old_name\", \"new_name\")\n```","summary":"

    Renames old_key to newkey if newkey does not yet exist.

    ","abstract":false,"args":[{"name":"old_key","doc":null,"default_value":"","external_name":"old_key","restriction":""},{"name":"new_key","doc":null,"default_value":"","external_name":"new_key","restriction":""}],"args_string":"(old_key, new_key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L129","def":{"name":"renamenx","args":[{"name":"old_key","doc":null,"default_value":"","external_name":"old_key","restriction":""},{"name":"new_key","doc":null,"default_value":"","external_name":"new_key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"RENAMENX\", namespaced(old_key), namespaced(new_key)])"}},{"id":"restore(key,ttl_in_milis:Int,serialized_value:String,replace=false)-instance-method","html_id":"restore(key,ttl_in_milis:Int,serialized_value:String,replace=false)-instance-method","name":"restore","doc":"Create a key associated with a value that is obtained by deserializing the provided serialized value (obtained via DUMP).\n\n**Return value**: The command returns \"OK\" on success.","summary":"

    Create a key associated with a value that is obtained by deserializing the provided serialized value (obtained via DUMP).

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"ttl_in_milis","doc":null,"default_value":"","external_name":"ttl_in_milis","restriction":"Int"},{"name":"serialized_value","doc":null,"default_value":"","external_name":"serialized_value","restriction":"String"},{"name":"replace","doc":null,"default_value":"false","external_name":"replace","restriction":""}],"args_string":"(key, ttl_in_milis : Int, serialized_value : String, replace = false)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L513","def":{"name":"restore","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"ttl_in_milis","doc":null,"default_value":"","external_name":"ttl_in_milis","restriction":"Int"},{"name":"serialized_value","doc":null,"default_value":"","external_name":"serialized_value","restriction":"String"},{"name":"replace","doc":null,"default_value":"false","external_name":"replace","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"RESTORE\", namespaced(key), ttl_in_milis.to_s, serialized_value]\nif replace\n q << \"REPLACE\"\nend\nstring_command(q)\n"}},{"id":"rpop(key)-instance-method","html_id":"rpop(key)-instance-method","name":"rpop","doc":"Removes and returns the last element of the list stored at key.\n\n**Return value**: \"OK\"","summary":"

    Removes and returns the last element of the list stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L669","def":{"name":"rpop","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_or_nil_command([\"RPOP\", namespaced(key)])"}},{"id":"rpoplpush(source,destination)-instance-method","html_id":"rpoplpush(source,destination)-instance-method","name":"rpoplpush","doc":"Atomically returns and removes the last element (tail) of the list stored at source,\nand pushes the element at the first element (head) of the list stored at destination.\n\n**Return value**: String, the element being popped and pushed.","summary":"

    Atomically returns and removes the last element (tail) of the list stored at source, and pushes the element at the first element (head) of the list stored at destination.

    ","abstract":false,"args":[{"name":"source","doc":null,"default_value":"","external_name":"source","restriction":""},{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""}],"args_string":"(source, destination)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L954","def":{"name":"rpoplpush","args":[{"name":"source","doc":null,"default_value":"","external_name":"source","restriction":""},{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_or_nil_command([\"RPOPLPUSH\", namespaced(source), namespaced(destination)])"}},{"id":"rpush(key,*values:String)-instance-method","html_id":"rpush(key,*values:String)-instance-method","name":"rpush","doc":"Insert all the specified values at the tail of the list stored at key.\n\n**Return value**: Integer, the length of the list after the push operation.\n\nExample:\n\n```\nredis.rpush(\"mylist\", \"1\", \"2\", \"3\")\n```","summary":"

    Insert all the specified values at the tail of the list stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"String"}],"args_string":"(key, *values : String)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L589","def":{"name":"rpush","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"String"}],"double_splat":null,"splat_index":1,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"rpush(key, values.to_a)"}},{"id":"rpush(key,values:Array(RedisValue))-instance-method","html_id":"rpush(key,values:Array(RedisValue))-instance-method","name":"rpush","doc":"Insert all the specified values at the tail of the list stored at key.\n\n**Return value**: Integer, the length of the list after the push operation.\n\nExample:\n\n```\nredis.rpush(\"mylist\", \"1\", \"2\", \"3\")\n```","summary":"

    Insert all the specified values at the tail of the list stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"Array(RedisValue)"}],"args_string":"(key, values : Array(RedisValue))","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L584","def":{"name":"rpush","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"Array(RedisValue)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command(concat([\"RPUSH\", namespaced(key)], values))"}},{"id":"rpushx(key,value)-instance-method","html_id":"rpushx(key,value)-instance-method","name":"rpushx","doc":"Inserts value at the tail of the list stored at key, only if key already exists and holds a list.\n\n**Return value**: Integer, the length of the list after the push operation.","summary":"

    Inserts value at the tail of the list stored at key, only if key already exists and holds a list.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L615","def":{"name":"rpushx","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"RPUSHX\", namespaced(key), value.to_s])"}},{"id":"sadd(key,*values)-instance-method","html_id":"sadd(key,*values)-instance-method","name":"sadd","doc":"Add the specified members to the set stored at key.\n\n**Return value**: Integer, the number of elements that were added to the set, not including all the elements already present into the set.","summary":"

    Add the specified members to the set stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":""}],"args_string":"(key, *values)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L707","def":{"name":"sadd","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":""}],"double_splat":null,"splat_index":1,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"sadd(key, values.to_a)"}},{"id":"sadd(key,values:Array(RedisValue))-instance-method","html_id":"sadd(key,values:Array(RedisValue))-instance-method","name":"sadd","doc":null,"summary":null,"abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"Array(RedisValue)"}],"args_string":"(key, values : Array(RedisValue))","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L711","def":{"name":"sadd","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"Array(RedisValue)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command(concat([\"SADD\", namespaced(key)], values))"}},{"id":"scan(cursor,match=nil,count=nil)-instance-method","html_id":"scan(cursor,match=nil,count=nil)-instance-method","name":"scan","doc":"The SCAN command and the closely related commands SSCAN, HSCAN and ZSCAN are used in order to incrementally iterate over a collection of elements.\n\n**Options**:\n\n* match - It is possible to only iterate elements matching a given glob-style pattern, similarly to the behavior of the KEYS command that takes a pattern as only argument.\n* count - While SCAN does not provide guarantees about the number of elements returned at every iteration, it is possible to empirically adjust the behavior of SCAN using the COUNT option.\n\n**Return value**: Array of String, a list of keys.\n\nExample:\n\n```\nredis.scan(0)\nredis.scan(0, \"foo*\")\nredis.scan(0, \"foo*\", 1024)\n```","summary":"

    The SCAN command and the closely related commands SSCAN, HSCAN and ZSCAN are used in order to incrementally iterate over a collection of elements.

    ","abstract":false,"args":[{"name":"cursor","doc":null,"default_value":"","external_name":"cursor","restriction":""},{"name":"match","doc":null,"default_value":"nil","external_name":"match","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""}],"args_string":"(cursor, match = nil, count = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L537","def":{"name":"scan","args":[{"name":"cursor","doc":null,"default_value":"","external_name":"cursor","restriction":""},{"name":"match","doc":null,"default_value":"nil","external_name":"match","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"SCAN\", cursor.to_s]\nif match\n (q << \"MATCH\") << (namespaced(match))\nend\nif count\n (q << \"COUNT\") << count.to_s\nend\nresult = string_array_command(q)\nresult[1] = array_without_namespace(result[1])\nresult\n"}},{"id":"scard(key)-instance-method","html_id":"scard(key)-instance-method","name":"scard","doc":"Returns the set cardinality (number of elements) of the set stored at key.","summary":"

    Returns the set cardinality (number of elements) of the set stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L749","def":{"name":"scard","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"SCARD\", namespaced(key)])"}},{"id":"script_exists(sha1_array:Array(Reference))-instance-method","html_id":"script_exists(sha1_array:Array(Reference))-instance-method","name":"script_exists","doc":"Returns information about the existence of the scripts in the script cache.\n\n**Return value**: The command returns an array of integers that correspond\nto the specified SHA1 digest arguments.\nFor every corresponding SHA1 digest of a script that actually exists\nin the script cache, an 1 is returned, otherwise 0 is returned.","summary":"

    Returns information about the existence of the scripts in the script cache.

    ","abstract":false,"args":[{"name":"sha1_array","doc":null,"default_value":"","external_name":"sha1_array","restriction":"Array(Reference)"}],"args_string":"(sha1_array : Array(Reference))","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1520","def":{"name":"script_exists","args":[{"name":"sha1_array","doc":null,"default_value":"","external_name":"sha1_array","restriction":"Array(Reference)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_array_command(concat([\"SCRIPT\", \"EXISTS\"], sha1_array))"}},{"id":"script_flush-instance-method","html_id":"script_flush-instance-method","name":"script_flush","doc":"Flush the Lua scripts cache.\n\n**Return value**: \"OK\"","summary":"

    Flush the Lua scripts cache.

    ","abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1541","def":{"name":"script_flush","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"SCRIPT\", \"FLUSH\"])"}},{"id":"script_kill-instance-method","html_id":"script_kill-instance-method","name":"script_kill","doc":"Kills the currently executing Lua script, assuming no write operation was\nyet performed by the script.\n\n**Return value**: \"OK\"","summary":"

    Kills the currently executing Lua script, assuming no write operation was yet performed by the script.

    ","abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1510","def":{"name":"script_kill","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"SCRIPT\", \"KILL\"])"}},{"id":"script_load(script:String)-instance-method","html_id":"script_load(script:String)-instance-method","name":"script_load","doc":"Load a script into the scripts cache, without executing it.\n\n**Return value**: String, the SHA1 digest of the script\nadded into the script cache.\n\nExample:\n\n```\nredis.script_load(\"return {KEYS[1],ARGV[1]}\") # => \"a191862bfe0bd3bec995befcd060582bf4bdbd77\"\n```","summary":"

    Load a script into the scripts cache, without executing it.

    ","abstract":false,"args":[{"name":"script","doc":null,"default_value":"","external_name":"script","restriction":"String"}],"args_string":"(script : String)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1502","def":{"name":"script_load","args":[{"name":"script","doc":null,"default_value":"","external_name":"script","restriction":"String"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"SCRIPT\", \"LOAD\", script])"}},{"id":"sdiff(keys:Array(String)):Array(RedisValue)-instance-method","html_id":"sdiff(keys:Array(String)):Array(RedisValue)-instance-method","name":"sdiff","doc":"Returns the members of the set resulting from the difference between the first set and all the successive sets.\n\n**Return value**: Array(String), a list with members of the resulting set.","summary":"

    Returns the members of the set resulting from the difference between the first set and all the successive sets.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"args_string":"(keys : Array(String)) : Array(RedisValue)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L756","def":{"name":"sdiff","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Array(RedisValue)","visibility":"Public","body":"string_array_command(concat([\"SDIFF\"], namespaced(keys)))"}},{"id":"sdiff(*keys:String):Array(RedisValue)-instance-method","html_id":"sdiff(*keys:String):Array(RedisValue)-instance-method","name":"sdiff","doc":null,"summary":null,"abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"args_string":"(*keys : String) : Array(RedisValue)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L760","def":{"name":"sdiff","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"double_splat":null,"splat_index":0,"yields":null,"block_arg":null,"return_type":"Array(RedisValue)","visibility":"Public","body":"sdiff(keys.to_a)"}},{"id":"sdiffstore(destination,*keys:String):Int64-instance-method","html_id":"sdiffstore(destination,*keys:String):Int64-instance-method","name":"sdiffstore","doc":"This command is equal to SDIFF, but instead of returning the resulting set, it is stored in destination.\n\n**Return value**: Integer, the number of elements in the resulting set.","summary":"

    This command is equal to SDIFF, but instead of returning the resulting set, it is stored in destination.

    ","abstract":false,"args":[{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"args_string":"(destination, *keys : String) : Int64","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L772","def":{"name":"sdiffstore","args":[{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"double_splat":null,"splat_index":1,"yields":null,"block_arg":null,"return_type":"Int64","visibility":"Public","body":"sdiffstore(destination, keys.to_a)"}},{"id":"sdiffstore(destination,keys:Array(String)):Int64-instance-method","html_id":"sdiffstore(destination,keys:Array(String)):Int64-instance-method","name":"sdiffstore","doc":"This command is equal to SDIFF, but instead of returning the resulting set, it is stored in destination.\n\n**Return value**: Integer, the number of elements in the resulting set.","summary":"

    This command is equal to SDIFF, but instead of returning the resulting set, it is stored in destination.

    ","abstract":false,"args":[{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"args_string":"(destination, keys : Array(String)) : Int64","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L767","def":{"name":"sdiffstore","args":[{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Int64","visibility":"Public","body":"integer_command(concat([\"SDIFFSTORE\", namespaced(destination)], namespaced(keys)))"}},{"id":"select(database_number)-instance-method","html_id":"select(database_number)-instance-method","name":"select","doc":"Select the DB with having the specified zero-based numeric index.\n\n**Return value**: \"OK\"","summary":"

    Select the DB with having the specified zero-based numeric index.

    ","abstract":false,"args":[{"name":"database_number","doc":null,"default_value":"","external_name":"database_number","restriction":""}],"args_string":"(database_number)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L94","def":{"name":"select","args":[{"name":"database_number","doc":null,"default_value":"","external_name":"database_number","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"if !database_number\n raise(Redis::Error.new(\"ERR database number could not be Nil\"))\nend\nif database_number == @database\n return \"OK\"\nend\nres = string_command([\"SELECT\", database_number.to_s])\n@database = database_number\nres\n"}},{"id":"set(key,value,ex=nil,px=nil,nx=nil,xx=nil)-instance-method","html_id":"set(key,value,ex=nil,px=nil,nx=nil,xx=nil)-instance-method","name":"set","doc":"Set key to hold the string value. If key already holds a value, it is overwritten, regardless of its type. Any previous time to live associated with the key is discarded on successful SET operation.\n\n**Options**:\n\n* Starting with Redis 2.6.12 SET supports a set of options that modify its behavior:\n* ex -- Set the specified expire time, in seconds.\n* px -- Set the specified expire time, in milliseconds.\n* nx -- Only set the key if it does not already exist.\n* xx -- Only set the key if it already exist.\n\n**Return value**:\n* OK if SET was executed correctly.\n* Null reply: nil is returned if the SET operation was not performed because the user specified the NX or XX option but the condition was not met.\n\nExample:\n\n```\nredis.set(\"foo\", \"test\")\nredis.set(\"bar\", \"test\", ex: 7)\n```","summary":"

    Set key to hold the string value.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""},{"name":"ex","doc":null,"default_value":"nil","external_name":"ex","restriction":""},{"name":"px","doc":null,"default_value":"nil","external_name":"px","restriction":""},{"name":"nx","doc":null,"default_value":"nil","external_name":"nx","restriction":""},{"name":"xx","doc":null,"default_value":"nil","external_name":"xx","restriction":""}],"args_string":"(key, value, ex = nil, px = nil, nx = nil, xx = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L47","def":{"name":"set","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""},{"name":"ex","doc":null,"default_value":"nil","external_name":"ex","restriction":""},{"name":"px","doc":null,"default_value":"nil","external_name":"px","restriction":""},{"name":"nx","doc":null,"default_value":"nil","external_name":"nx","restriction":""},{"name":"xx","doc":null,"default_value":"nil","external_name":"xx","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"SET\", namespaced(key), value.to_s]\nif ex\n (q << \"EX\") << ex.to_s\nend\nif px\n (q << \"PX\") << px.to_s\nend\nif nx\n q << \"NX\"\nend\nif xx\n q << \"XX\"\nend\nstring_or_nil_command(q)\n"}},{"id":"setbit(key,index,value)-instance-method","html_id":"setbit(key,index,value)-instance-method","name":"setbit","doc":"Sets or clears the bit at offset in the string value stored at key.\n\n**Return value**: Integer: the original bit value stored at offset.\n\nExample:\n\n```\nredis.setbit(\"mykey\", 7, 1)\n```","summary":"

    Sets or clears the bit at offset in the string value stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"index","doc":null,"default_value":"","external_name":"index","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, index, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L474","def":{"name":"setbit","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"index","doc":null,"default_value":"","external_name":"index","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"SETBIT\", namespaced(key), index.to_s, value.to_s])"}},{"id":"setex(key,expire_in_seconds,value)-instance-method","html_id":"setex(key,expire_in_seconds,value)-instance-method","name":"setex","doc":"Set key to hold the string value and set key to timeout after a given number of seconds.\n\n**Return value**: \"OK\"\n\nExample:\n\n```\nredis.setex(\"foo\", 3, \"bar\")\n```","summary":"

    Set key to hold the string value and set key to timeout after a given number of seconds.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"expire_in_seconds","doc":null,"default_value":"","external_name":"expire_in_seconds","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, expire_in_seconds, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L273","def":{"name":"setex","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"expire_in_seconds","doc":null,"default_value":"","external_name":"expire_in_seconds","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"SETEX\", namespaced(key), expire_in_seconds.to_s, value.to_s])"}},{"id":"setnx(key,value)-instance-method","html_id":"setnx(key,value)-instance-method","name":"setnx","doc":"Set key to hold string value if key does not exist.\n\n**Return value**: Integer, specifically:\n* 1 if the key was set\n* 0 if the key was not set","summary":"

    Set key to hold string value if key does not exist.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L289","def":{"name":"setnx","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"SETNX\", namespaced(key), value.to_s])"}},{"id":"setrange(key,start_index,value)-instance-method","html_id":"setrange(key,start_index,value)-instance-method","name":"setrange","doc":"Overwrites part of the string stored at key, starting at the specified offset, for the entire length of value.\n\n**Return value**: Integer, the length of the string after it was modified by the command.\n\nExample:\n\n```\nredis.setrange(\"foo\", 6, \"Redis\")\n```","summary":"

    Overwrites part of the string stored at key, starting at the specified offset, for the entire length of value.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start_index","doc":null,"default_value":"","external_name":"start_index","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, start_index, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L409","def":{"name":"setrange","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start_index","doc":null,"default_value":"","external_name":"start_index","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"SETRANGE\", namespaced(key), start_index.to_s, value.to_s])"}},{"id":"sinter(keys:Array(String)):Array(RedisValue)-instance-method","html_id":"sinter(keys:Array(String)):Array(RedisValue)-instance-method","name":"sinter","doc":"Returns the members of the set resulting from the intersection of all the given sets.\n\n**Return value**: Array(String), an array with members of the resulting set.","summary":"

    Returns the members of the set resulting from the intersection of all the given sets.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"args_string":"(keys : Array(String)) : Array(RedisValue)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L779","def":{"name":"sinter","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Array(RedisValue)","visibility":"Public","body":"string_array_command(concat([\"SINTER\"], namespaced(keys)))"}},{"id":"sinter(*keys:String):Array(RedisValue)-instance-method","html_id":"sinter(*keys:String):Array(RedisValue)-instance-method","name":"sinter","doc":"Returns the members of the set resulting from the intersection of all the given sets.\n\n**Return value**: Array(String), an array with members of the resulting set.","summary":"

    Returns the members of the set resulting from the intersection of all the given sets.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"args_string":"(*keys : String) : Array(RedisValue)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L784","def":{"name":"sinter","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"double_splat":null,"splat_index":0,"yields":null,"block_arg":null,"return_type":"Array(RedisValue)","visibility":"Public","body":"sinter(keys.to_a)"}},{"id":"sinterstore(destination_key,*keys:String):Int64-instance-method","html_id":"sinterstore(destination_key,*keys:String):Int64-instance-method","name":"sinterstore","doc":"This command is equal to SINTER, but instead of returning the resulting set, it is stored in destination.\n\n**Return value**: Integer, the number of elements in the resulting set.\n\nExample:\n\n```\nredis.sinterstore(\"destination\", \"key1\", \"key2\")\n```","summary":"

    This command is equal to SINTER, but instead of returning the resulting set, it is stored in destination.

    ","abstract":false,"args":[{"name":"destination_key","doc":null,"default_value":"","external_name":"destination_key","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"args_string":"(destination_key, *keys : String) : Int64","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L802","def":{"name":"sinterstore","args":[{"name":"destination_key","doc":null,"default_value":"","external_name":"destination_key","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"double_splat":null,"splat_index":1,"yields":null,"block_arg":null,"return_type":"Int64","visibility":"Public","body":"sinterstore(destination_key, keys.to_a)"}},{"id":"sinterstore(destination_key,keys:Array(String)):Int64-instance-method","html_id":"sinterstore(destination_key,keys:Array(String)):Int64-instance-method","name":"sinterstore","doc":"This command is equal to SINTER, but instead of returning the resulting set, it is stored in destination.\n\n**Return value**: Integer, the number of elements in the resulting set.\n\nExample:\n\n```\nredis.sinterstore(\"destination\", \"key1\", \"key2\")\n```","summary":"

    This command is equal to SINTER, but instead of returning the resulting set, it is stored in destination.

    ","abstract":false,"args":[{"name":"destination_key","doc":null,"default_value":"","external_name":"destination_key","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"args_string":"(destination_key, keys : Array(String)) : Int64","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L797","def":{"name":"sinterstore","args":[{"name":"destination_key","doc":null,"default_value":"","external_name":"destination_key","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Int64","visibility":"Public","body":"integer_command(concat([\"SINTERSTORE\", namespaced(destination_key)], namespaced(keys)))"}},{"id":"sismember(key,value)-instance-method","html_id":"sismember(key,value)-instance-method","name":"sismember","doc":"Returns if member is a member of the set stored at key.\n\n**Return value**: Integer, specifically:\n* 1 if the element is a member of the set.\n* 0 if the element is not a member of the set, or if key does not exist.","summary":"

    Returns if member is a member of the set stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L727","def":{"name":"sismember","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"SISMEMBER\", namespaced(key), value.to_s])"}},{"id":"smembers(key)-instance-method","html_id":"smembers(key)-instance-method","name":"smembers","doc":"Returns all the members of the set value stored at key.\n\n**Return value**: Array(String), all elements of the set.","summary":"

    Returns all the members of the set value stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L718","def":{"name":"smembers","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_array_command([\"SMEMBERS\", namespaced(key)])"}},{"id":"smove(source,destination,member)-instance-method","html_id":"smove(source,destination,member)-instance-method","name":"smove","doc":"Move member from the set at source to the set at destination.\n\n**Return value**: Integer, specifically:\n* 1 if the element is moved.\n* 0 if the element is not a member of source and no operation was performed.","summary":"

    Move member from the set at source to the set at destination.

    ","abstract":false,"args":[{"name":"source","doc":null,"default_value":"","external_name":"source","restriction":""},{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""}],"args_string":"(source, destination, member)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L811","def":{"name":"smove","args":[{"name":"source","doc":null,"default_value":"","external_name":"source","restriction":""},{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"SMOVE\", namespaced(source), namespaced(destination), member.to_s])"}},{"id":"sort(key,by=nil,limit=nil,get:Array(RedisValue)?=nil,order="ASC",alpha=false,store=nil)-instance-method","html_id":"sort(key,by=nil,limit=nil,get:Array(RedisValue)?=nil,order=&quot;ASC&quot;,alpha=false,store=nil)-instance-method","name":"sort","doc":"Returns or stores the elements contained in the list, set or sorted set at key.\n\n**Options**:\n\n* by - pattern for sorting by external keys\n* limit - Array of 2 strings [offset, count]\n* get - pattern for retrieving external keys\n* order - either 'ASC' or 'DESC'\n* alpha - true to sort lexicographically\n* store - key of destination list to store the result in\n\n**Return value**: Array(String), the list of sorted elements.\n\nExample:\n\n```\nredis.sort(\"mylist\") # => [...]\nredis.sort(\"mylist\", order: \"DESC\") # => [...]\n```","summary":"

    Returns or stores the elements contained in the list, set or sorted set at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"by","doc":null,"default_value":"nil","external_name":"by","restriction":""},{"name":"limit","doc":null,"default_value":"nil","external_name":"limit","restriction":""},{"name":"get","doc":null,"default_value":"nil","external_name":"get","restriction":"Array(RedisValue) | ::Nil"},{"name":"order","doc":null,"default_value":"\"ASC\"","external_name":"order","restriction":""},{"name":"alpha","doc":null,"default_value":"false","external_name":"alpha","restriction":""},{"name":"store","doc":null,"default_value":"nil","external_name":"store","restriction":""}],"args_string":"(key, by = nil, limit = nil, get : Array(RedisValue)? = nil, order = "ASC", alpha = false, store = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L178","def":{"name":"sort","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"by","doc":null,"default_value":"nil","external_name":"by","restriction":""},{"name":"limit","doc":null,"default_value":"nil","external_name":"limit","restriction":""},{"name":"get","doc":null,"default_value":"nil","external_name":"get","restriction":"Array(RedisValue) | ::Nil"},{"name":"order","doc":null,"default_value":"\"ASC\"","external_name":"order","restriction":""},{"name":"alpha","doc":null,"default_value":"false","external_name":"alpha","restriction":""},{"name":"store","doc":null,"default_value":"nil","external_name":"store","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"SORT\", namespaced(key)]\nif by\n (q << \"BY\") << by.to_s\nend\nif limit\n if limit.size != 2\n raise(Error.new(\"limit must be an array of 2 elements (offset, count)\"))\n end\n offset, count = limit\n ((q << \"LIMIT\") << offset.to_s) << count.to_s\nend\nif get\n get.each do |pattern|\n (q << \"GET\") << pattern\n end\nend\nif order\n _order = order.upcase\n if [\"ASC\", \"DESC\"].includes?(_order)\n else\n raise(Error.new(\"Bad order #{order}\"))\n end\n q << _order\nend\nif alpha\n q << \"ALPHA\"\nend\nif store\n (q << \"STORE\") << (namespaced(store))\nend\nstring_array_or_integer_command(q)\n"}},{"id":"spop(key,count=nil)-instance-method","html_id":"spop(key,count=nil)-instance-method","name":"spop","doc":"Removes and returns one or more random elements from the set value store at key.\n\nThe count argument will be available in a later Redis version and is not available in 2.6, 2.8, 3.0\n\n**Return value**: The removed element, or nil when key does not exist.","summary":"

    Removes and returns one or more random elements from the set value store at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""}],"args_string":"(key, count = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L820","def":{"name":"spop","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"SPOP\", namespaced(key)]\nif count\n q << count.to_s\nend\nstring_array_or_string_or_nil_command(q)\n"}},{"id":"srandmember(key,count=nil)-instance-method","html_id":"srandmember(key,count=nil)-instance-method","name":"srandmember","doc":"When called with just the key argument, return a random element from the set value stored at key.\n\n**Options**:\n\n* count - Starting from Redis version 2.6, when called with the additional count argument, return an array of count distinct elements if count is positive. If called with a negative count the behavior changes and the command is allowed to return the same element multiple times.\n\n**Return value**:\n* String: without the additional count argument the command returns a Bulk Reply with the randomly selected element, or nil when key does not exist.\n* Array: when the additional count argument is passed the command returns an array of elements, or an empty array when key does not exist.","summary":"

    When called with just the key argument, return a random element from the set value stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""}],"args_string":"(key, count = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L838","def":{"name":"srandmember","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"SRANDMEMBER\", namespaced(key)]\nif count\n q << count.to_s\nend\nstring_array_or_string_or_nil_command(q)\n"}},{"id":"srem(key,*values)-instance-method","html_id":"srem(key,*values)-instance-method","name":"srem","doc":"Remove the specified members from the set stored at key.\n\n**Return value**: Integer, The number of members that were removed from the set, not including non existing members.\n\nExample:\n\n```\nredis.srem(\"myset\", \"Hello\")\n```","summary":"

    Remove the specified members from the set stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":""}],"args_string":"(key, *values)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L740","def":{"name":"srem","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":""}],"double_splat":null,"splat_index":1,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"srem(key, values.to_a)"}},{"id":"srem(key,values:Array(RedisValue))-instance-method","html_id":"srem(key,values:Array(RedisValue))-instance-method","name":"srem","doc":null,"summary":null,"abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"Array(RedisValue)"}],"args_string":"(key, values : Array(RedisValue))","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L744","def":{"name":"srem","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"Array(RedisValue)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command(concat([\"SREM\", namespaced(key)], values))"}},{"id":"sscan(key,cursor,match=nil,count=nil)-instance-method","html_id":"sscan(key,cursor,match=nil,count=nil)-instance-method","name":"sscan","doc":"The SCAN command and the closely related commands SSCAN, HSCAN and ZSCAN are used in order to incrementally iterate over a collection of elements.\n\n**Options**:\n\n* match - It is possible to only iterate elements matching a given glob-style pattern, similarly to the behavior of the KEYS command that takes a pattern as only argument.\n* count - While SCAN does not provide guarantees about the number of elements returned at every iteration, it is possible to empirically adjust the behavior of SCAN using the COUNT option.\n\n**Return value**: Array(String), a list of Set members.\n\nExample:\n\n```\nredis.sscan(\"myset\", 0)\nredis.sscan(\"myset\", 0, \"foo*\")\nredis.sscan(\"myset\", 0, \"foo*\", 1024)\n```","summary":"

    The SCAN command and the closely related commands SSCAN, HSCAN and ZSCAN are used in order to incrementally iterate over a collection of elements.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"cursor","doc":null,"default_value":"","external_name":"cursor","restriction":""},{"name":"match","doc":null,"default_value":"nil","external_name":"match","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""}],"args_string":"(key, cursor, match = nil, count = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L862","def":{"name":"sscan","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"cursor","doc":null,"default_value":"","external_name":"cursor","restriction":""},{"name":"match","doc":null,"default_value":"nil","external_name":"match","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"SSCAN\", namespaced(key), cursor.to_s]\nif match\n (q << \"MATCH\") << match.to_s\nend\nif count\n (q << \"COUNT\") << count.to_s\nend\nstring_array_command(q)\n"}},{"id":"strlen(key)-instance-method","html_id":"strlen(key)-instance-method","name":"strlen","doc":"Returns the length of the string value stored at key.\n\n**Return value**: Integer, the length of the string at key, or 0 when key does not exist.","summary":"

    Returns the length of the string value stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L382","def":{"name":"strlen","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"STRLEN\", namespaced(key)])"}},{"id":"subscribe(*channels:String)-instance-method","html_id":"subscribe(*channels:String)-instance-method","name":"subscribe","doc":"Subscribes to more channels while already being in a subscription loop.","summary":"

    Subscribes to more channels while already being in a subscription loop.

    ","abstract":false,"args":[{"name":"channels","doc":null,"default_value":"","external_name":"channels","restriction":"String"}],"args_string":"(*channels : String)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1681","def":{"name":"subscribe","args":[{"name":"channels","doc":null,"default_value":"","external_name":"channels","restriction":"String"}],"double_splat":null,"splat_index":0,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"subscribe(channels.to_a)"}},{"id":"subscribe(*channels,&callback_setup_block:Subscription->)-instance-method","html_id":"subscribe(*channels,&callback_setup_block:Subscription->)-instance-method","name":"subscribe","doc":"Subscribes to channels and enters a subscription loop, waiting for events.\n\nThe method yields to the given block and passes a Subscription object, on\nwhich you can set your callbacks for the event subscription.\n\nThe subscription loop will end once you unsubscribe.\n\nSee also: `Subscription` class\nSee also: Example `subscribe.cr`\n\nExample:\n\n```\nredis.subscribe(\"mychannel\") do |on|\n on.message do |channel, message|\n puts \"Received message: #{message}\"\n if message == \"goodbye pal\"\n redis.unsubscribe\n end\n end\nend\n```","summary":"

    Subscribes to channels and enters a subscription loop, waiting for events.

    ","abstract":false,"args":[{"name":"channels","doc":null,"default_value":"","external_name":"channels","restriction":""}],"args_string":"(*channels, &callback_setup_block : Subscription -> )","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1655","def":{"name":"subscribe","args":[{"name":"channels","doc":null,"default_value":"","external_name":"channels","restriction":""}],"double_splat":null,"splat_index":0,"yields":1,"block_arg":{"name":"callback_setup_block","doc":null,"default_value":"","external_name":"callback_setup_block","restriction":"(Subscription -> )"},"return_type":"","visibility":"Public","body":"if already_in_subscription_loop?\n raise(Redis::Error.new(\"Must call subscribe without a subscription block when already inside a subscription loop\"))\nend\nsubscription = Subscription.new\ncallback_setup_block.call(subscription)\n@strategy = Redis::Strategy::SubscriptionLoop.new(connection, subscription)\nsubscribe(*channels)\n"}},{"id":"subscribe(channels:Array(String)):Void-instance-method","html_id":"subscribe(channels:Array(String)):Void-instance-method","name":"subscribe","doc":"Subscribes to more channels while already being in a subscription loop.","summary":"

    Subscribes to more channels while already being in a subscription loop.

    ","abstract":false,"args":[{"name":"channels","doc":null,"default_value":"","external_name":"channels","restriction":"Array(String)"}],"args_string":"(channels : Array(String)) : Void","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1671","def":{"name":"subscribe","args":[{"name":"channels","doc":null,"default_value":"","external_name":"channels","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Void","visibility":"Public","body":"if already_in_subscription_loop?\nelse\n raise(Redis::Error.new(\"Must call subscribe with a subscription block\"))\nend\nvoid_command(concat([\"SUBSCRIBE\"], channels))\n"}},{"id":"sunion(*keys:String)-instance-method","html_id":"sunion(*keys:String)-instance-method","name":"sunion","doc":"Returns the members of the set resulting from the union of all the given sets.\n\n**Return value**: Array(String), with members of the resulting set.","summary":"

    Returns the members of the set resulting from the union of all the given sets.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"args_string":"(*keys : String)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L877","def":{"name":"sunion","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"double_splat":null,"splat_index":0,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"sunion(keys.to_a)"}},{"id":"sunion(keys:Array(String))-instance-method","html_id":"sunion(keys:Array(String))-instance-method","name":"sunion","doc":"Returns the members of the set resulting from the union of all the given sets.\n\n**Return value**: Array(String), with members of the resulting set.","summary":"

    Returns the members of the set resulting from the union of all the given sets.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"args_string":"(keys : Array(String))","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L872","def":{"name":"sunion","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_array_command(concat([\"SUNION\"], namespaced(keys)))"}},{"id":"sunionstore(destination,keys:Array(String)):Int64-instance-method","html_id":"sunionstore(destination,keys:Array(String)):Int64-instance-method","name":"sunionstore","doc":"This command is equal to SUNION, but instead of returning the resulting set, it is stored in destination.\n\n**Return value**: Integer, the number of elements in the resulting set.","summary":"

    This command is equal to SUNION, but instead of returning the resulting set, it is stored in destination.

    ","abstract":false,"args":[{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"args_string":"(destination, keys : Array(String)) : Int64","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L884","def":{"name":"sunionstore","args":[{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Int64","visibility":"Public","body":"integer_command(concat([\"SUNIONSTORE\", namespaced(destination)], namespaced(keys)))"}},{"id":"sunionstore(destination,*keys:String):Int64-instance-method","html_id":"sunionstore(destination,*keys:String):Int64-instance-method","name":"sunionstore","doc":"This command is equal to SUNION, but instead of returning the resulting set, it is stored in destination.\n\n**Return value**: Integer, the number of elements in the resulting set.","summary":"

    This command is equal to SUNION, but instead of returning the resulting set, it is stored in destination.

    ","abstract":false,"args":[{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"args_string":"(destination, *keys : String) : Int64","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L889","def":{"name":"sunionstore","args":[{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"double_splat":null,"splat_index":1,"yields":null,"block_arg":null,"return_type":"Int64","visibility":"Public","body":"sunionstore(destination, keys.to_a)"}},{"id":"ttl(key)-instance-method","html_id":"ttl(key)-instance-method","name":"ttl","doc":"Returns the remaining time to live of a key that has a timeout.\n\n**Return value**: Integer: TTL in seconds, or a negative value in order to\nsignal an error (see the description above).","summary":"

    Returns the remaining time to live of a key that has a timeout.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1606","def":{"name":"ttl","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"TTL\", namespaced(key)])"}},{"id":"type(key)-instance-method","html_id":"type(key)-instance-method","name":"type","doc":"Returns the string representation of the type of the value stored at key.\n\n**Return value**: String, the type of key, or none when key does not exist.\n\nExample:\n\n```\nredis.set(\"foo\", 3)\nredis.type(\"foo\") # => \"string\"\n```","summary":"

    Returns the string representation of the type of the value stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1629","def":{"name":"type","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"TYPE\", namespaced(key)])"}},{"id":"unsubscribe(*channels)-instance-method","html_id":"unsubscribe(*channels)-instance-method","name":"unsubscribe","doc":"Unsubscribes the client from the given channels, or from all of them if none is given.","summary":"

    Unsubscribes the client from the given channels, or from all of them if none is given.

    ","abstract":false,"args":[{"name":"channels","doc":null,"default_value":"","external_name":"channels","restriction":""}],"args_string":"(*channels)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1730","def":{"name":"unsubscribe","args":[{"name":"channels","doc":null,"default_value":"","external_name":"channels","restriction":""}],"double_splat":null,"splat_index":0,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"unsubscribe(channels.to_a)"}},{"id":"unsubscribe(channels:Array(String)):Nil-instance-method","html_id":"unsubscribe(channels:Array(String)):Nil-instance-method","name":"unsubscribe","doc":"Unsubscribes the client from the given channels, or from all of them if none is given.","summary":"

    Unsubscribes the client from the given channels, or from all of them if none is given.

    ","abstract":false,"args":[{"name":"channels","doc":null,"default_value":"","external_name":"channels","restriction":"Array(String)"}],"args_string":"(channels : Array(String)) : Nil","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1725","def":{"name":"unsubscribe","args":[{"name":"channels","doc":null,"default_value":"","external_name":"channels","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Nil","visibility":"Public","body":"void_command(concat([\"UNSUBSCRIBE\"], channels))"}},{"id":"unwatch-instance-method","html_id":"unwatch-instance-method","name":"unwatch","doc":"Flushes all the previously watched keys for a transaction.\n\n**Return value**: \"OK\"","summary":"

    Flushes all the previously watched keys for a transaction.

    ","abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1771","def":{"name":"unwatch","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"UNWATCH\"])"}},{"id":"watch(keys:Array(String))-instance-method","html_id":"watch(keys:Array(String))-instance-method","name":"watch","doc":"Marks the given keys to be watched for conditional execution of a transaction.\n\n**Return value**: \"OK\"","summary":"

    Marks the given keys to be watched for conditional execution of a transaction.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"args_string":"(keys : Array(String))","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1760","def":{"name":"watch","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command(concat([\"WATCH\"], namespaced(keys)))"}},{"id":"watch(*keys)-instance-method","html_id":"watch(*keys)-instance-method","name":"watch","doc":null,"summary":null,"abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":""}],"args_string":"(*keys)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1764","def":{"name":"watch","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":""}],"double_splat":null,"splat_index":0,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"watch(keys.to_a)"}},{"id":"zadd(key,scores_and_members:Array(RedisValue))-instance-method","html_id":"zadd(key,scores_and_members:Array(RedisValue))-instance-method","name":"zadd","doc":null,"summary":null,"abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"scores_and_members","doc":null,"default_value":"","external_name":"scores_and_members","restriction":"Array(RedisValue)"}],"args_string":"(key, scores_and_members : Array(RedisValue))","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1147","def":{"name":"zadd","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"scores_and_members","doc":null,"default_value":"","external_name":"scores_and_members","restriction":"Array(RedisValue)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"if (scores_and_members.size % 2) > 0\n raise(Error.new(\"zadd expects an array of scores mapped to members\"))\nend\ninteger_command(concat([\"ZADD\", namespaced(key)], scores_and_members))\n"}},{"id":"zadd(key,*scores_and_members)-instance-method","html_id":"zadd(key,*scores_and_members)-instance-method","name":"zadd","doc":"Adds all the specified members with the specified scores to the sorted set stored at key.\n\n**Return value**: Integer, the number of elements added to the sorted sets, not including elements already existing for which the score was updated.\n\nExample:\n\n```\nredis.zadd(\"myzset\", 1, \"one\")\nredis.zadd(\"myzset\", 2, \"two\", 3, \"three\")\n```","summary":"

    Adds all the specified members with the specified scores to the sorted set stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"scores_and_members","doc":null,"default_value":"","external_name":"scores_and_members","restriction":""}],"args_string":"(key, *scores_and_members)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1139","def":{"name":"zadd","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"scores_and_members","doc":null,"default_value":"","external_name":"scores_and_members","restriction":""}],"double_splat":null,"splat_index":1,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"if (scores_and_members.size % 2) > 0\n raise(Error.new(\"zadd expects an array of scores mapped to members\"))\nend\ninteger_command(concat([\"ZADD\", namespaced(key)], scores_and_members))\n"}},{"id":"zcard(key)-instance-method","html_id":"zcard(key)-instance-method","name":"zcard","doc":"Returns the sorted set cardinality (number of elements) of the sorted set stored at key.\n\n**Return value**: Integer, the cardinality (number of elements) of the sorted set, or 0 if key does not exist.","summary":"

    Returns the sorted set cardinality (number of elements) of the sorted set stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1179","def":{"name":"zcard","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"ZCARD\", namespaced(key)])"}},{"id":"zcount(key,min,max)-instance-method","html_id":"zcount(key,min,max)-instance-method","name":"zcount","doc":"Returns the number of elements in the sorted set at key with a score between min and max.\n\n**Return value**: Integer, the number of elements in the specified score range.","summary":"

    Returns the number of elements in the sorted set at key with a score between min and max.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""}],"args_string":"(key, min, max)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1193","def":{"name":"zcount","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"ZCOUNT\", namespaced(key), min.to_s, max.to_s])"}},{"id":"zincrby(key,increment,member)-instance-method","html_id":"zincrby(key,increment,member)-instance-method","name":"zincrby","doc":"Increments the score of member in the sorted set stored at key by increment.\n\n**Return value**: String, the new score of member (a double precision floating point number represented as String).","summary":"

    Increments the score of member in the sorted set stored at key by increment.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"increment","doc":null,"default_value":"","external_name":"increment","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""}],"args_string":"(key, increment, member)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1207","def":{"name":"zincrby","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"increment","doc":null,"default_value":"","external_name":"increment","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"ZINCRBY\", namespaced(key), increment.to_s, member.to_s])"}},{"id":"zinterstore(destination,keys:Array,weights=nil,aggregate=nil)-instance-method","html_id":"zinterstore(destination,keys:Array,weights=nil,aggregate=nil)-instance-method","name":"zinterstore","doc":"Computes the intersection of numkeys sorted sets given by the specified keys,\nand stores the result in destination.\n\n**Options**:\n\n* weights - nil or Array(String): Using the WEIGHTS option, it is possible to specify a multiplication factor for each input sorted set.\n* aggregate - With the AGGREGATE option, it is possible to specify how the results of the union are aggregated.\n\n**Return value**: Integer, the number of elements in the resulting sorted set at destination.\n\nExample:\n\n```\nredis.zinterstore(\"zset3\", [\"zset1\", \"zset2\"], weights: [2, 3])\n```","summary":"

    Computes the intersection of numkeys sorted sets given by the specified keys, and stores the result in destination.

    ","abstract":false,"args":[{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array"},{"name":"weights","doc":null,"default_value":"nil","external_name":"weights","restriction":""},{"name":"aggregate","doc":null,"default_value":"nil","external_name":"aggregate","restriction":""}],"args_string":"(destination, keys : Array, weights = nil, aggregate = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1252","def":{"name":"zinterstore","args":[{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array"},{"name":"weights","doc":null,"default_value":"nil","external_name":"weights","restriction":""},{"name":"aggregate","doc":null,"default_value":"nil","external_name":"aggregate","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"numkeys = keys.size\nq = concat([\"ZINTERSTORE\", namespaced(destination), numkeys.to_s], namespaced(keys))\nif weights\n q << \"WEIGHTS\"\n concat(q, weights)\nend\nif aggregate\n (q << \"AGGREGATE\") << aggregate.to_s\nend\ninteger_command(q)\n"}},{"id":"zlexcount(key,min,max)-instance-method","html_id":"zlexcount(key,min,max)-instance-method","name":"zlexcount","doc":"When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering, this command returns the number of elements in the sorted set at key with a value between min and max.\n\n**Return value**: Integer, the number of elements in the specified score range.","summary":"

    When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering, this command returns the number of elements in the sorted set at key with a value between min and max.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""}],"args_string":"(key, min, max)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1200","def":{"name":"zlexcount","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"ZLEXCOUNT\", namespaced(key), min.to_s, max.to_s])"}},{"id":"zrange(key,start,stop,with_scores=false)-instance-method","html_id":"zrange(key,start,stop,with_scores=false)-instance-method","name":"zrange","doc":"Returns the specified range of elements in the sorted set stored at key.\n\n**Options**:\n\n* with_scores - true to return the scores of the elements together with the elements.\n\n**Return value**: Array(String), list of elements in the specified range (optionally with their scores, in case the with_scores option is true).\n\nExample:\n\n```\nredis.zrange(\"myzset\", 0, -1, with_scores: true) # => [\"one\", \"1\", \"uno\", \"1\", \"two\", \"2\", \"three\", \"3\"]\n```","summary":"

    Returns the specified range of elements in the sorted set stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start","doc":null,"default_value":"","external_name":"start","restriction":""},{"name":"stop","doc":null,"default_value":"","external_name":"stop","restriction":""},{"name":"with_scores","doc":null,"default_value":"false","external_name":"with_scores","restriction":""}],"args_string":"(key, start, stop, with_scores = false)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1168","def":{"name":"zrange","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start","doc":null,"default_value":"","external_name":"start","restriction":""},{"name":"stop","doc":null,"default_value":"","external_name":"stop","restriction":""},{"name":"with_scores","doc":null,"default_value":"false","external_name":"with_scores","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"ZRANGE\", namespaced(key), start.to_s, stop.to_s]\nif with_scores\n q << \"WITHSCORES\"\nend\nstring_array_command(q)\n"}},{"id":"zrangebylex(key,min,max,limit=nil)-instance-method","html_id":"zrangebylex(key,min,max,limit=nil)-instance-method","name":"zrangebylex","doc":"When all the elements in a sorted set are inserted with the same score,\nin order to force lexicographical ordering, this command returns all the\nelements in the sorted set at key with a value between min and max.\n\n**Options**:\n\n* limit - an array of [offset, count]. Skip offset members, return a maximum of count members.\n\n**Return value**:","summary":"

    When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering, this command returns all the elements in the sorted set at key with a value between min and max.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""},{"name":"limit","doc":null,"default_value":"nil","external_name":"limit","restriction":""}],"args_string":"(key, min, max, limit = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1295","def":{"name":"zrangebylex","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""},{"name":"limit","doc":null,"default_value":"nil","external_name":"limit","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"ZRANGEBYLEX\", namespaced(key), min.to_s, max.to_s]\nif limit\n ((q << \"LIMIT\") << limit[0].to_s) << limit[1].to_s\nend\nstring_array_command(q)\n"}},{"id":"zrangebyscore(key,min,max,limit=nil,with_scores=false)-instance-method","html_id":"zrangebyscore(key,min,max,limit=nil,with_scores=false)-instance-method","name":"zrangebyscore","doc":"Returns all the elements in the sorted set at key with a score between\nmax and min (including elements with score equal to max or min).\n\n**Options**:\n\n* limit - an array of [offset, count]. Skip offset members, return a maximum of count members.\n* with_scores - true to return the scores of the elements together with the elements.\n\n**Return value**: Array(String), the list of elements in the specified score range (optionally with their scores).","summary":"

    Returns all the elements in the sorted set at key with a score between max and min (including elements with score equal to max or min).

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""},{"name":"limit","doc":null,"default_value":"nil","external_name":"limit","restriction":""},{"name":"with_scores","doc":null,"default_value":"false","external_name":"with_scores","restriction":""}],"args_string":"(key, min, max, limit = nil, with_scores = false)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1312","def":{"name":"zrangebyscore","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""},{"name":"limit","doc":null,"default_value":"nil","external_name":"limit","restriction":""},{"name":"with_scores","doc":null,"default_value":"false","external_name":"with_scores","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"ZRANGEBYSCORE\", namespaced(key), min.to_s, max.to_s]\nif limit\n ((q << \"LIMIT\") << limit[0].to_s) << limit[1].to_s\nend\nif with_scores\n q << \"WITHSCORES\"\nend\nstring_array_command(q)\n"}},{"id":"zrank(key,member)-instance-method","html_id":"zrank(key,member)-instance-method","name":"zrank","doc":"Returns the rank of member in the sorted set stored at key, with the scores ordered from low to high.\n\n**Return value**:\n* If member exists in the sorted set, Integer: the rank of member.\n* If member does not exist in the sorted set or key does not exist: nil.","summary":"

    Returns the rank of member in the sorted set stored at key, with the scores ordered from low to high.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""}],"args_string":"(key, member)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1223","def":{"name":"zrank","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_or_nil_command([\"ZRANK\", namespaced(key), member.to_s])"}},{"id":"zrem(key,member)-instance-method","html_id":"zrem(key,member)-instance-method","name":"zrem","doc":"Removes the specified members from the sorted set stored at key.\n\n**Return value**: Integer, the number of members removed from the sorted set, not including non existing members.","summary":"

    Removes the specified members from the sorted set stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""}],"args_string":"(key, member)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1214","def":{"name":"zrem","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"ZREM\", namespaced(key), member.to_s])"}},{"id":"zremrangebylex(key,min,max)-instance-method","html_id":"zremrangebylex(key,min,max)-instance-method","name":"zremrangebylex","doc":"When all the elements in a sorted set are inserted with the same score,\nin order to force lexicographical ordering, this command removes all\nelements in the sorted set stored at key between the lexicographical range\nspecified by min and max.\n\n**Return value**: Integer, the number of elements removed.","summary":"

    When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering, this command removes all elements in the sorted set stored at key between the lexicographical range specified by min and max.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""}],"args_string":"(key, min, max)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1382","def":{"name":"zremrangebylex","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"ZREMRANGEBYLEX\", namespaced(key), min.to_s, max.to_s])"}},{"id":"zremrangebyrank(key,start,stop)-instance-method","html_id":"zremrangebyrank(key,start,stop)-instance-method","name":"zremrangebyrank","doc":"Removes all elements in the sorted set stored at key with rank between start and stop.\n\n**Return value**: Integer, the number of elements removed.","summary":"

    Removes all elements in the sorted set stored at key with rank between start and stop.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start","doc":null,"default_value":"","external_name":"start","restriction":""},{"name":"stop","doc":null,"default_value":"","external_name":"stop","restriction":""}],"args_string":"(key, start, stop)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1389","def":{"name":"zremrangebyrank","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start","doc":null,"default_value":"","external_name":"start","restriction":""},{"name":"stop","doc":null,"default_value":"","external_name":"stop","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"ZREMRANGEBYRANK\", namespaced(key), start.to_s, stop.to_s])"}},{"id":"zremrangebyscore(key,start,stop)-instance-method","html_id":"zremrangebyscore(key,start,stop)-instance-method","name":"zremrangebyscore","doc":"Removes all elements in the sorted set stored at key with a score\nbetween min and max (inclusive).\n\n**Return value**: Integer, the number of elements removed.","summary":"

    Removes all elements in the sorted set stored at key with a score between min and max (inclusive).

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start","doc":null,"default_value":"","external_name":"start","restriction":""},{"name":"stop","doc":null,"default_value":"","external_name":"stop","restriction":""}],"args_string":"(key, start, stop)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1397","def":{"name":"zremrangebyscore","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start","doc":null,"default_value":"","external_name":"start","restriction":""},{"name":"stop","doc":null,"default_value":"","external_name":"stop","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"ZREMRANGEBYSCORE\", namespaced(key), start.to_s, stop.to_s])"}},{"id":"zrevrange(key,start,stop,with_scores=false)-instance-method","html_id":"zrevrange(key,start,stop,with_scores=false)-instance-method","name":"zrevrange","doc":"Returns the specified range of elements in the sorted set stored at key.\n\n**Options**:\n\n* with_scores - true to return the scores of the elements together with the elements.\n\n**Return value**: Array(String), the list of elements in the specified range (optionally with their scores, in case the with_scores option is true).","summary":"

    Returns the specified range of elements in the sorted set stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start","doc":null,"default_value":"","external_name":"start","restriction":""},{"name":"stop","doc":null,"default_value":"","external_name":"stop","restriction":""},{"name":"with_scores","doc":null,"default_value":"false","external_name":"with_scores","restriction":""}],"args_string":"(key, start, stop, with_scores = false)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1330","def":{"name":"zrevrange","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start","doc":null,"default_value":"","external_name":"start","restriction":""},{"name":"stop","doc":null,"default_value":"","external_name":"stop","restriction":""},{"name":"with_scores","doc":null,"default_value":"false","external_name":"with_scores","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"ZREVRANGE\", namespaced(key), start.to_s, stop.to_s]\nif with_scores\n q << \"WITHSCORES\"\nend\nstring_array_command(q)\n"}},{"id":"zrevrangebylex(key,min,max,limit=nil)-instance-method","html_id":"zrevrangebylex(key,min,max,limit=nil)-instance-method","name":"zrevrangebylex","doc":"When all the elements in a sorted set are inserted with the same score,\nin order to force lexicographical ordering, this command returns all the\nelements in the sorted set at key with a value between min and max.\n\n**Options**:\n\n* limit - an array of [offset, count]. Skip offset members, return a maximum of count members.\n\n**Return value**:","summary":"

    When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering, this command returns all the elements in the sorted set at key with a value between min and max.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""},{"name":"limit","doc":null,"default_value":"nil","external_name":"limit","restriction":""}],"args_string":"(key, min, max, limit = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1348","def":{"name":"zrevrangebylex","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""},{"name":"limit","doc":null,"default_value":"nil","external_name":"limit","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"ZREVRANGEBYLEX\", namespaced(key), min.to_s, max.to_s]\nif limit\n ((q << \"LIMIT\") << limit[0].to_s) << limit[1].to_s\nend\nstring_array_command(q)\n"}},{"id":"zrevrangebyscore(key,min,max,limit=nil,with_scores=false)-instance-method","html_id":"zrevrangebyscore(key,min,max,limit=nil,with_scores=false)-instance-method","name":"zrevrangebyscore","doc":"Returns all the elements in the sorted set at key with a score between\nmax and min (including elements with score equal to max or min).\n\n**Options**:\n\n* limit - an array of [offset, count]. Skip offset members, return a maximum of count members.\n* with_scores - true to return the scores of the elements together with the elements.\n\n**Return value**: Array(String), the list of elements in the specified score range (optionally with their scores).","summary":"

    Returns all the elements in the sorted set at key with a score between max and min (including elements with score equal to max or min).

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""},{"name":"limit","doc":null,"default_value":"nil","external_name":"limit","restriction":""},{"name":"with_scores","doc":null,"default_value":"false","external_name":"with_scores","restriction":""}],"args_string":"(key, min, max, limit = nil, with_scores = false)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1365","def":{"name":"zrevrangebyscore","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""},{"name":"limit","doc":null,"default_value":"nil","external_name":"limit","restriction":""},{"name":"with_scores","doc":null,"default_value":"false","external_name":"with_scores","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"ZREVRANGEBYSCORE\", namespaced(key), min.to_s, max.to_s]\nif limit\n ((q << \"LIMIT\") << limit[0].to_s) << limit[1].to_s\nend\nif with_scores\n q << \"WITHSCORES\"\nend\nstring_array_command(q)\n"}},{"id":"zrevrank(key,member)-instance-method","html_id":"zrevrank(key,member)-instance-method","name":"zrevrank","doc":"Returns the rank of member in the sorted set stored at key,\nwith the scores ordered from high to low.\n\n**Return value**:\n* If member exists in the sorted set, Integer: the rank of member.\n* If member does not exist in the sorted set or key does not exist: nil.","summary":"

    Returns the rank of member in the sorted set stored at key, with the scores ordered from high to low.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""}],"args_string":"(key, member)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1233","def":{"name":"zrevrank","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_or_nil_command([\"ZREVRANK\", namespaced(key), member.to_s])"}},{"id":"zscan(key,cursor,match=nil,count=nil)-instance-method","html_id":"zscan(key,cursor,match=nil,count=nil)-instance-method","name":"zscan","doc":"The SCAN command and the closely related commands SSCAN, HSCAN and ZSCAN are used in order to incrementally iterate over a collection of elements.\n\n**Options**:\n\n* match - It is possible to only iterate elements matching a given glob-style pattern, similarly to the behavior of the KEYS command that takes a pattern as only argument.\n* count - While SCAN does not provide guarantees about the number of elements returned at every iteration, it is possible to empirically adjust the behavior of SCAN using the COUNT option.\n\n**Return value**: Array(String), contains two elements, a member and its associated score, for every returned element of the sorted set.\n\nExample:\n\n```\nredis.zscan(\"myzset\", 0)\nredis.zscan(\"myzset\", 0, \"foo*\")\nredis.zscan(\"myzset\", 0, \"foo*\", 1024)\n```","summary":"

    The SCAN command and the closely related commands SSCAN, HSCAN and ZSCAN are used in order to incrementally iterate over a collection of elements.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"cursor","doc":null,"default_value":"","external_name":"cursor","restriction":""},{"name":"match","doc":null,"default_value":"nil","external_name":"match","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""}],"args_string":"(key, cursor, match = nil, count = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1417","def":{"name":"zscan","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"cursor","doc":null,"default_value":"","external_name":"cursor","restriction":""},{"name":"match","doc":null,"default_value":"nil","external_name":"match","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"ZSCAN\", namespaced(key), cursor.to_s]\nif match\n (q << \"MATCH\") << match.to_s\nend\nif count\n (q << \"COUNT\") << count.to_s\nend\nstring_array_command(q)\n"}},{"id":"zscore(key,member)-instance-method","html_id":"zscore(key,member)-instance-method","name":"zscore","doc":"Returns the score of member in the sorted set at key.\n\n**Return value**: String, the score of member (a double precision floating point number).","summary":"

    Returns the score of member in the sorted set at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""}],"args_string":"(key, member)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1186","def":{"name":"zscore","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_or_nil_command([\"ZSCORE\", namespaced(key), member.to_s])"}},{"id":"zunionstore(destination,keys:Array,weights=nil,aggregate=nil)-instance-method","html_id":"zunionstore(destination,keys:Array,weights=nil,aggregate=nil)-instance-method","name":"zunionstore","doc":"Computes the union of numkeys sorted sets given by the specified keys, and stores the result in destination.\n\n**Options**:\n\n* weights - nil or Array(String): Using the WEIGHTS option, it is possible to specify a multiplication factor for each input sorted set.\n* aggregate - With the AGGREGATE option, it is possible to specify how the results of the union are aggregated.\n\n**Return value**: Integer, the number of elements in the resulting sorted set at destination.","summary":"

    Computes the union of numkeys sorted sets given by the specified keys, and stores the result in destination.

    ","abstract":false,"args":[{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array"},{"name":"weights","doc":null,"default_value":"nil","external_name":"weights","restriction":""},{"name":"aggregate","doc":null,"default_value":"nil","external_name":"aggregate","restriction":""}],"args_string":"(destination, keys : Array, weights = nil, aggregate = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1273","def":{"name":"zunionstore","args":[{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array"},{"name":"weights","doc":null,"default_value":"nil","external_name":"weights","restriction":""},{"name":"aggregate","doc":null,"default_value":"nil","external_name":"aggregate","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"numkeys = keys.size\nq = concat([\"ZUNIONSTORE\", namespaced(destination), numkeys.to_s], namespaced(keys))\nif weights\n q << \"WEIGHTS\"\n concat(q, weights)\nend\nif aggregate\n (q << \"AGGREGATE\") << aggregate.to_s\nend\ninteger_command(q)\n"}}],"macros":[],"types":[]},{"html_id":"github.com/stefanwille/crystal-redis/Redis/CommandTimeoutError","path":"Redis/CommandTimeoutError.html","kind":"class","full_name":"Redis::CommandTimeoutError","name":"CommandTimeoutError","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"github.com/stefanwille/crystal-redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/error.cr","line_number":18,"url":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/error.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"Raised when the `command_timeout` option triggers - a command took too long because the Redis-server is blocked by another command or by a dump.","summary":"

    Raised when the command_timeout option triggers - a command took too long because the Redis-server is blocked by another command or by a dump.

    ","class_methods":[],"constructors":[],"instance_methods":[],"macros":[],"types":[]},{"html_id":"github.com/stefanwille/crystal-redis/Redis/ConnectionError","path":"Redis/ConnectionError.html","kind":"class","full_name":"Redis::ConnectionError","name":"ConnectionError","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"github.com/stefanwille/crystal-redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/error.cr","line_number":6,"url":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/error.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/CannotConnectError","kind":"class","full_name":"Redis::CannotConnectError","name":"CannotConnectError"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/ConnectionLostError","kind":"class","full_name":"Redis::ConnectionLostError","name":"ConnectionLostError"}],"including_types":[],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"An error that makes the connection unusable.","summary":"

    An error that makes the connection unusable.

    ","class_methods":[],"constructors":[],"instance_methods":[],"macros":[],"types":[]},{"html_id":"github.com/stefanwille/crystal-redis/Redis/ConnectionLostError","path":"Redis/ConnectionLostError.html","kind":"class","full_name":"Redis::ConnectionLostError","name":"ConnectionLostError","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Redis/ConnectionError","kind":"class","full_name":"Redis::ConnectionError","name":"ConnectionError"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/ConnectionError","kind":"class","full_name":"Redis::ConnectionError","name":"ConnectionError"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"github.com/stefanwille/crystal-redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/error.cr","line_number":14,"url":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/error.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"Raised when the connection to the Redis server is lost.","summary":"

    Raised when the connection to the Redis server is lost.

    ","class_methods":[],"constructors":[],"instance_methods":[],"macros":[],"types":[]},{"html_id":"github.com/stefanwille/crystal-redis/Redis/Error","path":"Redis/Error.html","kind":"class","full_name":"Redis::Error","name":"Error","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/error.cr","line_number":2,"url":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/error.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/CommandTimeoutError","kind":"class","full_name":"Redis::CommandTimeoutError","name":"CommandTimeoutError"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/ConnectionError","kind":"class","full_name":"Redis::ConnectionError","name":"ConnectionError"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/PoolTimeoutError","kind":"class","full_name":"Redis::PoolTimeoutError","name":"PoolTimeoutError"}],"including_types":[],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"Exception for errors raised by this shard.","summary":"

    Exception for errors raised by this shard.

    ","class_methods":[],"constructors":[],"instance_methods":[],"macros":[],"types":[]},{"html_id":"github.com/stefanwille/crystal-redis/Redis/Future","path":"Redis/Future.html","kind":"class","full_name":"Redis::Future","name":"Future","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/future.cr","line_number":6,"url":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/future.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"Futures are handles for values that will become available at a later point in time.\n\nThe API methods Redis#pipelined and Redis#multi make commands return futures instead of actual values.\n\nSee this [example](https://github.com/stefanwille/crystal-redis-examples/blob/master/src/pipelining.cr).","summary":"

    Futures are handles for values that will become available at a later point in time.

    ","class_methods":[],"constructors":[{"id":"new-class-method","html_id":"new-class-method","name":"new","doc":null,"summary":null,"abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/future.cr#L9","def":{"name":"new","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"_ = allocate\n_.initialize\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"id":"value-instance-method","html_id":"value-instance-method","name":"value","doc":null,"summary":null,"abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/future.cr#L14","def":{"name":"value","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"if @ready\n @value\nelse\n raise(Redis::Error.new(\"Future value not ready yet\"))\nend"}},{"id":"value=(new_value)-instance-method","html_id":"value=(new_value)-instance-method","name":"value=","doc":null,"summary":null,"abstract":false,"args":[{"name":"new_value","doc":null,"default_value":"","external_name":"new_value","restriction":""}],"args_string":"(new_value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/future.cr#L22","def":{"name":"value=","args":[{"name":"new_value","doc":null,"default_value":"","external_name":"new_value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"@value = new_value\n@ready = true\n"}}],"macros":[],"types":[]},{"html_id":"github.com/stefanwille/crystal-redis/Redis/PipelineApi","path":"Redis/PipelineApi.html","kind":"class","full_name":"Redis::PipelineApi","name":"PipelineApi","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/CommandExecution/FutureOriented","kind":"module","full_name":"Redis::CommandExecution::FutureOriented","name":"FutureOriented"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/pipeline_api.cr","line_number":18,"url":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/pipeline_api.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/CommandExecution/FutureOriented","kind":"module","full_name":"Redis::CommandExecution::FutureOriented","name":"FutureOriented"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"API for sending commands in pipelined mode.\n\nUsed in Redis#pipelined.\n\nExample:\n\n```\nredis.pipelined do |pipeline|\n pipeline.set(\"foo1\", \"first\")\n pipeline.set(\"foo2\", \"second\")\nend\n```\n\nIn this example, the `pipeline` object passed to the block is a PipelineApi\nobject.","summary":"

    API for sending commands in pipelined mode.

    ","class_methods":[],"constructors":[{"id":"new(strategy,namespace="")-class-method","html_id":"new(strategy,namespace=&quot;&quot;)-class-method","name":"new","doc":null,"summary":null,"abstract":false,"args":[{"name":"strategy","doc":null,"default_value":"","external_name":"strategy","restriction":""},{"name":"namespace","doc":null,"default_value":"\"\"","external_name":"namespace","restriction":""}],"args_string":"(strategy, namespace = "")","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/pipeline_api.cr#L22","def":{"name":"new","args":[{"name":"strategy","doc":null,"default_value":"","external_name":"strategy","restriction":""},{"name":"namespace","doc":null,"default_value":"\"\"","external_name":"namespace","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"_ = allocate\n_.initialize(strategy, namespace)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[],"macros":[],"types":[]},{"html_id":"github.com/stefanwille/crystal-redis/Redis/PooledClient","path":"Redis/PooledClient.html","kind":"class","full_name":"Redis::PooledClient","name":"PooledClient","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/pooled_client.cr","line_number":20,"url":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/pooled_client.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"A Redis client object that can be shared across multiple fibers.\nIt is backed by a connection pool of `Redis` instances and will automatically allocate and free these instances from/to the pool, per command.\n\nExample usage:\n\n```Crystal\nredis = Redis::PooledClient.new(host: ..., port: ..., ..., pool_size: 5)\n10.times do |i|\n spawn do\n redis.set(\"foo#{i}\", \"bar\")\n redis.get(\"foo#{i}\") # => \"bar\"\n end\nend\n```\n\nHere 10 fibers access the same `Redis::PooledClient` instance while automatically sharing 5 Redis connections.\n","summary":"

    A Redis client object that can be shared across multiple fibers.

    ","class_methods":[],"constructors":[{"id":"new(*args,pool_size=5,pool_timeout=5.0,**args2)-class-method","html_id":"new(*args,pool_size=5,pool_timeout=5.0,**args2)-class-method","name":"new","doc":"Accepts the same connection parameters like a `Redis` instance, plus the documented ones.\n\n* pool_size - the number of `Redis` to hold in the connection pool.\n* pool_timeout - the time to wait for a `Redis` instance to become available from the pool before dying with `Redis::PoolTimeoutError`.","summary":"

    Accepts the same connection parameters like a Redis instance, plus the documented ones.

    ","abstract":false,"args":[{"name":"args","doc":null,"default_value":"","external_name":"args","restriction":""},{"name":"pool_size","doc":null,"default_value":"5","external_name":"pool_size","restriction":""},{"name":"pool_timeout","doc":null,"default_value":"5.0","external_name":"pool_timeout","restriction":""}],"args_string":"(*args, pool_size = 5, pool_timeout = 5.0, **args2)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/pooled_client.cr#L29","def":{"name":"new","args":[{"name":"args","doc":null,"default_value":"","external_name":"args","restriction":""},{"name":"pool_size","doc":null,"default_value":"5","external_name":"pool_size","restriction":""},{"name":"pool_timeout","doc":null,"default_value":"5.0","external_name":"pool_timeout","restriction":""}],"double_splat":{"name":"args2","doc":null,"default_value":"","external_name":"args2","restriction":""},"splat_index":0,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"_ = allocate\n_.initialize(*args, **args2, pool_size: pool_size, pool_timeout: pool_timeout)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"id":"pool:ConnectionPool(Redis)-instance-method","html_id":"pool:ConnectionPool(Redis)-instance-method","name":"pool","doc":"The connection pool.\nSee [https://github.com/ysbaddaden/pool](https://github.com/ysbaddaden/pool)","summary":"

    The connection pool.

    ","abstract":false,"args":[],"args_string":" : ConnectionPool(Redis)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/pooled_client.cr#L23","def":{"name":"pool","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"@pool"}},{"id":"psubscribe(*channel_patterns,&callback_setup_block:Redis::Subscription->)-instance-method","html_id":"psubscribe(*channel_patterns,&callback_setup_block:Redis::Subscription->)-instance-method","name":"psubscribe","doc":null,"summary":null,"abstract":false,"args":[{"name":"channel_patterns","doc":null,"default_value":"","external_name":"channel_patterns","restriction":""}],"args_string":"(*channel_patterns, &callback_setup_block : Redis::Subscription -> )","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/pooled_client.cr#L59","def":{"name":"psubscribe","args":[{"name":"channel_patterns","doc":null,"default_value":"","external_name":"channel_patterns","restriction":""}],"double_splat":null,"splat_index":0,"yields":1,"block_arg":{"name":"callback_setup_block","doc":null,"default_value":"","external_name":"callback_setup_block","restriction":"(Redis::Subscription -> )"},"return_type":"","visibility":"Public","body":"with_pool_connection(&.psubscribe(*channel_patterns) do |s|\n callback_setup_block.call(s)\nend)"}},{"id":"subscribe(*channels,&callback_setup_block:Redis::Subscription->)-instance-method","html_id":"subscribe(*channels,&callback_setup_block:Redis::Subscription->)-instance-method","name":"subscribe","doc":null,"summary":null,"abstract":false,"args":[{"name":"channels","doc":null,"default_value":"","external_name":"channels","restriction":""}],"args_string":"(*channels, &callback_setup_block : Redis::Subscription -> )","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/pooled_client.cr#L55","def":{"name":"subscribe","args":[{"name":"channels","doc":null,"default_value":"","external_name":"channels","restriction":""}],"double_splat":null,"splat_index":0,"yields":1,"block_arg":{"name":"callback_setup_block","doc":null,"default_value":"","external_name":"callback_setup_block","restriction":"(Redis::Subscription -> )"},"return_type":"","visibility":"Public","body":"with_pool_connection(&.subscribe(*channels) do |s|\n callback_setup_block.call(s)\nend)"}}],"macros":[{"id":"method_missing(call)-macro","html_id":"method_missing(call)-macro","name":"method_missing","doc":null,"summary":null,"abstract":false,"args":[{"name":"call","doc":null,"default_value":"","external_name":"call","restriction":""}],"args_string":"(call)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/pooled_client.cr#L35","def":{"name":"method_missing","args":[{"name":"call","doc":null,"default_value":"","external_name":"call","restriction":""}],"double_splat":null,"splat_index":null,"block_arg":null,"visibility":"Public","body":" \n# Delegates all Redis commands to a `Redis` instance from the connection pool.\n\n with_pool_connection \n{ |conn| conn.\n{{ call }}\n }\n \n"}}],"types":[]},{"html_id":"github.com/stefanwille/crystal-redis/Redis/PoolTimeoutError","path":"Redis/PoolTimeoutError.html","kind":"class","full_name":"Redis::PoolTimeoutError","name":"PoolTimeoutError","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"github.com/stefanwille/crystal-redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/error.cr","line_number":22,"url":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/error.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"Raised when no free connection became available in the pool within a certain time.","summary":"

    Raised when no free connection became available in the pool within a certain time.

    ","class_methods":[],"constructors":[],"instance_methods":[],"macros":[],"types":[]},{"html_id":"github.com/stefanwille/crystal-redis/Redis/SocketWrapper","path":"Redis/SocketWrapper.html","kind":"struct","full_name":"Redis::SocketWrapper","name":"SocketWrapper","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"github.com/stefanwille/crystal-redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/socket_wrapper.cr","line_number":4,"url":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/socket_wrapper.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"Wraps an open socket connection.\n\nThe purpose is to be able to convert all exceptions to Redis:Error's.","summary":"

    Wraps an open socket connection.

    ","class_methods":[],"constructors":[{"id":"new(socket:TCPSocket|UNIXSocket|OpenSSL::SSL::Socket::Client)-class-method","html_id":"new(socket:TCPSocket|UNIXSocket|OpenSSL::SSL::Socket::Client)-class-method","name":"new","doc":null,"summary":null,"abstract":false,"args":[{"name":"socket","doc":null,"default_value":"","external_name":"socket","restriction":"TCPSocket | UNIXSocket | OpenSSL::SSL::Socket::Client"}],"args_string":"(socket : TCPSocket | UNIXSocket | OpenSSL::SSL::Socket::Client)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/socket_wrapper.cr#L5","def":{"name":"new","args":[{"name":"socket","doc":null,"default_value":"","external_name":"socket","restriction":"TCPSocket | UNIXSocket | OpenSSL::SSL::Socket::Client"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"_ = allocate\n_.initialize(socket)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}},{"id":"new(&block)-class-method","html_id":"new(&block)-class-method","name":"new","doc":null,"summary":null,"abstract":false,"args":[],"args_string":"(&block)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/socket_wrapper.cr#L9","def":{"name":"new","args":[],"double_splat":null,"splat_index":null,"yields":0,"block_arg":null,"return_type":"","visibility":"Public","body":"begin\n self.new(yield)\nrescue ex : IO::Timeout | Errno | Socket::Error | OpenSSL::Error\n raise(Redis::CannotConnectError.new(\"#{ex.class}: #{ex.message}\"))\nend"}}],"instance_methods":[{"id":"close-instance-method","html_id":"close-instance-method","name":"close","doc":null,"summary":null,"abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/socket_wrapper.cr#L27","def":{"name":"close","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"begin\n if @connected\n @connected = false\n @socket.close\n end\nrescue Errno\nend"}}],"macros":[{"id":"method_missing(call)-macro","html_id":"method_missing(call)-macro","name":"method_missing","doc":null,"summary":null,"abstract":false,"args":[{"name":"call","doc":null,"default_value":"","external_name":"call","restriction":""}],"args_string":"(call)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/socket_wrapper.cr#L15","def":{"name":"method_missing","args":[{"name":"call","doc":null,"default_value":"","external_name":"call","restriction":""}],"double_splat":null,"splat_index":null,"block_arg":null,"visibility":"Public","body":" catch_errors \n{ @socket.\n{{ call }}\n }\n \n"}}],"types":[]},{"html_id":"github.com/stefanwille/crystal-redis/Redis/Subscription","path":"Redis/Subscription.html","kind":"class","full_name":"Redis::Subscription","name":"Subscription","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/subscription.cr","line_number":5,"url":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/subscription.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"Models a subscription to one or more publish/subscribe channels.\n\nThe caller sets callbacks on this object that the Redis client will\ntrigger for the matching events.","summary":"

    Models a subscription to one or more publish/subscribe channels.

    ","class_methods":[],"constructors":[],"instance_methods":[{"id":"message(&message_callback:String,String->)-instance-method","html_id":"message(&message_callback:String,String->)-instance-method","name":"message","doc":"Sets the 'message' callback.","summary":"

    Sets the 'message' callback.

    ","abstract":false,"args":[],"args_string":"(&message_callback : String, String -> )","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/subscription.cr#L28","def":{"name":"message","args":[],"double_splat":null,"splat_index":null,"yields":2,"block_arg":{"name":"message_callback","doc":null,"default_value":"","external_name":"message_callback","restriction":"(String, String -> )"},"return_type":"","visibility":"Public","body":"@message_callback = message_callback"}},{"id":"pmessage(&pmessage_callback:String,String,String->)-instance-method","html_id":"pmessage(&pmessage_callback:String,String,String->)-instance-method","name":"pmessage","doc":"Sets the 'pmessage' callback.","summary":"

    Sets the 'pmessage' callback.

    ","abstract":false,"args":[],"args_string":"(&pmessage_callback : String, String, String -> )","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/subscription.cr#L32","def":{"name":"pmessage","args":[],"double_splat":null,"splat_index":null,"yields":3,"block_arg":{"name":"pmessage_callback","doc":null,"default_value":"","external_name":"pmessage_callback","restriction":"(String, String, String -> )"},"return_type":"","visibility":"Public","body":"@pmessage_callback = pmessage_callback"}},{"id":"psubscribe(&psubscribe_callback:String,Int64->)-instance-method","html_id":"psubscribe(&psubscribe_callback:String,Int64->)-instance-method","name":"psubscribe","doc":"Sets the 'psubscribe' callback.","summary":"

    Sets the 'psubscribe' callback.

    ","abstract":false,"args":[],"args_string":"(&psubscribe_callback : String, Int64 -> )","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/subscription.cr#L24","def":{"name":"psubscribe","args":[],"double_splat":null,"splat_index":null,"yields":2,"block_arg":{"name":"psubscribe_callback","doc":null,"default_value":"","external_name":"psubscribe_callback","restriction":"(String, Int64 -> )"},"return_type":"","visibility":"Public","body":"@psubscribe_callback = psubscribe_callback"}},{"id":"punsubscribe(&punsubscribe_callback:String,Int64->)-instance-method","html_id":"punsubscribe(&punsubscribe_callback:String,Int64->)-instance-method","name":"punsubscribe","doc":"Sets the 'punsubscribe' callback.","summary":"

    Sets the 'punsubscribe' callback.

    ","abstract":false,"args":[],"args_string":"(&punsubscribe_callback : String, Int64 -> )","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/subscription.cr#L40","def":{"name":"punsubscribe","args":[],"double_splat":null,"splat_index":null,"yields":2,"block_arg":{"name":"punsubscribe_callback","doc":null,"default_value":"","external_name":"punsubscribe_callback","restriction":"(String, Int64 -> )"},"return_type":"","visibility":"Public","body":"@punsubscribe_callback = punsubscribe_callback"}},{"id":"subscribe(&subscribe_callback:String,Int64->)-instance-method","html_id":"subscribe(&subscribe_callback:String,Int64->)-instance-method","name":"subscribe","doc":"Sets the 'subscribe' callback.","summary":"

    Sets the 'subscribe' callback.

    ","abstract":false,"args":[],"args_string":"(&subscribe_callback : String, Int64 -> )","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/subscription.cr#L20","def":{"name":"subscribe","args":[],"double_splat":null,"splat_index":null,"yields":2,"block_arg":{"name":"subscribe_callback","doc":null,"default_value":"","external_name":"subscribe_callback","restriction":"(String, Int64 -> )"},"return_type":"","visibility":"Public","body":"@subscribe_callback = subscribe_callback"}},{"id":"unsubscribe(&unsubscribe_callback:String,Int64->)-instance-method","html_id":"unsubscribe(&unsubscribe_callback:String,Int64->)-instance-method","name":"unsubscribe","doc":"Sets the 'unsubscribe' callback.","summary":"

    Sets the 'unsubscribe' callback.

    ","abstract":false,"args":[],"args_string":"(&unsubscribe_callback : String, Int64 -> )","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/subscription.cr#L36","def":{"name":"unsubscribe","args":[],"double_splat":null,"splat_index":null,"yields":2,"block_arg":{"name":"unsubscribe_callback","doc":null,"default_value":"","external_name":"unsubscribe_callback","restriction":"(String, Int64 -> )"},"return_type":"","visibility":"Public","body":"@unsubscribe_callback = unsubscribe_callback"}}],"macros":[],"types":[]},{"html_id":"github.com/stefanwille/crystal-redis/Redis/TransactionApi","path":"Redis/TransactionApi.html","kind":"class","full_name":"Redis::TransactionApi","name":"TransactionApi","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/CommandExecution/FutureOriented","kind":"module","full_name":"Redis::CommandExecution::FutureOriented","name":"FutureOriented"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/transaction_api.cr","line_number":19,"url":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/transaction_api.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/CommandExecution/FutureOriented","kind":"module","full_name":"Redis::CommandExecution::FutureOriented","name":"FutureOriented"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"API for sending commands in a transaction.\n\nUsed in Redis#multi.\n\n\nExample:\n\n```\nredis.multi do |multi|\n multi.set(\"foo1\", \"first\")\n multi.set(\"foo2\", \"second\")\nend\n```\n\nIn this example, the `multi` object passed to the block is a TransactionApi\nobject.","summary":"

    API for sending commands in a transaction.

    ","class_methods":[],"constructors":[{"id":"new(strategy,namespace="")-class-method","html_id":"new(strategy,namespace=&quot;&quot;)-class-method","name":"new","doc":null,"summary":null,"abstract":false,"args":[{"name":"strategy","doc":null,"default_value":"","external_name":"strategy","restriction":""},{"name":"namespace","doc":null,"default_value":"\"\"","external_name":"namespace","restriction":""}],"args_string":"(strategy, namespace = "")","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/transaction_api.cr#L23","def":{"name":"new","args":[{"name":"strategy","doc":null,"default_value":"","external_name":"strategy","restriction":""},{"name":"namespace","doc":null,"default_value":"\"\"","external_name":"namespace","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"_ = allocate\n_.initialize(strategy, namespace)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"id":"discard-instance-method","html_id":"discard-instance-method","name":"discard","doc":"Aborts the current transaction.\n\n**Example**:\n\n```\nredis.multi do |multi|\n multi.set(\"foo\", \"the new value\")\n multi.discard\nend\n```","summary":"

    Aborts the current transaction.

    ","abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/transaction_api.cr#L40","def":{"name":"discard","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"@strategy.discard"}}],"macros":[],"types":[]}]}]}} \ No newline at end of file diff --git a/docs/search-index.js b/docs/search-index.js index 33343b1..efd56d2 100644 --- a/docs/search-index.js +++ b/docs/search-index.js @@ -1 +1 @@ -crystal_doc_search_index_callback({"repository_name":"github.com/stefanwille/crystal-redis","body":"# Redis Client for Crystal\n\n[![Build Status](https://img.shields.io/travis/stefanwille/crystal-redis/master.svg?style=flat)](https://travis-ci.org/stefanwille/crystal-redis) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md#pull-requests)\n\nA Redis client for the Crystal programming language.\n\n## Features\n\n- Performance (> 680,000 commands per second using pipeline on a MacBook Air with a single client thread)\n- Pipelining\n- Transactions\n- LUA Scripting\n- All string commands\n- All hash commands\n- All list commands\n- All set commands\n- All hyperloglog commands\n- All commands for bit operations\n- All sorted set commands\n- All geo commands\n- Publish/subscribe\n\n## Installation\n\nAdd it to your `shard.yml`:\n\n```crystal\ndependencies:\n redis:\n github: stefanwille/crystal-redis\n version: ~> 2.4.1\n```\n\nand then install the library into your project:\n\n```bash\n$ shards install\n```\n\n### Installation on MacOS X\n\nOn MacOS X you may get this error:\n\n```\nld: library not found for -lssl (this usually means you need to install the development package for libssl)\nclang: error: linker command failed with exit code 1 (use -v to see invocation)\n...\n```\n\nOr this warning:\n\n```\nPackage libssl was not found in the pkg-config search path.\nPerhaps you should add the directory containing `libssl.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'libssl' found\nPackage libcrypto was not found in the pkg-config search path.\nPerhaps you should add the directory containing `libcrypto.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'libcrypto' found\n```\n\nThe problem is that Crystal can't find openssl, because it is not installed by default on MacOS X.\n\nThe fix:\n\n1. Install openssl via [Homebrew](https://brew.sh/):\n\n```bash\n$ brew install openssl\n```\n\n2. Set the environment variable `PKG_CONFIG_PATH`:\n\n```bash\n$ export PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig\n```\n\nNote: Please write me if you know a better way!\n\n## Required Crystal Version\n\nThis library needs Crystal version >= 0.25.0\n\nI haven't tested older Crystal versions.\n\n## Usage\n\nRequire the package:\n\n```crystal\n require \"redis\"\n```\n\nthen\n\n```crystal\n redis = Redis.new\n```\n\nThen you can call Redis commands on the `redis` object:\n\n```crystal\n redis.set(\"foo\", \"bar\")\n redis.get(\"foo\")\n```\n\n#### Connection Pooling\n\nSince version 2.0.0, a connection pool is built in. It is used implicitly through `Redis::PooledClient`:\n\n```Crystal\nredis = Redis::PooledClient.new\n10.times do |i|\n spawn do\n redis.set(\"foo#{i}\", \"bar\")\n redis.get(\"foo#{i}\") # => \"bar\"\n end\nend\n```\n\nThis `redis` instance can be shared across fibers, and accepts the same Redis commands as the `Redis` class.\nIt automatically allocates and frees connections from/to the pool, per command.\n\n## Examples\n\nTo get started, see the examples:\n\n- There is a separate git repository [crystal-redis-examples](https://github.com/stefanwille/crystal-redis-examples) with examples.\n- start with this [basic example](https://github.com/stefanwille/crystal-redis-examples/blob/master/src/basic.cr)\n- look at [the other examples](https://github.com/stefanwille/crystal-redis-examples/blob/master/src/)\n- the [spec](https://github.com/stefanwille/crystal-redis/blob/master/spec/redis_spec.cr) contains even more usage examples\n\n## Documentation\n\n- [API documentation](http://stefanwille.github.io/crystal-redis) -\n start reading it at the class `Redis`.\n- [Redis commands documentation](http://redis.io/commands) - the original Redis documentation is necessary, as the API documentation above is just a quick reference\n- [Redis documentation page](http://redis.io/documentation) - general information about Redis and its concepts\n\n## Performance\n\nI have benchmarked Crystal-Redis against several other client libraries in various programming languages in this [blog article](http://www.stefanwille.com/2015/05/redis-clients-crystal-vs-ruby-vs-c-vs-go/).\n\nHere are some results:\n\n- Crystal: With this library I get > 680,000 commands per second using pipeline on a MacBook Air with a single client thread.\n\n- C: The equivalent program written in C with Hiredis gets me 340,000 commands per second.\n\n- Ruby: Ruby 2.2.1 with the [redis-rb](https://github.com/redis/redis-rb) and Hiredis driver handles 150,000 commands per second.\n\n[Read more results](http://www.stefanwille.com/2015/05/redis-clients-crystal-vs-ruby-vs-c-vs-go/) for Go, Java, Node.js.\n\n## Status\n\nI have exercised every API method in the spec and built some example programs. Some people report production usage.\n\nI took great care to make this library very usable with respect to API, reliability and documentation.\n\n## Development\n\nThis project requires a locally running redis server running on port 6379 and with a Unix socket located at /tmp/redis.sock. In Homebrew's default redis.config the Unix domain socket option is disabled. To enable, edit `/usr/local/etc/redis.conf` or whatever your `redis.conf` is and uncomment this line:\n\n```\n# unixsocket /tmp/redis.sock\n```\n\nso that it reads\n\n```\nunixsocket /tmp/redis.sock\n```\n\nThen you can run the specs via\n\n`$ crystal spec`\n\n[See more information](https://github.com/stefanwille/crystal-redis/blob/master/CONTRIBUTING.md).\n\n### WARNING\n\nRunning the spec will delete database number 0!\n\n## Questions, Bugs & Support\n\nIf you have questions or need help, please open a ticket in the [GitHub issue tracker](https://github.com/stefanwille/crystal-redis/issues). This way others can benefit from the discussion.\n","program":{"html_id":"github.com/stefanwille/crystal-redis/toplevel","path":"toplevel.html","kind":"module","full_name":"Top Level Namespace","name":"Top Level Namespace","abstract":false,"superclass":null,"ancestors":[],"locations":[],"repository_name":"github.com/stefanwille/crystal-redis","program":true,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":null,"doc":null,"summary":null,"class_methods":[],"constructors":[],"instance_methods":[],"macros":[],"types":[{"html_id":"github.com/stefanwille/crystal-redis/Redis","path":"Redis.html","kind":"class","full_name":"Redis","name":"Redis","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/CommandExecution/ValueOriented","kind":"module","full_name":"Redis::CommandExecution::ValueOriented","name":"ValueOriented"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/commands.cr","line_number":1,"url":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr"},{"filename":"redis/command_execution/value_oriented.cr","line_number":1,"url":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/command_execution/value_oriented.cr"},{"filename":"redis.cr","line_number":37,"url":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis.cr"},{"filename":"redis/command_execution/future_oriented.cr","line_number":1,"url":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/command_execution/future_oriented.cr"},{"filename":"redis/strategy/base.cr","line_number":1,"url":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/strategy/base.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/CommandExecution/ValueOriented","kind":"module","full_name":"Redis::CommandExecution::ValueOriented","name":"ValueOriented"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":null,"doc":"The class is the main entry point for the Redis client.\n\n**How to use**:\n\nRequire the package:\n\n```crystal\nrequire \"redis\"\n```\n\nThen instantiate this client class:\n\n```crystal\nredis = Redis.new\n```\n\nThen you can call Redis commands on the `redis` object:\n\n```crystal\nredis.set(\"foo\", \"bar\")\nredis.get(\"foo\")\nredis.incr(\"visitors\")\n```\n\nSee the mixin module [Commands](Redis/Commands.html) for most\nof the available Redis commands such as #incr, #rename, and so on.\n\n**Multithreading / Coroutines**\n\nPlease mind that a Redis object can't be shared across multiple threads/coroutines!\nEach thread/coroutine that wants to talk to Redis needs its own Redis object instance.","summary":"

    The class is the main entry point for the Redis client.

    ","class_methods":[{"id":"open(host="localhost",port=6379,unixsocket=nil,password=nil,database=nil,url=nil,ssl=false,ssl_context=nil,dns_timeout=nil,connect_timeout=nil,reconnect=true,command_timeout=nil,namespace:String?="",&block)-class-method","html_id":"open(host=&quot;localhost&quot;,port=6379,unixsocket=nil,password=nil,database=nil,url=nil,ssl=false,ssl_context=nil,dns_timeout=nil,connect_timeout=nil,reconnect=true,command_timeout=nil,namespace:String?=&quot;&quot;,&block)-class-method","name":"open","doc":"Opens a Redis connection, yields the given block with a Redis object and closes the connection.\n\n**Options**:\n* host - the host to connect to\n* port - the port to connect to\n* unixsocket - instead of using TCP, you can connect to Redis via a Unix domain socket by passing its path here (e.g. \"/tmp/redis.sock\")\n* password - the password for authentication against the server. This is a convenience which saves you the extra call to the Redis `auth` command.\n* database - the number of the database to select. This a convenience which saves you a call a call to `#select`.\n* ssl - whether SSL should be enabled.\n* ssl_context - a OpenSSL::SSL::Context::Client.\n* dns_timeout - the dns timeout.\n* connect_timeout - the connect timeout.\n* command_timeout - the command timeout - applies when a command takes too long because the Redis-server is blocked by another command or by a dump.\n* reconnect - whether we should reconnect when we encounter a disconnected Redis connection.\n* url - Redis url. If this is given, it overrides all others.\n\nExample:\n\n```\nRedis.open do |redis|\n redis.incr(\"counter\")\nend\n```","summary":"

    Opens a Redis connection, yields the given block with a Redis object and closes the connection.

    ","abstract":false,"args":[{"name":"host","doc":null,"default_value":"\"localhost\"","external_name":"host","restriction":""},{"name":"port","doc":null,"default_value":"6379","external_name":"port","restriction":""},{"name":"unixsocket","doc":null,"default_value":"nil","external_name":"unixsocket","restriction":""},{"name":"password","doc":null,"default_value":"nil","external_name":"password","restriction":""},{"name":"database","doc":null,"default_value":"nil","external_name":"database","restriction":""},{"name":"url","doc":null,"default_value":"nil","external_name":"url","restriction":""},{"name":"ssl","doc":null,"default_value":"false","external_name":"ssl","restriction":""},{"name":"ssl_context","doc":null,"default_value":"nil","external_name":"ssl_context","restriction":""},{"name":"dns_timeout","doc":null,"default_value":"nil","external_name":"dns_timeout","restriction":""},{"name":"connect_timeout","doc":null,"default_value":"nil","external_name":"connect_timeout","restriction":""},{"name":"reconnect","doc":null,"default_value":"true","external_name":"reconnect","restriction":""},{"name":"command_timeout","doc":null,"default_value":"nil","external_name":"command_timeout","restriction":""},{"name":"namespace","doc":null,"default_value":"\"\"","external_name":"namespace","restriction":"String | ::Nil"}],"args_string":"(host = "localhost", port = 6379, unixsocket = nil, password = nil, database = nil, url = nil, ssl = false, ssl_context = nil, dns_timeout = nil, connect_timeout = nil, reconnect = true, command_timeout = nil, namespace : String? = "", &block)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis.cr#L194","def":{"name":"open","args":[{"name":"host","doc":null,"default_value":"\"localhost\"","external_name":"host","restriction":""},{"name":"port","doc":null,"default_value":"6379","external_name":"port","restriction":""},{"name":"unixsocket","doc":null,"default_value":"nil","external_name":"unixsocket","restriction":""},{"name":"password","doc":null,"default_value":"nil","external_name":"password","restriction":""},{"name":"database","doc":null,"default_value":"nil","external_name":"database","restriction":""},{"name":"url","doc":null,"default_value":"nil","external_name":"url","restriction":""},{"name":"ssl","doc":null,"default_value":"false","external_name":"ssl","restriction":""},{"name":"ssl_context","doc":null,"default_value":"nil","external_name":"ssl_context","restriction":""},{"name":"dns_timeout","doc":null,"default_value":"nil","external_name":"dns_timeout","restriction":""},{"name":"connect_timeout","doc":null,"default_value":"nil","external_name":"connect_timeout","restriction":""},{"name":"reconnect","doc":null,"default_value":"true","external_name":"reconnect","restriction":""},{"name":"command_timeout","doc":null,"default_value":"nil","external_name":"command_timeout","restriction":""},{"name":"namespace","doc":null,"default_value":"\"\"","external_name":"namespace","restriction":"String | ::Nil"}],"double_splat":null,"splat_index":null,"yields":1,"block_arg":null,"return_type":"","visibility":"Public","body":"redis = Redis.new(host, port, unixsocket, password, database, url, ssl, ssl_context, dns_timeout, connect_timeout, reconnect, command_timeout, namespace)\nbegin\n yield redis\nensure\n redis.close\nend\n"}}],"constructors":[{"id":"new(host="localhost",port=6379,unixsocket:String?=nil,password:String?=nil,database:Int32?=nil,url=nil,ssl=false,ssl_context:OpenSSL::SSL::Context::Client?=nil,dns_timeout:Time::Span?=nil,connect_timeout:Time::Span?=nil,reconnect=true,command_timeout:Time::Span?=nil,namespace:String?="")-class-method","html_id":"new(host=&quot;localhost&quot;,port=6379,unixsocket:String?=nil,password:String?=nil,database:Int32?=nil,url=nil,ssl=false,ssl_context:OpenSSL::SSL::Context::Client?=nil,dns_timeout:Time::Span?=nil,connect_timeout:Time::Span?=nil,reconnect=true,command_timeout:Time::Span?=nil,namespace:String?=&quot;&quot;)-class-method","name":"new","doc":"Opens a Redis connection\n\n**Options**:\n* host - the host to connect to\n* port - the port to connect to\n* unixsocket - instead of using TCP, you can connect to Redis via a Unix domain socket by passing its path here (e.g. \"/tmp/redis.sock\")\n* password - the password for authentication against the server. This is a convenience which saves you the extra call to the Redis `auth` command.\n* database - the number of the database to select. This a convenience which saves you a call a call to `#select`.\n* ssl - whether SSL should be enabled.\n* ssl_context - a OpenSSL::SSL::Context::Client.\n* dns_timeout - the dns timeout.\n* connect_timeout - the connect timeout.\n* command_timeout - the command timeout - applies when a command takes too long because the Redis-server is blocked by another command or by a dump.\n* reconnect - whether we should reconnect when we encounter a disconnected Redis connection.\n* url - Redis url. If this is given, it overrides all others.\n\nExample:\n\n```\nredis = Redis.new\nredis.incr(\"counter\")\nredis.close\n```\n\nExample:\n\n```\nredis = Redis.new(host: \"localhost\", port: 6379)\n...\n```\n\nExample:\n\n```\nredis = Redis.new(unixsocket: \"/tmp/redis.sock\")\n...\n```\n\nExample:\n\n```\nredis = Redis.new(url: \"redis://:my-secret-pw@my.redis.com:6380/my-database\")\n...\n```","summary":"

    Opens a Redis connection

    ","abstract":false,"args":[{"name":"host","doc":null,"default_value":"\"localhost\"","external_name":"host","restriction":""},{"name":"port","doc":null,"default_value":"6379","external_name":"port","restriction":""},{"name":"unixsocket","doc":null,"default_value":"nil","external_name":"unixsocket","restriction":"String | ::Nil"},{"name":"password","doc":null,"default_value":"nil","external_name":"password","restriction":"String | ::Nil"},{"name":"database","doc":null,"default_value":"nil","external_name":"database","restriction":"Int32 | ::Nil"},{"name":"url","doc":null,"default_value":"nil","external_name":"url","restriction":""},{"name":"ssl","doc":null,"default_value":"false","external_name":"ssl","restriction":""},{"name":"ssl_context","doc":null,"default_value":"nil","external_name":"ssl_context","restriction":"OpenSSL::SSL::Context::Client | ::Nil"},{"name":"dns_timeout","doc":null,"default_value":"nil","external_name":"dns_timeout","restriction":"Time::Span | ::Nil"},{"name":"connect_timeout","doc":null,"default_value":"nil","external_name":"connect_timeout","restriction":"Time::Span | ::Nil"},{"name":"reconnect","doc":null,"default_value":"true","external_name":"reconnect","restriction":""},{"name":"command_timeout","doc":null,"default_value":"nil","external_name":"command_timeout","restriction":"Time::Span | ::Nil"},{"name":"namespace","doc":null,"default_value":"\"\"","external_name":"namespace","restriction":"String | ::Nil"}],"args_string":"(host = "localhost", port = 6379, unixsocket : String? = nil, password : String? = nil, database : Int32? = nil, url = nil, ssl = false, ssl_context : OpenSSL::SSL::Context::Client? = nil, dns_timeout : Time::Span? = nil, connect_timeout : Time::Span? = nil, reconnect = true, command_timeout : Time::Span? = nil, namespace : String? = "")","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis.cr#L95","def":{"name":"new","args":[{"name":"host","doc":null,"default_value":"\"localhost\"","external_name":"host","restriction":""},{"name":"port","doc":null,"default_value":"6379","external_name":"port","restriction":""},{"name":"unixsocket","doc":null,"default_value":"nil","external_name":"unixsocket","restriction":"String | ::Nil"},{"name":"password","doc":null,"default_value":"nil","external_name":"password","restriction":"String | ::Nil"},{"name":"database","doc":null,"default_value":"nil","external_name":"database","restriction":"Int32 | ::Nil"},{"name":"url","doc":null,"default_value":"nil","external_name":"url","restriction":""},{"name":"ssl","doc":null,"default_value":"false","external_name":"ssl","restriction":""},{"name":"ssl_context","doc":null,"default_value":"nil","external_name":"ssl_context","restriction":"OpenSSL::SSL::Context::Client | ::Nil"},{"name":"dns_timeout","doc":null,"default_value":"nil","external_name":"dns_timeout","restriction":"Time::Span | ::Nil"},{"name":"connect_timeout","doc":null,"default_value":"nil","external_name":"connect_timeout","restriction":"Time::Span | ::Nil"},{"name":"reconnect","doc":null,"default_value":"true","external_name":"reconnect","restriction":""},{"name":"command_timeout","doc":null,"default_value":"nil","external_name":"command_timeout","restriction":"Time::Span | ::Nil"},{"name":"namespace","doc":null,"default_value":"\"\"","external_name":"namespace","restriction":"String | ::Nil"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"_ = allocate\n_.initialize(host, port, unixsocket, password, database, url, ssl, ssl_context, dns_timeout, connect_timeout, reconnect, command_timeout, namespace)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"id":"close-instance-method","html_id":"close-instance-method","name":"close","doc":"Closes the Redis connection.","summary":"

    Closes the Redis connection.

    ","abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis.cr#L207","def":{"name":"close","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"@connection.try(&.close)\n@connection = nil\n@strategy = nil\n"}},{"id":"multi(&block)-instance-method","html_id":"multi(&block)-instance-method","name":"multi","doc":"Sends Redis commands in transaction mode.\n\nYields its block. The block receives as argument\nan object that has the same API as this class, except:\n * it participates in the transaction\n * all the Redis commands return Futures\n * there is an additional method #discard that will abort the transaction.\n\n**Return value**: an array with all the responses\n- one element for each executed command.\n\nExample:\n\n```\nredis.multi do |multi|\n multi.set(\"foo1\", \"first\")\n multi.set(\"foo2\", \"second\")\nend\n```\n\nSee the [examples repository](https://github.com/stefanwille/crystal-redis-examples) for more examples.","summary":"

    Sends Redis commands in transaction mode.

    ","abstract":false,"args":[],"args_string":"(&block)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis.cr#L286","def":{"name":"multi","args":[],"double_splat":null,"splat_index":null,"yields":1,"block_arg":null,"return_type":"","visibility":"Public","body":"begin\n @strategy = Redis::Strategy::PauseDuringTransaction.new\n transaction_strategy = Redis::Strategy::Transaction.new(connection)\n transaction_strategy.begin\n transaction_api = Redis::TransactionApi.new(transaction_strategy, @namespace.to_s)\n yield transaction_api\n transaction_strategy.commit.as(Array(RedisValue))\nrescue ex : Redis::ConnectionError | Redis::CommandTimeoutError\n close\n raise(ex)\nensure\n if @connection\n @strategy = Redis::Strategy::SingleStatement.new(@connection.not_nil!)\n end\nend"}},{"id":"pipelined(&block)-instance-method","html_id":"pipelined(&block)-instance-method","name":"pipelined","doc":"Sends Redis commands in pipeline mode.\n\nYields its block. The block receives as argument\nan object that has the same API as this class, except\nit participates in pipelining and all Redis commands return Futures.\n\n**Return value**: an array with all the responses\n- one element for each executed command.\n\nExample:\n\n```\nredis.pipelined do |pipeline|\n pipeline.set(\"foo1\", \"first\")\n pipeline.set(\"foo2\", \"second\")\nend\n```\n\nSee the [examples repository](https://github.com/stefanwille/crystal-redis-examples) for more examples.","summary":"

    Sends Redis commands in pipeline mode.

    ","abstract":false,"args":[],"args_string":"(&block)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis.cr#L250","def":{"name":"pipelined","args":[],"double_splat":null,"splat_index":null,"yields":1,"block_arg":null,"return_type":"","visibility":"Public","body":"begin\n @strategy = Redis::Strategy::PauseDuringPipeline.new\n pipeline_strategy = Redis::Strategy::Pipeline.new(connection)\n pipeline_api = Redis::PipelineApi.new(pipeline_strategy, @namespace.to_s)\n yield pipeline_api\n pipeline_strategy.commit.as(Array(RedisValue))\nrescue ex : Redis::ConnectionError | Redis::CommandTimeoutError\n close\n raise(ex)\nensure\n if @connection\n @strategy = Redis::Strategy::SingleStatement.new(@connection.not_nil!)\n end\nend"}},{"id":"url-instance-method","html_id":"url-instance-method","name":"url","doc":"Returns the server URL for this client.","summary":"

    Returns the server URL for this client.

    ","abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis.cr#L214","def":{"name":"url","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"scheme = @ssl ? \"rediss\" : \"redis\"\nif @unixsocket\n \"#{scheme}://#{@unixsocket}/#{@database || 0}\"\nelse\n \"#{scheme}://#{@host}:#{@port}/#{@database || 0}\"\nend\n"}}],"macros":[],"types":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/CannotConnectError","path":"Redis/CannotConnectError.html","kind":"class","full_name":"Redis::CannotConnectError","name":"CannotConnectError","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Redis/ConnectionError","kind":"class","full_name":"Redis::ConnectionError","name":"ConnectionError"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/ConnectionError","kind":"class","full_name":"Redis::ConnectionError","name":"ConnectionError"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"github.com/stefanwille/crystal-redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/error.cr","line_number":10,"url":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/error.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"Raised when connecting to the Redis server is not possible.","summary":"

    Raised when connecting to the Redis server is not possible.

    ","class_methods":[],"constructors":[],"instance_methods":[],"macros":[],"types":[]},{"html_id":"github.com/stefanwille/crystal-redis/Redis/Commands","path":"Redis/Commands.html","kind":"module","full_name":"Redis::Commands","name":"Commands","abstract":false,"superclass":null,"ancestors":[],"locations":[{"filename":"redis/commands.cr","line_number":4,"url":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[],"including_types":[{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/PipelineApi","kind":"class","full_name":"Redis::PipelineApi","name":"PipelineApi"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/TransactionApi","kind":"class","full_name":"Redis::TransactionApi","name":"TransactionApi"}],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"Definition of all Redis commands except pipelining and transactions.\n","summary":"

    Definition of all Redis commands except pipelining and transactions.

    ","class_methods":[],"constructors":[],"instance_methods":[{"id":"append(key,value)-instance-method","html_id":"append(key,value)-instance-method","name":"append","doc":"If key already exists and is a string, this command appends the value at the end of the string.\nIf key does not exist it is created and set as an empty string, so APPEND will be similar to SET in this special case.\n\n**Return value**: Integer, the length of the string after the append operation.\n\nExample:\n\n```\nredis.append(\"foo\", \" world\")\n```","summary":"

    If key already exists and is a string, this command appends the value at the end of the string.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L375","def":{"name":"append","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"APPEND\", namespaced(key), value.to_s])"}},{"id":"auth(password)-instance-method","html_id":"auth(password)-instance-method","name":"auth","doc":"Request for authentication in a password-protected Redis server.\n\n**Return value**: \"OK\"","summary":"

    Request for authentication in a password-protected Redis server.

    ","abstract":false,"args":[{"name":"password","doc":null,"default_value":"","external_name":"password","restriction":""}],"args_string":"(password)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L87","def":{"name":"auth","args":[{"name":"password","doc":null,"default_value":"","external_name":"password","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"AUTH\", password])"}},{"id":"bitcount(key,from=nil,to=nil)-instance-method","html_id":"bitcount(key,from=nil,to=nil)-instance-method","name":"bitcount","doc":"Count the number of set bits (population counting) in a string.\nBy default all the bytes contained in the string are examined.\n\n**Options**:\n\n* from / to - It is possible to specify the counting operation only in an interval passing the additional arguments from and to.\n\n**Return value** Integer, the number of bits set to 1.\n\nExample:\n\n```\nredis.bitcount(\"foo\", 0, 0)\n```","summary":"

    Count the number of set bits (population counting) in a string.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"from","doc":null,"default_value":"nil","external_name":"from","restriction":""},{"name":"to","doc":null,"default_value":"nil","external_name":"to","restriction":""}],"args_string":"(key, from = nil, to = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L427","def":{"name":"bitcount","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"from","doc":null,"default_value":"nil","external_name":"from","restriction":""},{"name":"to","doc":null,"default_value":"nil","external_name":"to","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"BITCOUNT\", namespaced(key)]\nif from\n if to\n q << from.to_s\n q << to.to_s\n else\n raise(Redis::Error.new(\"from specified, but not to\"))\n end\nend\ninteger_command(q)\n"}},{"id":"bitop(operation,key,*keys:String):Int64-instance-method","html_id":"bitop(operation,key,*keys:String):Int64-instance-method","name":"bitop","doc":"Perform a bitwise operation between multiple keys (containing string values) and store the result in the destination key.\n\n**Return value**: Integer, the size of the string stored in the destination key, that is equal to the size of the longest input string.\n\nExample:\n\n```\nredis.bitop(\"and\", \"dest\", \"key1\", \"key2\")\n```","summary":"

    Perform a bitwise operation between multiple keys (containing string values) and store the result in the destination key.

    ","abstract":false,"args":[{"name":"operation","doc":null,"default_value":"","external_name":"operation","restriction":""},{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"args_string":"(operation, key, *keys : String) : Int64","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L454","def":{"name":"bitop","args":[{"name":"operation","doc":null,"default_value":"","external_name":"operation","restriction":""},{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"double_splat":null,"splat_index":2,"yields":null,"block_arg":null,"return_type":"Int64","visibility":"Public","body":"bitop(operation, key, keys.to_a)"}},{"id":"bitop(operation,key,keys:Array(String)):Int64-instance-method","html_id":"bitop(operation,key,keys:Array(String)):Int64-instance-method","name":"bitop","doc":"Perform a bitwise operation between multiple keys (containing string values) and store the result in the destination key.\n\n**Return value**: Integer, the size of the string stored in the destination key, that is equal to the size of the longest input string.\n\nExample:\n\n```\nredis.bitop(\"and\", \"dest\", \"key1\", \"key2\")\n```","summary":"

    Perform a bitwise operation between multiple keys (containing string values) and store the result in the destination key.

    ","abstract":false,"args":[{"name":"operation","doc":null,"default_value":"","external_name":"operation","restriction":""},{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"args_string":"(operation, key, keys : Array(String)) : Int64","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L449","def":{"name":"bitop","args":[{"name":"operation","doc":null,"default_value":"","external_name":"operation","restriction":""},{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Int64","visibility":"Public","body":"integer_command(concat([\"BITOP\", operation.to_s, namespaced(key)], namespaced(keys)))"}},{"id":"bitpos(key,bit,start=nil,to=nil)-instance-method","html_id":"bitpos(key,bit,start=nil,to=nil)-instance-method","name":"bitpos","doc":"Return the position of the first bit set to 1 or 0 in a string.\n\n**Options**:\n\n* start / to - By default, all the bytes contained in the string are examined. It is possible to look for bits only in a specified interval passing the additional arguments start and to (it is possible to just pass start, the operation will assume that the to is the last byte of the string.\n\n**Return value**: Integer, the command returns the position of the first bit set to 1 or 0 according to the request.\n\nExample:\n\n```\nredis.set(\"mykey\", \"0\")\nredis.bitpos(\"mykey\", 1) # => 2\n```","summary":"

    Return the position of the first bit set to 1 or 0 in a string.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"bit","doc":null,"default_value":"","external_name":"bit","restriction":""},{"name":"start","doc":null,"default_value":"nil","external_name":"start","restriction":""},{"name":"to","doc":null,"default_value":"nil","external_name":"to","restriction":""}],"args_string":"(key, bit, start = nil, to = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L492","def":{"name":"bitpos","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"bit","doc":null,"default_value":"","external_name":"bit","restriction":""},{"name":"start","doc":null,"default_value":"nil","external_name":"start","restriction":""},{"name":"to","doc":null,"default_value":"nil","external_name":"to","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"BITPOS\", namespaced(key), bit.to_s] of RedisValue\nif start\n q << start.to_s\n if to\n q << to\n end\nend\ninteger_command(q)\n"}},{"id":"blpop(keys,timeout_in_seconds)-instance-method","html_id":"blpop(keys,timeout_in_seconds)-instance-method","name":"blpop","doc":"BLPOP is a blocking list pop primitive.\nIt is the blocking version of LPOP because it blocks the connection when there\nare no elements to pop from any of the given lists.\nAn element is popped from the head of the first list that is non-empty,\nwith the given keys being checked in the order that they are given.\n\nThe timeout_in_seconds argument is interpreted as an integer value specifying the maximum number of seconds to block\n\n**Return value**: Array, specifically:\n* An array of nils when no element could be popped and the timeout expired.\n* An array of two-element arrays with the first element being the name of the key where an element was popped and the second element being the value of the popped element.\n\nExample:\n\n```\nredis.blpop([\"myotherlist\", \"mylist\"], 1) # => [\"mylist\", \"hello\"]\n```","summary":"

    BLPOP is a blocking list pop primitive.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":""},{"name":"timeout_in_seconds","doc":null,"default_value":"","external_name":"timeout_in_seconds","restriction":""}],"args_string":"(keys, timeout_in_seconds)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L910","def":{"name":"blpop","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":""},{"name":"timeout_in_seconds","doc":null,"default_value":"","external_name":"timeout_in_seconds","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = concat([\"BLPOP\"], namespaced(keys))\nq << timeout_in_seconds.to_s\nresult = array_or_nil_command(q)\nif result\nelse\n return result\nend\nresult[0] = without_namespace(\"#{result.first}\")\nresult\n"}},{"id":"brpop(keys,timeout_in_seconds)-instance-method","html_id":"brpop(keys,timeout_in_seconds)-instance-method","name":"brpop","doc":"BRPOP is a blocking list pop primitive.\nIt is the blocking version of RPOP because it blocks the connection when there\nare no elements to pop from any of the given lists.\nAn element is popped from the tail of the first list that is non-empty,\nwith the given keys being checked in the order that they are given.\n\nThe timeout_in_seconds argument is interpreted as an integer value specifying the maximum\nnumber of seconds to block.\n\n**Return value**: Array, specifically:\n* An array of nils when no element could be popped and the timeout expired.\n* An array of two-element arrays with the first element being the name of the key where an element was popped and the second element being the value of the popped element.\n\nExample:\n\n```\nredis.brpop([\"myotherlist\", \"mylist\"], 1) # => [\"mylist\", \"world\"]\n```","summary":"

    BRPOP is a blocking list pop primitive.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":""},{"name":"timeout_in_seconds","doc":null,"default_value":"","external_name":"timeout_in_seconds","restriction":""}],"args_string":"(keys, timeout_in_seconds)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L939","def":{"name":"brpop","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":""},{"name":"timeout_in_seconds","doc":null,"default_value":"","external_name":"timeout_in_seconds","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = concat([\"BRPOP\"], namespaced(keys))\nq << timeout_in_seconds.to_s\nresult = array_or_nil_command(q)\nif result\nelse\n return result\nend\nresult[0] = without_namespace(\"#{result.first}\")\nresult\n"}},{"id":"brpoplpush(source,destination,timeout_in_seconds=nil)-instance-method","html_id":"brpoplpush(source,destination,timeout_in_seconds=nil)-instance-method","name":"brpoplpush","doc":"BRPOPLPUSH is the blocking variant of RPOPLPUSH.\nWhen source contains elements, this command behaves exactly like RPOPLPUSH.\n\n**Options**:\n\n* timeout_in_seconds - interpreted as an integer value specifying the maximum number of seconds to block\n\nSee RPOPLPUSH for more information.\n\n**Return value**: String, the element being popped from source and pushed to destination.\nIf timeout is reached, nil is returned.\n\nExample:\n\n```\nredis.brpoplpush(\"source\", \"destination\", 0)\n```","summary":"

    BRPOPLPUSH is the blocking variant of RPOPLPUSH.

    ","abstract":false,"args":[{"name":"source","doc":null,"default_value":"","external_name":"source","restriction":""},{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"timeout_in_seconds","doc":null,"default_value":"nil","external_name":"timeout_in_seconds","restriction":""}],"args_string":"(source, destination, timeout_in_seconds = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L975","def":{"name":"brpoplpush","args":[{"name":"source","doc":null,"default_value":"","external_name":"source","restriction":""},{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"timeout_in_seconds","doc":null,"default_value":"nil","external_name":"timeout_in_seconds","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"BRPOPLPUSH\", source.to_s, destination.to_s]\nif timeout_in_seconds\n q << timeout_in_seconds.to_s\nend\nstring_or_nil_command(q)\n"}},{"id":"decr(key)-instance-method","html_id":"decr(key)-instance-method","name":"decr","doc":"Decrements the number stored at key by one.\n\n**Return value**: Integer, the value of key after the decrement","summary":"

    Decrements the number stored at key by one.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L328","def":{"name":"decr","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"DECR\", namespaced(key)])"}},{"id":"decrby(key,decrement)-instance-method","html_id":"decrby(key,decrement)-instance-method","name":"decrby","doc":"Decrements the number stored at key by decrement.\n\n**Return value**: Integer, the value of key after the decrement","summary":"

    Decrements the number stored at key by decrement.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"decrement","doc":null,"default_value":"","external_name":"decrement","restriction":""}],"args_string":"(key, decrement)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L361","def":{"name":"decrby","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"decrement","doc":null,"default_value":"","external_name":"decrement","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"DECRBY\", namespaced(key), decrement.to_s])"}},{"id":"del(keys:Array)-instance-method","html_id":"del(keys:Array)-instance-method","name":"del","doc":"Removes the specified keys.\n\n**Return value**: Integer, the number of keys that were removed.\n\nExample:\n\n```\nredis.del([\"some\", \"keys\", \"to\", \"delete\"])\n```","summary":"

    Removes the specified keys.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array"}],"args_string":"(keys : Array)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L155","def":{"name":"del","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command(concat([\"DEL\"], namespaced(keys)))"}},{"id":"del(*keys)-instance-method","html_id":"del(*keys)-instance-method","name":"del","doc":"Removes the specified keys.\n\n**Return value**: Integer, the number of keys that were removed.\n\nExample:\n\n```\nredis.del(\"some\", \"keys\", \"to\", \"delete\")\n```","summary":"

    Removes the specified keys.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":""}],"args_string":"(*keys)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L142","def":{"name":"del","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":""}],"double_splat":null,"splat_index":0,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"del(keys.to_a)"}},{"id":"dump(key)-instance-method","html_id":"dump(key)-instance-method","name":"dump","doc":"Serialize the value stored at key in a Redis-specific format and return it to the user.\n\n**Return value**: String, the serialized value.","summary":"

    Serialize the value stored at key in a Redis-specific format and return it to the user.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L506","def":{"name":"dump","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"DUMP\", namespaced(key)])"}},{"id":"echo(message)-instance-method","html_id":"echo(message)-instance-method","name":"echo","doc":"Returns the given message.\n\nExample:\n\n```\nredis.echo(\"Hello Redis\") # => \"Hello Redis\"\n```","summary":"

    Returns the given message.

    ","abstract":false,"args":[{"name":"message","doc":null,"default_value":"","external_name":"message","restriction":""}],"args_string":"(message)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L12","def":{"name":"echo","args":[{"name":"message","doc":null,"default_value":"","external_name":"message","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"ECHO\", message.to_s])"}},{"id":"eval(script:String,keys=[]ofRedisValue,args=[]ofRedisValue)-instance-method","html_id":"eval(script:String,keys=[]ofRedisValue,args=[]ofRedisValue)-instance-method","name":"eval","doc":"EVAL and EVALSHA are used to evaluate scripts using the Lua interpreter\nbuilt into Redis starting from version 2.6.0.\n\n**Return value**: Array(String), depends on the executed script\n\nExample:\n\n```\nredis.eval(\"return {KEYS[1],KEYS[2],ARGV[1],ARGV[2]}\", [\"key1\", \"key2\"], [\"first art\", \"second arg\"])\n```","summary":"

    EVAL and EVALSHA are used to evaluate scripts using the Lua interpreter built into Redis starting from version 2.6.0.

    ","abstract":false,"args":[{"name":"script","doc":null,"default_value":"","external_name":"script","restriction":"String"},{"name":"keys","doc":null,"default_value":"[] of RedisValue","external_name":"keys","restriction":""},{"name":"args","doc":null,"default_value":"[] of RedisValue","external_name":"args","restriction":""}],"args_string":"(script : String, keys = [] of RedisValue, args = [] of RedisValue)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1480","def":{"name":"eval","args":[{"name":"script","doc":null,"default_value":"","external_name":"script","restriction":"String"},{"name":"keys","doc":null,"default_value":"[] of RedisValue","external_name":"keys","restriction":""},{"name":"args","doc":null,"default_value":"[] of RedisValue","external_name":"args","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_array_command(concat([\"EVAL\", script, keys.size.to_s], keys, args))"}},{"id":"evalsha(sha1,keys=[]ofRedisValue,args=[]ofRedisValue)-instance-method","html_id":"evalsha(sha1,keys=[]ofRedisValue,args=[]ofRedisValue)-instance-method","name":"evalsha","doc":"EVAL and EVALSHA are used to evaluate scripts using the Lua interpreter\nbuilt into Redis starting from version 2.6.0.\n\n**Return value**: Array(String), depends on the executed script","summary":"

    EVAL and EVALSHA are used to evaluate scripts using the Lua interpreter built into Redis starting from version 2.6.0.

    ","abstract":false,"args":[{"name":"sha1","doc":null,"default_value":"","external_name":"sha1","restriction":""},{"name":"keys","doc":null,"default_value":"[] of RedisValue","external_name":"keys","restriction":""},{"name":"args","doc":null,"default_value":"[] of RedisValue","external_name":"args","restriction":""}],"args_string":"(sha1, keys = [] of RedisValue, args = [] of RedisValue)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1488","def":{"name":"evalsha","args":[{"name":"sha1","doc":null,"default_value":"","external_name":"sha1","restriction":""},{"name":"keys","doc":null,"default_value":"[] of RedisValue","external_name":"keys","restriction":""},{"name":"args","doc":null,"default_value":"[] of RedisValue","external_name":"args","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_array_command(concat([\"EVALSHA\", sha1.to_s, keys.size.to_s], keys, args))"}},{"id":"exists(key)-instance-method","html_id":"exists(key)-instance-method","name":"exists","doc":"Returns if key exists.\n\n**Return value**:\n* 1 if the key exists.\n* 0 if the key does not exist.","summary":"

    Returns if key exists.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L558","def":{"name":"exists","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"EXISTS\", namespaced(key)])"}},{"id":"expire(key,seconds)-instance-method","html_id":"expire(key,seconds)-instance-method","name":"expire","doc":"Set a timeout on key.\n\n**Return value**: Integeger, specifically:\n* 1 if the timeout was set.\n* 0 if key does not exist or the timeout could not be set.\n\nExample:\n\n```\nredis.expire(\"temp\", 2)\n```","summary":"

    Set a timeout on key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"seconds","doc":null,"default_value":"","external_name":"seconds","restriction":""}],"args_string":"(key, seconds)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1556","def":{"name":"expire","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"seconds","doc":null,"default_value":"","external_name":"seconds","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"EXPIRE\", namespaced(key), seconds.to_s])"}},{"id":"expireat(key,unix_date)-instance-method","html_id":"expireat(key,unix_date)-instance-method","name":"expireat","doc":"EXPIREAT has the same effect and semantic as EXPIRE, but instead of\nspecifying the number of seconds representing the TTL (time to live),\nit takes an absolute Unix timestamp (seconds since January 1, 1970).\n\n**Return value**: Integeger, specifically:\n* 1 if the timeout was set.\n* 0 if key does not exist or the timeout could not be set.","summary":"

    EXPIREAT has the same effect and semantic as EXPIRE, but instead of specifying the number of seconds representing the TTL (time to live), it takes an absolute Unix timestamp (seconds since January 1, 1970).

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"unix_date","doc":null,"default_value":"","external_name":"unix_date","restriction":""}],"args_string":"(key, unix_date)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1577","def":{"name":"expireat","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"unix_date","doc":null,"default_value":"","external_name":"unix_date","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"EXPIREAT\", namespaced(key), unix_date.to_s])"}},{"id":"flushall-instance-method","html_id":"flushall-instance-method","name":"flushall","doc":"Flush all databases.\n\n**Return value**: \"OK\"","summary":"

    Flush all databases.

    ","abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1534","def":{"name":"flushall","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"FLUSHALL\"])"}},{"id":"flushdb-instance-method","html_id":"flushdb-instance-method","name":"flushdb","doc":"Flush the current database.\n\n**Return value**: \"OK\"","summary":"

    Flush the current database.

    ","abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1527","def":{"name":"flushdb","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"FLUSHDB\"])"}},{"id":"geoadd(key,longitude,latitude,place)-instance-method","html_id":"geoadd(key,longitude,latitude,place)-instance-method","name":"geoadd","doc":"Adds the specified geospatial items (latitude, longitude, name) to the specified key.\n\n**Return value**: Integer: The number of elements added to the sorted set, not including elements already existing for which the score was updated.","summary":"

    Adds the specified geospatial items (latitude, longitude, name) to the specified key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"longitude","doc":null,"default_value":"","external_name":"longitude","restriction":""},{"name":"latitude","doc":null,"default_value":"","external_name":"latitude","restriction":""},{"name":"place","doc":null,"default_value":"","external_name":"place","restriction":""}],"args_string":"(key, longitude, latitude, place)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1822","def":{"name":"geoadd","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"longitude","doc":null,"default_value":"","external_name":"longitude","restriction":""},{"name":"latitude","doc":null,"default_value":"","external_name":"latitude","restriction":""},{"name":"place","doc":null,"default_value":"","external_name":"place","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"GEOADD\", namespaced(key), longitude.to_s, latitude.to_s, place.to_s])"}},{"id":"geodist(key,member1,member2,unit=nil)-instance-method","html_id":"geodist(key,member1,member2,unit=nil)-instance-method","name":"geodist","doc":"Return the distance between two members in the geospatial index represented by the sorted set.\n\n**Return value**: String: returns the distance as a double (represented as a string) in the specified unit,\nor NULL if one or both the elements are missing","summary":"

    Return the distance between two members in the geospatial index represented by the sorted set.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"member1","doc":null,"default_value":"","external_name":"member1","restriction":""},{"name":"member2","doc":null,"default_value":"","external_name":"member2","restriction":""},{"name":"unit","doc":null,"default_value":"nil","external_name":"unit","restriction":""}],"args_string":"(key, member1, member2, unit = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1830","def":{"name":"geodist","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"member1","doc":null,"default_value":"","external_name":"member1","restriction":""},{"name":"member2","doc":null,"default_value":"","external_name":"member2","restriction":""},{"name":"unit","doc":null,"default_value":"nil","external_name":"unit","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"GEODIST\", namespaced(key), member1.to_s, member2.to_s]\nif unit\n q << unit.to_s\nend\nstring_or_nil_command(q)\n"}},{"id":"geohash(key,*args)-instance-method","html_id":"geohash(key,*args)-instance-method","name":"geohash","doc":"Return valid Geohash strings representing the position of one or more elements in a sorted set value representing a geospatial index\n\n**Return value**: Array(String): returns an array where each element is the Geohash corresponding to each\nmember name passed as argument to the command","summary":"

    Return valid Geohash strings representing the position of one or more elements in a sorted set value representing a geospatial index

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"args","doc":null,"default_value":"","external_name":"args","restriction":""}],"args_string":"(key, *args)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1840","def":{"name":"geohash","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"args","doc":null,"default_value":"","external_name":"args","restriction":""}],"double_splat":null,"splat_index":1,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"GEOHASH\", namespaced(key)]\nargs.each do |arg|\n q << arg.to_s\nend\nstring_array_command(q)\n"}},{"id":"geopos(key,*args)-instance-method","html_id":"geopos(key,*args)-instance-method","name":"geopos","doc":"Return the positions (longitude,latitude) of all the specified members of the geospatial index represented by the sorted set at key\n\n**Return value**: Array(String): returns an array where each element is a two elements array representing\nlongitude and latitude (x,y) of each member name passed as argument to the command","summary":"

    Return the positions (longitude,latitude) of all the specified members of the geospatial index represented by the sorted set at key

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"args","doc":null,"default_value":"","external_name":"args","restriction":""}],"args_string":"(key, *args)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1852","def":{"name":"geopos","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"args","doc":null,"default_value":"","external_name":"args","restriction":""}],"double_splat":null,"splat_index":1,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"GEOPOS\", namespaced(key)]\nargs.each do |arg|\n q << arg.to_s\nend\nstring_array_command(q)\n"}},{"id":"georadius(key,longitude,latitude,radius,unit,withcoord=nil,withdist=nil,withhash=nil,count=nil,sort=nil)-instance-method","html_id":"georadius(key,longitude,latitude,radius,unit,withcoord=nil,withdist=nil,withhash=nil,count=nil,sort=nil)-instance-method","name":"georadius","doc":"Return the members of a sorted set populated with geospatial information using GEOADD, which are within the borders\nof the area specified with the center location and the maximum distance from the center (the radius).\n\n**Return value**: Array(String): Returns a simple array or array of arrays, depending on the options passed\nhttps://redis.io/commands/georadius#return-value","summary":"

    Return the members of a sorted set populated with geospatial information using GEOADD, which are within the borders of the area specified with the center location and the maximum distance from the center (the radius).

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"longitude","doc":null,"default_value":"","external_name":"longitude","restriction":""},{"name":"latitude","doc":null,"default_value":"","external_name":"latitude","restriction":""},{"name":"radius","doc":null,"default_value":"","external_name":"radius","restriction":""},{"name":"unit","doc":null,"default_value":"","external_name":"unit","restriction":""},{"name":"withcoord","doc":null,"default_value":"nil","external_name":"withcoord","restriction":""},{"name":"withdist","doc":null,"default_value":"nil","external_name":"withdist","restriction":""},{"name":"withhash","doc":null,"default_value":"nil","external_name":"withhash","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""},{"name":"sort","doc":null,"default_value":"nil","external_name":"sort","restriction":""}],"args_string":"(key, longitude, latitude, radius, unit, withcoord = nil, withdist = nil, withhash = nil, count = nil, sort = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1865","def":{"name":"georadius","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"longitude","doc":null,"default_value":"","external_name":"longitude","restriction":""},{"name":"latitude","doc":null,"default_value":"","external_name":"latitude","restriction":""},{"name":"radius","doc":null,"default_value":"","external_name":"radius","restriction":""},{"name":"unit","doc":null,"default_value":"","external_name":"unit","restriction":""},{"name":"withcoord","doc":null,"default_value":"nil","external_name":"withcoord","restriction":""},{"name":"withdist","doc":null,"default_value":"nil","external_name":"withdist","restriction":""},{"name":"withhash","doc":null,"default_value":"nil","external_name":"withhash","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""},{"name":"sort","doc":null,"default_value":"nil","external_name":"sort","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"GEORADIUS\", namespaced(key), longitude.to_s, latitude.to_s, radius.to_s, unit.to_s]\nif withcoord\n q << \"WITHCOORD\"\nend\nif withdist\n q << \"WITHDIST\"\nend\nif withhash\n q << \"WITHHASH\"\nend\nif count\n q << count.to_s\nend\nif sort\n q << sort.to_s\nend\nstring_array_command(q)\n"}},{"id":"georadiusbymember(key,member,radius,unit,withcoord=nil,withdist=nil,withhash=nil,count=nil,sort=nil)-instance-method","html_id":"georadiusbymember(key,member,radius,unit,withcoord=nil,withdist=nil,withhash=nil,count=nil,sort=nil)-instance-method","name":"georadiusbymember","doc":"Exactly like GEORADIUS with the sole difference that instead of taking, as the center of the area to query, a longitude\nand latitude value, it takes the name of a member already existing inside the geospatial index represented by the sorted set\n\n**Return value**: Array(String): Returns a simple array or array of arrays, depending on the options passed\nhttps://redis.io/commands/georadius#return-value","summary":"

    Exactly like GEORADIUS with the sole difference that instead of taking, as the center of the area to query, a longitude and latitude value, it takes the name of a member already existing inside the geospatial index represented by the sorted set

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""},{"name":"radius","doc":null,"default_value":"","external_name":"radius","restriction":""},{"name":"unit","doc":null,"default_value":"","external_name":"unit","restriction":""},{"name":"withcoord","doc":null,"default_value":"nil","external_name":"withcoord","restriction":""},{"name":"withdist","doc":null,"default_value":"nil","external_name":"withdist","restriction":""},{"name":"withhash","doc":null,"default_value":"nil","external_name":"withhash","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""},{"name":"sort","doc":null,"default_value":"nil","external_name":"sort","restriction":""}],"args_string":"(key, member, radius, unit, withcoord = nil, withdist = nil, withhash = nil, count = nil, sort = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1880","def":{"name":"georadiusbymember","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""},{"name":"radius","doc":null,"default_value":"","external_name":"radius","restriction":""},{"name":"unit","doc":null,"default_value":"","external_name":"unit","restriction":""},{"name":"withcoord","doc":null,"default_value":"nil","external_name":"withcoord","restriction":""},{"name":"withdist","doc":null,"default_value":"nil","external_name":"withdist","restriction":""},{"name":"withhash","doc":null,"default_value":"nil","external_name":"withhash","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""},{"name":"sort","doc":null,"default_value":"nil","external_name":"sort","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"GEORADIUSBYMEMBER\", namespaced(key), member.to_s, radius.to_s, unit.to_s]\nif withcoord\n q << \"WITHCOORD\"\nend\nif withdist\n q << \"WITHDIST\"\nend\nif withhash\n q << \"WITHHASH\"\nend\nif count\n q << count.to_s\nend\nif sort\n q << sort.to_s\nend\nstring_array_command(q)\n"}},{"id":"get(key)-instance-method","html_id":"get(key)-instance-method","name":"get","doc":"Get the value of key.\n\n**Return value**: a String or nil\n\nExample:\n\n```\nredis.set(\"foo\", \"test\")\nredis.get(\"foo\") # => \"test\"\n```","summary":"

    Get the value of key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L66","def":{"name":"get","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_or_nil_command([\"GET\", namespaced(key)])"}},{"id":"getbit(key,index)-instance-method","html_id":"getbit(key,index)-instance-method","name":"getbit","doc":"Returns the bit value at offset in the string value stored at key.\n\n**Return value**: Integer, the bit value stored at offset.","summary":"

    Returns the bit value at offset in the string value stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"index","doc":null,"default_value":"","external_name":"index","restriction":""}],"args_string":"(key, index)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L461","def":{"name":"getbit","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"index","doc":null,"default_value":"","external_name":"index","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"GETBIT\", namespaced(key), index.to_s])"}},{"id":"getrange(key,start_index,end_index)-instance-method","html_id":"getrange(key,start_index,end_index)-instance-method","name":"getrange","doc":"Returns the substring of the string value stored at key, determined by the offsets start and end (both are inclusive).\n\n\nExample:\n\n```\nredis.set(\"foo\", \"This is a string\")\nredis.getrange(\"foo\", 0, 3) # => \"This\"\nredis.getrange(\"foo\", -3, -1) # => \"ing\"\n```","summary":"

    Returns the substring of the string value stored at key, determined by the offsets start and end (both are inclusive).

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start_index","doc":null,"default_value":"","external_name":"start_index","restriction":""},{"name":"end_index","doc":null,"default_value":"","external_name":"end_index","restriction":""}],"args_string":"(key, start_index, end_index)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L396","def":{"name":"getrange","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start_index","doc":null,"default_value":"","external_name":"start_index","restriction":""},{"name":"end_index","doc":null,"default_value":"","external_name":"end_index","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"GETRANGE\", namespaced(key), start_index.to_s, end_index.to_s])"}},{"id":"getset(key,value)-instance-method","html_id":"getset(key,value)-instance-method","name":"getset","doc":"Atomically sets key to value and returns the old value stored at key.\n\n**Return value**: String, the old value stored at key, or nil when key did not exist.\n\nExample:\n\n```\nredis.getset(\"foo\", \"new\") # => (the old value)\n```","summary":"

    Atomically sets key to value and returns the old value stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L260","def":{"name":"getset","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_or_nil_command([\"GETSET\", namespaced(key), value])"}},{"id":"hdel(key,field)-instance-method","html_id":"hdel(key,field)-instance-method","name":"hdel","doc":"Removes the specified fields from the hash stored at key.\n\n**Return value**: Integer, the number of fields that were removed from the hash,\nnot including specified but non existing fields.","summary":"

    Removes the specified fields from the hash stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""}],"args_string":"(key, field)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1023","def":{"name":"hdel","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"HDEL\", namespaced(key), field.to_s])"}},{"id":"hexists(key,field)-instance-method","html_id":"hexists(key,field)-instance-method","name":"hexists","doc":"Returns if field is an existing field in the hash stored at key.\n\n**Return value**: Integer, specifically:\n* 1 if the hash contains field.\n* 0 if the hash does not contain field, or key does not exist.","summary":"

    Returns if field is an existing field in the hash stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""}],"args_string":"(key, field)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1032","def":{"name":"hexists","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"HEXISTS\", namespaced(key), field.to_s])"}},{"id":"hget(key,field)-instance-method","html_id":"hget(key,field)-instance-method","name":"hget","doc":"Returns the value associated with field in the hash stored at key.\n\n**Return value**: String, the value associated with field, or nil\n\nExample:\n\n```\nredis.hget(\"myhash\", \"a\") # => \"434\"\n```","summary":"

    Returns the value associated with field in the hash stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""}],"args_string":"(key, field)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1007","def":{"name":"hget","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_or_nil_command([\"HGET\", namespaced(key), field.to_s])"}},{"id":"hgetall(key)-instance-method","html_id":"hgetall(key)-instance-method","name":"hgetall","doc":"Returns all fields and values of the hash stored at key.\n\n**Return value**: Array(String) of fields and their values stored in the hash,\nor an empty array when key does not exist.","summary":"

    Returns all fields and values of the hash stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1015","def":{"name":"hgetall","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_array_command([\"HGETALL\", namespaced(key)])"}},{"id":"hincrby(key,field,increment)-instance-method","html_id":"hincrby(key,field,increment)-instance-method","name":"hincrby","doc":"Increments the number stored at field in the hash stored at key by increment.\n\n**Return value**: Integer, the value at field after the increment operation.\n\nExample:\n\n```\nredis.hincrby(\"myhash\", \"field1\", \"3\") # => 4\n```","summary":"

    Increments the number stored at field in the hash stored at key by increment.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""},{"name":"increment","doc":null,"default_value":"","external_name":"increment","restriction":""}],"args_string":"(key, field, increment)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1045","def":{"name":"hincrby","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""},{"name":"increment","doc":null,"default_value":"","external_name":"increment","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"HINCRBY\", namespaced(key), field.to_s, increment.to_s])"}},{"id":"hincrbyfloat(key,field,increment)-instance-method","html_id":"hincrbyfloat(key,field,increment)-instance-method","name":"hincrbyfloat","doc":"Increment the specified field of an hash stored at key,\nand representing a floating point number, by the specified increment.\n\n**Return value**: String, the value at field after the increment operation.","summary":"

    Increment the specified field of an hash stored at key, and representing a floating point number, by the specified increment.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""},{"name":"increment","doc":null,"default_value":"","external_name":"increment","restriction":""}],"args_string":"(key, field, increment)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1053","def":{"name":"hincrbyfloat","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""},{"name":"increment","doc":null,"default_value":"","external_name":"increment","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"HINCRBYFLOAT\", namespaced(key), field.to_s, increment.to_s])"}},{"id":"hkeys(key)-instance-method","html_id":"hkeys(key)-instance-method","name":"hkeys","doc":"Returns all field names in the hash stored at key.\n\n**Return value**: Array(String) - list of fields in the hash, or an empty list when key does not exist.","summary":"

    Returns all field names in the hash stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1060","def":{"name":"hkeys","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_array_command([\"HKEYS\", namespaced(key)])"}},{"id":"hlen(key)-instance-method","html_id":"hlen(key)-instance-method","name":"hlen","doc":"Returns the number of fields contained in the hash stored at key.\n\n**Return value**: Integer, the number of fields in the hash, or 0 when key does not exist.","summary":"

    Returns the number of fields contained in the hash stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1067","def":{"name":"hlen","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"HLEN\", namespaced(key)])"}},{"id":"hmget(key,fields:Array(String)):Array(RedisValue)-instance-method","html_id":"hmget(key,fields:Array(String)):Array(RedisValue)-instance-method","name":"hmget","doc":"Returns the values associated with the specified fields in the hash stored at key.\n\n**Return value**: Array(RedisValue), the list of values associated with the given fields, in the same order as they are requested.","summary":"

    Returns the values associated with the specified fields in the hash stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"fields","doc":null,"default_value":"","external_name":"fields","restriction":"Array(String)"}],"args_string":"(key, fields : Array(String)) : Array(RedisValue)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1074","def":{"name":"hmget","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"fields","doc":null,"default_value":"","external_name":"fields","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Array(RedisValue)","visibility":"Public","body":"string_array_command(concat([\"HMGET\", namespaced(key)], fields))"}},{"id":"hmget(key,*fields:String):Array(RedisValue)-instance-method","html_id":"hmget(key,*fields:String):Array(RedisValue)-instance-method","name":"hmget","doc":"Returns the values associated with the specified fields in the hash stored at key.\n\n**Return value**: Array(RedisValue), the list of values associated with the given fields, in the same order as they are requested.","summary":"

    Returns the values associated with the specified fields in the hash stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"fields","doc":null,"default_value":"","external_name":"fields","restriction":"String"}],"args_string":"(key, *fields : String) : Array(RedisValue)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1079","def":{"name":"hmget","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"fields","doc":null,"default_value":"","external_name":"fields","restriction":"String"}],"double_splat":null,"splat_index":1,"yields":null,"block_arg":null,"return_type":"Array(RedisValue)","visibility":"Public","body":"hmget(key, fields.to_a)"}},{"id":"hmset(key,hash)-instance-method","html_id":"hmset(key,hash)-instance-method","name":"hmset","doc":"Sets the specified fields to their respective values in the hash stored at key.\n\n**Return value**: \"OK\"","summary":"

    Sets the specified fields to their respective values in the hash stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"hash","doc":null,"default_value":"","external_name":"hash","restriction":""}],"args_string":"(key, hash)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1086","def":{"name":"hmset","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"hash","doc":null,"default_value":"","external_name":"hash","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"HMSET\", namespaced(key)] of RedisValue\nhash.each do |field, value|\n (q << field.to_s) << value.to_s\nend\nstring_command(q)\n"}},{"id":"hscan(key,cursor,match=nil,count=nil)-instance-method","html_id":"hscan(key,cursor,match=nil,count=nil)-instance-method","name":"hscan","doc":"```\nredis.hscan(\"myhash\", 0)\nredis.hscan(\"myhash\", 0, \"foo*\")\nredis.hscan(\"myhash\", 0, \"foo*\", 1024)\n```","summary":"

    ` redis.hscan(\"myhash\", 0) redis.hscan(\"myhash\", 0, \"foo\") redis.hscan(\"myhash\", 0, \"foo\", 1024) `

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"cursor","doc":null,"default_value":"","external_name":"cursor","restriction":""},{"name":"match","doc":null,"default_value":"nil","external_name":"match","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""}],"args_string":"(key, cursor, match = nil, count = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1106","def":{"name":"hscan","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"cursor","doc":null,"default_value":"","external_name":"cursor","restriction":""},{"name":"match","doc":null,"default_value":"nil","external_name":"match","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"HSCAN\", namespaced(key), cursor.to_s]\nif match\n (q << \"MATCH\") << match.to_s\nend\nif count\n (q << \"COUNT\") << count.to_s\nend\nstring_array_command(q)\n"}},{"id":"hset(key,field,value)-instance-method","html_id":"hset(key,field,value)-instance-method","name":"hset","doc":"Sets field in the hash stored at key to value.\n\n**Return value**: Integer, specifically:\n* 1 if field is a new field in the hash and value was set.\n* 0 if field already exists in the hash and the value was updated.\n\nExample:\n\n```\nredis.hset(\"myhash\", \"a\", \"434\")\n```","summary":"

    Sets field in the hash stored at key to value.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, field, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L994","def":{"name":"hset","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"HSET\", namespaced(key), field.to_s, value.to_s])"}},{"id":"hsetnx(key,field,value)-instance-method","html_id":"hsetnx(key,field,value)-instance-method","name":"hsetnx","doc":"Sets field in the hash stored at key to value, only if field does not yet exist.\n\n**Return value**: Integer, specifically:\n* 1 if field is a new field in the hash and value was set.\n* 0 if field already exists in the hash and no operation was performed.","summary":"

    Sets field in the hash stored at key to value, only if field does not yet exist.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, field, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1118","def":{"name":"hsetnx","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"HSETNX\", namespaced(key), field.to_s, value.to_s])"}},{"id":"hvals(key)-instance-method","html_id":"hvals(key)-instance-method","name":"hvals","doc":"Returns all values in the hash stored at key.\n\n**Return value**: Array(String), the list of values in the hash, or an empty list when key does not exist.","summary":"

    Returns all values in the hash stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1125","def":{"name":"hvals","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_array_command([\"HVALS\", namespaced(key)])"}},{"id":"incr(key)-instance-method","html_id":"incr(key)-instance-method","name":"incr","doc":"Increments the number stored at key by one.\n\n**Return value**: Integer: the value of key after the increment\n\nExample:\n\n```\nredis.set(\"foo\", \"3\")\nredis.incr(\"foo\") # => 4\n```","summary":"

    Increments the number stored at key by one.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L321","def":{"name":"incr","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"INCR\", namespaced(key)])"}},{"id":"incrby(key,increment)-instance-method","html_id":"incrby(key,increment)-instance-method","name":"incrby","doc":"Increments the number stored at key by increment.\n\n**Return value**: Integer, the value of key after the increment\n\nExample:\n\n```\nredis.incrby(\"foo\", 4)\n```","summary":"

    Increments the number stored at key by increment.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"increment","doc":null,"default_value":"","external_name":"increment","restriction":""}],"args_string":"(key, increment)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L341","def":{"name":"incrby","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"increment","doc":null,"default_value":"","external_name":"increment","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"INCRBY\", namespaced(key), increment.to_s])"}},{"id":"incrbyfloat(key,increment)-instance-method","html_id":"incrbyfloat(key,increment)-instance-method","name":"incrbyfloat","doc":"Increment the string representing a floating point number stored at key by the specified increment.\n\n**Return value**: Integer, the value of key after the increment\n\nExample:\n\n```\nredis.incrbyfloat(\"foo\", 2.5)\n```","summary":"

    Increment the string representing a floating point number stored at key by the specified increment.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"increment","doc":null,"default_value":"","external_name":"increment","restriction":""}],"args_string":"(key, increment)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L354","def":{"name":"incrbyfloat","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"increment","doc":null,"default_value":"","external_name":"increment","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"INCRBYFLOAT\", namespaced(key), increment.to_s])"}},{"id":"info(section:String?=nil)-instance-method","html_id":"info(section:String?=nil)-instance-method","name":"info","doc":"The INFO command returns information and statistics about the server.\n\n**Return value**: A hash with the server information","summary":"

    The INFO command returns information and statistics about the server.

    ","abstract":false,"args":[{"name":"section","doc":null,"default_value":"nil","external_name":"section","restriction":"String | ::Nil"}],"args_string":"(section : String? = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1778","def":{"name":"info","args":[{"name":"section","doc":null,"default_value":"nil","external_name":"section","restriction":"String | ::Nil"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"arr = [\"INFO\"]\nif section\n arr << section\nend\nbulk = string_command(arr)\nresults = Hash(String, String).new\n(bulk.split(\"\\r\\n\")).each do |line|\n if line.empty? || (line[0] == '#')\n next\n end\n key, val = line.split(\":\")\n results[key] = val\nend\nresults\n"}},{"id":"keys(pattern)-instance-method","html_id":"keys(pattern)-instance-method","name":"keys","doc":"Returns all keys matching pattern.\n\n**Return value**: Array(String), array of keys matching pattern.\n\nExample:\n\n```\nredis.keys(\"callmemaybe\")\n```","summary":"

    Returns all keys matching pattern.

    ","abstract":false,"args":[{"name":"pattern","doc":null,"default_value":"","external_name":"pattern","restriction":""}],"args_string":"(pattern)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L571","def":{"name":"keys","args":[{"name":"pattern","doc":null,"default_value":"","external_name":"pattern","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"(string_array_command([\"KEYS\", namespaced(pattern)])).map do |key|\n without_namespace(\"#{key}\")\nend"}},{"id":"lindex(key,index)-instance-method","html_id":"lindex(key,index)-instance-method","name":"lindex","doc":"Returns the element at index index in the list stored at key.\n\n**Return value**: String, the requested element, or nil when index is out of range.","summary":"

    Returns the element at index index in the list stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"index","doc":null,"default_value":"","external_name":"index","restriction":""}],"args_string":"(key, index)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L642","def":{"name":"lindex","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"index","doc":null,"default_value":"","external_name":"index","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_or_nil_command([\"LINDEX\", namespaced(key), index.to_s])"}},{"id":"linsert(key,where,pivot,value)-instance-method","html_id":"linsert(key,where,pivot,value)-instance-method","name":"linsert","doc":"Inserts value in the list stored at key either before or after the reference value pivot.\n\n**Options**:\n\n* where - either \"BEFORE\" or \"AFTER\"\n\n**Return value**: Integer, the length of the list after the insert operation, or -1 when the value pivot was not found.","summary":"

    Inserts value in the list stored at key either before or after the reference value pivot.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"where","doc":null,"default_value":"","external_name":"where","restriction":""},{"name":"pivot","doc":null,"default_value":"","external_name":"pivot","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, where, pivot, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L680","def":{"name":"linsert","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"where","doc":null,"default_value":"","external_name":"where","restriction":""},{"name":"pivot","doc":null,"default_value":"","external_name":"pivot","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"LINSERT\", namespaced(key), where.to_s, pivot.to_s, value.to_s])"}},{"id":"llen(key)-instance-method","html_id":"llen(key)-instance-method","name":"llen","doc":"Returns the length of the list stored at key.\n\n**Return value**: Integer, the length of the list at key.","summary":"

    Returns the length of the list stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L635","def":{"name":"llen","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"LLEN\", namespaced(key)])"}},{"id":"lpop(key)-instance-method","html_id":"lpop(key)-instance-method","name":"lpop","doc":"Removes and returns the first element of the list stored at key.\n\n**Return value**: String, the value of the first element, or nil when key does not exist.\n\nExample:\n\n```\nredis.lpop(\"mylist\")\n```","summary":"

    Removes and returns the first element of the list stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L662","def":{"name":"lpop","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_or_nil_command([\"LPOP\", namespaced(key)])"}},{"id":"lpush(key,*values)-instance-method","html_id":"lpush(key,*values)-instance-method","name":"lpush","doc":"Insert all the specified values at the head of the list stored at key.\n\n**Return value**: Integer, the length of the list after the push operation.","summary":"

    Insert all the specified values at the head of the list stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":""}],"args_string":"(key, *values)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L596","def":{"name":"lpush","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":""}],"double_splat":null,"splat_index":1,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"lpush(key, values.to_a)"}},{"id":"lpush(key,values:Array(RedisValue))-instance-method","html_id":"lpush(key,values:Array(RedisValue))-instance-method","name":"lpush","doc":"Insert all the specified values at the head of the list stored at key.\n\n**Return value**: Integer, the length of the list after the push operation.","summary":"

    Insert all the specified values at the head of the list stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"Array(RedisValue)"}],"args_string":"(key, values : Array(RedisValue))","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L601","def":{"name":"lpush","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"Array(RedisValue)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command(concat([\"LPUSH\", namespaced(key)], values))"}},{"id":"lpushx(key,value)-instance-method","html_id":"lpushx(key,value)-instance-method","name":"lpushx","doc":"Inserts value at the head of the list stored at key, only if key already exists and holds a list.\n\n**Return value**: Integer, the length of the list after the push operation.","summary":"

    Inserts value at the head of the list stored at key, only if key already exists and holds a list.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L608","def":{"name":"lpushx","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"LPUSHX\", namespaced(key), value.to_s])"}},{"id":"lrange(key,from,to)-instance-method","html_id":"lrange(key,from,to)-instance-method","name":"lrange","doc":"Returns the specified elements of the list stored at key.\n\n**Return value**: Array(String), the list of elements in the specified range.\n\nExample:\n\n```\nredis.lrange(\"mylist\", 0, 2)\n```","summary":"

    Returns the specified elements of the list stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"from","doc":null,"default_value":"","external_name":"from","restriction":""},{"name":"to","doc":null,"default_value":"","external_name":"to","restriction":""}],"args_string":"(key, from, to)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L693","def":{"name":"lrange","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"from","doc":null,"default_value":"","external_name":"from","restriction":""},{"name":"to","doc":null,"default_value":"","external_name":"to","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_array_command([\"LRANGE\", namespaced(key), from.to_s, to.to_s])"}},{"id":"lrem(key,count,value)-instance-method","html_id":"lrem(key,count,value)-instance-method","name":"lrem","doc":"Removes the first count occurrences of elements equal to value from the list stored at key.\n\n**Return value**: Integer, the number of removed elements.\n\nExample:\n\n```\nredis.lrem(\"mylist\", 1, \"my\")\n```","summary":"

    Removes the first count occurrences of elements equal to value from the list stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"count","doc":null,"default_value":"","external_name":"count","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, count, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L628","def":{"name":"lrem","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"count","doc":null,"default_value":"","external_name":"count","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"LREM\", namespaced(key), count.to_s, value.to_s])"}},{"id":"lset(key,index,value)-instance-method","html_id":"lset(key,index,value)-instance-method","name":"lset","doc":"Sets the list element at index to value.\n\n**Return value**: \"OK\"","summary":"

    Sets the list element at index to value.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"index","doc":null,"default_value":"","external_name":"index","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, index, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L649","def":{"name":"lset","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"index","doc":null,"default_value":"","external_name":"index","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"LSET\", namespaced(key), index.to_s, value.to_s])"}},{"id":"ltrim(key,start,stop)-instance-method","html_id":"ltrim(key,start,stop)-instance-method","name":"ltrim","doc":"Trim an existing list so that it will contain only the specified range of elements specified.\n\n**Return value**: \"OK\"","summary":"

    Trim an existing list so that it will contain only the specified range of elements specified.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start","doc":null,"default_value":"","external_name":"start","restriction":""},{"name":"stop","doc":null,"default_value":"","external_name":"stop","restriction":""}],"args_string":"(key, start, stop)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L700","def":{"name":"ltrim","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start","doc":null,"default_value":"","external_name":"start","restriction":""},{"name":"stop","doc":null,"default_value":"","external_name":"stop","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"LTRIM\", namespaced(key), start.to_s, stop.to_s])"}},{"id":"mget(keys:Array(String)):Array(RedisValue)-instance-method","html_id":"mget(keys:Array(String)):Array(RedisValue)-instance-method","name":"mget","doc":null,"summary":null,"abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"args_string":"(keys : Array(String)) : Array(RedisValue)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L232","def":{"name":"mget","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Array(RedisValue)","visibility":"Public","body":"string_array_command(concat([\"MGET\"], namespaced(keys)))"}},{"id":"mget(*keys)-instance-method","html_id":"mget(*keys)-instance-method","name":"mget","doc":"Returns the values of all specified keys.\n\n**Return value**: Array(String), the list of values at the specified keys.\nFor every key that does not hold a string value or does not exist, nil is returned.\n\nExample:\n\n```\nredis.set(\"foo1\", \"test1\")\nredis.set(\"foo2\", \"test2\")\nredis.mget(\"foo1\", \"foo2\") # => [\"test1\", \"test2\"]\n```","summary":"

    Returns the values of all specified keys.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":""}],"args_string":"(*keys)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L228","def":{"name":"mget","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":""}],"double_splat":null,"splat_index":0,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_array_command(concat([\"MGET\"], namespaced(keys)))"}},{"id":"mset(hash:Hash)-instance-method","html_id":"mset(hash:Hash)-instance-method","name":"mset","doc":"Sets the given keys to their respective values as defined in the hash.\n\n**Return value**: \"OK\"\n\nExample:\n\n```\nredis.mset({\"foo1\": \"bar1\", \"foo2\": \"bar2\"})\n```","summary":"

    Sets the given keys to their respective values as defined in the hash.

    ","abstract":false,"args":[{"name":"hash","doc":null,"default_value":"","external_name":"hash","restriction":"Hash"}],"args_string":"(hash : Hash)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L245","def":{"name":"mset","args":[{"name":"hash","doc":null,"default_value":"","external_name":"hash","restriction":"Hash"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"MSET\"] of RedisValue\nhash.each do |key, value|\n (q << (namespaced(key))) << value.to_s\nend\nstring_command(q)\n"}},{"id":"msetnx(hash)-instance-method","html_id":"msetnx(hash)-instance-method","name":"msetnx","doc":"Sets the given keys to their respective values as defined in the hash.\nMSETNX will not perform any operation at all even if just a single key already exists.\n\n**Return value**: Integer, specifically:\n* 1 if the all the keys were set.\n* 0 if no key was set (at least one key already existed).\n\nExample:\n\n```\nredis.msetnx({\"key1\": \"hello\", \"key2\": \"there\"})\n```","summary":"

    Sets the given keys to their respective values as defined in the hash.

    ","abstract":false,"args":[{"name":"hash","doc":null,"default_value":"","external_name":"hash","restriction":""}],"args_string":"(hash)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L305","def":{"name":"msetnx","args":[{"name":"hash","doc":null,"default_value":"","external_name":"hash","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"MSETNX\"] of RedisValue\nhash.each do |key, value|\n (q << (namespaced(key))) << value\nend\ninteger_command(q)\n"}},{"id":"object_encoding(key)-instance-method","html_id":"object_encoding(key)-instance-method","name":"object_encoding","doc":"Returns the kind of internal representation used in order to store\nthe value associated with a key.\n\n**Return value**: String: returns the kind of internal representation\nused in order to store the value associated with a key.","summary":"

    Returns the kind of internal representation used in order to store the value associated with a key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1805","def":{"name":"object_encoding","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_or_nil_command([\"OBJECT\", \"ENCODING\", namespaced(key)])"}},{"id":"object_idletime(key)-instance-method","html_id":"object_idletime(key)-instance-method","name":"object_idletime","doc":"Returns the number of seconds since the object stored at the specified key\nis idle (not requested by read or write operations).\n\n**Return value**: Integer: returns the number of seconds\nsince the object stored at the specified key is idle\n(not requested by read or write operations).","summary":"

    Returns the number of seconds since the object stored at the specified key is idle (not requested by read or write operations).

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1815","def":{"name":"object_idletime","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_or_nil_command([\"OBJECT\", \"IDLETIME\", namespaced(key)])"}},{"id":"object_refcount(key)-instance-method","html_id":"object_refcount(key)-instance-method","name":"object_refcount","doc":"Returns the number of references of the value associated\nwith the specified key.\n\n**Return value**: Integer: returns the number of references\nof the value associated with the specified key.","summary":"

    Returns the number of references of the value associated with the specified key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1796","def":{"name":"object_refcount","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_or_nil_command([\"OBJECT\", \"REFCOUNT\", namespaced(key)])"}},{"id":"persist(key)-instance-method","html_id":"persist(key)-instance-method","name":"persist","doc":"Remove the existing timeout on key, turning the key from volatile\n(a key with an expire set) to persistent (a key that will never expire\nas no timeout is associated).\n\n**Return value**: Integer, specifically:\n* 1 if the timeout was removed.\n* 0 if key does not exist or does not have an associated timeout.","summary":"

    Remove the existing timeout on key, turning the key from volatile (a key with an expire set) to persistent (a key that will never expire as no timeout is associated).

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1598","def":{"name":"persist","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"PERSIST\", namespaced(key)])"}},{"id":"pexpire(key,milis)-instance-method","html_id":"pexpire(key,milis)-instance-method","name":"pexpire","doc":"This command works exactly like EXPIRE but the time to live of the key is\nspecified in milliseconds instead of seconds.\n\n**Return value**: Integeger, specifically:\n* 1 if the timeout was set.\n* 0 if key does not exist or the timeout could not be set.","summary":"

    This command works exactly like EXPIRE but the time to live of the key is specified in milliseconds instead of seconds.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"milis","doc":null,"default_value":"","external_name":"milis","restriction":""}],"args_string":"(key, milis)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1566","def":{"name":"pexpire","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"milis","doc":null,"default_value":"","external_name":"milis","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"PEXPIRE\", namespaced(key), milis.to_s])"}},{"id":"pexpireat(key,unix_date_in_millis)-instance-method","html_id":"pexpireat(key,unix_date_in_millis)-instance-method","name":"pexpireat","doc":"PEXPIREAT has the same effect and semantic as EXPIREAT, but the Unix time\nat which the key will expire is specified in milliseconds instead of seconds.\n\n**Return value**: Integeger, specifically:\n* 1 if the timeout was set.\n* 0 if key does not exist or the timeout could not be set.","summary":"

    PEXPIREAT has the same effect and semantic as EXPIREAT, but the Unix time at which the key will expire is specified in milliseconds instead of seconds.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"unix_date_in_millis","doc":null,"default_value":"","external_name":"unix_date_in_millis","restriction":""}],"args_string":"(key, unix_date_in_millis)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1587","def":{"name":"pexpireat","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"unix_date_in_millis","doc":null,"default_value":"","external_name":"unix_date_in_millis","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"PEXPIREAT\", namespaced(key), unix_date_in_millis.to_s])"}},{"id":"pfadd(key,*values:String):Int64-instance-method","html_id":"pfadd(key,*values:String):Int64-instance-method","name":"pfadd","doc":"Adds all the element arguments to the HyperLogLog data structure stored at\nthe variable name specified as first argument.\n\n**Return value**: Integer: 1 if at least 1 HyperLogLog internal register was altered. 0 otherwise.\n\nExample:\n\n```\nredis.pfadd(\"hll\", \"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\") # => 1\n```","summary":"

    Adds all the element arguments to the HyperLogLog data structure stored at the variable name specified as first argument.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"String"}],"args_string":"(key, *values : String) : Int64","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1439","def":{"name":"pfadd","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"String"}],"double_splat":null,"splat_index":1,"yields":null,"block_arg":null,"return_type":"Int64","visibility":"Public","body":"pfadd(key, values.to_a)"}},{"id":"pfadd(key,values:Array(String)):Int64-instance-method","html_id":"pfadd(key,values:Array(String)):Int64-instance-method","name":"pfadd","doc":"Adds all the element arguments to the HyperLogLog data structure stored at\nthe variable name specified as first argument.\n\n**Return value**: Integer: 1 if at least 1 HyperLogLog internal register was altered. 0 otherwise.\n\nExample:\n\n```\nredis.pfadd(\"hll\", \"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\") # => 1\n```","summary":"

    Adds all the element arguments to the HyperLogLog data structure stored at the variable name specified as first argument.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"Array(String)"}],"args_string":"(key, values : Array(String)) : Int64","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1434","def":{"name":"pfadd","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Int64","visibility":"Public","body":"integer_command(concat([\"PFADD\", namespaced(key)], values))"}},{"id":"pfcount(keys:Array(String)):Int64-instance-method","html_id":"pfcount(keys:Array(String)):Int64-instance-method","name":"pfcount","doc":"When called with a single key, returns the approximated cardinality computed\nby the HyperLogLog data structure stored at the specified variable,\nwhich is 0 if the variable does not exist.\n\n**Return value**: Integer, the approximated number of unique elements\nobserved via PFADD.","summary":"

    When called with a single key, returns the approximated cardinality computed by the HyperLogLog data structure stored at the specified variable, which is 0 if the variable does not exist.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"args_string":"(keys : Array(String)) : Int64","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1461","def":{"name":"pfcount","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Int64","visibility":"Public","body":"integer_command(concat([\"PFCOUNT\"], namespaced(keys)))"}},{"id":"pfcount(*keys:String):Int64-instance-method","html_id":"pfcount(*keys:String):Int64-instance-method","name":"pfcount","doc":"When called with a single key, returns the approximated cardinality computed\nby the HyperLogLog data structure stored at the specified variable,\nwhich is 0 if the variable does not exist.\n\n**Return value**: Integer, the approximated number of unique elements\nobserved via PFADD.","summary":"

    When called with a single key, returns the approximated cardinality computed by the HyperLogLog data structure stored at the specified variable, which is 0 if the variable does not exist.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"args_string":"(*keys : String) : Int64","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1466","def":{"name":"pfcount","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"double_splat":null,"splat_index":0,"yields":null,"block_arg":null,"return_type":"Int64","visibility":"Public","body":"pfcount(keys.to_a)"}},{"id":"pfmerge(*keys:String)-instance-method","html_id":"pfmerge(*keys:String)-instance-method","name":"pfmerge","doc":"Merge multiple HyperLogLog values into an unique value that will\napproximate the cardinality of the union of the observed Sets of the\nsource HyperLogLog structures.","summary":"

    Merge multiple HyperLogLog values into an unique value that will approximate the cardinality of the union of the observed Sets of the source HyperLogLog structures.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"args_string":"(*keys : String)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1451","def":{"name":"pfmerge","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"double_splat":null,"splat_index":0,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"pfmerge(keys.to_a)"}},{"id":"pfmerge(keys:Array(String))-instance-method","html_id":"pfmerge(keys:Array(String))-instance-method","name":"pfmerge","doc":"Merge multiple HyperLogLog values into an unique value that will\napproximate the cardinality of the union of the observed Sets of the\nsource HyperLogLog structures.","summary":"

    Merge multiple HyperLogLog values into an unique value that will approximate the cardinality of the union of the observed Sets of the source HyperLogLog structures.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"args_string":"(keys : Array(String))","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1446","def":{"name":"pfmerge","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command(concat([\"PFMERGE\"], namespaced(keys)))"}},{"id":"ping-instance-method","html_id":"ping-instance-method","name":"ping","doc":"Returns PONG. This command is often used to test if a connection is still alive, or to measure latency.\n\nExample:\n\n```\nredis.ping # => \"PONG\"\n```","summary":"

    Returns PONG.

    ","abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L23","def":{"name":"ping","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"PING\"])"}},{"id":"psetex(key,expire_in_milis,value)-instance-method","html_id":"psetex(key,expire_in_milis,value)-instance-method","name":"psetex","doc":"PSETEX works exactly like SETEX with the sole difference that the expire time is specified in milliseconds instead of seconds.\n\n**Return value**: \"OK\"","summary":"

    PSETEX works exactly like SETEX with the sole difference that the expire time is specified in milliseconds instead of seconds.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"expire_in_milis","doc":null,"default_value":"","external_name":"expire_in_milis","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, expire_in_milis, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L280","def":{"name":"psetex","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"expire_in_milis","doc":null,"default_value":"","external_name":"expire_in_milis","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"PSETEX\", namespaced(key), expire_in_milis.to_s, value.to_s])"}},{"id":"psubscribe(*channel_patterns,&callback_setup_block:Subscription->)-instance-method","html_id":"psubscribe(*channel_patterns,&callback_setup_block:Subscription->)-instance-method","name":"psubscribe","doc":"Subscribes to channel patterns and enters a subscription loop, waiting for events.\n\nThe method yields to the given block and passes a Subscription object, on\nwhich you can set your callbacks for the event subscription.\n\nThe subscription loop will end once you unsubscribe.","summary":"

    Subscribes to channel patterns and enters a subscription loop, waiting for events.

    ","abstract":false,"args":[{"name":"channel_patterns","doc":null,"default_value":"","external_name":"channel_patterns","restriction":""}],"args_string":"(*channel_patterns, &callback_setup_block : Subscription -> )","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1691","def":{"name":"psubscribe","args":[{"name":"channel_patterns","doc":null,"default_value":"","external_name":"channel_patterns","restriction":""}],"double_splat":null,"splat_index":0,"yields":1,"block_arg":{"name":"callback_setup_block","doc":null,"default_value":"","external_name":"callback_setup_block","restriction":"(Subscription -> )"},"return_type":"","visibility":"Public","body":"if already_in_subscription_loop?\n raise(Redis::Error.new(\"Must call psubscribe without a subscription block when inside a subscription loop\"))\nend\nsubscription = Subscription.new\ncallback_setup_block.call(subscription)\n@strategy = Redis::Strategy::SubscriptionLoop.new(connection, subscription)\npsubscribe(*channel_patterns)\n"}},{"id":"psubscribe(channel_patterns:Array(String))-instance-method","html_id":"psubscribe(channel_patterns:Array(String))-instance-method","name":"psubscribe","doc":"Subscribes to more channel patterns while already being in a subscription loop.","summary":"

    Subscribes to more channel patterns while already being in a subscription loop.

    ","abstract":false,"args":[{"name":"channel_patterns","doc":null,"default_value":"","external_name":"channel_patterns","restriction":"Array(String)"}],"args_string":"(channel_patterns : Array(String))","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1707","def":{"name":"psubscribe","args":[{"name":"channel_patterns","doc":null,"default_value":"","external_name":"channel_patterns","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"if already_in_subscription_loop?\nelse\n raise(Redis::Error.new(\"Must call psubscribe with a subscription block\"))\nend\nvoid_command(concat([\"PSUBSCRIBE\"], channel_patterns))\n"}},{"id":"psubscribe(*channel_patterns)-instance-method","html_id":"psubscribe(*channel_patterns)-instance-method","name":"psubscribe","doc":null,"summary":null,"abstract":false,"args":[{"name":"channel_patterns","doc":null,"default_value":"","external_name":"channel_patterns","restriction":""}],"args_string":"(*channel_patterns)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1716","def":{"name":"psubscribe","args":[{"name":"channel_patterns","doc":null,"default_value":"","external_name":"channel_patterns","restriction":""}],"double_splat":null,"splat_index":0,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"psubscribe(channel_patterns.to_a)"}},{"id":"pttl(key)-instance-method","html_id":"pttl(key)-instance-method","name":"pttl","doc":"Like TTL this command returns the remaining time to live of a key that has\nan expire set, with the sole difference that TTL returns the amount of\nremaining time in seconds while PTTL returns it in milliseconds.\n\n**Return value**: Integer, the TTL in milliseconds, or a negative value in order to signal an error.","summary":"

    Like TTL this command returns the remaining time to live of a key that has an expire set, with the sole difference that TTL returns the amount of remaining time in seconds while PTTL returns it in milliseconds.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1615","def":{"name":"pttl","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"PTTL\", namespaced(key)])"}},{"id":"publish(channel,message)-instance-method","html_id":"publish(channel,message)-instance-method","name":"publish","doc":"Posts a message to the given channel.\n\n**Return value**: Integer, the number of clients that received the message.\n\nExample:\n\n```\nredis.publish(\"mychannel\", \"some message\")\n```","summary":"

    Posts a message to the given channel.

    ","abstract":false,"args":[{"name":"channel","doc":null,"default_value":"","external_name":"channel","restriction":""},{"name":"message","doc":null,"default_value":"","external_name":"message","restriction":""}],"args_string":"(channel, message)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1753","def":{"name":"publish","args":[{"name":"channel","doc":null,"default_value":"","external_name":"channel","restriction":""},{"name":"message","doc":null,"default_value":"","external_name":"message","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"PUBLISH\", channel.to_s, message.to_s])"}},{"id":"punsubscribe(*channel_patterns)-instance-method","html_id":"punsubscribe(*channel_patterns)-instance-method","name":"punsubscribe","doc":"Unsubscribes the client from the given patterns, or from all of them if none is given.","summary":"

    Unsubscribes the client from the given patterns, or from all of them if none is given.

    ","abstract":false,"args":[{"name":"channel_patterns","doc":null,"default_value":"","external_name":"channel_patterns","restriction":""}],"args_string":"(*channel_patterns)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1740","def":{"name":"punsubscribe","args":[{"name":"channel_patterns","doc":null,"default_value":"","external_name":"channel_patterns","restriction":""}],"double_splat":null,"splat_index":0,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"punsubscribe(channel_patterns.to_a)"}},{"id":"punsubscribe(channel_patterns:Array(String))-instance-method","html_id":"punsubscribe(channel_patterns:Array(String))-instance-method","name":"punsubscribe","doc":"Unsubscribes the client from the given patterns, or from all of them if none is given.","summary":"

    Unsubscribes the client from the given patterns, or from all of them if none is given.

    ","abstract":false,"args":[{"name":"channel_patterns","doc":null,"default_value":"","external_name":"channel_patterns","restriction":"Array(String)"}],"args_string":"(channel_patterns : Array(String))","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1735","def":{"name":"punsubscribe","args":[{"name":"channel_patterns","doc":null,"default_value":"","external_name":"channel_patterns","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"void_command(concat([\"PUNSUBSCRIBE\"], channel_patterns))"}},{"id":"quit-instance-method","html_id":"quit-instance-method","name":"quit","doc":"Ask the server to close the connection. The connection is closed as soon as all pending replies have been written to the client.\n\n**Return value**: \"OK\"","summary":"

    Ask the server to close the connection.

    ","abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L73","def":{"name":"quit","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"QUIT\"])"}},{"id":"randomkey-instance-method","html_id":"randomkey-instance-method","name":"randomkey","doc":"Return a random key from the currently selected database.","summary":"

    Return a random key from the currently selected database.

    ","abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L549","def":{"name":"randomkey","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"RANDOMKEY\"])"}},{"id":"rename(old_key,new_key)-instance-method","html_id":"rename(old_key,new_key)-instance-method","name":"rename","doc":"Renames old_key to newkey.\n\n**Return value**: \"OK\"\n\nExample:\n\n```\nredis.rename(\"old_name\", \"new_name\")\n```","summary":"

    Renames old_key to newkey.

    ","abstract":false,"args":[{"name":"old_key","doc":null,"default_value":"","external_name":"old_key","restriction":""},{"name":"new_key","doc":null,"default_value":"","external_name":"new_key","restriction":""}],"args_string":"(old_key, new_key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L116","def":{"name":"rename","args":[{"name":"old_key","doc":null,"default_value":"","external_name":"old_key","restriction":""},{"name":"new_key","doc":null,"default_value":"","external_name":"new_key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"RENAME\", namespaced(old_key), namespaced(new_key)])"}},{"id":"renamenx(old_key,new_key)-instance-method","html_id":"renamenx(old_key,new_key)-instance-method","name":"renamenx","doc":"Renames old_key to newkey if newkey does not yet exist.\n\n**Return value**: \"OK\"\n\nExample:\n\n```\nredis.renamenx(\"old_name\", \"new_name\")\n```","summary":"

    Renames old_key to newkey if newkey does not yet exist.

    ","abstract":false,"args":[{"name":"old_key","doc":null,"default_value":"","external_name":"old_key","restriction":""},{"name":"new_key","doc":null,"default_value":"","external_name":"new_key","restriction":""}],"args_string":"(old_key, new_key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L129","def":{"name":"renamenx","args":[{"name":"old_key","doc":null,"default_value":"","external_name":"old_key","restriction":""},{"name":"new_key","doc":null,"default_value":"","external_name":"new_key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"RENAMENX\", namespaced(old_key), namespaced(new_key)])"}},{"id":"restore(key,ttl_in_milis:Int,serialized_value:String,replace=false)-instance-method","html_id":"restore(key,ttl_in_milis:Int,serialized_value:String,replace=false)-instance-method","name":"restore","doc":"Create a key associated with a value that is obtained by deserializing the provided serialized value (obtained via DUMP).\n\n**Return value**: The command returns \"OK\" on success.","summary":"

    Create a key associated with a value that is obtained by deserializing the provided serialized value (obtained via DUMP).

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"ttl_in_milis","doc":null,"default_value":"","external_name":"ttl_in_milis","restriction":"Int"},{"name":"serialized_value","doc":null,"default_value":"","external_name":"serialized_value","restriction":"String"},{"name":"replace","doc":null,"default_value":"false","external_name":"replace","restriction":""}],"args_string":"(key, ttl_in_milis : Int, serialized_value : String, replace = false)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L513","def":{"name":"restore","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"ttl_in_milis","doc":null,"default_value":"","external_name":"ttl_in_milis","restriction":"Int"},{"name":"serialized_value","doc":null,"default_value":"","external_name":"serialized_value","restriction":"String"},{"name":"replace","doc":null,"default_value":"false","external_name":"replace","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"RESTORE\", namespaced(key), ttl_in_milis.to_s, serialized_value]\nif replace\n q << \"REPLACE\"\nend\nstring_command(q)\n"}},{"id":"rpop(key)-instance-method","html_id":"rpop(key)-instance-method","name":"rpop","doc":"Removes and returns the last element of the list stored at key.\n\n**Return value**: \"OK\"","summary":"

    Removes and returns the last element of the list stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L669","def":{"name":"rpop","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_or_nil_command([\"RPOP\", namespaced(key)])"}},{"id":"rpoplpush(source,destination)-instance-method","html_id":"rpoplpush(source,destination)-instance-method","name":"rpoplpush","doc":"Atomically returns and removes the last element (tail) of the list stored at source,\nand pushes the element at the first element (head) of the list stored at destination.\n\n**Return value**: String, the element being popped and pushed.","summary":"

    Atomically returns and removes the last element (tail) of the list stored at source, and pushes the element at the first element (head) of the list stored at destination.

    ","abstract":false,"args":[{"name":"source","doc":null,"default_value":"","external_name":"source","restriction":""},{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""}],"args_string":"(source, destination)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L954","def":{"name":"rpoplpush","args":[{"name":"source","doc":null,"default_value":"","external_name":"source","restriction":""},{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_or_nil_command([\"RPOPLPUSH\", namespaced(source), namespaced(destination)])"}},{"id":"rpush(key,*values:String)-instance-method","html_id":"rpush(key,*values:String)-instance-method","name":"rpush","doc":"Insert all the specified values at the tail of the list stored at key.\n\n**Return value**: Integer, the length of the list after the push operation.\n\nExample:\n\n```\nredis.rpush(\"mylist\", \"1\", \"2\", \"3\")\n```","summary":"

    Insert all the specified values at the tail of the list stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"String"}],"args_string":"(key, *values : String)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L589","def":{"name":"rpush","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"String"}],"double_splat":null,"splat_index":1,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"rpush(key, values.to_a)"}},{"id":"rpush(key,values:Array(RedisValue))-instance-method","html_id":"rpush(key,values:Array(RedisValue))-instance-method","name":"rpush","doc":"Insert all the specified values at the tail of the list stored at key.\n\n**Return value**: Integer, the length of the list after the push operation.\n\nExample:\n\n```\nredis.rpush(\"mylist\", \"1\", \"2\", \"3\")\n```","summary":"

    Insert all the specified values at the tail of the list stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"Array(RedisValue)"}],"args_string":"(key, values : Array(RedisValue))","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L584","def":{"name":"rpush","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"Array(RedisValue)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command(concat([\"RPUSH\", namespaced(key)], values))"}},{"id":"rpushx(key,value)-instance-method","html_id":"rpushx(key,value)-instance-method","name":"rpushx","doc":"Inserts value at the tail of the list stored at key, only if key already exists and holds a list.\n\n**Return value**: Integer, the length of the list after the push operation.","summary":"

    Inserts value at the tail of the list stored at key, only if key already exists and holds a list.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L615","def":{"name":"rpushx","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"RPUSHX\", namespaced(key), value.to_s])"}},{"id":"sadd(key,*values)-instance-method","html_id":"sadd(key,*values)-instance-method","name":"sadd","doc":"Add the specified members to the set stored at key.\n\n**Return value**: Integer, the number of elements that were added to the set, not including all the elements already present into the set.","summary":"

    Add the specified members to the set stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":""}],"args_string":"(key, *values)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L707","def":{"name":"sadd","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":""}],"double_splat":null,"splat_index":1,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"sadd(key, values.to_a)"}},{"id":"sadd(key,values:Array(RedisValue))-instance-method","html_id":"sadd(key,values:Array(RedisValue))-instance-method","name":"sadd","doc":null,"summary":null,"abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"Array(RedisValue)"}],"args_string":"(key, values : Array(RedisValue))","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L711","def":{"name":"sadd","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"Array(RedisValue)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command(concat([\"SADD\", namespaced(key)], values))"}},{"id":"scan(cursor,match=nil,count=nil)-instance-method","html_id":"scan(cursor,match=nil,count=nil)-instance-method","name":"scan","doc":"The SCAN command and the closely related commands SSCAN, HSCAN and ZSCAN are used in order to incrementally iterate over a collection of elements.\n\n**Options**:\n\n* match - It is possible to only iterate elements matching a given glob-style pattern, similarly to the behavior of the KEYS command that takes a pattern as only argument.\n* count - While SCAN does not provide guarantees about the number of elements returned at every iteration, it is possible to empirically adjust the behavior of SCAN using the COUNT option.\n\n**Return value**: Array of String, a list of keys.\n\nExample:\n\n```\nredis.scan(0)\nredis.scan(0, \"foo*\")\nredis.scan(0, \"foo*\", 1024)\n```","summary":"

    The SCAN command and the closely related commands SSCAN, HSCAN and ZSCAN are used in order to incrementally iterate over a collection of elements.

    ","abstract":false,"args":[{"name":"cursor","doc":null,"default_value":"","external_name":"cursor","restriction":""},{"name":"match","doc":null,"default_value":"nil","external_name":"match","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""}],"args_string":"(cursor, match = nil, count = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L537","def":{"name":"scan","args":[{"name":"cursor","doc":null,"default_value":"","external_name":"cursor","restriction":""},{"name":"match","doc":null,"default_value":"nil","external_name":"match","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"SCAN\", cursor.to_s]\nif match\n (q << \"MATCH\") << (namespaced(match))\nend\nif count\n (q << \"COUNT\") << count.to_s\nend\nresult = string_array_command(q)\nresult[1] = array_without_namespace(result[1])\nresult\n"}},{"id":"scard(key)-instance-method","html_id":"scard(key)-instance-method","name":"scard","doc":"Returns the set cardinality (number of elements) of the set stored at key.","summary":"

    Returns the set cardinality (number of elements) of the set stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L749","def":{"name":"scard","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"SCARD\", namespaced(key)])"}},{"id":"script_exists(sha1_array:Array(Reference))-instance-method","html_id":"script_exists(sha1_array:Array(Reference))-instance-method","name":"script_exists","doc":"Returns information about the existence of the scripts in the script cache.\n\n**Return value**: The command returns an array of integers that correspond\nto the specified SHA1 digest arguments.\nFor every corresponding SHA1 digest of a script that actually exists\nin the script cache, an 1 is returned, otherwise 0 is returned.","summary":"

    Returns information about the existence of the scripts in the script cache.

    ","abstract":false,"args":[{"name":"sha1_array","doc":null,"default_value":"","external_name":"sha1_array","restriction":"Array(Reference)"}],"args_string":"(sha1_array : Array(Reference))","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1520","def":{"name":"script_exists","args":[{"name":"sha1_array","doc":null,"default_value":"","external_name":"sha1_array","restriction":"Array(Reference)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_array_command(concat([\"SCRIPT\", \"EXISTS\"], sha1_array))"}},{"id":"script_flush-instance-method","html_id":"script_flush-instance-method","name":"script_flush","doc":"Flush the Lua scripts cache.\n\n**Return value**: \"OK\"","summary":"

    Flush the Lua scripts cache.

    ","abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1541","def":{"name":"script_flush","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"SCRIPT\", \"FLUSH\"])"}},{"id":"script_kill-instance-method","html_id":"script_kill-instance-method","name":"script_kill","doc":"Kills the currently executing Lua script, assuming no write operation was\nyet performed by the script.\n\n**Return value**: \"OK\"","summary":"

    Kills the currently executing Lua script, assuming no write operation was yet performed by the script.

    ","abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1510","def":{"name":"script_kill","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"SCRIPT\", \"KILL\"])"}},{"id":"script_load(script:String)-instance-method","html_id":"script_load(script:String)-instance-method","name":"script_load","doc":"Load a script into the scripts cache, without executing it.\n\n**Return value**: String, the SHA1 digest of the script\nadded into the script cache.\n\nExample:\n\n```\nredis.script_load(\"return {KEYS[1],ARGV[1]}\") # => \"a191862bfe0bd3bec995befcd060582bf4bdbd77\"\n```","summary":"

    Load a script into the scripts cache, without executing it.

    ","abstract":false,"args":[{"name":"script","doc":null,"default_value":"","external_name":"script","restriction":"String"}],"args_string":"(script : String)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1502","def":{"name":"script_load","args":[{"name":"script","doc":null,"default_value":"","external_name":"script","restriction":"String"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"SCRIPT\", \"LOAD\", script])"}},{"id":"sdiff(keys:Array(String)):Array(RedisValue)-instance-method","html_id":"sdiff(keys:Array(String)):Array(RedisValue)-instance-method","name":"sdiff","doc":"Returns the members of the set resulting from the difference between the first set and all the successive sets.\n\n**Return value**: Array(String), a list with members of the resulting set.","summary":"

    Returns the members of the set resulting from the difference between the first set and all the successive sets.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"args_string":"(keys : Array(String)) : Array(RedisValue)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L756","def":{"name":"sdiff","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Array(RedisValue)","visibility":"Public","body":"string_array_command(concat([\"SDIFF\"], namespaced(keys)))"}},{"id":"sdiff(*keys:String):Array(RedisValue)-instance-method","html_id":"sdiff(*keys:String):Array(RedisValue)-instance-method","name":"sdiff","doc":null,"summary":null,"abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"args_string":"(*keys : String) : Array(RedisValue)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L760","def":{"name":"sdiff","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"double_splat":null,"splat_index":0,"yields":null,"block_arg":null,"return_type":"Array(RedisValue)","visibility":"Public","body":"sdiff(keys.to_a)"}},{"id":"sdiffstore(destination,*keys:String):Int64-instance-method","html_id":"sdiffstore(destination,*keys:String):Int64-instance-method","name":"sdiffstore","doc":"This command is equal to SDIFF, but instead of returning the resulting set, it is stored in destination.\n\n**Return value**: Integer, the number of elements in the resulting set.","summary":"

    This command is equal to SDIFF, but instead of returning the resulting set, it is stored in destination.

    ","abstract":false,"args":[{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"args_string":"(destination, *keys : String) : Int64","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L772","def":{"name":"sdiffstore","args":[{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"double_splat":null,"splat_index":1,"yields":null,"block_arg":null,"return_type":"Int64","visibility":"Public","body":"sdiffstore(destination, keys.to_a)"}},{"id":"sdiffstore(destination,keys:Array(String)):Int64-instance-method","html_id":"sdiffstore(destination,keys:Array(String)):Int64-instance-method","name":"sdiffstore","doc":"This command is equal to SDIFF, but instead of returning the resulting set, it is stored in destination.\n\n**Return value**: Integer, the number of elements in the resulting set.","summary":"

    This command is equal to SDIFF, but instead of returning the resulting set, it is stored in destination.

    ","abstract":false,"args":[{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"args_string":"(destination, keys : Array(String)) : Int64","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L767","def":{"name":"sdiffstore","args":[{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Int64","visibility":"Public","body":"integer_command(concat([\"SDIFFSTORE\", namespaced(destination)], namespaced(keys)))"}},{"id":"select(database_number)-instance-method","html_id":"select(database_number)-instance-method","name":"select","doc":"Select the DB with having the specified zero-based numeric index.\n\n**Return value**: \"OK\"","summary":"

    Select the DB with having the specified zero-based numeric index.

    ","abstract":false,"args":[{"name":"database_number","doc":null,"default_value":"","external_name":"database_number","restriction":""}],"args_string":"(database_number)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L94","def":{"name":"select","args":[{"name":"database_number","doc":null,"default_value":"","external_name":"database_number","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"if !database_number\n raise(Redis::Error.new(\"ERR database number could not be Nil\"))\nend\nif database_number == @database\n return \"OK\"\nend\nres = string_command([\"SELECT\", database_number.to_s])\n@database = database_number\nres\n"}},{"id":"set(key,value,ex=nil,px=nil,nx=nil,xx=nil)-instance-method","html_id":"set(key,value,ex=nil,px=nil,nx=nil,xx=nil)-instance-method","name":"set","doc":"Set key to hold the string value. If key already holds a value, it is overwritten, regardless of its type. Any previous time to live associated with the key is discarded on successful SET operation.\n\n**Options**:\n\n* Starting with Redis 2.6.12 SET supports a set of options that modify its behavior:\n* ex -- Set the specified expire time, in seconds.\n* px -- Set the specified expire time, in milliseconds.\n* nx -- Only set the key if it does not already exist.\n* xx -- Only set the key if it already exist.\n\n**Return value**:\n* OK if SET was executed correctly.\n* Null reply: nil is returned if the SET operation was not performed because the user specified the NX or XX option but the condition was not met.\n\nExample:\n\n```\nredis.set(\"foo\", \"test\")\nredis.set(\"bar\", \"test\", ex: 7)\n```","summary":"

    Set key to hold the string value.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""},{"name":"ex","doc":null,"default_value":"nil","external_name":"ex","restriction":""},{"name":"px","doc":null,"default_value":"nil","external_name":"px","restriction":""},{"name":"nx","doc":null,"default_value":"nil","external_name":"nx","restriction":""},{"name":"xx","doc":null,"default_value":"nil","external_name":"xx","restriction":""}],"args_string":"(key, value, ex = nil, px = nil, nx = nil, xx = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L47","def":{"name":"set","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""},{"name":"ex","doc":null,"default_value":"nil","external_name":"ex","restriction":""},{"name":"px","doc":null,"default_value":"nil","external_name":"px","restriction":""},{"name":"nx","doc":null,"default_value":"nil","external_name":"nx","restriction":""},{"name":"xx","doc":null,"default_value":"nil","external_name":"xx","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"SET\", namespaced(key), value.to_s]\nif ex\n (q << \"EX\") << ex.to_s\nend\nif px\n (q << \"PX\") << px.to_s\nend\nif nx\n q << \"NX\"\nend\nif xx\n q << \"XX\"\nend\nstring_or_nil_command(q)\n"}},{"id":"setbit(key,index,value)-instance-method","html_id":"setbit(key,index,value)-instance-method","name":"setbit","doc":"Sets or clears the bit at offset in the string value stored at key.\n\n**Return value**: Integer: the original bit value stored at offset.\n\nExample:\n\n```\nredis.setbit(\"mykey\", 7, 1)\n```","summary":"

    Sets or clears the bit at offset in the string value stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"index","doc":null,"default_value":"","external_name":"index","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, index, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L474","def":{"name":"setbit","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"index","doc":null,"default_value":"","external_name":"index","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"SETBIT\", namespaced(key), index.to_s, value.to_s])"}},{"id":"setex(key,expire_in_seconds,value)-instance-method","html_id":"setex(key,expire_in_seconds,value)-instance-method","name":"setex","doc":"Set key to hold the string value and set key to timeout after a given number of seconds.\n\n**Return value**: \"OK\"\n\nExample:\n\n```\nredis.setex(\"foo\", 3, \"bar\")\n```","summary":"

    Set key to hold the string value and set key to timeout after a given number of seconds.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"expire_in_seconds","doc":null,"default_value":"","external_name":"expire_in_seconds","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, expire_in_seconds, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L273","def":{"name":"setex","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"expire_in_seconds","doc":null,"default_value":"","external_name":"expire_in_seconds","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"SETEX\", namespaced(key), expire_in_seconds.to_s, value.to_s])"}},{"id":"setnx(key,value)-instance-method","html_id":"setnx(key,value)-instance-method","name":"setnx","doc":"Set key to hold string value if key does not exist.\n\n**Return value**: Integer, specifically:\n* 1 if the key was set\n* 0 if the key was not set","summary":"

    Set key to hold string value if key does not exist.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L289","def":{"name":"setnx","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"SETNX\", namespaced(key), value.to_s])"}},{"id":"setrange(key,start_index,value)-instance-method","html_id":"setrange(key,start_index,value)-instance-method","name":"setrange","doc":"Overwrites part of the string stored at key, starting at the specified offset, for the entire length of value.\n\n**Return value**: Integer, the length of the string after it was modified by the command.\n\nExample:\n\n```\nredis.setrange(\"foo\", 6, \"Redis\")\n```","summary":"

    Overwrites part of the string stored at key, starting at the specified offset, for the entire length of value.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start_index","doc":null,"default_value":"","external_name":"start_index","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, start_index, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L409","def":{"name":"setrange","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start_index","doc":null,"default_value":"","external_name":"start_index","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"SETRANGE\", namespaced(key), start_index.to_s, value.to_s])"}},{"id":"sinter(keys:Array(String)):Array(RedisValue)-instance-method","html_id":"sinter(keys:Array(String)):Array(RedisValue)-instance-method","name":"sinter","doc":"Returns the members of the set resulting from the intersection of all the given sets.\n\n**Return value**: Array(String), an array with members of the resulting set.","summary":"

    Returns the members of the set resulting from the intersection of all the given sets.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"args_string":"(keys : Array(String)) : Array(RedisValue)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L779","def":{"name":"sinter","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Array(RedisValue)","visibility":"Public","body":"string_array_command(concat([\"SINTER\"], namespaced(keys)))"}},{"id":"sinter(*keys:String):Array(RedisValue)-instance-method","html_id":"sinter(*keys:String):Array(RedisValue)-instance-method","name":"sinter","doc":"Returns the members of the set resulting from the intersection of all the given sets.\n\n**Return value**: Array(String), an array with members of the resulting set.","summary":"

    Returns the members of the set resulting from the intersection of all the given sets.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"args_string":"(*keys : String) : Array(RedisValue)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L784","def":{"name":"sinter","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"double_splat":null,"splat_index":0,"yields":null,"block_arg":null,"return_type":"Array(RedisValue)","visibility":"Public","body":"sinter(keys.to_a)"}},{"id":"sinterstore(destination_key,*keys:String):Int64-instance-method","html_id":"sinterstore(destination_key,*keys:String):Int64-instance-method","name":"sinterstore","doc":"This command is equal to SINTER, but instead of returning the resulting set, it is stored in destination.\n\n**Return value**: Integer, the number of elements in the resulting set.\n\nExample:\n\n```\nredis.sinterstore(\"destination\", \"key1\", \"key2\")\n```","summary":"

    This command is equal to SINTER, but instead of returning the resulting set, it is stored in destination.

    ","abstract":false,"args":[{"name":"destination_key","doc":null,"default_value":"","external_name":"destination_key","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"args_string":"(destination_key, *keys : String) : Int64","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L802","def":{"name":"sinterstore","args":[{"name":"destination_key","doc":null,"default_value":"","external_name":"destination_key","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"double_splat":null,"splat_index":1,"yields":null,"block_arg":null,"return_type":"Int64","visibility":"Public","body":"sinterstore(destination_key, keys.to_a)"}},{"id":"sinterstore(destination_key,keys:Array(String)):Int64-instance-method","html_id":"sinterstore(destination_key,keys:Array(String)):Int64-instance-method","name":"sinterstore","doc":"This command is equal to SINTER, but instead of returning the resulting set, it is stored in destination.\n\n**Return value**: Integer, the number of elements in the resulting set.\n\nExample:\n\n```\nredis.sinterstore(\"destination\", \"key1\", \"key2\")\n```","summary":"

    This command is equal to SINTER, but instead of returning the resulting set, it is stored in destination.

    ","abstract":false,"args":[{"name":"destination_key","doc":null,"default_value":"","external_name":"destination_key","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"args_string":"(destination_key, keys : Array(String)) : Int64","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L797","def":{"name":"sinterstore","args":[{"name":"destination_key","doc":null,"default_value":"","external_name":"destination_key","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Int64","visibility":"Public","body":"integer_command(concat([\"SINTERSTORE\", namespaced(destination_key)], namespaced(keys)))"}},{"id":"sismember(key,value)-instance-method","html_id":"sismember(key,value)-instance-method","name":"sismember","doc":"Returns if member is a member of the set stored at key.\n\n**Return value**: Integer, specifically:\n* 1 if the element is a member of the set.\n* 0 if the element is not a member of the set, or if key does not exist.","summary":"

    Returns if member is a member of the set stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L727","def":{"name":"sismember","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"SISMEMBER\", namespaced(key), value.to_s])"}},{"id":"smembers(key)-instance-method","html_id":"smembers(key)-instance-method","name":"smembers","doc":"Returns all the members of the set value stored at key.\n\n**Return value**: Array(String), all elements of the set.","summary":"

    Returns all the members of the set value stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L718","def":{"name":"smembers","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_array_command([\"SMEMBERS\", namespaced(key)])"}},{"id":"smove(source,destination,member)-instance-method","html_id":"smove(source,destination,member)-instance-method","name":"smove","doc":"Move member from the set at source to the set at destination.\n\n**Return value**: Integer, specifically:\n* 1 if the element is moved.\n* 0 if the element is not a member of source and no operation was performed.","summary":"

    Move member from the set at source to the set at destination.

    ","abstract":false,"args":[{"name":"source","doc":null,"default_value":"","external_name":"source","restriction":""},{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""}],"args_string":"(source, destination, member)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L811","def":{"name":"smove","args":[{"name":"source","doc":null,"default_value":"","external_name":"source","restriction":""},{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"SMOVE\", namespaced(source), namespaced(destination), member.to_s])"}},{"id":"sort(key,by=nil,limit=nil,get:Array(RedisValue)?=nil,order="ASC",alpha=false,store=nil)-instance-method","html_id":"sort(key,by=nil,limit=nil,get:Array(RedisValue)?=nil,order=&quot;ASC&quot;,alpha=false,store=nil)-instance-method","name":"sort","doc":"Returns or stores the elements contained in the list, set or sorted set at key.\n\n**Options**:\n\n* by - pattern for sorting by external keys\n* limit - Array of 2 strings [offset, count]\n* get - pattern for retrieving external keys\n* order - either 'ASC' or 'DESC'\n* alpha - true to sort lexicographically\n* store - key of destination list to store the result in\n\n**Return value**: Array(String), the list of sorted elements.\n\nExample:\n\n```\nredis.sort(\"mylist\") # => [...]\nredis.sort(\"mylist\", order: \"DESC\") # => [...]\n```","summary":"

    Returns or stores the elements contained in the list, set or sorted set at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"by","doc":null,"default_value":"nil","external_name":"by","restriction":""},{"name":"limit","doc":null,"default_value":"nil","external_name":"limit","restriction":""},{"name":"get","doc":null,"default_value":"nil","external_name":"get","restriction":"Array(RedisValue) | ::Nil"},{"name":"order","doc":null,"default_value":"\"ASC\"","external_name":"order","restriction":""},{"name":"alpha","doc":null,"default_value":"false","external_name":"alpha","restriction":""},{"name":"store","doc":null,"default_value":"nil","external_name":"store","restriction":""}],"args_string":"(key, by = nil, limit = nil, get : Array(RedisValue)? = nil, order = "ASC", alpha = false, store = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L178","def":{"name":"sort","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"by","doc":null,"default_value":"nil","external_name":"by","restriction":""},{"name":"limit","doc":null,"default_value":"nil","external_name":"limit","restriction":""},{"name":"get","doc":null,"default_value":"nil","external_name":"get","restriction":"Array(RedisValue) | ::Nil"},{"name":"order","doc":null,"default_value":"\"ASC\"","external_name":"order","restriction":""},{"name":"alpha","doc":null,"default_value":"false","external_name":"alpha","restriction":""},{"name":"store","doc":null,"default_value":"nil","external_name":"store","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"SORT\", namespaced(key)]\nif by\n (q << \"BY\") << by.to_s\nend\nif limit\n if limit.size != 2\n raise(Error.new(\"limit must be an array of 2 elements (offset, count)\"))\n end\n offset, count = limit\n ((q << \"LIMIT\") << offset.to_s) << count.to_s\nend\nif get\n get.each do |pattern|\n (q << \"GET\") << pattern\n end\nend\nif order\n _order = order.upcase\n if [\"ASC\", \"DESC\"].includes?(_order)\n else\n raise(Error.new(\"Bad order #{order}\"))\n end\n q << _order\nend\nif alpha\n q << \"ALPHA\"\nend\nif store\n (q << \"STORE\") << (namespaced(store))\nend\nstring_array_or_integer_command(q)\n"}},{"id":"spop(key,count=nil)-instance-method","html_id":"spop(key,count=nil)-instance-method","name":"spop","doc":"Removes and returns one or more random elements from the set value store at key.\n\nThe count argument will be available in a later Redis version and is not available in 2.6, 2.8, 3.0\n\n**Return value**: The removed element, or nil when key does not exist.","summary":"

    Removes and returns one or more random elements from the set value store at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""}],"args_string":"(key, count = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L820","def":{"name":"spop","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"SPOP\", namespaced(key)]\nif count\n q << count.to_s\nend\nstring_array_or_string_or_nil_command(q)\n"}},{"id":"srandmember(key,count=nil)-instance-method","html_id":"srandmember(key,count=nil)-instance-method","name":"srandmember","doc":"When called with just the key argument, return a random element from the set value stored at key.\n\n**Options**:\n\n* count - Starting from Redis version 2.6, when called with the additional count argument, return an array of count distinct elements if count is positive. If called with a negative count the behavior changes and the command is allowed to return the same element multiple times.\n\n**Return value**:\n* String: without the additional count argument the command returns a Bulk Reply with the randomly selected element, or nil when key does not exist.\n* Array: when the additional count argument is passed the command returns an array of elements, or an empty array when key does not exist.","summary":"

    When called with just the key argument, return a random element from the set value stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""}],"args_string":"(key, count = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L838","def":{"name":"srandmember","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"SRANDMEMBER\", namespaced(key)]\nif count\n q << count.to_s\nend\nstring_array_or_string_or_nil_command(q)\n"}},{"id":"srem(key,*values)-instance-method","html_id":"srem(key,*values)-instance-method","name":"srem","doc":"Remove the specified members from the set stored at key.\n\n**Return value**: Integer, The number of members that were removed from the set, not including non existing members.\n\nExample:\n\n```\nredis.srem(\"myset\", \"Hello\")\n```","summary":"

    Remove the specified members from the set stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":""}],"args_string":"(key, *values)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L740","def":{"name":"srem","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":""}],"double_splat":null,"splat_index":1,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"srem(key, values.to_a)"}},{"id":"srem(key,values:Array(RedisValue))-instance-method","html_id":"srem(key,values:Array(RedisValue))-instance-method","name":"srem","doc":null,"summary":null,"abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"Array(RedisValue)"}],"args_string":"(key, values : Array(RedisValue))","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L744","def":{"name":"srem","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"Array(RedisValue)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command(concat([\"SREM\", namespaced(key)], values))"}},{"id":"sscan(key,cursor,match=nil,count=nil)-instance-method","html_id":"sscan(key,cursor,match=nil,count=nil)-instance-method","name":"sscan","doc":"The SCAN command and the closely related commands SSCAN, HSCAN and ZSCAN are used in order to incrementally iterate over a collection of elements.\n\n**Options**:\n\n* match - It is possible to only iterate elements matching a given glob-style pattern, similarly to the behavior of the KEYS command that takes a pattern as only argument.\n* count - While SCAN does not provide guarantees about the number of elements returned at every iteration, it is possible to empirically adjust the behavior of SCAN using the COUNT option.\n\n**Return value**: Array(String), a list of Set members.\n\nExample:\n\n```\nredis.sscan(\"myset\", 0)\nredis.sscan(\"myset\", 0, \"foo*\")\nredis.sscan(\"myset\", 0, \"foo*\", 1024)\n```","summary":"

    The SCAN command and the closely related commands SSCAN, HSCAN and ZSCAN are used in order to incrementally iterate over a collection of elements.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"cursor","doc":null,"default_value":"","external_name":"cursor","restriction":""},{"name":"match","doc":null,"default_value":"nil","external_name":"match","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""}],"args_string":"(key, cursor, match = nil, count = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L862","def":{"name":"sscan","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"cursor","doc":null,"default_value":"","external_name":"cursor","restriction":""},{"name":"match","doc":null,"default_value":"nil","external_name":"match","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"SSCAN\", namespaced(key), cursor.to_s]\nif match\n (q << \"MATCH\") << match.to_s\nend\nif count\n (q << \"COUNT\") << count.to_s\nend\nstring_array_command(q)\n"}},{"id":"strlen(key)-instance-method","html_id":"strlen(key)-instance-method","name":"strlen","doc":"Returns the length of the string value stored at key.\n\n**Return value**: Integer, the length of the string at key, or 0 when key does not exist.","summary":"

    Returns the length of the string value stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L382","def":{"name":"strlen","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"STRLEN\", namespaced(key)])"}},{"id":"subscribe(*channels:String)-instance-method","html_id":"subscribe(*channels:String)-instance-method","name":"subscribe","doc":"Subscribes to more channels while already being in a subscription loop.","summary":"

    Subscribes to more channels while already being in a subscription loop.

    ","abstract":false,"args":[{"name":"channels","doc":null,"default_value":"","external_name":"channels","restriction":"String"}],"args_string":"(*channels : String)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1681","def":{"name":"subscribe","args":[{"name":"channels","doc":null,"default_value":"","external_name":"channels","restriction":"String"}],"double_splat":null,"splat_index":0,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"subscribe(channels.to_a)"}},{"id":"subscribe(*channels,&callback_setup_block:Subscription->)-instance-method","html_id":"subscribe(*channels,&callback_setup_block:Subscription->)-instance-method","name":"subscribe","doc":"Subscribes to channels and enters a subscription loop, waiting for events.\n\nThe method yields to the given block and passes a Subscription object, on\nwhich you can set your callbacks for the event subscription.\n\nThe subscription loop will end once you unsubscribe.\n\nSee also: `Subscription` class\nSee also: Example `subscribe.cr`\n\nExample:\n\n```\nredis.subscribe(\"mychannel\") do |on|\n on.message do |channel, message|\n puts \"Received message: #{message}\"\n if message == \"goodbye pal\"\n redis.unsubscribe\n end\n end\nend\n```","summary":"

    Subscribes to channels and enters a subscription loop, waiting for events.

    ","abstract":false,"args":[{"name":"channels","doc":null,"default_value":"","external_name":"channels","restriction":""}],"args_string":"(*channels, &callback_setup_block : Subscription -> )","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1655","def":{"name":"subscribe","args":[{"name":"channels","doc":null,"default_value":"","external_name":"channels","restriction":""}],"double_splat":null,"splat_index":0,"yields":1,"block_arg":{"name":"callback_setup_block","doc":null,"default_value":"","external_name":"callback_setup_block","restriction":"(Subscription -> )"},"return_type":"","visibility":"Public","body":"if already_in_subscription_loop?\n raise(Redis::Error.new(\"Must call subscribe without a subscription block when already inside a subscription loop\"))\nend\nsubscription = Subscription.new\ncallback_setup_block.call(subscription)\n@strategy = Redis::Strategy::SubscriptionLoop.new(connection, subscription)\nsubscribe(*channels)\n"}},{"id":"subscribe(channels:Array(String)):Void-instance-method","html_id":"subscribe(channels:Array(String)):Void-instance-method","name":"subscribe","doc":"Subscribes to more channels while already being in a subscription loop.","summary":"

    Subscribes to more channels while already being in a subscription loop.

    ","abstract":false,"args":[{"name":"channels","doc":null,"default_value":"","external_name":"channels","restriction":"Array(String)"}],"args_string":"(channels : Array(String)) : Void","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1671","def":{"name":"subscribe","args":[{"name":"channels","doc":null,"default_value":"","external_name":"channels","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Void","visibility":"Public","body":"if already_in_subscription_loop?\nelse\n raise(Redis::Error.new(\"Must call subscribe with a subscription block\"))\nend\nvoid_command(concat([\"SUBSCRIBE\"], channels))\n"}},{"id":"sunion(*keys:String)-instance-method","html_id":"sunion(*keys:String)-instance-method","name":"sunion","doc":"Returns the members of the set resulting from the union of all the given sets.\n\n**Return value**: Array(String), with members of the resulting set.","summary":"

    Returns the members of the set resulting from the union of all the given sets.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"args_string":"(*keys : String)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L877","def":{"name":"sunion","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"double_splat":null,"splat_index":0,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"sunion(keys.to_a)"}},{"id":"sunion(keys:Array(String))-instance-method","html_id":"sunion(keys:Array(String))-instance-method","name":"sunion","doc":"Returns the members of the set resulting from the union of all the given sets.\n\n**Return value**: Array(String), with members of the resulting set.","summary":"

    Returns the members of the set resulting from the union of all the given sets.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"args_string":"(keys : Array(String))","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L872","def":{"name":"sunion","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_array_command(concat([\"SUNION\"], namespaced(keys)))"}},{"id":"sunionstore(destination,keys:Array(String)):Int64-instance-method","html_id":"sunionstore(destination,keys:Array(String)):Int64-instance-method","name":"sunionstore","doc":"This command is equal to SUNION, but instead of returning the resulting set, it is stored in destination.\n\n**Return value**: Integer, the number of elements in the resulting set.","summary":"

    This command is equal to SUNION, but instead of returning the resulting set, it is stored in destination.

    ","abstract":false,"args":[{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"args_string":"(destination, keys : Array(String)) : Int64","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L884","def":{"name":"sunionstore","args":[{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Int64","visibility":"Public","body":"integer_command(concat([\"SUNIONSTORE\", namespaced(destination)], namespaced(keys)))"}},{"id":"sunionstore(destination,*keys:String):Int64-instance-method","html_id":"sunionstore(destination,*keys:String):Int64-instance-method","name":"sunionstore","doc":"This command is equal to SUNION, but instead of returning the resulting set, it is stored in destination.\n\n**Return value**: Integer, the number of elements in the resulting set.","summary":"

    This command is equal to SUNION, but instead of returning the resulting set, it is stored in destination.

    ","abstract":false,"args":[{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"args_string":"(destination, *keys : String) : Int64","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L889","def":{"name":"sunionstore","args":[{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"double_splat":null,"splat_index":1,"yields":null,"block_arg":null,"return_type":"Int64","visibility":"Public","body":"sunionstore(destination, keys.to_a)"}},{"id":"ttl(key)-instance-method","html_id":"ttl(key)-instance-method","name":"ttl","doc":"Returns the remaining time to live of a key that has a timeout.\n\n**Return value**: Integer: TTL in seconds, or a negative value in order to\nsignal an error (see the description above).","summary":"

    Returns the remaining time to live of a key that has a timeout.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1606","def":{"name":"ttl","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"TTL\", namespaced(key)])"}},{"id":"type(key)-instance-method","html_id":"type(key)-instance-method","name":"type","doc":"Returns the string representation of the type of the value stored at key.\n\n**Return value**: String, the type of key, or none when key does not exist.\n\nExample:\n\n```\nredis.set(\"foo\", 3)\nredis.type(\"foo\") # => \"string\"\n```","summary":"

    Returns the string representation of the type of the value stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1629","def":{"name":"type","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"TYPE\", namespaced(key)])"}},{"id":"unsubscribe(*channels)-instance-method","html_id":"unsubscribe(*channels)-instance-method","name":"unsubscribe","doc":"Unsubscribes the client from the given channels, or from all of them if none is given.","summary":"

    Unsubscribes the client from the given channels, or from all of them if none is given.

    ","abstract":false,"args":[{"name":"channels","doc":null,"default_value":"","external_name":"channels","restriction":""}],"args_string":"(*channels)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1730","def":{"name":"unsubscribe","args":[{"name":"channels","doc":null,"default_value":"","external_name":"channels","restriction":""}],"double_splat":null,"splat_index":0,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"unsubscribe(channels.to_a)"}},{"id":"unsubscribe(channels:Array(String)):Nil-instance-method","html_id":"unsubscribe(channels:Array(String)):Nil-instance-method","name":"unsubscribe","doc":"Unsubscribes the client from the given channels, or from all of them if none is given.","summary":"

    Unsubscribes the client from the given channels, or from all of them if none is given.

    ","abstract":false,"args":[{"name":"channels","doc":null,"default_value":"","external_name":"channels","restriction":"Array(String)"}],"args_string":"(channels : Array(String)) : Nil","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1725","def":{"name":"unsubscribe","args":[{"name":"channels","doc":null,"default_value":"","external_name":"channels","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Nil","visibility":"Public","body":"void_command(concat([\"UNSUBSCRIBE\"], channels))"}},{"id":"unwatch-instance-method","html_id":"unwatch-instance-method","name":"unwatch","doc":"Flushes all the previously watched keys for a transaction.\n\n**Return value**: \"OK\"","summary":"

    Flushes all the previously watched keys for a transaction.

    ","abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1771","def":{"name":"unwatch","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"UNWATCH\"])"}},{"id":"watch(keys:Array(String))-instance-method","html_id":"watch(keys:Array(String))-instance-method","name":"watch","doc":"Marks the given keys to be watched for conditional execution of a transaction.\n\n**Return value**: \"OK\"","summary":"

    Marks the given keys to be watched for conditional execution of a transaction.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"args_string":"(keys : Array(String))","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1760","def":{"name":"watch","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command(concat([\"WATCH\"], namespaced(keys)))"}},{"id":"watch(*keys)-instance-method","html_id":"watch(*keys)-instance-method","name":"watch","doc":null,"summary":null,"abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":""}],"args_string":"(*keys)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1764","def":{"name":"watch","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":""}],"double_splat":null,"splat_index":0,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"watch(keys.to_a)"}},{"id":"zadd(key,scores_and_members:Array(RedisValue))-instance-method","html_id":"zadd(key,scores_and_members:Array(RedisValue))-instance-method","name":"zadd","doc":null,"summary":null,"abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"scores_and_members","doc":null,"default_value":"","external_name":"scores_and_members","restriction":"Array(RedisValue)"}],"args_string":"(key, scores_and_members : Array(RedisValue))","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1147","def":{"name":"zadd","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"scores_and_members","doc":null,"default_value":"","external_name":"scores_and_members","restriction":"Array(RedisValue)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"if (scores_and_members.size % 2) > 0\n raise(Error.new(\"zadd expects an array of scores mapped to members\"))\nend\ninteger_command(concat([\"ZADD\", namespaced(key)], scores_and_members))\n"}},{"id":"zadd(key,*scores_and_members)-instance-method","html_id":"zadd(key,*scores_and_members)-instance-method","name":"zadd","doc":"Adds all the specified members with the specified scores to the sorted set stored at key.\n\n**Return value**: Integer, the number of elements added to the sorted sets, not including elements already existing for which the score was updated.\n\nExample:\n\n```\nredis.zadd(\"myzset\", 1, \"one\")\nredis.zadd(\"myzset\", 2, \"two\", 3, \"three\")\n```","summary":"

    Adds all the specified members with the specified scores to the sorted set stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"scores_and_members","doc":null,"default_value":"","external_name":"scores_and_members","restriction":""}],"args_string":"(key, *scores_and_members)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1139","def":{"name":"zadd","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"scores_and_members","doc":null,"default_value":"","external_name":"scores_and_members","restriction":""}],"double_splat":null,"splat_index":1,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"if (scores_and_members.size % 2) > 0\n raise(Error.new(\"zadd expects an array of scores mapped to members\"))\nend\ninteger_command(concat([\"ZADD\", namespaced(key)], scores_and_members))\n"}},{"id":"zcard(key)-instance-method","html_id":"zcard(key)-instance-method","name":"zcard","doc":"Returns the sorted set cardinality (number of elements) of the sorted set stored at key.\n\n**Return value**: Integer, the cardinality (number of elements) of the sorted set, or 0 if key does not exist.","summary":"

    Returns the sorted set cardinality (number of elements) of the sorted set stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1179","def":{"name":"zcard","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"ZCARD\", namespaced(key)])"}},{"id":"zcount(key,min,max)-instance-method","html_id":"zcount(key,min,max)-instance-method","name":"zcount","doc":"Returns the number of elements in the sorted set at key with a score between min and max.\n\n**Return value**: Integer, the number of elements in the specified score range.","summary":"

    Returns the number of elements in the sorted set at key with a score between min and max.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""}],"args_string":"(key, min, max)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1193","def":{"name":"zcount","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"ZCOUNT\", namespaced(key), min.to_s, max.to_s])"}},{"id":"zincrby(key,increment,member)-instance-method","html_id":"zincrby(key,increment,member)-instance-method","name":"zincrby","doc":"Increments the score of member in the sorted set stored at key by increment.\n\n**Return value**: String, the new score of member (a double precision floating point number represented as String).","summary":"

    Increments the score of member in the sorted set stored at key by increment.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"increment","doc":null,"default_value":"","external_name":"increment","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""}],"args_string":"(key, increment, member)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1207","def":{"name":"zincrby","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"increment","doc":null,"default_value":"","external_name":"increment","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"ZINCRBY\", namespaced(key), increment.to_s, member.to_s])"}},{"id":"zinterstore(destination,keys:Array,weights=nil,aggregate=nil)-instance-method","html_id":"zinterstore(destination,keys:Array,weights=nil,aggregate=nil)-instance-method","name":"zinterstore","doc":"Computes the intersection of numkeys sorted sets given by the specified keys,\nand stores the result in destination.\n\n**Options**:\n\n* weights - nil or Array(String): Using the WEIGHTS option, it is possible to specify a multiplication factor for each input sorted set.\n* aggregate - With the AGGREGATE option, it is possible to specify how the results of the union are aggregated.\n\n**Return value**: Integer, the number of elements in the resulting sorted set at destination.\n\nExample:\n\n```\nredis.zinterstore(\"zset3\", [\"zset1\", \"zset2\"], weights: [2, 3])\n```","summary":"

    Computes the intersection of numkeys sorted sets given by the specified keys, and stores the result in destination.

    ","abstract":false,"args":[{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array"},{"name":"weights","doc":null,"default_value":"nil","external_name":"weights","restriction":""},{"name":"aggregate","doc":null,"default_value":"nil","external_name":"aggregate","restriction":""}],"args_string":"(destination, keys : Array, weights = nil, aggregate = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1252","def":{"name":"zinterstore","args":[{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array"},{"name":"weights","doc":null,"default_value":"nil","external_name":"weights","restriction":""},{"name":"aggregate","doc":null,"default_value":"nil","external_name":"aggregate","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"numkeys = keys.size\nq = concat([\"ZINTERSTORE\", namespaced(destination), numkeys.to_s], namespaced(keys))\nif weights\n q << \"WEIGHTS\"\n concat(q, weights)\nend\nif aggregate\n (q << \"AGGREGATE\") << aggregate.to_s\nend\ninteger_command(q)\n"}},{"id":"zlexcount(key,min,max)-instance-method","html_id":"zlexcount(key,min,max)-instance-method","name":"zlexcount","doc":"When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering, this command returns the number of elements in the sorted set at key with a value between min and max.\n\n**Return value**: Integer, the number of elements in the specified score range.","summary":"

    When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering, this command returns the number of elements in the sorted set at key with a value between min and max.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""}],"args_string":"(key, min, max)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1200","def":{"name":"zlexcount","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"ZLEXCOUNT\", namespaced(key), min.to_s, max.to_s])"}},{"id":"zrange(key,start,stop,with_scores=false)-instance-method","html_id":"zrange(key,start,stop,with_scores=false)-instance-method","name":"zrange","doc":"Returns the specified range of elements in the sorted set stored at key.\n\n**Options**:\n\n* with_scores - true to return the scores of the elements together with the elements.\n\n**Return value**: Array(String), list of elements in the specified range (optionally with their scores, in case the with_scores option is true).\n\nExample:\n\n```\nredis.zrange(\"myzset\", 0, -1, with_scores: true) # => [\"one\", \"1\", \"uno\", \"1\", \"two\", \"2\", \"three\", \"3\"]\n```","summary":"

    Returns the specified range of elements in the sorted set stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start","doc":null,"default_value":"","external_name":"start","restriction":""},{"name":"stop","doc":null,"default_value":"","external_name":"stop","restriction":""},{"name":"with_scores","doc":null,"default_value":"false","external_name":"with_scores","restriction":""}],"args_string":"(key, start, stop, with_scores = false)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1168","def":{"name":"zrange","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start","doc":null,"default_value":"","external_name":"start","restriction":""},{"name":"stop","doc":null,"default_value":"","external_name":"stop","restriction":""},{"name":"with_scores","doc":null,"default_value":"false","external_name":"with_scores","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"ZRANGE\", namespaced(key), start.to_s, stop.to_s]\nif with_scores\n q << \"WITHSCORES\"\nend\nstring_array_command(q)\n"}},{"id":"zrangebylex(key,min,max,limit=nil)-instance-method","html_id":"zrangebylex(key,min,max,limit=nil)-instance-method","name":"zrangebylex","doc":"When all the elements in a sorted set are inserted with the same score,\nin order to force lexicographical ordering, this command returns all the\nelements in the sorted set at key with a value between min and max.\n\n**Options**:\n\n* limit - an array of [offset, count]. Skip offset members, return a maximum of count members.\n\n**Return value**:","summary":"

    When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering, this command returns all the elements in the sorted set at key with a value between min and max.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""},{"name":"limit","doc":null,"default_value":"nil","external_name":"limit","restriction":""}],"args_string":"(key, min, max, limit = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1295","def":{"name":"zrangebylex","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""},{"name":"limit","doc":null,"default_value":"nil","external_name":"limit","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"ZRANGEBYLEX\", namespaced(key), min.to_s, max.to_s]\nif limit\n ((q << \"LIMIT\") << limit[0].to_s) << limit[1].to_s\nend\nstring_array_command(q)\n"}},{"id":"zrangebyscore(key,min,max,limit=nil,with_scores=false)-instance-method","html_id":"zrangebyscore(key,min,max,limit=nil,with_scores=false)-instance-method","name":"zrangebyscore","doc":"Returns all the elements in the sorted set at key with a score between\nmax and min (including elements with score equal to max or min).\n\n**Options**:\n\n* limit - an array of [offset, count]. Skip offset members, return a maximum of count members.\n* with_scores - true to return the scores of the elements together with the elements.\n\n**Return value**: Array(String), the list of elements in the specified score range (optionally with their scores).","summary":"

    Returns all the elements in the sorted set at key with a score between max and min (including elements with score equal to max or min).

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""},{"name":"limit","doc":null,"default_value":"nil","external_name":"limit","restriction":""},{"name":"with_scores","doc":null,"default_value":"false","external_name":"with_scores","restriction":""}],"args_string":"(key, min, max, limit = nil, with_scores = false)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1312","def":{"name":"zrangebyscore","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""},{"name":"limit","doc":null,"default_value":"nil","external_name":"limit","restriction":""},{"name":"with_scores","doc":null,"default_value":"false","external_name":"with_scores","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"ZRANGEBYSCORE\", namespaced(key), min.to_s, max.to_s]\nif limit\n ((q << \"LIMIT\") << limit[0].to_s) << limit[1].to_s\nend\nif with_scores\n q << \"WITHSCORES\"\nend\nstring_array_command(q)\n"}},{"id":"zrank(key,member)-instance-method","html_id":"zrank(key,member)-instance-method","name":"zrank","doc":"Returns the rank of member in the sorted set stored at key, with the scores ordered from low to high.\n\n**Return value**:\n* If member exists in the sorted set, Integer: the rank of member.\n* If member does not exist in the sorted set or key does not exist: nil.","summary":"

    Returns the rank of member in the sorted set stored at key, with the scores ordered from low to high.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""}],"args_string":"(key, member)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1223","def":{"name":"zrank","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_or_nil_command([\"ZRANK\", namespaced(key), member.to_s])"}},{"id":"zrem(key,member)-instance-method","html_id":"zrem(key,member)-instance-method","name":"zrem","doc":"Removes the specified members from the sorted set stored at key.\n\n**Return value**: Integer, the number of members removed from the sorted set, not including non existing members.","summary":"

    Removes the specified members from the sorted set stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""}],"args_string":"(key, member)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1214","def":{"name":"zrem","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"ZREM\", namespaced(key), member.to_s])"}},{"id":"zremrangebylex(key,min,max)-instance-method","html_id":"zremrangebylex(key,min,max)-instance-method","name":"zremrangebylex","doc":"When all the elements in a sorted set are inserted with the same score,\nin order to force lexicographical ordering, this command removes all\nelements in the sorted set stored at key between the lexicographical range\nspecified by min and max.\n\n**Return value**: Integer, the number of elements removed.","summary":"

    When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering, this command removes all elements in the sorted set stored at key between the lexicographical range specified by min and max.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""}],"args_string":"(key, min, max)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1382","def":{"name":"zremrangebylex","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"ZREMRANGEBYLEX\", namespaced(key), min.to_s, max.to_s])"}},{"id":"zremrangebyrank(key,start,stop)-instance-method","html_id":"zremrangebyrank(key,start,stop)-instance-method","name":"zremrangebyrank","doc":"Removes all elements in the sorted set stored at key with rank between start and stop.\n\n**Return value**: Integer, the number of elements removed.","summary":"

    Removes all elements in the sorted set stored at key with rank between start and stop.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start","doc":null,"default_value":"","external_name":"start","restriction":""},{"name":"stop","doc":null,"default_value":"","external_name":"stop","restriction":""}],"args_string":"(key, start, stop)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1389","def":{"name":"zremrangebyrank","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start","doc":null,"default_value":"","external_name":"start","restriction":""},{"name":"stop","doc":null,"default_value":"","external_name":"stop","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"ZREMRANGEBYRANK\", namespaced(key), start.to_s, stop.to_s])"}},{"id":"zremrangebyscore(key,start,stop)-instance-method","html_id":"zremrangebyscore(key,start,stop)-instance-method","name":"zremrangebyscore","doc":"Removes all elements in the sorted set stored at key with a score\nbetween min and max (inclusive).\n\n**Return value**: Integer, the number of elements removed.","summary":"

    Removes all elements in the sorted set stored at key with a score between min and max (inclusive).

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start","doc":null,"default_value":"","external_name":"start","restriction":""},{"name":"stop","doc":null,"default_value":"","external_name":"stop","restriction":""}],"args_string":"(key, start, stop)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1397","def":{"name":"zremrangebyscore","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start","doc":null,"default_value":"","external_name":"start","restriction":""},{"name":"stop","doc":null,"default_value":"","external_name":"stop","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"ZREMRANGEBYSCORE\", namespaced(key), start.to_s, stop.to_s])"}},{"id":"zrevrange(key,start,stop,with_scores=false)-instance-method","html_id":"zrevrange(key,start,stop,with_scores=false)-instance-method","name":"zrevrange","doc":"Returns the specified range of elements in the sorted set stored at key.\n\n**Options**:\n\n* with_scores - true to return the scores of the elements together with the elements.\n\n**Return value**: Array(String), the list of elements in the specified range (optionally with their scores, in case the with_scores option is true).","summary":"

    Returns the specified range of elements in the sorted set stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start","doc":null,"default_value":"","external_name":"start","restriction":""},{"name":"stop","doc":null,"default_value":"","external_name":"stop","restriction":""},{"name":"with_scores","doc":null,"default_value":"false","external_name":"with_scores","restriction":""}],"args_string":"(key, start, stop, with_scores = false)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1330","def":{"name":"zrevrange","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start","doc":null,"default_value":"","external_name":"start","restriction":""},{"name":"stop","doc":null,"default_value":"","external_name":"stop","restriction":""},{"name":"with_scores","doc":null,"default_value":"false","external_name":"with_scores","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"ZREVRANGE\", namespaced(key), start.to_s, stop.to_s]\nif with_scores\n q << \"WITHSCORES\"\nend\nstring_array_command(q)\n"}},{"id":"zrevrangebylex(key,min,max,limit=nil)-instance-method","html_id":"zrevrangebylex(key,min,max,limit=nil)-instance-method","name":"zrevrangebylex","doc":"When all the elements in a sorted set are inserted with the same score,\nin order to force lexicographical ordering, this command returns all the\nelements in the sorted set at key with a value between min and max.\n\n**Options**:\n\n* limit - an array of [offset, count]. Skip offset members, return a maximum of count members.\n\n**Return value**:","summary":"

    When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering, this command returns all the elements in the sorted set at key with a value between min and max.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""},{"name":"limit","doc":null,"default_value":"nil","external_name":"limit","restriction":""}],"args_string":"(key, min, max, limit = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1348","def":{"name":"zrevrangebylex","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""},{"name":"limit","doc":null,"default_value":"nil","external_name":"limit","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"ZREVRANGEBYLEX\", namespaced(key), min.to_s, max.to_s]\nif limit\n ((q << \"LIMIT\") << limit[0].to_s) << limit[1].to_s\nend\nstring_array_command(q)\n"}},{"id":"zrevrangebyscore(key,min,max,limit=nil,with_scores=false)-instance-method","html_id":"zrevrangebyscore(key,min,max,limit=nil,with_scores=false)-instance-method","name":"zrevrangebyscore","doc":"Returns all the elements in the sorted set at key with a score between\nmax and min (including elements with score equal to max or min).\n\n**Options**:\n\n* limit - an array of [offset, count]. Skip offset members, return a maximum of count members.\n* with_scores - true to return the scores of the elements together with the elements.\n\n**Return value**: Array(String), the list of elements in the specified score range (optionally with their scores).","summary":"

    Returns all the elements in the sorted set at key with a score between max and min (including elements with score equal to max or min).

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""},{"name":"limit","doc":null,"default_value":"nil","external_name":"limit","restriction":""},{"name":"with_scores","doc":null,"default_value":"false","external_name":"with_scores","restriction":""}],"args_string":"(key, min, max, limit = nil, with_scores = false)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1365","def":{"name":"zrevrangebyscore","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""},{"name":"limit","doc":null,"default_value":"nil","external_name":"limit","restriction":""},{"name":"with_scores","doc":null,"default_value":"false","external_name":"with_scores","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"ZREVRANGEBYSCORE\", namespaced(key), min.to_s, max.to_s]\nif limit\n ((q << \"LIMIT\") << limit[0].to_s) << limit[1].to_s\nend\nif with_scores\n q << \"WITHSCORES\"\nend\nstring_array_command(q)\n"}},{"id":"zrevrank(key,member)-instance-method","html_id":"zrevrank(key,member)-instance-method","name":"zrevrank","doc":"Returns the rank of member in the sorted set stored at key,\nwith the scores ordered from high to low.\n\n**Return value**:\n* If member exists in the sorted set, Integer: the rank of member.\n* If member does not exist in the sorted set or key does not exist: nil.","summary":"

    Returns the rank of member in the sorted set stored at key, with the scores ordered from high to low.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""}],"args_string":"(key, member)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1233","def":{"name":"zrevrank","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_or_nil_command([\"ZREVRANK\", namespaced(key), member.to_s])"}},{"id":"zscan(key,cursor,match=nil,count=nil)-instance-method","html_id":"zscan(key,cursor,match=nil,count=nil)-instance-method","name":"zscan","doc":"The SCAN command and the closely related commands SSCAN, HSCAN and ZSCAN are used in order to incrementally iterate over a collection of elements.\n\n**Options**:\n\n* match - It is possible to only iterate elements matching a given glob-style pattern, similarly to the behavior of the KEYS command that takes a pattern as only argument.\n* count - While SCAN does not provide guarantees about the number of elements returned at every iteration, it is possible to empirically adjust the behavior of SCAN using the COUNT option.\n\n**Return value**: Array(String), contains two elements, a member and its associated score, for every returned element of the sorted set.\n\nExample:\n\n```\nredis.zscan(\"myzset\", 0)\nredis.zscan(\"myzset\", 0, \"foo*\")\nredis.zscan(\"myzset\", 0, \"foo*\", 1024)\n```","summary":"

    The SCAN command and the closely related commands SSCAN, HSCAN and ZSCAN are used in order to incrementally iterate over a collection of elements.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"cursor","doc":null,"default_value":"","external_name":"cursor","restriction":""},{"name":"match","doc":null,"default_value":"nil","external_name":"match","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""}],"args_string":"(key, cursor, match = nil, count = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1417","def":{"name":"zscan","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"cursor","doc":null,"default_value":"","external_name":"cursor","restriction":""},{"name":"match","doc":null,"default_value":"nil","external_name":"match","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"ZSCAN\", namespaced(key), cursor.to_s]\nif match\n (q << \"MATCH\") << match.to_s\nend\nif count\n (q << \"COUNT\") << count.to_s\nend\nstring_array_command(q)\n"}},{"id":"zscore(key,member)-instance-method","html_id":"zscore(key,member)-instance-method","name":"zscore","doc":"Returns the score of member in the sorted set at key.\n\n**Return value**: String, the score of member (a double precision floating point number).","summary":"

    Returns the score of member in the sorted set at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""}],"args_string":"(key, member)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1186","def":{"name":"zscore","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_or_nil_command([\"ZSCORE\", namespaced(key), member.to_s])"}},{"id":"zunionstore(destination,keys:Array,weights=nil,aggregate=nil)-instance-method","html_id":"zunionstore(destination,keys:Array,weights=nil,aggregate=nil)-instance-method","name":"zunionstore","doc":"Computes the union of numkeys sorted sets given by the specified keys, and stores the result in destination.\n\n**Options**:\n\n* weights - nil or Array(String): Using the WEIGHTS option, it is possible to specify a multiplication factor for each input sorted set.\n* aggregate - With the AGGREGATE option, it is possible to specify how the results of the union are aggregated.\n\n**Return value**: Integer, the number of elements in the resulting sorted set at destination.","summary":"

    Computes the union of numkeys sorted sets given by the specified keys, and stores the result in destination.

    ","abstract":false,"args":[{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array"},{"name":"weights","doc":null,"default_value":"nil","external_name":"weights","restriction":""},{"name":"aggregate","doc":null,"default_value":"nil","external_name":"aggregate","restriction":""}],"args_string":"(destination, keys : Array, weights = nil, aggregate = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/commands.cr#L1273","def":{"name":"zunionstore","args":[{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array"},{"name":"weights","doc":null,"default_value":"nil","external_name":"weights","restriction":""},{"name":"aggregate","doc":null,"default_value":"nil","external_name":"aggregate","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"numkeys = keys.size\nq = concat([\"ZUNIONSTORE\", namespaced(destination), numkeys.to_s], namespaced(keys))\nif weights\n q << \"WEIGHTS\"\n concat(q, weights)\nend\nif aggregate\n (q << \"AGGREGATE\") << aggregate.to_s\nend\ninteger_command(q)\n"}}],"macros":[],"types":[]},{"html_id":"github.com/stefanwille/crystal-redis/Redis/CommandTimeoutError","path":"Redis/CommandTimeoutError.html","kind":"class","full_name":"Redis::CommandTimeoutError","name":"CommandTimeoutError","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"github.com/stefanwille/crystal-redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/error.cr","line_number":18,"url":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/error.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"Raised when the `command_timeout` option triggers - a command took too long because the Redis-server is blocked by another command or by a dump.","summary":"

    Raised when the command_timeout option triggers - a command took too long because the Redis-server is blocked by another command or by a dump.

    ","class_methods":[],"constructors":[],"instance_methods":[],"macros":[],"types":[]},{"html_id":"github.com/stefanwille/crystal-redis/Redis/ConnectionError","path":"Redis/ConnectionError.html","kind":"class","full_name":"Redis::ConnectionError","name":"ConnectionError","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"github.com/stefanwille/crystal-redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/error.cr","line_number":6,"url":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/error.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/CannotConnectError","kind":"class","full_name":"Redis::CannotConnectError","name":"CannotConnectError"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/ConnectionLostError","kind":"class","full_name":"Redis::ConnectionLostError","name":"ConnectionLostError"}],"including_types":[],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"An error that makes the connection unusable.","summary":"

    An error that makes the connection unusable.

    ","class_methods":[],"constructors":[],"instance_methods":[],"macros":[],"types":[]},{"html_id":"github.com/stefanwille/crystal-redis/Redis/ConnectionLostError","path":"Redis/ConnectionLostError.html","kind":"class","full_name":"Redis::ConnectionLostError","name":"ConnectionLostError","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Redis/ConnectionError","kind":"class","full_name":"Redis::ConnectionError","name":"ConnectionError"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/ConnectionError","kind":"class","full_name":"Redis::ConnectionError","name":"ConnectionError"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"github.com/stefanwille/crystal-redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/error.cr","line_number":14,"url":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/error.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"Raised when the connection to the Redis server is lost.","summary":"

    Raised when the connection to the Redis server is lost.

    ","class_methods":[],"constructors":[],"instance_methods":[],"macros":[],"types":[]},{"html_id":"github.com/stefanwille/crystal-redis/Redis/Error","path":"Redis/Error.html","kind":"class","full_name":"Redis::Error","name":"Error","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/error.cr","line_number":2,"url":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/error.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/CommandTimeoutError","kind":"class","full_name":"Redis::CommandTimeoutError","name":"CommandTimeoutError"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/ConnectionError","kind":"class","full_name":"Redis::ConnectionError","name":"ConnectionError"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/PoolTimeoutError","kind":"class","full_name":"Redis::PoolTimeoutError","name":"PoolTimeoutError"}],"including_types":[],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"Exception for errors raised by this shard.","summary":"

    Exception for errors raised by this shard.

    ","class_methods":[],"constructors":[],"instance_methods":[],"macros":[],"types":[]},{"html_id":"github.com/stefanwille/crystal-redis/Redis/Future","path":"Redis/Future.html","kind":"class","full_name":"Redis::Future","name":"Future","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/future.cr","line_number":6,"url":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/future.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"Futures are handles for values that will become available at a later point in time.\n\nThe API methods Redis#pipelined and Redis#multi make commands return futures instead of actual values.\n\nSee this [example](https://github.com/stefanwille/crystal-redis-examples/blob/master/src/pipelining.cr).","summary":"

    Futures are handles for values that will become available at a later point in time.

    ","class_methods":[],"constructors":[{"id":"new-class-method","html_id":"new-class-method","name":"new","doc":null,"summary":null,"abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/future.cr#L9","def":{"name":"new","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"_ = allocate\n_.initialize\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"id":"value-instance-method","html_id":"value-instance-method","name":"value","doc":null,"summary":null,"abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/future.cr#L14","def":{"name":"value","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"if @ready\n @value\nelse\n raise(Redis::Error.new(\"Future value not ready yet\"))\nend"}},{"id":"value=(new_value)-instance-method","html_id":"value=(new_value)-instance-method","name":"value=","doc":null,"summary":null,"abstract":false,"args":[{"name":"new_value","doc":null,"default_value":"","external_name":"new_value","restriction":""}],"args_string":"(new_value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/future.cr#L22","def":{"name":"value=","args":[{"name":"new_value","doc":null,"default_value":"","external_name":"new_value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"@value = new_value\n@ready = true\n"}}],"macros":[],"types":[]},{"html_id":"github.com/stefanwille/crystal-redis/Redis/PipelineApi","path":"Redis/PipelineApi.html","kind":"class","full_name":"Redis::PipelineApi","name":"PipelineApi","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/CommandExecution/FutureOriented","kind":"module","full_name":"Redis::CommandExecution::FutureOriented","name":"FutureOriented"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/pipeline_api.cr","line_number":18,"url":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/pipeline_api.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/CommandExecution/FutureOriented","kind":"module","full_name":"Redis::CommandExecution::FutureOriented","name":"FutureOriented"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"API for sending commands in pipelined mode.\n\nUsed in Redis#pipelined.\n\nExample:\n\n```\nredis.pipelined do |pipeline|\n pipeline.set(\"foo1\", \"first\")\n pipeline.set(\"foo2\", \"second\")\nend\n```\n\nIn this example, the `pipeline` object passed to the block is a PipelineApi\nobject.","summary":"

    API for sending commands in pipelined mode.

    ","class_methods":[],"constructors":[{"id":"new(strategy,namespace="")-class-method","html_id":"new(strategy,namespace=&quot;&quot;)-class-method","name":"new","doc":null,"summary":null,"abstract":false,"args":[{"name":"strategy","doc":null,"default_value":"","external_name":"strategy","restriction":""},{"name":"namespace","doc":null,"default_value":"\"\"","external_name":"namespace","restriction":""}],"args_string":"(strategy, namespace = "")","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/pipeline_api.cr#L22","def":{"name":"new","args":[{"name":"strategy","doc":null,"default_value":"","external_name":"strategy","restriction":""},{"name":"namespace","doc":null,"default_value":"\"\"","external_name":"namespace","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"_ = allocate\n_.initialize(strategy, namespace)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[],"macros":[],"types":[]},{"html_id":"github.com/stefanwille/crystal-redis/Redis/PooledClient","path":"Redis/PooledClient.html","kind":"class","full_name":"Redis::PooledClient","name":"PooledClient","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/pooled_client.cr","line_number":20,"url":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/pooled_client.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"A Redis client object that can be shared across multiple fibers.\nIt is backed by a connection pool of `Redis` instances and will automatically allocate and free these instances from/to the pool, per command.\n\nExample usage:\n\n```Crystal\nredis = Redis::PooledClient.new(host: ..., port: ..., ..., pool_size: 5)\n10.times do |i|\n spawn do\n redis.set(\"foo#{i}\", \"bar\")\n redis.get(\"foo#{i}\") # => \"bar\"\n end\nend\n```\n\nHere 10 fibers access the same `Redis::PooledClient` instance while automatically sharing 5 Redis connections.\n","summary":"

    A Redis client object that can be shared across multiple fibers.

    ","class_methods":[],"constructors":[{"id":"new(*args,pool_size=5,pool_timeout=5.0,**args2)-class-method","html_id":"new(*args,pool_size=5,pool_timeout=5.0,**args2)-class-method","name":"new","doc":"Accepts the same connection parameters like a `Redis` instance, plus the documented ones.\n\n* pool_size - the number of `Redis` to hold in the connection pool.\n* pool_timeout - the time to wait for a `Redis` instance to become available from the pool before dying with `Redis::PoolTimeoutError`.","summary":"

    Accepts the same connection parameters like a Redis instance, plus the documented ones.

    ","abstract":false,"args":[{"name":"args","doc":null,"default_value":"","external_name":"args","restriction":""},{"name":"pool_size","doc":null,"default_value":"5","external_name":"pool_size","restriction":""},{"name":"pool_timeout","doc":null,"default_value":"5.0","external_name":"pool_timeout","restriction":""}],"args_string":"(*args, pool_size = 5, pool_timeout = 5.0, **args2)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/pooled_client.cr#L29","def":{"name":"new","args":[{"name":"args","doc":null,"default_value":"","external_name":"args","restriction":""},{"name":"pool_size","doc":null,"default_value":"5","external_name":"pool_size","restriction":""},{"name":"pool_timeout","doc":null,"default_value":"5.0","external_name":"pool_timeout","restriction":""}],"double_splat":{"name":"args2","doc":null,"default_value":"","external_name":"args2","restriction":""},"splat_index":0,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"_ = allocate\n_.initialize(*args, **args2, pool_size: pool_size, pool_timeout: pool_timeout)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"id":"pool:ConnectionPool(Redis)-instance-method","html_id":"pool:ConnectionPool(Redis)-instance-method","name":"pool","doc":"The connection pool.\nSee [https://github.com/ysbaddaden/pool](https://github.com/ysbaddaden/pool)","summary":"

    The connection pool.

    ","abstract":false,"args":[],"args_string":" : ConnectionPool(Redis)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/pooled_client.cr#L23","def":{"name":"pool","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"@pool"}},{"id":"psubscribe(*channel_patterns,&callback_setup_block:Redis::Subscription->)-instance-method","html_id":"psubscribe(*channel_patterns,&callback_setup_block:Redis::Subscription->)-instance-method","name":"psubscribe","doc":null,"summary":null,"abstract":false,"args":[{"name":"channel_patterns","doc":null,"default_value":"","external_name":"channel_patterns","restriction":""}],"args_string":"(*channel_patterns, &callback_setup_block : Redis::Subscription -> )","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/pooled_client.cr#L59","def":{"name":"psubscribe","args":[{"name":"channel_patterns","doc":null,"default_value":"","external_name":"channel_patterns","restriction":""}],"double_splat":null,"splat_index":0,"yields":1,"block_arg":{"name":"callback_setup_block","doc":null,"default_value":"","external_name":"callback_setup_block","restriction":"(Redis::Subscription -> )"},"return_type":"","visibility":"Public","body":"with_pool_connection(&.psubscribe(*channel_patterns) do |s|\n callback_setup_block.call(s)\nend)"}},{"id":"subscribe(*channels,&callback_setup_block:Redis::Subscription->)-instance-method","html_id":"subscribe(*channels,&callback_setup_block:Redis::Subscription->)-instance-method","name":"subscribe","doc":null,"summary":null,"abstract":false,"args":[{"name":"channels","doc":null,"default_value":"","external_name":"channels","restriction":""}],"args_string":"(*channels, &callback_setup_block : Redis::Subscription -> )","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/pooled_client.cr#L55","def":{"name":"subscribe","args":[{"name":"channels","doc":null,"default_value":"","external_name":"channels","restriction":""}],"double_splat":null,"splat_index":0,"yields":1,"block_arg":{"name":"callback_setup_block","doc":null,"default_value":"","external_name":"callback_setup_block","restriction":"(Redis::Subscription -> )"},"return_type":"","visibility":"Public","body":"with_pool_connection(&.subscribe(*channels) do |s|\n callback_setup_block.call(s)\nend)"}}],"macros":[{"id":"method_missing(call)-macro","html_id":"method_missing(call)-macro","name":"method_missing","doc":null,"summary":null,"abstract":false,"args":[{"name":"call","doc":null,"default_value":"","external_name":"call","restriction":""}],"args_string":"(call)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/pooled_client.cr#L35","def":{"name":"method_missing","args":[{"name":"call","doc":null,"default_value":"","external_name":"call","restriction":""}],"double_splat":null,"splat_index":null,"block_arg":null,"visibility":"Public","body":" \n# Delegates all Redis commands to a `Redis` instance from the connection pool.\n\n with_pool_connection \n{ |conn| conn.\n{{ call }}\n }\n \n"}}],"types":[]},{"html_id":"github.com/stefanwille/crystal-redis/Redis/PoolTimeoutError","path":"Redis/PoolTimeoutError.html","kind":"class","full_name":"Redis::PoolTimeoutError","name":"PoolTimeoutError","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"github.com/stefanwille/crystal-redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/error.cr","line_number":22,"url":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/error.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"Raised when no free connection became available in the pool within a certain time.","summary":"

    Raised when no free connection became available in the pool within a certain time.

    ","class_methods":[],"constructors":[],"instance_methods":[],"macros":[],"types":[]},{"html_id":"github.com/stefanwille/crystal-redis/Redis/SocketWrapper","path":"Redis/SocketWrapper.html","kind":"struct","full_name":"Redis::SocketWrapper","name":"SocketWrapper","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"github.com/stefanwille/crystal-redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/socket_wrapper.cr","line_number":4,"url":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/socket_wrapper.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"Wraps an open socket connection.\n\nThe purpose is to be able to convert all exceptions to Redis:Error's.","summary":"

    Wraps an open socket connection.

    ","class_methods":[],"constructors":[{"id":"new(socket:TCPSocket|UNIXSocket|OpenSSL::SSL::Socket::Client)-class-method","html_id":"new(socket:TCPSocket|UNIXSocket|OpenSSL::SSL::Socket::Client)-class-method","name":"new","doc":null,"summary":null,"abstract":false,"args":[{"name":"socket","doc":null,"default_value":"","external_name":"socket","restriction":"TCPSocket | UNIXSocket | OpenSSL::SSL::Socket::Client"}],"args_string":"(socket : TCPSocket | UNIXSocket | OpenSSL::SSL::Socket::Client)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/socket_wrapper.cr#L5","def":{"name":"new","args":[{"name":"socket","doc":null,"default_value":"","external_name":"socket","restriction":"TCPSocket | UNIXSocket | OpenSSL::SSL::Socket::Client"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"_ = allocate\n_.initialize(socket)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}},{"id":"new(&block)-class-method","html_id":"new(&block)-class-method","name":"new","doc":null,"summary":null,"abstract":false,"args":[],"args_string":"(&block)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/socket_wrapper.cr#L9","def":{"name":"new","args":[],"double_splat":null,"splat_index":null,"yields":0,"block_arg":null,"return_type":"","visibility":"Public","body":"begin\n self.new(yield)\nrescue ex : IO::Timeout | Errno | Socket::Error | OpenSSL::Error\n raise(Redis::CannotConnectError.new(\"#{ex.class}: #{ex.message}\"))\nend"}}],"instance_methods":[{"id":"close-instance-method","html_id":"close-instance-method","name":"close","doc":null,"summary":null,"abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/socket_wrapper.cr#L27","def":{"name":"close","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"begin\n if @connected\n @connected = false\n @socket.close\n end\nrescue Errno\nend"}}],"macros":[{"id":"method_missing(call)-macro","html_id":"method_missing(call)-macro","name":"method_missing","doc":null,"summary":null,"abstract":false,"args":[{"name":"call","doc":null,"default_value":"","external_name":"call","restriction":""}],"args_string":"(call)","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/socket_wrapper.cr#L15","def":{"name":"method_missing","args":[{"name":"call","doc":null,"default_value":"","external_name":"call","restriction":""}],"double_splat":null,"splat_index":null,"block_arg":null,"visibility":"Public","body":" catch_errors \n{ @socket.\n{{ call }}\n }\n \n"}}],"types":[]},{"html_id":"github.com/stefanwille/crystal-redis/Redis/Subscription","path":"Redis/Subscription.html","kind":"class","full_name":"Redis::Subscription","name":"Subscription","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/subscription.cr","line_number":5,"url":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/subscription.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"Models a subscription to one or more publish/subscribe channels.\n\nThe caller sets callbacks on this object that the Redis client will\ntrigger for the matching events.","summary":"

    Models a subscription to one or more publish/subscribe channels.

    ","class_methods":[],"constructors":[],"instance_methods":[{"id":"message(&message_callback:String,String->)-instance-method","html_id":"message(&message_callback:String,String->)-instance-method","name":"message","doc":"Sets the 'message' callback.","summary":"

    Sets the 'message' callback.

    ","abstract":false,"args":[],"args_string":"(&message_callback : String, String -> )","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/subscription.cr#L28","def":{"name":"message","args":[],"double_splat":null,"splat_index":null,"yields":2,"block_arg":{"name":"message_callback","doc":null,"default_value":"","external_name":"message_callback","restriction":"(String, String -> )"},"return_type":"","visibility":"Public","body":"@message_callback = message_callback"}},{"id":"pmessage(&pmessage_callback:String,String,String->)-instance-method","html_id":"pmessage(&pmessage_callback:String,String,String->)-instance-method","name":"pmessage","doc":"Sets the 'pmessage' callback.","summary":"

    Sets the 'pmessage' callback.

    ","abstract":false,"args":[],"args_string":"(&pmessage_callback : String, String, String -> )","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/subscription.cr#L32","def":{"name":"pmessage","args":[],"double_splat":null,"splat_index":null,"yields":3,"block_arg":{"name":"pmessage_callback","doc":null,"default_value":"","external_name":"pmessage_callback","restriction":"(String, String, String -> )"},"return_type":"","visibility":"Public","body":"@pmessage_callback = pmessage_callback"}},{"id":"psubscribe(&psubscribe_callback:String,Int64->)-instance-method","html_id":"psubscribe(&psubscribe_callback:String,Int64->)-instance-method","name":"psubscribe","doc":"Sets the 'psubscribe' callback.","summary":"

    Sets the 'psubscribe' callback.

    ","abstract":false,"args":[],"args_string":"(&psubscribe_callback : String, Int64 -> )","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/subscription.cr#L24","def":{"name":"psubscribe","args":[],"double_splat":null,"splat_index":null,"yields":2,"block_arg":{"name":"psubscribe_callback","doc":null,"default_value":"","external_name":"psubscribe_callback","restriction":"(String, Int64 -> )"},"return_type":"","visibility":"Public","body":"@psubscribe_callback = psubscribe_callback"}},{"id":"punsubscribe(&punsubscribe_callback:String,Int64->)-instance-method","html_id":"punsubscribe(&punsubscribe_callback:String,Int64->)-instance-method","name":"punsubscribe","doc":"Sets the 'punsubscribe' callback.","summary":"

    Sets the 'punsubscribe' callback.

    ","abstract":false,"args":[],"args_string":"(&punsubscribe_callback : String, Int64 -> )","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/subscription.cr#L40","def":{"name":"punsubscribe","args":[],"double_splat":null,"splat_index":null,"yields":2,"block_arg":{"name":"punsubscribe_callback","doc":null,"default_value":"","external_name":"punsubscribe_callback","restriction":"(String, Int64 -> )"},"return_type":"","visibility":"Public","body":"@punsubscribe_callback = punsubscribe_callback"}},{"id":"subscribe(&subscribe_callback:String,Int64->)-instance-method","html_id":"subscribe(&subscribe_callback:String,Int64->)-instance-method","name":"subscribe","doc":"Sets the 'subscribe' callback.","summary":"

    Sets the 'subscribe' callback.

    ","abstract":false,"args":[],"args_string":"(&subscribe_callback : String, Int64 -> )","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/subscription.cr#L20","def":{"name":"subscribe","args":[],"double_splat":null,"splat_index":null,"yields":2,"block_arg":{"name":"subscribe_callback","doc":null,"default_value":"","external_name":"subscribe_callback","restriction":"(String, Int64 -> )"},"return_type":"","visibility":"Public","body":"@subscribe_callback = subscribe_callback"}},{"id":"unsubscribe(&unsubscribe_callback:String,Int64->)-instance-method","html_id":"unsubscribe(&unsubscribe_callback:String,Int64->)-instance-method","name":"unsubscribe","doc":"Sets the 'unsubscribe' callback.","summary":"

    Sets the 'unsubscribe' callback.

    ","abstract":false,"args":[],"args_string":"(&unsubscribe_callback : String, Int64 -> )","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/subscription.cr#L36","def":{"name":"unsubscribe","args":[],"double_splat":null,"splat_index":null,"yields":2,"block_arg":{"name":"unsubscribe_callback","doc":null,"default_value":"","external_name":"unsubscribe_callback","restriction":"(String, Int64 -> )"},"return_type":"","visibility":"Public","body":"@unsubscribe_callback = unsubscribe_callback"}}],"macros":[],"types":[]},{"html_id":"github.com/stefanwille/crystal-redis/Redis/TransactionApi","path":"Redis/TransactionApi.html","kind":"class","full_name":"Redis::TransactionApi","name":"TransactionApi","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/CommandExecution/FutureOriented","kind":"module","full_name":"Redis::CommandExecution::FutureOriented","name":"FutureOriented"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/transaction_api.cr","line_number":19,"url":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/transaction_api.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/CommandExecution/FutureOriented","kind":"module","full_name":"Redis::CommandExecution::FutureOriented","name":"FutureOriented"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"API for sending commands in a transaction.\n\nUsed in Redis#multi.\n\n\nExample:\n\n```\nredis.multi do |multi|\n multi.set(\"foo1\", \"first\")\n multi.set(\"foo2\", \"second\")\nend\n```\n\nIn this example, the `multi` object passed to the block is a TransactionApi\nobject.","summary":"

    API for sending commands in a transaction.

    ","class_methods":[],"constructors":[{"id":"new(strategy,namespace="")-class-method","html_id":"new(strategy,namespace=&quot;&quot;)-class-method","name":"new","doc":null,"summary":null,"abstract":false,"args":[{"name":"strategy","doc":null,"default_value":"","external_name":"strategy","restriction":""},{"name":"namespace","doc":null,"default_value":"\"\"","external_name":"namespace","restriction":""}],"args_string":"(strategy, namespace = "")","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/transaction_api.cr#L23","def":{"name":"new","args":[{"name":"strategy","doc":null,"default_value":"","external_name":"strategy","restriction":""},{"name":"namespace","doc":null,"default_value":"\"\"","external_name":"namespace","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"_ = allocate\n_.initialize(strategy, namespace)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"id":"discard-instance-method","html_id":"discard-instance-method","name":"discard","doc":"Aborts the current transaction.\n\n**Example**:\n\n```\nredis.multi do |multi|\n multi.set(\"foo\", \"the new value\")\n multi.discard\nend\n```","summary":"

    Aborts the current transaction.

    ","abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/38c6617f173dde20c1081317f74d9f6c1803fb85/src/redis/transaction_api.cr#L40","def":{"name":"discard","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"@strategy.discard"}}],"macros":[],"types":[]}]}]}}) \ No newline at end of file +crystal_doc_search_index_callback({"repository_name":"github.com/stefanwille/crystal-redis","body":"# Redis Client for Crystal\n\n[![Build Status](https://img.shields.io/travis/stefanwille/crystal-redis/master.svg?style=flat)](https://travis-ci.org/stefanwille/crystal-redis) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md#pull-requests)\n\nA Redis client for the Crystal programming language.\n\n## Features\n\n- Performance (> 680,000 commands per second using pipeline on a MacBook Air with a single client thread)\n- Pipelining\n- Transactions\n- LUA Scripting\n- All string commands\n- All hash commands\n- All list commands\n- All set commands\n- All hyperloglog commands\n- All commands for bit operations\n- All sorted set commands\n- All geo commands\n- Publish/subscribe\n\n## Installation\n\nAdd it to your `shard.yml`:\n\n```crystal\ndependencies:\n redis:\n github: stefanwille/crystal-redis\n version: ~> 2.5.2\n```\n\nand then install the library into your project:\n\n```bash\n$ shards install\n```\n\n### Installation on MacOS X\n\nOn MacOS X you may get this error:\n\n```\nld: library not found for -lssl (this usually means you need to install the development package for libssl)\nclang: error: linker command failed with exit code 1 (use -v to see invocation)\n...\n```\n\nOr this warning:\n\n```\nPackage libssl was not found in the pkg-config search path.\nPerhaps you should add the directory containing `libssl.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'libssl' found\nPackage libcrypto was not found in the pkg-config search path.\nPerhaps you should add the directory containing `libcrypto.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'libcrypto' found\n```\n\nThe problem is that Crystal can't find openssl, because it is not installed by default on MacOS X.\n\nThe fix:\n\n1. Install openssl via [Homebrew](https://brew.sh/):\n\n```bash\n$ brew install openssl\n```\n\n2. Set the environment variable `PKG_CONFIG_PATH`:\n\n```bash\n$ export PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig\n```\n\nNote: Please write me if you know a better way!\n\n## Required Crystal Version\n\nThis library needs Crystal version >= 0.25.0\n\nI haven't tested older Crystal versions.\n\n## Usage\n\nRequire the package:\n\n```crystal\n require \"redis\"\n```\n\nthen\n\n```crystal\n redis = Redis.new\n```\n\nThen you can call Redis commands on the `redis` object:\n\n```crystal\n redis.set(\"foo\", \"bar\")\n redis.get(\"foo\")\n```\n\n#### Connection Pooling\n\nSince version 2.0.0, a connection pool is built in. It is used implicitly through `Redis::PooledClient`:\n\n```Crystal\nredis = Redis::PooledClient.new\n10.times do |i|\n spawn do\n redis.set(\"foo#{i}\", \"bar\")\n redis.get(\"foo#{i}\") # => \"bar\"\n end\nend\n```\n\nThis `redis` instance can be shared across fibers, and accepts the same Redis commands as the `Redis` class.\nIt automatically allocates and frees connections from/to the pool, per command.\n\n## Examples\n\nTo get started, see the examples:\n\n- There is a separate git repository [crystal-redis-examples](https://github.com/stefanwille/crystal-redis-examples) with examples.\n- start with this [basic example](https://github.com/stefanwille/crystal-redis-examples/blob/master/src/basic.cr)\n- look at [the other examples](https://github.com/stefanwille/crystal-redis-examples/blob/master/src/)\n- the [spec](https://github.com/stefanwille/crystal-redis/blob/master/spec/redis_spec.cr) contains even more usage examples\n\n## Documentation\n\n- [API documentation](http://stefanwille.github.io/crystal-redis) -\n start reading it at the class `Redis`.\n- [Redis commands documentation](http://redis.io/commands) - the original Redis documentation is necessary, as the API documentation above is just a quick reference\n- [Redis documentation page](http://redis.io/documentation) - general information about Redis and its concepts\n\n## Performance\n\nI have benchmarked Crystal-Redis against several other client libraries in various programming languages in this [blog article](http://www.stefanwille.com/2015/05/redis-clients-crystal-vs-ruby-vs-c-vs-go/).\n\nHere are some results:\n\n- Crystal: With this library I get > 680,000 commands per second using pipeline on a MacBook Air with a single client thread.\n\n- C: The equivalent program written in C with Hiredis gets me 340,000 commands per second.\n\n- Ruby: Ruby 2.2.1 with the [redis-rb](https://github.com/redis/redis-rb) and Hiredis driver handles 150,000 commands per second.\n\n[Read more results](http://www.stefanwille.com/2015/05/redis-clients-crystal-vs-ruby-vs-c-vs-go/) for Go, Java, Node.js.\n\n## Status\n\nI have exercised every API method in the spec and built some example programs. Some people report production usage.\n\nI took great care to make this library very usable with respect to API, reliability and documentation.\n\n## Development\n\nThis project requires a locally running redis server running on port 6379 and with a Unix socket located at /tmp/redis.sock. In Homebrew's default redis.config the Unix domain socket option is disabled. To enable, edit `/usr/local/etc/redis.conf` or whatever your `redis.conf` is and uncomment this line:\n\n```\n# unixsocket /tmp/redis.sock\n```\n\nso that it reads\n\n```\nunixsocket /tmp/redis.sock\n```\n\nThen you can run the specs via\n\n`$ crystal spec`\n\n[See more information](https://github.com/stefanwille/crystal-redis/blob/master/CONTRIBUTING.md).\n\n### WARNING\n\nRunning the spec will delete database number 0!\n\n## Questions, Bugs & Support\n\nIf you have questions or need help, please open a ticket in the [GitHub issue tracker](https://github.com/stefanwille/crystal-redis/issues). This way others can benefit from the discussion.\n","program":{"html_id":"github.com/stefanwille/crystal-redis/toplevel","path":"toplevel.html","kind":"module","full_name":"Top Level Namespace","name":"Top Level Namespace","abstract":false,"superclass":null,"ancestors":[],"locations":[],"repository_name":"github.com/stefanwille/crystal-redis","program":true,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":null,"doc":null,"summary":null,"class_methods":[],"constructors":[],"instance_methods":[],"macros":[],"types":[{"html_id":"github.com/stefanwille/crystal-redis/Redis","path":"Redis.html","kind":"class","full_name":"Redis","name":"Redis","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/CommandExecution/ValueOriented","kind":"module","full_name":"Redis::CommandExecution::ValueOriented","name":"ValueOriented"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/commands.cr","line_number":1,"url":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr"},{"filename":"redis/command_execution/value_oriented.cr","line_number":1,"url":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/command_execution/value_oriented.cr"},{"filename":"redis.cr","line_number":37,"url":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis.cr"},{"filename":"redis/command_execution/future_oriented.cr","line_number":1,"url":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/command_execution/future_oriented.cr"},{"filename":"redis/strategy/base.cr","line_number":1,"url":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/strategy/base.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/CommandExecution/ValueOriented","kind":"module","full_name":"Redis::CommandExecution::ValueOriented","name":"ValueOriented"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":null,"doc":"The class is the main entry point for the Redis client.\n\n**How to use**:\n\nRequire the package:\n\n```crystal\nrequire \"redis\"\n```\n\nThen instantiate this client class:\n\n```crystal\nredis = Redis.new\n```\n\nThen you can call Redis commands on the `redis` object:\n\n```crystal\nredis.set(\"foo\", \"bar\")\nredis.get(\"foo\")\nredis.incr(\"visitors\")\n```\n\nSee the mixin module [Commands](Redis/Commands.html) for most\nof the available Redis commands such as #incr, #rename, and so on.\n\n**Multithreading / Coroutines**\n\nPlease mind that a Redis object can't be shared across multiple threads/coroutines!\nEach thread/coroutine that wants to talk to Redis needs its own Redis object instance.","summary":"

    The class is the main entry point for the Redis client.

    ","class_methods":[{"id":"open(host="localhost",port=6379,unixsocket=nil,password=nil,database=nil,url=nil,ssl=false,ssl_context=nil,dns_timeout=nil,connect_timeout=nil,reconnect=true,command_timeout=nil,namespace:String?="",&block)-class-method","html_id":"open(host=&quot;localhost&quot;,port=6379,unixsocket=nil,password=nil,database=nil,url=nil,ssl=false,ssl_context=nil,dns_timeout=nil,connect_timeout=nil,reconnect=true,command_timeout=nil,namespace:String?=&quot;&quot;,&block)-class-method","name":"open","doc":"Opens a Redis connection, yields the given block with a Redis object and closes the connection.\n\n**Options**:\n* host - the host to connect to\n* port - the port to connect to\n* unixsocket - instead of using TCP, you can connect to Redis via a Unix domain socket by passing its path here (e.g. \"/tmp/redis.sock\")\n* password - the password for authentication against the server. This is a convenience which saves you the extra call to the Redis `auth` command.\n* database - the number of the database to select. This a convenience which saves you a call a call to `#select`.\n* ssl - whether SSL should be enabled.\n* ssl_context - a OpenSSL::SSL::Context::Client.\n* dns_timeout - the dns timeout.\n* connect_timeout - the connect timeout.\n* command_timeout - the command timeout - applies when a command takes too long because the Redis-server is blocked by another command or by a dump.\n* reconnect - whether we should reconnect when we encounter a disconnected Redis connection.\n* url - Redis url. If this is given, it overrides all others.\n\nExample:\n\n```\nRedis.open do |redis|\n redis.incr(\"counter\")\nend\n```","summary":"

    Opens a Redis connection, yields the given block with a Redis object and closes the connection.

    ","abstract":false,"args":[{"name":"host","doc":null,"default_value":"\"localhost\"","external_name":"host","restriction":""},{"name":"port","doc":null,"default_value":"6379","external_name":"port","restriction":""},{"name":"unixsocket","doc":null,"default_value":"nil","external_name":"unixsocket","restriction":""},{"name":"password","doc":null,"default_value":"nil","external_name":"password","restriction":""},{"name":"database","doc":null,"default_value":"nil","external_name":"database","restriction":""},{"name":"url","doc":null,"default_value":"nil","external_name":"url","restriction":""},{"name":"ssl","doc":null,"default_value":"false","external_name":"ssl","restriction":""},{"name":"ssl_context","doc":null,"default_value":"nil","external_name":"ssl_context","restriction":""},{"name":"dns_timeout","doc":null,"default_value":"nil","external_name":"dns_timeout","restriction":""},{"name":"connect_timeout","doc":null,"default_value":"nil","external_name":"connect_timeout","restriction":""},{"name":"reconnect","doc":null,"default_value":"true","external_name":"reconnect","restriction":""},{"name":"command_timeout","doc":null,"default_value":"nil","external_name":"command_timeout","restriction":""},{"name":"namespace","doc":null,"default_value":"\"\"","external_name":"namespace","restriction":"String | ::Nil"}],"args_string":"(host = "localhost", port = 6379, unixsocket = nil, password = nil, database = nil, url = nil, ssl = false, ssl_context = nil, dns_timeout = nil, connect_timeout = nil, reconnect = true, command_timeout = nil, namespace : String? = "", &block)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis.cr#L194","def":{"name":"open","args":[{"name":"host","doc":null,"default_value":"\"localhost\"","external_name":"host","restriction":""},{"name":"port","doc":null,"default_value":"6379","external_name":"port","restriction":""},{"name":"unixsocket","doc":null,"default_value":"nil","external_name":"unixsocket","restriction":""},{"name":"password","doc":null,"default_value":"nil","external_name":"password","restriction":""},{"name":"database","doc":null,"default_value":"nil","external_name":"database","restriction":""},{"name":"url","doc":null,"default_value":"nil","external_name":"url","restriction":""},{"name":"ssl","doc":null,"default_value":"false","external_name":"ssl","restriction":""},{"name":"ssl_context","doc":null,"default_value":"nil","external_name":"ssl_context","restriction":""},{"name":"dns_timeout","doc":null,"default_value":"nil","external_name":"dns_timeout","restriction":""},{"name":"connect_timeout","doc":null,"default_value":"nil","external_name":"connect_timeout","restriction":""},{"name":"reconnect","doc":null,"default_value":"true","external_name":"reconnect","restriction":""},{"name":"command_timeout","doc":null,"default_value":"nil","external_name":"command_timeout","restriction":""},{"name":"namespace","doc":null,"default_value":"\"\"","external_name":"namespace","restriction":"String | ::Nil"}],"double_splat":null,"splat_index":null,"yields":1,"block_arg":null,"return_type":"","visibility":"Public","body":"redis = Redis.new(host, port, unixsocket, password, database, url, ssl, ssl_context, dns_timeout, connect_timeout, reconnect, command_timeout, namespace)\nbegin\n yield redis\nensure\n redis.close\nend\n"}}],"constructors":[{"id":"new(host="localhost",port=6379,unixsocket:String?=nil,password:String?=nil,database:Int32?=nil,url=nil,ssl=false,ssl_context:OpenSSL::SSL::Context::Client?=nil,dns_timeout:Time::Span?=nil,connect_timeout:Time::Span?=nil,reconnect=true,command_timeout:Time::Span?=nil,namespace:String?="")-class-method","html_id":"new(host=&quot;localhost&quot;,port=6379,unixsocket:String?=nil,password:String?=nil,database:Int32?=nil,url=nil,ssl=false,ssl_context:OpenSSL::SSL::Context::Client?=nil,dns_timeout:Time::Span?=nil,connect_timeout:Time::Span?=nil,reconnect=true,command_timeout:Time::Span?=nil,namespace:String?=&quot;&quot;)-class-method","name":"new","doc":"Opens a Redis connection\n\n**Options**:\n* host - the host to connect to\n* port - the port to connect to\n* unixsocket - instead of using TCP, you can connect to Redis via a Unix domain socket by passing its path here (e.g. \"/tmp/redis.sock\")\n* password - the password for authentication against the server. This is a convenience which saves you the extra call to the Redis `auth` command.\n* database - the number of the database to select. This a convenience which saves you a call a call to `#select`.\n* ssl - whether SSL should be enabled.\n* ssl_context - a OpenSSL::SSL::Context::Client.\n* dns_timeout - the dns timeout.\n* connect_timeout - the connect timeout.\n* command_timeout - the command timeout - applies when a command takes too long because the Redis-server is blocked by another command or by a dump.\n* reconnect - whether we should reconnect when we encounter a disconnected Redis connection.\n* url - Redis url. If this is given, it overrides all others.\n\nExample:\n\n```\nredis = Redis.new\nredis.incr(\"counter\")\nredis.close\n```\n\nExample:\n\n```\nredis = Redis.new(host: \"localhost\", port: 6379)\n...\n```\n\nExample:\n\n```\nredis = Redis.new(unixsocket: \"/tmp/redis.sock\")\n...\n```\n\nExample:\n\n```\nredis = Redis.new(url: \"redis://:my-secret-pw@my.redis.com:6380/my-database\")\n...\n```","summary":"

    Opens a Redis connection

    ","abstract":false,"args":[{"name":"host","doc":null,"default_value":"\"localhost\"","external_name":"host","restriction":""},{"name":"port","doc":null,"default_value":"6379","external_name":"port","restriction":""},{"name":"unixsocket","doc":null,"default_value":"nil","external_name":"unixsocket","restriction":"String | ::Nil"},{"name":"password","doc":null,"default_value":"nil","external_name":"password","restriction":"String | ::Nil"},{"name":"database","doc":null,"default_value":"nil","external_name":"database","restriction":"Int32 | ::Nil"},{"name":"url","doc":null,"default_value":"nil","external_name":"url","restriction":""},{"name":"ssl","doc":null,"default_value":"false","external_name":"ssl","restriction":""},{"name":"ssl_context","doc":null,"default_value":"nil","external_name":"ssl_context","restriction":"OpenSSL::SSL::Context::Client | ::Nil"},{"name":"dns_timeout","doc":null,"default_value":"nil","external_name":"dns_timeout","restriction":"Time::Span | ::Nil"},{"name":"connect_timeout","doc":null,"default_value":"nil","external_name":"connect_timeout","restriction":"Time::Span | ::Nil"},{"name":"reconnect","doc":null,"default_value":"true","external_name":"reconnect","restriction":""},{"name":"command_timeout","doc":null,"default_value":"nil","external_name":"command_timeout","restriction":"Time::Span | ::Nil"},{"name":"namespace","doc":null,"default_value":"\"\"","external_name":"namespace","restriction":"String | ::Nil"}],"args_string":"(host = "localhost", port = 6379, unixsocket : String? = nil, password : String? = nil, database : Int32? = nil, url = nil, ssl = false, ssl_context : OpenSSL::SSL::Context::Client? = nil, dns_timeout : Time::Span? = nil, connect_timeout : Time::Span? = nil, reconnect = true, command_timeout : Time::Span? = nil, namespace : String? = "")","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis.cr#L95","def":{"name":"new","args":[{"name":"host","doc":null,"default_value":"\"localhost\"","external_name":"host","restriction":""},{"name":"port","doc":null,"default_value":"6379","external_name":"port","restriction":""},{"name":"unixsocket","doc":null,"default_value":"nil","external_name":"unixsocket","restriction":"String | ::Nil"},{"name":"password","doc":null,"default_value":"nil","external_name":"password","restriction":"String | ::Nil"},{"name":"database","doc":null,"default_value":"nil","external_name":"database","restriction":"Int32 | ::Nil"},{"name":"url","doc":null,"default_value":"nil","external_name":"url","restriction":""},{"name":"ssl","doc":null,"default_value":"false","external_name":"ssl","restriction":""},{"name":"ssl_context","doc":null,"default_value":"nil","external_name":"ssl_context","restriction":"OpenSSL::SSL::Context::Client | ::Nil"},{"name":"dns_timeout","doc":null,"default_value":"nil","external_name":"dns_timeout","restriction":"Time::Span | ::Nil"},{"name":"connect_timeout","doc":null,"default_value":"nil","external_name":"connect_timeout","restriction":"Time::Span | ::Nil"},{"name":"reconnect","doc":null,"default_value":"true","external_name":"reconnect","restriction":""},{"name":"command_timeout","doc":null,"default_value":"nil","external_name":"command_timeout","restriction":"Time::Span | ::Nil"},{"name":"namespace","doc":null,"default_value":"\"\"","external_name":"namespace","restriction":"String | ::Nil"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"_ = allocate\n_.initialize(host, port, unixsocket, password, database, url, ssl, ssl_context, dns_timeout, connect_timeout, reconnect, command_timeout, namespace)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"id":"close-instance-method","html_id":"close-instance-method","name":"close","doc":"Closes the Redis connection.","summary":"

    Closes the Redis connection.

    ","abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis.cr#L207","def":{"name":"close","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"@connection.try(&.close)\n@connection = nil\n@strategy = nil\n"}},{"id":"multi(&block)-instance-method","html_id":"multi(&block)-instance-method","name":"multi","doc":"Sends Redis commands in transaction mode.\n\nYields its block. The block receives as argument\nan object that has the same API as this class, except:\n * it participates in the transaction\n * all the Redis commands return Futures\n * there is an additional method #discard that will abort the transaction.\n\n**Return value**: an array with all the responses\n- one element for each executed command.\n\nExample:\n\n```\nredis.multi do |multi|\n multi.set(\"foo1\", \"first\")\n multi.set(\"foo2\", \"second\")\nend\n```\n\nSee the [examples repository](https://github.com/stefanwille/crystal-redis-examples) for more examples.","summary":"

    Sends Redis commands in transaction mode.

    ","abstract":false,"args":[],"args_string":"(&block)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis.cr#L286","def":{"name":"multi","args":[],"double_splat":null,"splat_index":null,"yields":1,"block_arg":null,"return_type":"","visibility":"Public","body":"begin\n @strategy = Redis::Strategy::PauseDuringTransaction.new\n transaction_strategy = Redis::Strategy::Transaction.new(connection)\n transaction_strategy.begin\n transaction_api = Redis::TransactionApi.new(transaction_strategy, @namespace.to_s)\n yield transaction_api\n transaction_strategy.commit.as(Array(RedisValue))\nrescue ex : Redis::ConnectionError | Redis::CommandTimeoutError\n close\n raise(ex)\nensure\n if @connection\n @strategy = Redis::Strategy::SingleStatement.new(@connection.not_nil!)\n end\nend"}},{"id":"pipelined(&block)-instance-method","html_id":"pipelined(&block)-instance-method","name":"pipelined","doc":"Sends Redis commands in pipeline mode.\n\nYields its block. The block receives as argument\nan object that has the same API as this class, except\nit participates in pipelining and all Redis commands return Futures.\n\n**Return value**: an array with all the responses\n- one element for each executed command.\n\nExample:\n\n```\nredis.pipelined do |pipeline|\n pipeline.set(\"foo1\", \"first\")\n pipeline.set(\"foo2\", \"second\")\nend\n```\n\nSee the [examples repository](https://github.com/stefanwille/crystal-redis-examples) for more examples.","summary":"

    Sends Redis commands in pipeline mode.

    ","abstract":false,"args":[],"args_string":"(&block)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis.cr#L250","def":{"name":"pipelined","args":[],"double_splat":null,"splat_index":null,"yields":1,"block_arg":null,"return_type":"","visibility":"Public","body":"begin\n @strategy = Redis::Strategy::PauseDuringPipeline.new\n pipeline_strategy = Redis::Strategy::Pipeline.new(connection)\n pipeline_api = Redis::PipelineApi.new(pipeline_strategy, @namespace.to_s)\n yield pipeline_api\n pipeline_strategy.commit.as(Array(RedisValue))\nrescue ex : Redis::ConnectionError | Redis::CommandTimeoutError\n close\n raise(ex)\nensure\n if @connection\n @strategy = Redis::Strategy::SingleStatement.new(@connection.not_nil!)\n end\nend"}},{"id":"url-instance-method","html_id":"url-instance-method","name":"url","doc":"Returns the server URL for this client.","summary":"

    Returns the server URL for this client.

    ","abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis.cr#L214","def":{"name":"url","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"scheme = @ssl ? \"rediss\" : \"redis\"\nif @unixsocket\n \"#{scheme}://#{@unixsocket}/#{@database || 0}\"\nelse\n \"#{scheme}://#{@host}:#{@port}/#{@database || 0}\"\nend\n"}}],"macros":[],"types":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/CannotConnectError","path":"Redis/CannotConnectError.html","kind":"class","full_name":"Redis::CannotConnectError","name":"CannotConnectError","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Redis/ConnectionError","kind":"class","full_name":"Redis::ConnectionError","name":"ConnectionError"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/ConnectionError","kind":"class","full_name":"Redis::ConnectionError","name":"ConnectionError"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"github.com/stefanwille/crystal-redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/error.cr","line_number":10,"url":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/error.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"Raised when connecting to the Redis server is not possible.","summary":"

    Raised when connecting to the Redis server is not possible.

    ","class_methods":[],"constructors":[],"instance_methods":[],"macros":[],"types":[]},{"html_id":"github.com/stefanwille/crystal-redis/Redis/Commands","path":"Redis/Commands.html","kind":"module","full_name":"Redis::Commands","name":"Commands","abstract":false,"superclass":null,"ancestors":[],"locations":[{"filename":"redis/commands.cr","line_number":4,"url":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[],"including_types":[{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/PipelineApi","kind":"class","full_name":"Redis::PipelineApi","name":"PipelineApi"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/TransactionApi","kind":"class","full_name":"Redis::TransactionApi","name":"TransactionApi"}],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"Definition of all Redis commands except pipelining and transactions.\n","summary":"

    Definition of all Redis commands except pipelining and transactions.

    ","class_methods":[],"constructors":[],"instance_methods":[{"id":"append(key,value)-instance-method","html_id":"append(key,value)-instance-method","name":"append","doc":"If key already exists and is a string, this command appends the value at the end of the string.\nIf key does not exist it is created and set as an empty string, so APPEND will be similar to SET in this special case.\n\n**Return value**: Integer, the length of the string after the append operation.\n\nExample:\n\n```\nredis.append(\"foo\", \" world\")\n```","summary":"

    If key already exists and is a string, this command appends the value at the end of the string.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L375","def":{"name":"append","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"APPEND\", namespaced(key), value.to_s])"}},{"id":"auth(password)-instance-method","html_id":"auth(password)-instance-method","name":"auth","doc":"Request for authentication in a password-protected Redis server.\n\n**Return value**: \"OK\"","summary":"

    Request for authentication in a password-protected Redis server.

    ","abstract":false,"args":[{"name":"password","doc":null,"default_value":"","external_name":"password","restriction":""}],"args_string":"(password)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L87","def":{"name":"auth","args":[{"name":"password","doc":null,"default_value":"","external_name":"password","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"AUTH\", password])"}},{"id":"bitcount(key,from=nil,to=nil)-instance-method","html_id":"bitcount(key,from=nil,to=nil)-instance-method","name":"bitcount","doc":"Count the number of set bits (population counting) in a string.\nBy default all the bytes contained in the string are examined.\n\n**Options**:\n\n* from / to - It is possible to specify the counting operation only in an interval passing the additional arguments from and to.\n\n**Return value** Integer, the number of bits set to 1.\n\nExample:\n\n```\nredis.bitcount(\"foo\", 0, 0)\n```","summary":"

    Count the number of set bits (population counting) in a string.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"from","doc":null,"default_value":"nil","external_name":"from","restriction":""},{"name":"to","doc":null,"default_value":"nil","external_name":"to","restriction":""}],"args_string":"(key, from = nil, to = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L427","def":{"name":"bitcount","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"from","doc":null,"default_value":"nil","external_name":"from","restriction":""},{"name":"to","doc":null,"default_value":"nil","external_name":"to","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"BITCOUNT\", namespaced(key)]\nif from\n if to\n q << from.to_s\n q << to.to_s\n else\n raise(Redis::Error.new(\"from specified, but not to\"))\n end\nend\ninteger_command(q)\n"}},{"id":"bitop(operation,key,*keys:String):Int64-instance-method","html_id":"bitop(operation,key,*keys:String):Int64-instance-method","name":"bitop","doc":"Perform a bitwise operation between multiple keys (containing string values) and store the result in the destination key.\n\n**Return value**: Integer, the size of the string stored in the destination key, that is equal to the size of the longest input string.\n\nExample:\n\n```\nredis.bitop(\"and\", \"dest\", \"key1\", \"key2\")\n```","summary":"

    Perform a bitwise operation between multiple keys (containing string values) and store the result in the destination key.

    ","abstract":false,"args":[{"name":"operation","doc":null,"default_value":"","external_name":"operation","restriction":""},{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"args_string":"(operation, key, *keys : String) : Int64","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L454","def":{"name":"bitop","args":[{"name":"operation","doc":null,"default_value":"","external_name":"operation","restriction":""},{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"double_splat":null,"splat_index":2,"yields":null,"block_arg":null,"return_type":"Int64","visibility":"Public","body":"bitop(operation, key, keys.to_a)"}},{"id":"bitop(operation,key,keys:Array(String)):Int64-instance-method","html_id":"bitop(operation,key,keys:Array(String)):Int64-instance-method","name":"bitop","doc":"Perform a bitwise operation between multiple keys (containing string values) and store the result in the destination key.\n\n**Return value**: Integer, the size of the string stored in the destination key, that is equal to the size of the longest input string.\n\nExample:\n\n```\nredis.bitop(\"and\", \"dest\", \"key1\", \"key2\")\n```","summary":"

    Perform a bitwise operation between multiple keys (containing string values) and store the result in the destination key.

    ","abstract":false,"args":[{"name":"operation","doc":null,"default_value":"","external_name":"operation","restriction":""},{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"args_string":"(operation, key, keys : Array(String)) : Int64","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L449","def":{"name":"bitop","args":[{"name":"operation","doc":null,"default_value":"","external_name":"operation","restriction":""},{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Int64","visibility":"Public","body":"integer_command(concat([\"BITOP\", operation.to_s, namespaced(key)], namespaced(keys)))"}},{"id":"bitpos(key,bit,start=nil,to=nil)-instance-method","html_id":"bitpos(key,bit,start=nil,to=nil)-instance-method","name":"bitpos","doc":"Return the position of the first bit set to 1 or 0 in a string.\n\n**Options**:\n\n* start / to - By default, all the bytes contained in the string are examined. It is possible to look for bits only in a specified interval passing the additional arguments start and to (it is possible to just pass start, the operation will assume that the to is the last byte of the string.\n\n**Return value**: Integer, the command returns the position of the first bit set to 1 or 0 according to the request.\n\nExample:\n\n```\nredis.set(\"mykey\", \"0\")\nredis.bitpos(\"mykey\", 1) # => 2\n```","summary":"

    Return the position of the first bit set to 1 or 0 in a string.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"bit","doc":null,"default_value":"","external_name":"bit","restriction":""},{"name":"start","doc":null,"default_value":"nil","external_name":"start","restriction":""},{"name":"to","doc":null,"default_value":"nil","external_name":"to","restriction":""}],"args_string":"(key, bit, start = nil, to = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L492","def":{"name":"bitpos","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"bit","doc":null,"default_value":"","external_name":"bit","restriction":""},{"name":"start","doc":null,"default_value":"nil","external_name":"start","restriction":""},{"name":"to","doc":null,"default_value":"nil","external_name":"to","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"BITPOS\", namespaced(key), bit.to_s] of RedisValue\nif start\n q << start.to_s\n if to\n q << to\n end\nend\ninteger_command(q)\n"}},{"id":"blpop(keys,timeout_in_seconds)-instance-method","html_id":"blpop(keys,timeout_in_seconds)-instance-method","name":"blpop","doc":"BLPOP is a blocking list pop primitive.\nIt is the blocking version of LPOP because it blocks the connection when there\nare no elements to pop from any of the given lists.\nAn element is popped from the head of the first list that is non-empty,\nwith the given keys being checked in the order that they are given.\n\nThe timeout_in_seconds argument is interpreted as an integer value specifying the maximum number of seconds to block\n\n**Return value**: Array, specifically:\n* An array of nils when no element could be popped and the timeout expired.\n* An array of two-element arrays with the first element being the name of the key where an element was popped and the second element being the value of the popped element.\n\nExample:\n\n```\nredis.blpop([\"myotherlist\", \"mylist\"], 1) # => [\"mylist\", \"hello\"]\n```","summary":"

    BLPOP is a blocking list pop primitive.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":""},{"name":"timeout_in_seconds","doc":null,"default_value":"","external_name":"timeout_in_seconds","restriction":""}],"args_string":"(keys, timeout_in_seconds)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L910","def":{"name":"blpop","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":""},{"name":"timeout_in_seconds","doc":null,"default_value":"","external_name":"timeout_in_seconds","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = concat([\"BLPOP\"], namespaced(keys))\nq << timeout_in_seconds.to_s\nresult = array_or_nil_command(q)\nif result\nelse\n return result\nend\nresult[0] = without_namespace(\"#{result.first}\")\nresult\n"}},{"id":"brpop(keys,timeout_in_seconds)-instance-method","html_id":"brpop(keys,timeout_in_seconds)-instance-method","name":"brpop","doc":"BRPOP is a blocking list pop primitive.\nIt is the blocking version of RPOP because it blocks the connection when there\nare no elements to pop from any of the given lists.\nAn element is popped from the tail of the first list that is non-empty,\nwith the given keys being checked in the order that they are given.\n\nThe timeout_in_seconds argument is interpreted as an integer value specifying the maximum\nnumber of seconds to block.\n\n**Return value**: Array, specifically:\n* An array of nils when no element could be popped and the timeout expired.\n* An array of two-element arrays with the first element being the name of the key where an element was popped and the second element being the value of the popped element.\n\nExample:\n\n```\nredis.brpop([\"myotherlist\", \"mylist\"], 1) # => [\"mylist\", \"world\"]\n```","summary":"

    BRPOP is a blocking list pop primitive.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":""},{"name":"timeout_in_seconds","doc":null,"default_value":"","external_name":"timeout_in_seconds","restriction":""}],"args_string":"(keys, timeout_in_seconds)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L939","def":{"name":"brpop","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":""},{"name":"timeout_in_seconds","doc":null,"default_value":"","external_name":"timeout_in_seconds","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = concat([\"BRPOP\"], namespaced(keys))\nq << timeout_in_seconds.to_s\nresult = array_or_nil_command(q)\nif result\nelse\n return result\nend\nresult[0] = without_namespace(\"#{result.first}\")\nresult\n"}},{"id":"brpoplpush(source,destination,timeout_in_seconds=nil)-instance-method","html_id":"brpoplpush(source,destination,timeout_in_seconds=nil)-instance-method","name":"brpoplpush","doc":"BRPOPLPUSH is the blocking variant of RPOPLPUSH.\nWhen source contains elements, this command behaves exactly like RPOPLPUSH.\n\n**Options**:\n\n* timeout_in_seconds - interpreted as an integer value specifying the maximum number of seconds to block\n\nSee RPOPLPUSH for more information.\n\n**Return value**: String, the element being popped from source and pushed to destination.\nIf timeout is reached, nil is returned.\n\nExample:\n\n```\nredis.brpoplpush(\"source\", \"destination\", 0)\n```","summary":"

    BRPOPLPUSH is the blocking variant of RPOPLPUSH.

    ","abstract":false,"args":[{"name":"source","doc":null,"default_value":"","external_name":"source","restriction":""},{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"timeout_in_seconds","doc":null,"default_value":"nil","external_name":"timeout_in_seconds","restriction":""}],"args_string":"(source, destination, timeout_in_seconds = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L975","def":{"name":"brpoplpush","args":[{"name":"source","doc":null,"default_value":"","external_name":"source","restriction":""},{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"timeout_in_seconds","doc":null,"default_value":"nil","external_name":"timeout_in_seconds","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"BRPOPLPUSH\", source.to_s, destination.to_s]\nif timeout_in_seconds\n q << timeout_in_seconds.to_s\nend\nstring_or_nil_command(q)\n"}},{"id":"decr(key)-instance-method","html_id":"decr(key)-instance-method","name":"decr","doc":"Decrements the number stored at key by one.\n\n**Return value**: Integer, the value of key after the decrement","summary":"

    Decrements the number stored at key by one.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L328","def":{"name":"decr","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"DECR\", namespaced(key)])"}},{"id":"decrby(key,decrement)-instance-method","html_id":"decrby(key,decrement)-instance-method","name":"decrby","doc":"Decrements the number stored at key by decrement.\n\n**Return value**: Integer, the value of key after the decrement","summary":"

    Decrements the number stored at key by decrement.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"decrement","doc":null,"default_value":"","external_name":"decrement","restriction":""}],"args_string":"(key, decrement)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L361","def":{"name":"decrby","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"decrement","doc":null,"default_value":"","external_name":"decrement","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"DECRBY\", namespaced(key), decrement.to_s])"}},{"id":"del(keys:Array)-instance-method","html_id":"del(keys:Array)-instance-method","name":"del","doc":"Removes the specified keys.\n\n**Return value**: Integer, the number of keys that were removed.\n\nExample:\n\n```\nredis.del([\"some\", \"keys\", \"to\", \"delete\"])\n```","summary":"

    Removes the specified keys.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array"}],"args_string":"(keys : Array)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L155","def":{"name":"del","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command(concat([\"DEL\"], namespaced(keys)))"}},{"id":"del(*keys)-instance-method","html_id":"del(*keys)-instance-method","name":"del","doc":"Removes the specified keys.\n\n**Return value**: Integer, the number of keys that were removed.\n\nExample:\n\n```\nredis.del(\"some\", \"keys\", \"to\", \"delete\")\n```","summary":"

    Removes the specified keys.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":""}],"args_string":"(*keys)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L142","def":{"name":"del","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":""}],"double_splat":null,"splat_index":0,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"del(keys.to_a)"}},{"id":"dump(key)-instance-method","html_id":"dump(key)-instance-method","name":"dump","doc":"Serialize the value stored at key in a Redis-specific format and return it to the user.\n\n**Return value**: String, the serialized value.","summary":"

    Serialize the value stored at key in a Redis-specific format and return it to the user.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L506","def":{"name":"dump","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"DUMP\", namespaced(key)])"}},{"id":"echo(message)-instance-method","html_id":"echo(message)-instance-method","name":"echo","doc":"Returns the given message.\n\nExample:\n\n```\nredis.echo(\"Hello Redis\") # => \"Hello Redis\"\n```","summary":"

    Returns the given message.

    ","abstract":false,"args":[{"name":"message","doc":null,"default_value":"","external_name":"message","restriction":""}],"args_string":"(message)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L12","def":{"name":"echo","args":[{"name":"message","doc":null,"default_value":"","external_name":"message","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"ECHO\", message.to_s])"}},{"id":"eval(script:String,keys=[]ofRedisValue,args=[]ofRedisValue)-instance-method","html_id":"eval(script:String,keys=[]ofRedisValue,args=[]ofRedisValue)-instance-method","name":"eval","doc":"EVAL and EVALSHA are used to evaluate scripts using the Lua interpreter\nbuilt into Redis starting from version 2.6.0.\n\n**Return value**: Depends on the executed script\n\nExample:\n\n```\nredis.eval(\"return {KEYS[1],KEYS[2],ARGV[1],ARGV[2]}\", [\"key1\", \"key2\"], [\"first art\", \"second arg\"])\n```","summary":"

    EVAL and EVALSHA are used to evaluate scripts using the Lua interpreter built into Redis starting from version 2.6.0.

    ","abstract":false,"args":[{"name":"script","doc":null,"default_value":"","external_name":"script","restriction":"String"},{"name":"keys","doc":null,"default_value":"[] of RedisValue","external_name":"keys","restriction":""},{"name":"args","doc":null,"default_value":"[] of RedisValue","external_name":"args","restriction":""}],"args_string":"(script : String, keys = [] of RedisValue, args = [] of RedisValue)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1480","def":{"name":"eval","args":[{"name":"script","doc":null,"default_value":"","external_name":"script","restriction":"String"},{"name":"keys","doc":null,"default_value":"[] of RedisValue","external_name":"keys","restriction":""},{"name":"args","doc":null,"default_value":"[] of RedisValue","external_name":"args","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_array_or_string_or_integer_command(concat([\"EVAL\", script, keys.size.to_s], keys, args))"}},{"id":"evalsha(sha1,keys=[]ofRedisValue,args=[]ofRedisValue)-instance-method","html_id":"evalsha(sha1,keys=[]ofRedisValue,args=[]ofRedisValue)-instance-method","name":"evalsha","doc":"EVAL and EVALSHA are used to evaluate scripts using the Lua interpreter\nbuilt into Redis starting from version 2.6.0.\n\n**Return value**: Depends on the executed script","summary":"

    EVAL and EVALSHA are used to evaluate scripts using the Lua interpreter built into Redis starting from version 2.6.0.

    ","abstract":false,"args":[{"name":"sha1","doc":null,"default_value":"","external_name":"sha1","restriction":""},{"name":"keys","doc":null,"default_value":"[] of RedisValue","external_name":"keys","restriction":""},{"name":"args","doc":null,"default_value":"[] of RedisValue","external_name":"args","restriction":""}],"args_string":"(sha1, keys = [] of RedisValue, args = [] of RedisValue)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1488","def":{"name":"evalsha","args":[{"name":"sha1","doc":null,"default_value":"","external_name":"sha1","restriction":""},{"name":"keys","doc":null,"default_value":"[] of RedisValue","external_name":"keys","restriction":""},{"name":"args","doc":null,"default_value":"[] of RedisValue","external_name":"args","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_array_or_string_or_integer_command(concat([\"EVALSHA\", sha1.to_s, keys.size.to_s], keys, args))"}},{"id":"exists(key)-instance-method","html_id":"exists(key)-instance-method","name":"exists","doc":"Returns if key exists.\n\n**Return value**:\n* 1 if the key exists.\n* 0 if the key does not exist.","summary":"

    Returns if key exists.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L558","def":{"name":"exists","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"EXISTS\", namespaced(key)])"}},{"id":"expire(key,seconds)-instance-method","html_id":"expire(key,seconds)-instance-method","name":"expire","doc":"Set a timeout on key.\n\n**Return value**: Integeger, specifically:\n* 1 if the timeout was set.\n* 0 if key does not exist or the timeout could not be set.\n\nExample:\n\n```\nredis.expire(\"temp\", 2)\n```","summary":"

    Set a timeout on key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"seconds","doc":null,"default_value":"","external_name":"seconds","restriction":""}],"args_string":"(key, seconds)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1556","def":{"name":"expire","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"seconds","doc":null,"default_value":"","external_name":"seconds","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"EXPIRE\", namespaced(key), seconds.to_s])"}},{"id":"expireat(key,unix_date)-instance-method","html_id":"expireat(key,unix_date)-instance-method","name":"expireat","doc":"EXPIREAT has the same effect and semantic as EXPIRE, but instead of\nspecifying the number of seconds representing the TTL (time to live),\nit takes an absolute Unix timestamp (seconds since January 1, 1970).\n\n**Return value**: Integeger, specifically:\n* 1 if the timeout was set.\n* 0 if key does not exist or the timeout could not be set.","summary":"

    EXPIREAT has the same effect and semantic as EXPIRE, but instead of specifying the number of seconds representing the TTL (time to live), it takes an absolute Unix timestamp (seconds since January 1, 1970).

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"unix_date","doc":null,"default_value":"","external_name":"unix_date","restriction":""}],"args_string":"(key, unix_date)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1577","def":{"name":"expireat","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"unix_date","doc":null,"default_value":"","external_name":"unix_date","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"EXPIREAT\", namespaced(key), unix_date.to_s])"}},{"id":"flushall-instance-method","html_id":"flushall-instance-method","name":"flushall","doc":"Flush all databases.\n\n**Return value**: \"OK\"","summary":"

    Flush all databases.

    ","abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1534","def":{"name":"flushall","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"FLUSHALL\"])"}},{"id":"flushdb-instance-method","html_id":"flushdb-instance-method","name":"flushdb","doc":"Flush the current database.\n\n**Return value**: \"OK\"","summary":"

    Flush the current database.

    ","abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1527","def":{"name":"flushdb","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"FLUSHDB\"])"}},{"id":"geoadd(key,longitude,latitude,place)-instance-method","html_id":"geoadd(key,longitude,latitude,place)-instance-method","name":"geoadd","doc":"Adds the specified geospatial items (latitude, longitude, name) to the specified key.\n\n**Return value**: Integer: The number of elements added to the sorted set, not including elements already existing for which the score was updated.","summary":"

    Adds the specified geospatial items (latitude, longitude, name) to the specified key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"longitude","doc":null,"default_value":"","external_name":"longitude","restriction":""},{"name":"latitude","doc":null,"default_value":"","external_name":"latitude","restriction":""},{"name":"place","doc":null,"default_value":"","external_name":"place","restriction":""}],"args_string":"(key, longitude, latitude, place)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1822","def":{"name":"geoadd","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"longitude","doc":null,"default_value":"","external_name":"longitude","restriction":""},{"name":"latitude","doc":null,"default_value":"","external_name":"latitude","restriction":""},{"name":"place","doc":null,"default_value":"","external_name":"place","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"GEOADD\", namespaced(key), longitude.to_s, latitude.to_s, place.to_s])"}},{"id":"geodist(key,member1,member2,unit=nil)-instance-method","html_id":"geodist(key,member1,member2,unit=nil)-instance-method","name":"geodist","doc":"Return the distance between two members in the geospatial index represented by the sorted set.\n\n**Return value**: String: returns the distance as a double (represented as a string) in the specified unit,\nor NULL if one or both the elements are missing","summary":"

    Return the distance between two members in the geospatial index represented by the sorted set.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"member1","doc":null,"default_value":"","external_name":"member1","restriction":""},{"name":"member2","doc":null,"default_value":"","external_name":"member2","restriction":""},{"name":"unit","doc":null,"default_value":"nil","external_name":"unit","restriction":""}],"args_string":"(key, member1, member2, unit = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1830","def":{"name":"geodist","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"member1","doc":null,"default_value":"","external_name":"member1","restriction":""},{"name":"member2","doc":null,"default_value":"","external_name":"member2","restriction":""},{"name":"unit","doc":null,"default_value":"nil","external_name":"unit","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"GEODIST\", namespaced(key), member1.to_s, member2.to_s]\nif unit\n q << unit.to_s\nend\nstring_or_nil_command(q)\n"}},{"id":"geohash(key,*args)-instance-method","html_id":"geohash(key,*args)-instance-method","name":"geohash","doc":"Return valid Geohash strings representing the position of one or more elements in a sorted set value representing a geospatial index\n\n**Return value**: Array(String): returns an array where each element is the Geohash corresponding to each\nmember name passed as argument to the command","summary":"

    Return valid Geohash strings representing the position of one or more elements in a sorted set value representing a geospatial index

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"args","doc":null,"default_value":"","external_name":"args","restriction":""}],"args_string":"(key, *args)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1840","def":{"name":"geohash","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"args","doc":null,"default_value":"","external_name":"args","restriction":""}],"double_splat":null,"splat_index":1,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"GEOHASH\", namespaced(key)]\nargs.each do |arg|\n q << arg.to_s\nend\nstring_array_command(q)\n"}},{"id":"geopos(key,*args)-instance-method","html_id":"geopos(key,*args)-instance-method","name":"geopos","doc":"Return the positions (longitude,latitude) of all the specified members of the geospatial index represented by the sorted set at key\n\n**Return value**: Array(String): returns an array where each element is a two elements array representing\nlongitude and latitude (x,y) of each member name passed as argument to the command","summary":"

    Return the positions (longitude,latitude) of all the specified members of the geospatial index represented by the sorted set at key

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"args","doc":null,"default_value":"","external_name":"args","restriction":""}],"args_string":"(key, *args)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1852","def":{"name":"geopos","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"args","doc":null,"default_value":"","external_name":"args","restriction":""}],"double_splat":null,"splat_index":1,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"GEOPOS\", namespaced(key)]\nargs.each do |arg|\n q << arg.to_s\nend\nstring_array_command(q)\n"}},{"id":"georadius(key,longitude,latitude,radius,unit,withcoord=nil,withdist=nil,withhash=nil,count=nil,sort=nil)-instance-method","html_id":"georadius(key,longitude,latitude,radius,unit,withcoord=nil,withdist=nil,withhash=nil,count=nil,sort=nil)-instance-method","name":"georadius","doc":"Return the members of a sorted set populated with geospatial information using GEOADD, which are within the borders\nof the area specified with the center location and the maximum distance from the center (the radius).\n\n**Return value**: Array(String): Returns a simple array or array of arrays, depending on the options passed\nhttps://redis.io/commands/georadius#return-value","summary":"

    Return the members of a sorted set populated with geospatial information using GEOADD, which are within the borders of the area specified with the center location and the maximum distance from the center (the radius).

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"longitude","doc":null,"default_value":"","external_name":"longitude","restriction":""},{"name":"latitude","doc":null,"default_value":"","external_name":"latitude","restriction":""},{"name":"radius","doc":null,"default_value":"","external_name":"radius","restriction":""},{"name":"unit","doc":null,"default_value":"","external_name":"unit","restriction":""},{"name":"withcoord","doc":null,"default_value":"nil","external_name":"withcoord","restriction":""},{"name":"withdist","doc":null,"default_value":"nil","external_name":"withdist","restriction":""},{"name":"withhash","doc":null,"default_value":"nil","external_name":"withhash","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""},{"name":"sort","doc":null,"default_value":"nil","external_name":"sort","restriction":""}],"args_string":"(key, longitude, latitude, radius, unit, withcoord = nil, withdist = nil, withhash = nil, count = nil, sort = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1865","def":{"name":"georadius","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"longitude","doc":null,"default_value":"","external_name":"longitude","restriction":""},{"name":"latitude","doc":null,"default_value":"","external_name":"latitude","restriction":""},{"name":"radius","doc":null,"default_value":"","external_name":"radius","restriction":""},{"name":"unit","doc":null,"default_value":"","external_name":"unit","restriction":""},{"name":"withcoord","doc":null,"default_value":"nil","external_name":"withcoord","restriction":""},{"name":"withdist","doc":null,"default_value":"nil","external_name":"withdist","restriction":""},{"name":"withhash","doc":null,"default_value":"nil","external_name":"withhash","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""},{"name":"sort","doc":null,"default_value":"nil","external_name":"sort","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"GEORADIUS\", namespaced(key), longitude.to_s, latitude.to_s, radius.to_s, unit.to_s]\nif withcoord\n q << \"WITHCOORD\"\nend\nif withdist\n q << \"WITHDIST\"\nend\nif withhash\n q << \"WITHHASH\"\nend\nif count\n q << \"COUNT\"\n q << count.to_s\nend\nif sort\n q << sort.to_s\nend\nstring_array_command(q)\n"}},{"id":"georadiusbymember(key,member,radius,unit,withcoord=nil,withdist=nil,withhash=nil,count=nil,sort=nil)-instance-method","html_id":"georadiusbymember(key,member,radius,unit,withcoord=nil,withdist=nil,withhash=nil,count=nil,sort=nil)-instance-method","name":"georadiusbymember","doc":"Exactly like GEORADIUS with the sole difference that instead of taking, as the center of the area to query, a longitude\nand latitude value, it takes the name of a member already existing inside the geospatial index represented by the sorted set\n\n**Return value**: Array(String): Returns a simple array or array of arrays, depending on the options passed\nhttps://redis.io/commands/georadius#return-value","summary":"

    Exactly like GEORADIUS with the sole difference that instead of taking, as the center of the area to query, a longitude and latitude value, it takes the name of a member already existing inside the geospatial index represented by the sorted set

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""},{"name":"radius","doc":null,"default_value":"","external_name":"radius","restriction":""},{"name":"unit","doc":null,"default_value":"","external_name":"unit","restriction":""},{"name":"withcoord","doc":null,"default_value":"nil","external_name":"withcoord","restriction":""},{"name":"withdist","doc":null,"default_value":"nil","external_name":"withdist","restriction":""},{"name":"withhash","doc":null,"default_value":"nil","external_name":"withhash","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""},{"name":"sort","doc":null,"default_value":"nil","external_name":"sort","restriction":""}],"args_string":"(key, member, radius, unit, withcoord = nil, withdist = nil, withhash = nil, count = nil, sort = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1883","def":{"name":"georadiusbymember","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""},{"name":"radius","doc":null,"default_value":"","external_name":"radius","restriction":""},{"name":"unit","doc":null,"default_value":"","external_name":"unit","restriction":""},{"name":"withcoord","doc":null,"default_value":"nil","external_name":"withcoord","restriction":""},{"name":"withdist","doc":null,"default_value":"nil","external_name":"withdist","restriction":""},{"name":"withhash","doc":null,"default_value":"nil","external_name":"withhash","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""},{"name":"sort","doc":null,"default_value":"nil","external_name":"sort","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"GEORADIUSBYMEMBER\", namespaced(key), member.to_s, radius.to_s, unit.to_s]\nif withcoord\n q << \"WITHCOORD\"\nend\nif withdist\n q << \"WITHDIST\"\nend\nif withhash\n q << \"WITHHASH\"\nend\nif count\n q << \"COUNT\"\n q << count.to_s\nend\nif sort\n q << sort.to_s\nend\nstring_array_command(q)\n"}},{"id":"get(key)-instance-method","html_id":"get(key)-instance-method","name":"get","doc":"Get the value of key.\n\n**Return value**: a String or nil\n\nExample:\n\n```\nredis.set(\"foo\", \"test\")\nredis.get(\"foo\") # => \"test\"\n```","summary":"

    Get the value of key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L66","def":{"name":"get","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_or_nil_command([\"GET\", namespaced(key)])"}},{"id":"getbit(key,index)-instance-method","html_id":"getbit(key,index)-instance-method","name":"getbit","doc":"Returns the bit value at offset in the string value stored at key.\n\n**Return value**: Integer, the bit value stored at offset.","summary":"

    Returns the bit value at offset in the string value stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"index","doc":null,"default_value":"","external_name":"index","restriction":""}],"args_string":"(key, index)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L461","def":{"name":"getbit","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"index","doc":null,"default_value":"","external_name":"index","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"GETBIT\", namespaced(key), index.to_s])"}},{"id":"getrange(key,start_index,end_index)-instance-method","html_id":"getrange(key,start_index,end_index)-instance-method","name":"getrange","doc":"Returns the substring of the string value stored at key, determined by the offsets start and end (both are inclusive).\n\n\nExample:\n\n```\nredis.set(\"foo\", \"This is a string\")\nredis.getrange(\"foo\", 0, 3) # => \"This\"\nredis.getrange(\"foo\", -3, -1) # => \"ing\"\n```","summary":"

    Returns the substring of the string value stored at key, determined by the offsets start and end (both are inclusive).

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start_index","doc":null,"default_value":"","external_name":"start_index","restriction":""},{"name":"end_index","doc":null,"default_value":"","external_name":"end_index","restriction":""}],"args_string":"(key, start_index, end_index)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L396","def":{"name":"getrange","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start_index","doc":null,"default_value":"","external_name":"start_index","restriction":""},{"name":"end_index","doc":null,"default_value":"","external_name":"end_index","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"GETRANGE\", namespaced(key), start_index.to_s, end_index.to_s])"}},{"id":"getset(key,value)-instance-method","html_id":"getset(key,value)-instance-method","name":"getset","doc":"Atomically sets key to value and returns the old value stored at key.\n\n**Return value**: String, the old value stored at key, or nil when key did not exist.\n\nExample:\n\n```\nredis.getset(\"foo\", \"new\") # => (the old value)\n```","summary":"

    Atomically sets key to value and returns the old value stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L260","def":{"name":"getset","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_or_nil_command([\"GETSET\", namespaced(key), value])"}},{"id":"hdel(key,field)-instance-method","html_id":"hdel(key,field)-instance-method","name":"hdel","doc":"Removes the specified fields from the hash stored at key.\n\n**Return value**: Integer, the number of fields that were removed from the hash,\nnot including specified but non existing fields.","summary":"

    Removes the specified fields from the hash stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""}],"args_string":"(key, field)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1023","def":{"name":"hdel","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"HDEL\", namespaced(key), field.to_s])"}},{"id":"hexists(key,field)-instance-method","html_id":"hexists(key,field)-instance-method","name":"hexists","doc":"Returns if field is an existing field in the hash stored at key.\n\n**Return value**: Integer, specifically:\n* 1 if the hash contains field.\n* 0 if the hash does not contain field, or key does not exist.","summary":"

    Returns if field is an existing field in the hash stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""}],"args_string":"(key, field)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1032","def":{"name":"hexists","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"HEXISTS\", namespaced(key), field.to_s])"}},{"id":"hget(key,field)-instance-method","html_id":"hget(key,field)-instance-method","name":"hget","doc":"Returns the value associated with field in the hash stored at key.\n\n**Return value**: String, the value associated with field, or nil\n\nExample:\n\n```\nredis.hget(\"myhash\", \"a\") # => \"434\"\n```","summary":"

    Returns the value associated with field in the hash stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""}],"args_string":"(key, field)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1007","def":{"name":"hget","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_or_nil_command([\"HGET\", namespaced(key), field.to_s])"}},{"id":"hgetall(key)-instance-method","html_id":"hgetall(key)-instance-method","name":"hgetall","doc":"Returns all fields and values of the hash stored at key.\n\n**Return value**: Array(String) of fields and their values stored in the hash,\nor an empty array when key does not exist.","summary":"

    Returns all fields and values of the hash stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1015","def":{"name":"hgetall","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_array_command([\"HGETALL\", namespaced(key)])"}},{"id":"hincrby(key,field,increment)-instance-method","html_id":"hincrby(key,field,increment)-instance-method","name":"hincrby","doc":"Increments the number stored at field in the hash stored at key by increment.\n\n**Return value**: Integer, the value at field after the increment operation.\n\nExample:\n\n```\nredis.hincrby(\"myhash\", \"field1\", \"3\") # => 4\n```","summary":"

    Increments the number stored at field in the hash stored at key by increment.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""},{"name":"increment","doc":null,"default_value":"","external_name":"increment","restriction":""}],"args_string":"(key, field, increment)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1045","def":{"name":"hincrby","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""},{"name":"increment","doc":null,"default_value":"","external_name":"increment","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"HINCRBY\", namespaced(key), field.to_s, increment.to_s])"}},{"id":"hincrbyfloat(key,field,increment)-instance-method","html_id":"hincrbyfloat(key,field,increment)-instance-method","name":"hincrbyfloat","doc":"Increment the specified field of an hash stored at key,\nand representing a floating point number, by the specified increment.\n\n**Return value**: String, the value at field after the increment operation.","summary":"

    Increment the specified field of an hash stored at key, and representing a floating point number, by the specified increment.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""},{"name":"increment","doc":null,"default_value":"","external_name":"increment","restriction":""}],"args_string":"(key, field, increment)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1053","def":{"name":"hincrbyfloat","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""},{"name":"increment","doc":null,"default_value":"","external_name":"increment","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"HINCRBYFLOAT\", namespaced(key), field.to_s, increment.to_s])"}},{"id":"hkeys(key)-instance-method","html_id":"hkeys(key)-instance-method","name":"hkeys","doc":"Returns all field names in the hash stored at key.\n\n**Return value**: Array(String) - list of fields in the hash, or an empty list when key does not exist.","summary":"

    Returns all field names in the hash stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1060","def":{"name":"hkeys","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_array_command([\"HKEYS\", namespaced(key)])"}},{"id":"hlen(key)-instance-method","html_id":"hlen(key)-instance-method","name":"hlen","doc":"Returns the number of fields contained in the hash stored at key.\n\n**Return value**: Integer, the number of fields in the hash, or 0 when key does not exist.","summary":"

    Returns the number of fields contained in the hash stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1067","def":{"name":"hlen","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"HLEN\", namespaced(key)])"}},{"id":"hmget(key,fields:Array(String))-instance-method","html_id":"hmget(key,fields:Array(String))-instance-method","name":"hmget","doc":"Returns the values associated with the specified fields in the hash stored at key.\n\n**Return value**: Array(RedisValue), the list of values associated with the given fields, in the same order as they are requested.","summary":"

    Returns the values associated with the specified fields in the hash stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"fields","doc":null,"default_value":"","external_name":"fields","restriction":"Array(String)"}],"args_string":"(key, fields : Array(String))","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1074","def":{"name":"hmget","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"fields","doc":null,"default_value":"","external_name":"fields","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_array_command(concat([\"HMGET\", namespaced(key)], fields))"}},{"id":"hmget(key,*fields:String)-instance-method","html_id":"hmget(key,*fields:String)-instance-method","name":"hmget","doc":"Returns the values associated with the specified fields in the hash stored at key.\n\n**Return value**: Array(RedisValue), the list of values associated with the given fields, in the same order as they are requested.","summary":"

    Returns the values associated with the specified fields in the hash stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"fields","doc":null,"default_value":"","external_name":"fields","restriction":"String"}],"args_string":"(key, *fields : String)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1079","def":{"name":"hmget","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"fields","doc":null,"default_value":"","external_name":"fields","restriction":"String"}],"double_splat":null,"splat_index":1,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"hmget(key, fields.to_a)"}},{"id":"hmset(key,hash)-instance-method","html_id":"hmset(key,hash)-instance-method","name":"hmset","doc":"Sets the specified fields to their respective values in the hash stored at key.\n\n**Return value**: \"OK\"","summary":"

    Sets the specified fields to their respective values in the hash stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"hash","doc":null,"default_value":"","external_name":"hash","restriction":""}],"args_string":"(key, hash)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1086","def":{"name":"hmset","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"hash","doc":null,"default_value":"","external_name":"hash","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"HMSET\", namespaced(key)] of RedisValue\nhash.each do |field, value|\n (q << field.to_s) << value.to_s\nend\nstring_command(q)\n"}},{"id":"hscan(key,cursor,match=nil,count=nil)-instance-method","html_id":"hscan(key,cursor,match=nil,count=nil)-instance-method","name":"hscan","doc":"```\nredis.hscan(\"myhash\", 0)\nredis.hscan(\"myhash\", 0, \"foo*\")\nredis.hscan(\"myhash\", 0, \"foo*\", 1024)\n```","summary":"

    ` redis.hscan(\"myhash\", 0) redis.hscan(\"myhash\", 0, \"foo\") redis.hscan(\"myhash\", 0, \"foo\", 1024) `

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"cursor","doc":null,"default_value":"","external_name":"cursor","restriction":""},{"name":"match","doc":null,"default_value":"nil","external_name":"match","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""}],"args_string":"(key, cursor, match = nil, count = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1106","def":{"name":"hscan","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"cursor","doc":null,"default_value":"","external_name":"cursor","restriction":""},{"name":"match","doc":null,"default_value":"nil","external_name":"match","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"HSCAN\", namespaced(key), cursor.to_s]\nif match\n (q << \"MATCH\") << match.to_s\nend\nif count\n (q << \"COUNT\") << count.to_s\nend\nstring_array_command(q)\n"}},{"id":"hset(key,field,value)-instance-method","html_id":"hset(key,field,value)-instance-method","name":"hset","doc":"Sets field in the hash stored at key to value.\n\n**Return value**: Integer, specifically:\n* 1 if field is a new field in the hash and value was set.\n* 0 if field already exists in the hash and the value was updated.\n\nExample:\n\n```\nredis.hset(\"myhash\", \"a\", \"434\")\n```","summary":"

    Sets field in the hash stored at key to value.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, field, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L994","def":{"name":"hset","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"HSET\", namespaced(key), field.to_s, value.to_s])"}},{"id":"hsetnx(key,field,value)-instance-method","html_id":"hsetnx(key,field,value)-instance-method","name":"hsetnx","doc":"Sets field in the hash stored at key to value, only if field does not yet exist.\n\n**Return value**: Integer, specifically:\n* 1 if field is a new field in the hash and value was set.\n* 0 if field already exists in the hash and no operation was performed.","summary":"

    Sets field in the hash stored at key to value, only if field does not yet exist.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, field, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1118","def":{"name":"hsetnx","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"field","doc":null,"default_value":"","external_name":"field","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"HSETNX\", namespaced(key), field.to_s, value.to_s])"}},{"id":"hvals(key)-instance-method","html_id":"hvals(key)-instance-method","name":"hvals","doc":"Returns all values in the hash stored at key.\n\n**Return value**: Array(String), the list of values in the hash, or an empty list when key does not exist.","summary":"

    Returns all values in the hash stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1125","def":{"name":"hvals","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_array_command([\"HVALS\", namespaced(key)])"}},{"id":"incr(key)-instance-method","html_id":"incr(key)-instance-method","name":"incr","doc":"Increments the number stored at key by one.\n\n**Return value**: Integer: the value of key after the increment\n\nExample:\n\n```\nredis.set(\"foo\", \"3\")\nredis.incr(\"foo\") # => 4\n```","summary":"

    Increments the number stored at key by one.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L321","def":{"name":"incr","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"INCR\", namespaced(key)])"}},{"id":"incrby(key,increment)-instance-method","html_id":"incrby(key,increment)-instance-method","name":"incrby","doc":"Increments the number stored at key by increment.\n\n**Return value**: Integer, the value of key after the increment\n\nExample:\n\n```\nredis.incrby(\"foo\", 4)\n```","summary":"

    Increments the number stored at key by increment.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"increment","doc":null,"default_value":"","external_name":"increment","restriction":""}],"args_string":"(key, increment)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L341","def":{"name":"incrby","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"increment","doc":null,"default_value":"","external_name":"increment","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"INCRBY\", namespaced(key), increment.to_s])"}},{"id":"incrbyfloat(key,increment)-instance-method","html_id":"incrbyfloat(key,increment)-instance-method","name":"incrbyfloat","doc":"Increment the string representing a floating point number stored at key by the specified increment.\n\n**Return value**: Integer, the value of key after the increment\n\nExample:\n\n```\nredis.incrbyfloat(\"foo\", 2.5)\n```","summary":"

    Increment the string representing a floating point number stored at key by the specified increment.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"increment","doc":null,"default_value":"","external_name":"increment","restriction":""}],"args_string":"(key, increment)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L354","def":{"name":"incrbyfloat","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"increment","doc":null,"default_value":"","external_name":"increment","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"INCRBYFLOAT\", namespaced(key), increment.to_s])"}},{"id":"info(section:String?=nil)-instance-method","html_id":"info(section:String?=nil)-instance-method","name":"info","doc":"The INFO command returns information and statistics about the server.\n\n**Return value**: A hash with the server information","summary":"

    The INFO command returns information and statistics about the server.

    ","abstract":false,"args":[{"name":"section","doc":null,"default_value":"nil","external_name":"section","restriction":"String | ::Nil"}],"args_string":"(section : String? = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1778","def":{"name":"info","args":[{"name":"section","doc":null,"default_value":"nil","external_name":"section","restriction":"String | ::Nil"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"arr = [\"INFO\"]\nif section\n arr << section\nend\nbulk = string_command(arr)\nresults = Hash(String, String).new\n(bulk.split(\"\\r\\n\")).each do |line|\n if line.empty? || (line[0] == '#')\n next\n end\n key, val = line.split(\":\")\n results[key] = val\nend\nresults\n"}},{"id":"keys(pattern)-instance-method","html_id":"keys(pattern)-instance-method","name":"keys","doc":"Returns all keys matching pattern.\n\n**Return value**: Array(String), array of keys matching pattern.\n\nExample:\n\n```\nredis.keys(\"callmemaybe\")\n```","summary":"

    Returns all keys matching pattern.

    ","abstract":false,"args":[{"name":"pattern","doc":null,"default_value":"","external_name":"pattern","restriction":""}],"args_string":"(pattern)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L571","def":{"name":"keys","args":[{"name":"pattern","doc":null,"default_value":"","external_name":"pattern","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"(string_array_command([\"KEYS\", namespaced(pattern)])).map do |key|\n without_namespace(\"#{key}\")\nend"}},{"id":"lindex(key,index)-instance-method","html_id":"lindex(key,index)-instance-method","name":"lindex","doc":"Returns the element at index index in the list stored at key.\n\n**Return value**: String, the requested element, or nil when index is out of range.","summary":"

    Returns the element at index index in the list stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"index","doc":null,"default_value":"","external_name":"index","restriction":""}],"args_string":"(key, index)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L642","def":{"name":"lindex","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"index","doc":null,"default_value":"","external_name":"index","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_or_nil_command([\"LINDEX\", namespaced(key), index.to_s])"}},{"id":"linsert(key,where,pivot,value)-instance-method","html_id":"linsert(key,where,pivot,value)-instance-method","name":"linsert","doc":"Inserts value in the list stored at key either before or after the reference value pivot.\n\n**Options**:\n\n* where - either \"BEFORE\" or \"AFTER\"\n\n**Return value**: Integer, the length of the list after the insert operation, or -1 when the value pivot was not found.","summary":"

    Inserts value in the list stored at key either before or after the reference value pivot.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"where","doc":null,"default_value":"","external_name":"where","restriction":""},{"name":"pivot","doc":null,"default_value":"","external_name":"pivot","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, where, pivot, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L680","def":{"name":"linsert","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"where","doc":null,"default_value":"","external_name":"where","restriction":""},{"name":"pivot","doc":null,"default_value":"","external_name":"pivot","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"LINSERT\", namespaced(key), where.to_s, pivot.to_s, value.to_s])"}},{"id":"llen(key)-instance-method","html_id":"llen(key)-instance-method","name":"llen","doc":"Returns the length of the list stored at key.\n\n**Return value**: Integer, the length of the list at key.","summary":"

    Returns the length of the list stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L635","def":{"name":"llen","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"LLEN\", namespaced(key)])"}},{"id":"lpop(key)-instance-method","html_id":"lpop(key)-instance-method","name":"lpop","doc":"Removes and returns the first element of the list stored at key.\n\n**Return value**: String, the value of the first element, or nil when key does not exist.\n\nExample:\n\n```\nredis.lpop(\"mylist\")\n```","summary":"

    Removes and returns the first element of the list stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L662","def":{"name":"lpop","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_or_nil_command([\"LPOP\", namespaced(key)])"}},{"id":"lpush(key,*values)-instance-method","html_id":"lpush(key,*values)-instance-method","name":"lpush","doc":"Insert all the specified values at the head of the list stored at key.\n\n**Return value**: Integer, the length of the list after the push operation.","summary":"

    Insert all the specified values at the head of the list stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":""}],"args_string":"(key, *values)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L596","def":{"name":"lpush","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":""}],"double_splat":null,"splat_index":1,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"lpush(key, values.to_a)"}},{"id":"lpush(key,values:Array(RedisValue))-instance-method","html_id":"lpush(key,values:Array(RedisValue))-instance-method","name":"lpush","doc":"Insert all the specified values at the head of the list stored at key.\n\n**Return value**: Integer, the length of the list after the push operation.","summary":"

    Insert all the specified values at the head of the list stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"Array(RedisValue)"}],"args_string":"(key, values : Array(RedisValue))","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L601","def":{"name":"lpush","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"Array(RedisValue)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command(concat([\"LPUSH\", namespaced(key)], values))"}},{"id":"lpushx(key,value)-instance-method","html_id":"lpushx(key,value)-instance-method","name":"lpushx","doc":"Inserts value at the head of the list stored at key, only if key already exists and holds a list.\n\n**Return value**: Integer, the length of the list after the push operation.","summary":"

    Inserts value at the head of the list stored at key, only if key already exists and holds a list.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L608","def":{"name":"lpushx","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"LPUSHX\", namespaced(key), value.to_s])"}},{"id":"lrange(key,from,to)-instance-method","html_id":"lrange(key,from,to)-instance-method","name":"lrange","doc":"Returns the specified elements of the list stored at key.\n\n**Return value**: Array(String), the list of elements in the specified range.\n\nExample:\n\n```\nredis.lrange(\"mylist\", 0, 2)\n```","summary":"

    Returns the specified elements of the list stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"from","doc":null,"default_value":"","external_name":"from","restriction":""},{"name":"to","doc":null,"default_value":"","external_name":"to","restriction":""}],"args_string":"(key, from, to)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L693","def":{"name":"lrange","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"from","doc":null,"default_value":"","external_name":"from","restriction":""},{"name":"to","doc":null,"default_value":"","external_name":"to","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_array_command([\"LRANGE\", namespaced(key), from.to_s, to.to_s])"}},{"id":"lrem(key,count,value)-instance-method","html_id":"lrem(key,count,value)-instance-method","name":"lrem","doc":"Removes the first count occurrences of elements equal to value from the list stored at key.\n\n**Return value**: Integer, the number of removed elements.\n\nExample:\n\n```\nredis.lrem(\"mylist\", 1, \"my\")\n```","summary":"

    Removes the first count occurrences of elements equal to value from the list stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"count","doc":null,"default_value":"","external_name":"count","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, count, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L628","def":{"name":"lrem","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"count","doc":null,"default_value":"","external_name":"count","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"LREM\", namespaced(key), count.to_s, value.to_s])"}},{"id":"lset(key,index,value)-instance-method","html_id":"lset(key,index,value)-instance-method","name":"lset","doc":"Sets the list element at index to value.\n\n**Return value**: \"OK\"","summary":"

    Sets the list element at index to value.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"index","doc":null,"default_value":"","external_name":"index","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, index, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L649","def":{"name":"lset","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"index","doc":null,"default_value":"","external_name":"index","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"LSET\", namespaced(key), index.to_s, value.to_s])"}},{"id":"ltrim(key,start,stop)-instance-method","html_id":"ltrim(key,start,stop)-instance-method","name":"ltrim","doc":"Trim an existing list so that it will contain only the specified range of elements specified.\n\n**Return value**: \"OK\"","summary":"

    Trim an existing list so that it will contain only the specified range of elements specified.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start","doc":null,"default_value":"","external_name":"start","restriction":""},{"name":"stop","doc":null,"default_value":"","external_name":"stop","restriction":""}],"args_string":"(key, start, stop)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L700","def":{"name":"ltrim","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start","doc":null,"default_value":"","external_name":"start","restriction":""},{"name":"stop","doc":null,"default_value":"","external_name":"stop","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"LTRIM\", namespaced(key), start.to_s, stop.to_s])"}},{"id":"mget(keys:Array(String)):Array(RedisValue)-instance-method","html_id":"mget(keys:Array(String)):Array(RedisValue)-instance-method","name":"mget","doc":null,"summary":null,"abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"args_string":"(keys : Array(String)) : Array(RedisValue)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L232","def":{"name":"mget","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Array(RedisValue)","visibility":"Public","body":"string_array_command(concat([\"MGET\"], namespaced(keys)))"}},{"id":"mget(*keys)-instance-method","html_id":"mget(*keys)-instance-method","name":"mget","doc":"Returns the values of all specified keys.\n\n**Return value**: Array(String), the list of values at the specified keys.\nFor every key that does not hold a string value or does not exist, nil is returned.\n\nExample:\n\n```\nredis.set(\"foo1\", \"test1\")\nredis.set(\"foo2\", \"test2\")\nredis.mget(\"foo1\", \"foo2\") # => [\"test1\", \"test2\"]\n```","summary":"

    Returns the values of all specified keys.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":""}],"args_string":"(*keys)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L228","def":{"name":"mget","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":""}],"double_splat":null,"splat_index":0,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_array_command(concat([\"MGET\"], namespaced(keys)))"}},{"id":"mset(hash:Hash)-instance-method","html_id":"mset(hash:Hash)-instance-method","name":"mset","doc":"Sets the given keys to their respective values as defined in the hash.\n\n**Return value**: \"OK\"\n\nExample:\n\n```\nredis.mset({\"foo1\": \"bar1\", \"foo2\": \"bar2\"})\n```","summary":"

    Sets the given keys to their respective values as defined in the hash.

    ","abstract":false,"args":[{"name":"hash","doc":null,"default_value":"","external_name":"hash","restriction":"Hash"}],"args_string":"(hash : Hash)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L245","def":{"name":"mset","args":[{"name":"hash","doc":null,"default_value":"","external_name":"hash","restriction":"Hash"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"MSET\"] of RedisValue\nhash.each do |key, value|\n (q << (namespaced(key))) << value.to_s\nend\nstring_command(q)\n"}},{"id":"msetnx(hash)-instance-method","html_id":"msetnx(hash)-instance-method","name":"msetnx","doc":"Sets the given keys to their respective values as defined in the hash.\nMSETNX will not perform any operation at all even if just a single key already exists.\n\n**Return value**: Integer, specifically:\n* 1 if the all the keys were set.\n* 0 if no key was set (at least one key already existed).\n\nExample:\n\n```\nredis.msetnx({\"key1\": \"hello\", \"key2\": \"there\"})\n```","summary":"

    Sets the given keys to their respective values as defined in the hash.

    ","abstract":false,"args":[{"name":"hash","doc":null,"default_value":"","external_name":"hash","restriction":""}],"args_string":"(hash)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L305","def":{"name":"msetnx","args":[{"name":"hash","doc":null,"default_value":"","external_name":"hash","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"MSETNX\"] of RedisValue\nhash.each do |key, value|\n (q << (namespaced(key))) << value\nend\ninteger_command(q)\n"}},{"id":"object_encoding(key)-instance-method","html_id":"object_encoding(key)-instance-method","name":"object_encoding","doc":"Returns the kind of internal representation used in order to store\nthe value associated with a key.\n\n**Return value**: String: returns the kind of internal representation\nused in order to store the value associated with a key.","summary":"

    Returns the kind of internal representation used in order to store the value associated with a key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1805","def":{"name":"object_encoding","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_or_nil_command([\"OBJECT\", \"ENCODING\", namespaced(key)])"}},{"id":"object_idletime(key)-instance-method","html_id":"object_idletime(key)-instance-method","name":"object_idletime","doc":"Returns the number of seconds since the object stored at the specified key\nis idle (not requested by read or write operations).\n\n**Return value**: Integer: returns the number of seconds\nsince the object stored at the specified key is idle\n(not requested by read or write operations).","summary":"

    Returns the number of seconds since the object stored at the specified key is idle (not requested by read or write operations).

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1815","def":{"name":"object_idletime","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_or_nil_command([\"OBJECT\", \"IDLETIME\", namespaced(key)])"}},{"id":"object_refcount(key)-instance-method","html_id":"object_refcount(key)-instance-method","name":"object_refcount","doc":"Returns the number of references of the value associated\nwith the specified key.\n\n**Return value**: Integer: returns the number of references\nof the value associated with the specified key.","summary":"

    Returns the number of references of the value associated with the specified key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1796","def":{"name":"object_refcount","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_or_nil_command([\"OBJECT\", \"REFCOUNT\", namespaced(key)])"}},{"id":"persist(key)-instance-method","html_id":"persist(key)-instance-method","name":"persist","doc":"Remove the existing timeout on key, turning the key from volatile\n(a key with an expire set) to persistent (a key that will never expire\nas no timeout is associated).\n\n**Return value**: Integer, specifically:\n* 1 if the timeout was removed.\n* 0 if key does not exist or does not have an associated timeout.","summary":"

    Remove the existing timeout on key, turning the key from volatile (a key with an expire set) to persistent (a key that will never expire as no timeout is associated).

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1598","def":{"name":"persist","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"PERSIST\", namespaced(key)])"}},{"id":"pexpire(key,milis)-instance-method","html_id":"pexpire(key,milis)-instance-method","name":"pexpire","doc":"This command works exactly like EXPIRE but the time to live of the key is\nspecified in milliseconds instead of seconds.\n\n**Return value**: Integeger, specifically:\n* 1 if the timeout was set.\n* 0 if key does not exist or the timeout could not be set.","summary":"

    This command works exactly like EXPIRE but the time to live of the key is specified in milliseconds instead of seconds.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"milis","doc":null,"default_value":"","external_name":"milis","restriction":""}],"args_string":"(key, milis)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1566","def":{"name":"pexpire","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"milis","doc":null,"default_value":"","external_name":"milis","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"PEXPIRE\", namespaced(key), milis.to_s])"}},{"id":"pexpireat(key,unix_date_in_millis)-instance-method","html_id":"pexpireat(key,unix_date_in_millis)-instance-method","name":"pexpireat","doc":"PEXPIREAT has the same effect and semantic as EXPIREAT, but the Unix time\nat which the key will expire is specified in milliseconds instead of seconds.\n\n**Return value**: Integeger, specifically:\n* 1 if the timeout was set.\n* 0 if key does not exist or the timeout could not be set.","summary":"

    PEXPIREAT has the same effect and semantic as EXPIREAT, but the Unix time at which the key will expire is specified in milliseconds instead of seconds.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"unix_date_in_millis","doc":null,"default_value":"","external_name":"unix_date_in_millis","restriction":""}],"args_string":"(key, unix_date_in_millis)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1587","def":{"name":"pexpireat","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"unix_date_in_millis","doc":null,"default_value":"","external_name":"unix_date_in_millis","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"PEXPIREAT\", namespaced(key), unix_date_in_millis.to_s])"}},{"id":"pfadd(key,*values:String):Int64-instance-method","html_id":"pfadd(key,*values:String):Int64-instance-method","name":"pfadd","doc":"Adds all the element arguments to the HyperLogLog data structure stored at\nthe variable name specified as first argument.\n\n**Return value**: Integer: 1 if at least 1 HyperLogLog internal register was altered. 0 otherwise.\n\nExample:\n\n```\nredis.pfadd(\"hll\", \"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\") # => 1\n```","summary":"

    Adds all the element arguments to the HyperLogLog data structure stored at the variable name specified as first argument.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"String"}],"args_string":"(key, *values : String) : Int64","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1439","def":{"name":"pfadd","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"String"}],"double_splat":null,"splat_index":1,"yields":null,"block_arg":null,"return_type":"Int64","visibility":"Public","body":"pfadd(key, values.to_a)"}},{"id":"pfadd(key,values:Array(String)):Int64-instance-method","html_id":"pfadd(key,values:Array(String)):Int64-instance-method","name":"pfadd","doc":"Adds all the element arguments to the HyperLogLog data structure stored at\nthe variable name specified as first argument.\n\n**Return value**: Integer: 1 if at least 1 HyperLogLog internal register was altered. 0 otherwise.\n\nExample:\n\n```\nredis.pfadd(\"hll\", \"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\") # => 1\n```","summary":"

    Adds all the element arguments to the HyperLogLog data structure stored at the variable name specified as first argument.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"Array(String)"}],"args_string":"(key, values : Array(String)) : Int64","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1434","def":{"name":"pfadd","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Int64","visibility":"Public","body":"integer_command(concat([\"PFADD\", namespaced(key)], values))"}},{"id":"pfcount(keys:Array(String)):Int64-instance-method","html_id":"pfcount(keys:Array(String)):Int64-instance-method","name":"pfcount","doc":"When called with a single key, returns the approximated cardinality computed\nby the HyperLogLog data structure stored at the specified variable,\nwhich is 0 if the variable does not exist.\n\n**Return value**: Integer, the approximated number of unique elements\nobserved via PFADD.","summary":"

    When called with a single key, returns the approximated cardinality computed by the HyperLogLog data structure stored at the specified variable, which is 0 if the variable does not exist.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"args_string":"(keys : Array(String)) : Int64","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1461","def":{"name":"pfcount","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Int64","visibility":"Public","body":"integer_command(concat([\"PFCOUNT\"], namespaced(keys)))"}},{"id":"pfcount(*keys:String):Int64-instance-method","html_id":"pfcount(*keys:String):Int64-instance-method","name":"pfcount","doc":"When called with a single key, returns the approximated cardinality computed\nby the HyperLogLog data structure stored at the specified variable,\nwhich is 0 if the variable does not exist.\n\n**Return value**: Integer, the approximated number of unique elements\nobserved via PFADD.","summary":"

    When called with a single key, returns the approximated cardinality computed by the HyperLogLog data structure stored at the specified variable, which is 0 if the variable does not exist.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"args_string":"(*keys : String) : Int64","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1466","def":{"name":"pfcount","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"double_splat":null,"splat_index":0,"yields":null,"block_arg":null,"return_type":"Int64","visibility":"Public","body":"pfcount(keys.to_a)"}},{"id":"pfmerge(*keys:String)-instance-method","html_id":"pfmerge(*keys:String)-instance-method","name":"pfmerge","doc":"Merge multiple HyperLogLog values into an unique value that will\napproximate the cardinality of the union of the observed Sets of the\nsource HyperLogLog structures.","summary":"

    Merge multiple HyperLogLog values into an unique value that will approximate the cardinality of the union of the observed Sets of the source HyperLogLog structures.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"args_string":"(*keys : String)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1451","def":{"name":"pfmerge","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"double_splat":null,"splat_index":0,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"pfmerge(keys.to_a)"}},{"id":"pfmerge(keys:Array(String))-instance-method","html_id":"pfmerge(keys:Array(String))-instance-method","name":"pfmerge","doc":"Merge multiple HyperLogLog values into an unique value that will\napproximate the cardinality of the union of the observed Sets of the\nsource HyperLogLog structures.","summary":"

    Merge multiple HyperLogLog values into an unique value that will approximate the cardinality of the union of the observed Sets of the source HyperLogLog structures.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"args_string":"(keys : Array(String))","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1446","def":{"name":"pfmerge","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command(concat([\"PFMERGE\"], namespaced(keys)))"}},{"id":"ping-instance-method","html_id":"ping-instance-method","name":"ping","doc":"Returns PONG. This command is often used to test if a connection is still alive, or to measure latency.\n\nExample:\n\n```\nredis.ping # => \"PONG\"\n```","summary":"

    Returns PONG.

    ","abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L23","def":{"name":"ping","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"PING\"])"}},{"id":"psetex(key,expire_in_milis,value)-instance-method","html_id":"psetex(key,expire_in_milis,value)-instance-method","name":"psetex","doc":"PSETEX works exactly like SETEX with the sole difference that the expire time is specified in milliseconds instead of seconds.\n\n**Return value**: \"OK\"","summary":"

    PSETEX works exactly like SETEX with the sole difference that the expire time is specified in milliseconds instead of seconds.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"expire_in_milis","doc":null,"default_value":"","external_name":"expire_in_milis","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, expire_in_milis, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L280","def":{"name":"psetex","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"expire_in_milis","doc":null,"default_value":"","external_name":"expire_in_milis","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"PSETEX\", namespaced(key), expire_in_milis.to_s, value.to_s])"}},{"id":"psubscribe(*channel_patterns,&callback_setup_block:Subscription->)-instance-method","html_id":"psubscribe(*channel_patterns,&callback_setup_block:Subscription->)-instance-method","name":"psubscribe","doc":"Subscribes to channel patterns and enters a subscription loop, waiting for events.\n\nThe method yields to the given block and passes a Subscription object, on\nwhich you can set your callbacks for the event subscription.\n\nThe subscription loop will end once you unsubscribe.","summary":"

    Subscribes to channel patterns and enters a subscription loop, waiting for events.

    ","abstract":false,"args":[{"name":"channel_patterns","doc":null,"default_value":"","external_name":"channel_patterns","restriction":""}],"args_string":"(*channel_patterns, &callback_setup_block : Subscription -> )","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1691","def":{"name":"psubscribe","args":[{"name":"channel_patterns","doc":null,"default_value":"","external_name":"channel_patterns","restriction":""}],"double_splat":null,"splat_index":0,"yields":1,"block_arg":{"name":"callback_setup_block","doc":null,"default_value":"","external_name":"callback_setup_block","restriction":"(Subscription -> )"},"return_type":"","visibility":"Public","body":"if already_in_subscription_loop?\n raise(Redis::Error.new(\"Must call psubscribe without a subscription block when inside a subscription loop\"))\nend\nsubscription = Subscription.new\ncallback_setup_block.call(subscription)\n@strategy = Redis::Strategy::SubscriptionLoop.new(connection, subscription)\npsubscribe(*channel_patterns)\n"}},{"id":"psubscribe(channel_patterns:Array(String))-instance-method","html_id":"psubscribe(channel_patterns:Array(String))-instance-method","name":"psubscribe","doc":"Subscribes to more channel patterns while already being in a subscription loop.","summary":"

    Subscribes to more channel patterns while already being in a subscription loop.

    ","abstract":false,"args":[{"name":"channel_patterns","doc":null,"default_value":"","external_name":"channel_patterns","restriction":"Array(String)"}],"args_string":"(channel_patterns : Array(String))","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1707","def":{"name":"psubscribe","args":[{"name":"channel_patterns","doc":null,"default_value":"","external_name":"channel_patterns","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"if already_in_subscription_loop?\nelse\n raise(Redis::Error.new(\"Must call psubscribe with a subscription block\"))\nend\nvoid_command(concat([\"PSUBSCRIBE\"], channel_patterns))\n"}},{"id":"psubscribe(*channel_patterns)-instance-method","html_id":"psubscribe(*channel_patterns)-instance-method","name":"psubscribe","doc":null,"summary":null,"abstract":false,"args":[{"name":"channel_patterns","doc":null,"default_value":"","external_name":"channel_patterns","restriction":""}],"args_string":"(*channel_patterns)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1716","def":{"name":"psubscribe","args":[{"name":"channel_patterns","doc":null,"default_value":"","external_name":"channel_patterns","restriction":""}],"double_splat":null,"splat_index":0,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"psubscribe(channel_patterns.to_a)"}},{"id":"pttl(key)-instance-method","html_id":"pttl(key)-instance-method","name":"pttl","doc":"Like TTL this command returns the remaining time to live of a key that has\nan expire set, with the sole difference that TTL returns the amount of\nremaining time in seconds while PTTL returns it in milliseconds.\n\n**Return value**: Integer, the TTL in milliseconds, or a negative value in order to signal an error.","summary":"

    Like TTL this command returns the remaining time to live of a key that has an expire set, with the sole difference that TTL returns the amount of remaining time in seconds while PTTL returns it in milliseconds.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1615","def":{"name":"pttl","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"PTTL\", namespaced(key)])"}},{"id":"publish(channel,message)-instance-method","html_id":"publish(channel,message)-instance-method","name":"publish","doc":"Posts a message to the given channel.\n\n**Return value**: Integer, the number of clients that received the message.\n\nExample:\n\n```\nredis.publish(\"mychannel\", \"some message\")\n```","summary":"

    Posts a message to the given channel.

    ","abstract":false,"args":[{"name":"channel","doc":null,"default_value":"","external_name":"channel","restriction":""},{"name":"message","doc":null,"default_value":"","external_name":"message","restriction":""}],"args_string":"(channel, message)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1753","def":{"name":"publish","args":[{"name":"channel","doc":null,"default_value":"","external_name":"channel","restriction":""},{"name":"message","doc":null,"default_value":"","external_name":"message","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"PUBLISH\", channel.to_s, message.to_s])"}},{"id":"punsubscribe(*channel_patterns)-instance-method","html_id":"punsubscribe(*channel_patterns)-instance-method","name":"punsubscribe","doc":"Unsubscribes the client from the given patterns, or from all of them if none is given.","summary":"

    Unsubscribes the client from the given patterns, or from all of them if none is given.

    ","abstract":false,"args":[{"name":"channel_patterns","doc":null,"default_value":"","external_name":"channel_patterns","restriction":""}],"args_string":"(*channel_patterns)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1740","def":{"name":"punsubscribe","args":[{"name":"channel_patterns","doc":null,"default_value":"","external_name":"channel_patterns","restriction":""}],"double_splat":null,"splat_index":0,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"punsubscribe(channel_patterns.to_a)"}},{"id":"punsubscribe(channel_patterns:Array(String))-instance-method","html_id":"punsubscribe(channel_patterns:Array(String))-instance-method","name":"punsubscribe","doc":"Unsubscribes the client from the given patterns, or from all of them if none is given.","summary":"

    Unsubscribes the client from the given patterns, or from all of them if none is given.

    ","abstract":false,"args":[{"name":"channel_patterns","doc":null,"default_value":"","external_name":"channel_patterns","restriction":"Array(String)"}],"args_string":"(channel_patterns : Array(String))","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1735","def":{"name":"punsubscribe","args":[{"name":"channel_patterns","doc":null,"default_value":"","external_name":"channel_patterns","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"void_command(concat([\"PUNSUBSCRIBE\"], channel_patterns))"}},{"id":"quit-instance-method","html_id":"quit-instance-method","name":"quit","doc":"Ask the server to close the connection. The connection is closed as soon as all pending replies have been written to the client.\n\n**Return value**: \"OK\"","summary":"

    Ask the server to close the connection.

    ","abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L73","def":{"name":"quit","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"QUIT\"])"}},{"id":"randomkey-instance-method","html_id":"randomkey-instance-method","name":"randomkey","doc":"Return a random key from the currently selected database.","summary":"

    Return a random key from the currently selected database.

    ","abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L549","def":{"name":"randomkey","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"RANDOMKEY\"])"}},{"id":"rename(old_key,new_key)-instance-method","html_id":"rename(old_key,new_key)-instance-method","name":"rename","doc":"Renames old_key to newkey.\n\n**Return value**: \"OK\"\n\nExample:\n\n```\nredis.rename(\"old_name\", \"new_name\")\n```","summary":"

    Renames old_key to newkey.

    ","abstract":false,"args":[{"name":"old_key","doc":null,"default_value":"","external_name":"old_key","restriction":""},{"name":"new_key","doc":null,"default_value":"","external_name":"new_key","restriction":""}],"args_string":"(old_key, new_key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L116","def":{"name":"rename","args":[{"name":"old_key","doc":null,"default_value":"","external_name":"old_key","restriction":""},{"name":"new_key","doc":null,"default_value":"","external_name":"new_key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"RENAME\", namespaced(old_key), namespaced(new_key)])"}},{"id":"renamenx(old_key,new_key)-instance-method","html_id":"renamenx(old_key,new_key)-instance-method","name":"renamenx","doc":"Renames old_key to newkey if newkey does not yet exist.\n\n**Return value**: \"OK\"\n\nExample:\n\n```\nredis.renamenx(\"old_name\", \"new_name\")\n```","summary":"

    Renames old_key to newkey if newkey does not yet exist.

    ","abstract":false,"args":[{"name":"old_key","doc":null,"default_value":"","external_name":"old_key","restriction":""},{"name":"new_key","doc":null,"default_value":"","external_name":"new_key","restriction":""}],"args_string":"(old_key, new_key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L129","def":{"name":"renamenx","args":[{"name":"old_key","doc":null,"default_value":"","external_name":"old_key","restriction":""},{"name":"new_key","doc":null,"default_value":"","external_name":"new_key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"RENAMENX\", namespaced(old_key), namespaced(new_key)])"}},{"id":"restore(key,ttl_in_milis:Int,serialized_value:String,replace=false)-instance-method","html_id":"restore(key,ttl_in_milis:Int,serialized_value:String,replace=false)-instance-method","name":"restore","doc":"Create a key associated with a value that is obtained by deserializing the provided serialized value (obtained via DUMP).\n\n**Return value**: The command returns \"OK\" on success.","summary":"

    Create a key associated with a value that is obtained by deserializing the provided serialized value (obtained via DUMP).

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"ttl_in_milis","doc":null,"default_value":"","external_name":"ttl_in_milis","restriction":"Int"},{"name":"serialized_value","doc":null,"default_value":"","external_name":"serialized_value","restriction":"String"},{"name":"replace","doc":null,"default_value":"false","external_name":"replace","restriction":""}],"args_string":"(key, ttl_in_milis : Int, serialized_value : String, replace = false)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L513","def":{"name":"restore","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"ttl_in_milis","doc":null,"default_value":"","external_name":"ttl_in_milis","restriction":"Int"},{"name":"serialized_value","doc":null,"default_value":"","external_name":"serialized_value","restriction":"String"},{"name":"replace","doc":null,"default_value":"false","external_name":"replace","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"RESTORE\", namespaced(key), ttl_in_milis.to_s, serialized_value]\nif replace\n q << \"REPLACE\"\nend\nstring_command(q)\n"}},{"id":"rpop(key)-instance-method","html_id":"rpop(key)-instance-method","name":"rpop","doc":"Removes and returns the last element of the list stored at key.\n\n**Return value**: \"OK\"","summary":"

    Removes and returns the last element of the list stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L669","def":{"name":"rpop","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_or_nil_command([\"RPOP\", namespaced(key)])"}},{"id":"rpoplpush(source,destination)-instance-method","html_id":"rpoplpush(source,destination)-instance-method","name":"rpoplpush","doc":"Atomically returns and removes the last element (tail) of the list stored at source,\nand pushes the element at the first element (head) of the list stored at destination.\n\n**Return value**: String, the element being popped and pushed.","summary":"

    Atomically returns and removes the last element (tail) of the list stored at source, and pushes the element at the first element (head) of the list stored at destination.

    ","abstract":false,"args":[{"name":"source","doc":null,"default_value":"","external_name":"source","restriction":""},{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""}],"args_string":"(source, destination)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L954","def":{"name":"rpoplpush","args":[{"name":"source","doc":null,"default_value":"","external_name":"source","restriction":""},{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_or_nil_command([\"RPOPLPUSH\", namespaced(source), namespaced(destination)])"}},{"id":"rpush(key,*values:String)-instance-method","html_id":"rpush(key,*values:String)-instance-method","name":"rpush","doc":"Insert all the specified values at the tail of the list stored at key.\n\n**Return value**: Integer, the length of the list after the push operation.\n\nExample:\n\n```\nredis.rpush(\"mylist\", \"1\", \"2\", \"3\")\n```","summary":"

    Insert all the specified values at the tail of the list stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"String"}],"args_string":"(key, *values : String)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L589","def":{"name":"rpush","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"String"}],"double_splat":null,"splat_index":1,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"rpush(key, values.to_a)"}},{"id":"rpush(key,values:Array(RedisValue))-instance-method","html_id":"rpush(key,values:Array(RedisValue))-instance-method","name":"rpush","doc":"Insert all the specified values at the tail of the list stored at key.\n\n**Return value**: Integer, the length of the list after the push operation.\n\nExample:\n\n```\nredis.rpush(\"mylist\", \"1\", \"2\", \"3\")\n```","summary":"

    Insert all the specified values at the tail of the list stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"Array(RedisValue)"}],"args_string":"(key, values : Array(RedisValue))","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L584","def":{"name":"rpush","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"Array(RedisValue)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command(concat([\"RPUSH\", namespaced(key)], values))"}},{"id":"rpushx(key,value)-instance-method","html_id":"rpushx(key,value)-instance-method","name":"rpushx","doc":"Inserts value at the tail of the list stored at key, only if key already exists and holds a list.\n\n**Return value**: Integer, the length of the list after the push operation.","summary":"

    Inserts value at the tail of the list stored at key, only if key already exists and holds a list.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L615","def":{"name":"rpushx","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"RPUSHX\", namespaced(key), value.to_s])"}},{"id":"sadd(key,*values)-instance-method","html_id":"sadd(key,*values)-instance-method","name":"sadd","doc":"Add the specified members to the set stored at key.\n\n**Return value**: Integer, the number of elements that were added to the set, not including all the elements already present into the set.","summary":"

    Add the specified members to the set stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":""}],"args_string":"(key, *values)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L707","def":{"name":"sadd","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":""}],"double_splat":null,"splat_index":1,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"sadd(key, values.to_a)"}},{"id":"sadd(key,values:Array(RedisValue))-instance-method","html_id":"sadd(key,values:Array(RedisValue))-instance-method","name":"sadd","doc":null,"summary":null,"abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"Array(RedisValue)"}],"args_string":"(key, values : Array(RedisValue))","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L711","def":{"name":"sadd","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"Array(RedisValue)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command(concat([\"SADD\", namespaced(key)], values))"}},{"id":"scan(cursor,match=nil,count=nil)-instance-method","html_id":"scan(cursor,match=nil,count=nil)-instance-method","name":"scan","doc":"The SCAN command and the closely related commands SSCAN, HSCAN and ZSCAN are used in order to incrementally iterate over a collection of elements.\n\n**Options**:\n\n* match - It is possible to only iterate elements matching a given glob-style pattern, similarly to the behavior of the KEYS command that takes a pattern as only argument.\n* count - While SCAN does not provide guarantees about the number of elements returned at every iteration, it is possible to empirically adjust the behavior of SCAN using the COUNT option.\n\n**Return value**: Array of String, a list of keys.\n\nExample:\n\n```\nredis.scan(0)\nredis.scan(0, \"foo*\")\nredis.scan(0, \"foo*\", 1024)\n```","summary":"

    The SCAN command and the closely related commands SSCAN, HSCAN and ZSCAN are used in order to incrementally iterate over a collection of elements.

    ","abstract":false,"args":[{"name":"cursor","doc":null,"default_value":"","external_name":"cursor","restriction":""},{"name":"match","doc":null,"default_value":"nil","external_name":"match","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""}],"args_string":"(cursor, match = nil, count = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L537","def":{"name":"scan","args":[{"name":"cursor","doc":null,"default_value":"","external_name":"cursor","restriction":""},{"name":"match","doc":null,"default_value":"nil","external_name":"match","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"SCAN\", cursor.to_s]\nif match\n (q << \"MATCH\") << (namespaced(match))\nend\nif count\n (q << \"COUNT\") << count.to_s\nend\nresult = string_array_command(q)\nresult[1] = array_without_namespace(result[1])\nresult\n"}},{"id":"scard(key)-instance-method","html_id":"scard(key)-instance-method","name":"scard","doc":"Returns the set cardinality (number of elements) of the set stored at key.","summary":"

    Returns the set cardinality (number of elements) of the set stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L749","def":{"name":"scard","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"SCARD\", namespaced(key)])"}},{"id":"script_exists(sha1_array:Array(Reference))-instance-method","html_id":"script_exists(sha1_array:Array(Reference))-instance-method","name":"script_exists","doc":"Returns information about the existence of the scripts in the script cache.\n\n**Return value**: The command returns an array of integers that correspond\nto the specified SHA1 digest arguments.\nFor every corresponding SHA1 digest of a script that actually exists\nin the script cache, an 1 is returned, otherwise 0 is returned.","summary":"

    Returns information about the existence of the scripts in the script cache.

    ","abstract":false,"args":[{"name":"sha1_array","doc":null,"default_value":"","external_name":"sha1_array","restriction":"Array(Reference)"}],"args_string":"(sha1_array : Array(Reference))","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1520","def":{"name":"script_exists","args":[{"name":"sha1_array","doc":null,"default_value":"","external_name":"sha1_array","restriction":"Array(Reference)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_array_command(concat([\"SCRIPT\", \"EXISTS\"], sha1_array))"}},{"id":"script_flush-instance-method","html_id":"script_flush-instance-method","name":"script_flush","doc":"Flush the Lua scripts cache.\n\n**Return value**: \"OK\"","summary":"

    Flush the Lua scripts cache.

    ","abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1541","def":{"name":"script_flush","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"SCRIPT\", \"FLUSH\"])"}},{"id":"script_kill-instance-method","html_id":"script_kill-instance-method","name":"script_kill","doc":"Kills the currently executing Lua script, assuming no write operation was\nyet performed by the script.\n\n**Return value**: \"OK\"","summary":"

    Kills the currently executing Lua script, assuming no write operation was yet performed by the script.

    ","abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1510","def":{"name":"script_kill","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"SCRIPT\", \"KILL\"])"}},{"id":"script_load(script:String)-instance-method","html_id":"script_load(script:String)-instance-method","name":"script_load","doc":"Load a script into the scripts cache, without executing it.\n\n**Return value**: String, the SHA1 digest of the script\nadded into the script cache.\n\nExample:\n\n```\nredis.script_load(\"return {KEYS[1],ARGV[1]}\") # => \"a191862bfe0bd3bec995befcd060582bf4bdbd77\"\n```","summary":"

    Load a script into the scripts cache, without executing it.

    ","abstract":false,"args":[{"name":"script","doc":null,"default_value":"","external_name":"script","restriction":"String"}],"args_string":"(script : String)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1502","def":{"name":"script_load","args":[{"name":"script","doc":null,"default_value":"","external_name":"script","restriction":"String"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"SCRIPT\", \"LOAD\", script])"}},{"id":"sdiff(keys:Array(String)):Array(RedisValue)-instance-method","html_id":"sdiff(keys:Array(String)):Array(RedisValue)-instance-method","name":"sdiff","doc":"Returns the members of the set resulting from the difference between the first set and all the successive sets.\n\n**Return value**: Array(String), a list with members of the resulting set.","summary":"

    Returns the members of the set resulting from the difference between the first set and all the successive sets.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"args_string":"(keys : Array(String)) : Array(RedisValue)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L756","def":{"name":"sdiff","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Array(RedisValue)","visibility":"Public","body":"string_array_command(concat([\"SDIFF\"], namespaced(keys)))"}},{"id":"sdiff(*keys:String):Array(RedisValue)-instance-method","html_id":"sdiff(*keys:String):Array(RedisValue)-instance-method","name":"sdiff","doc":null,"summary":null,"abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"args_string":"(*keys : String) : Array(RedisValue)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L760","def":{"name":"sdiff","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"double_splat":null,"splat_index":0,"yields":null,"block_arg":null,"return_type":"Array(RedisValue)","visibility":"Public","body":"sdiff(keys.to_a)"}},{"id":"sdiffstore(destination,*keys:String):Int64-instance-method","html_id":"sdiffstore(destination,*keys:String):Int64-instance-method","name":"sdiffstore","doc":"This command is equal to SDIFF, but instead of returning the resulting set, it is stored in destination.\n\n**Return value**: Integer, the number of elements in the resulting set.","summary":"

    This command is equal to SDIFF, but instead of returning the resulting set, it is stored in destination.

    ","abstract":false,"args":[{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"args_string":"(destination, *keys : String) : Int64","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L772","def":{"name":"sdiffstore","args":[{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"double_splat":null,"splat_index":1,"yields":null,"block_arg":null,"return_type":"Int64","visibility":"Public","body":"sdiffstore(destination, keys.to_a)"}},{"id":"sdiffstore(destination,keys:Array(String)):Int64-instance-method","html_id":"sdiffstore(destination,keys:Array(String)):Int64-instance-method","name":"sdiffstore","doc":"This command is equal to SDIFF, but instead of returning the resulting set, it is stored in destination.\n\n**Return value**: Integer, the number of elements in the resulting set.","summary":"

    This command is equal to SDIFF, but instead of returning the resulting set, it is stored in destination.

    ","abstract":false,"args":[{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"args_string":"(destination, keys : Array(String)) : Int64","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L767","def":{"name":"sdiffstore","args":[{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Int64","visibility":"Public","body":"integer_command(concat([\"SDIFFSTORE\", namespaced(destination)], namespaced(keys)))"}},{"id":"select(database_number)-instance-method","html_id":"select(database_number)-instance-method","name":"select","doc":"Select the DB with having the specified zero-based numeric index.\n\n**Return value**: \"OK\"","summary":"

    Select the DB with having the specified zero-based numeric index.

    ","abstract":false,"args":[{"name":"database_number","doc":null,"default_value":"","external_name":"database_number","restriction":""}],"args_string":"(database_number)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L94","def":{"name":"select","args":[{"name":"database_number","doc":null,"default_value":"","external_name":"database_number","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"if !database_number\n raise(Redis::Error.new(\"ERR database number could not be Nil\"))\nend\nif database_number == @database\n return \"OK\"\nend\nres = string_command([\"SELECT\", database_number.to_s])\n@database = database_number\nres\n"}},{"id":"set(key,value,ex=nil,px=nil,nx=nil,xx=nil)-instance-method","html_id":"set(key,value,ex=nil,px=nil,nx=nil,xx=nil)-instance-method","name":"set","doc":"Set key to hold the string value. If key already holds a value, it is overwritten, regardless of its type. Any previous time to live associated with the key is discarded on successful SET operation.\n\n**Options**:\n\n* Starting with Redis 2.6.12 SET supports a set of options that modify its behavior:\n* ex -- Set the specified expire time, in seconds.\n* px -- Set the specified expire time, in milliseconds.\n* nx -- Only set the key if it does not already exist.\n* xx -- Only set the key if it already exist.\n\n**Return value**:\n* OK if SET was executed correctly.\n* Null reply: nil is returned if the SET operation was not performed because the user specified the NX or XX option but the condition was not met.\n\nExample:\n\n```\nredis.set(\"foo\", \"test\")\nredis.set(\"bar\", \"test\", ex: 7)\n```","summary":"

    Set key to hold the string value.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""},{"name":"ex","doc":null,"default_value":"nil","external_name":"ex","restriction":""},{"name":"px","doc":null,"default_value":"nil","external_name":"px","restriction":""},{"name":"nx","doc":null,"default_value":"nil","external_name":"nx","restriction":""},{"name":"xx","doc":null,"default_value":"nil","external_name":"xx","restriction":""}],"args_string":"(key, value, ex = nil, px = nil, nx = nil, xx = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L47","def":{"name":"set","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""},{"name":"ex","doc":null,"default_value":"nil","external_name":"ex","restriction":""},{"name":"px","doc":null,"default_value":"nil","external_name":"px","restriction":""},{"name":"nx","doc":null,"default_value":"nil","external_name":"nx","restriction":""},{"name":"xx","doc":null,"default_value":"nil","external_name":"xx","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"SET\", namespaced(key), value.to_s]\nif ex\n (q << \"EX\") << ex.to_s\nend\nif px\n (q << \"PX\") << px.to_s\nend\nif nx\n q << \"NX\"\nend\nif xx\n q << \"XX\"\nend\nstring_or_nil_command(q)\n"}},{"id":"setbit(key,index,value)-instance-method","html_id":"setbit(key,index,value)-instance-method","name":"setbit","doc":"Sets or clears the bit at offset in the string value stored at key.\n\n**Return value**: Integer: the original bit value stored at offset.\n\nExample:\n\n```\nredis.setbit(\"mykey\", 7, 1)\n```","summary":"

    Sets or clears the bit at offset in the string value stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"index","doc":null,"default_value":"","external_name":"index","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, index, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L474","def":{"name":"setbit","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"index","doc":null,"default_value":"","external_name":"index","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"SETBIT\", namespaced(key), index.to_s, value.to_s])"}},{"id":"setex(key,expire_in_seconds,value)-instance-method","html_id":"setex(key,expire_in_seconds,value)-instance-method","name":"setex","doc":"Set key to hold the string value and set key to timeout after a given number of seconds.\n\n**Return value**: \"OK\"\n\nExample:\n\n```\nredis.setex(\"foo\", 3, \"bar\")\n```","summary":"

    Set key to hold the string value and set key to timeout after a given number of seconds.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"expire_in_seconds","doc":null,"default_value":"","external_name":"expire_in_seconds","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, expire_in_seconds, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L273","def":{"name":"setex","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"expire_in_seconds","doc":null,"default_value":"","external_name":"expire_in_seconds","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"SETEX\", namespaced(key), expire_in_seconds.to_s, value.to_s])"}},{"id":"setnx(key,value)-instance-method","html_id":"setnx(key,value)-instance-method","name":"setnx","doc":"Set key to hold string value if key does not exist.\n\n**Return value**: Integer, specifically:\n* 1 if the key was set\n* 0 if the key was not set","summary":"

    Set key to hold string value if key does not exist.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L289","def":{"name":"setnx","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"SETNX\", namespaced(key), value.to_s])"}},{"id":"setrange(key,start_index,value)-instance-method","html_id":"setrange(key,start_index,value)-instance-method","name":"setrange","doc":"Overwrites part of the string stored at key, starting at the specified offset, for the entire length of value.\n\n**Return value**: Integer, the length of the string after it was modified by the command.\n\nExample:\n\n```\nredis.setrange(\"foo\", 6, \"Redis\")\n```","summary":"

    Overwrites part of the string stored at key, starting at the specified offset, for the entire length of value.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start_index","doc":null,"default_value":"","external_name":"start_index","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, start_index, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L409","def":{"name":"setrange","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start_index","doc":null,"default_value":"","external_name":"start_index","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"SETRANGE\", namespaced(key), start_index.to_s, value.to_s])"}},{"id":"sinter(keys:Array(String)):Array(RedisValue)-instance-method","html_id":"sinter(keys:Array(String)):Array(RedisValue)-instance-method","name":"sinter","doc":"Returns the members of the set resulting from the intersection of all the given sets.\n\n**Return value**: Array(String), an array with members of the resulting set.","summary":"

    Returns the members of the set resulting from the intersection of all the given sets.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"args_string":"(keys : Array(String)) : Array(RedisValue)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L779","def":{"name":"sinter","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Array(RedisValue)","visibility":"Public","body":"string_array_command(concat([\"SINTER\"], namespaced(keys)))"}},{"id":"sinter(*keys:String):Array(RedisValue)-instance-method","html_id":"sinter(*keys:String):Array(RedisValue)-instance-method","name":"sinter","doc":"Returns the members of the set resulting from the intersection of all the given sets.\n\n**Return value**: Array(String), an array with members of the resulting set.","summary":"

    Returns the members of the set resulting from the intersection of all the given sets.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"args_string":"(*keys : String) : Array(RedisValue)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L784","def":{"name":"sinter","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"double_splat":null,"splat_index":0,"yields":null,"block_arg":null,"return_type":"Array(RedisValue)","visibility":"Public","body":"sinter(keys.to_a)"}},{"id":"sinterstore(destination_key,*keys:String):Int64-instance-method","html_id":"sinterstore(destination_key,*keys:String):Int64-instance-method","name":"sinterstore","doc":"This command is equal to SINTER, but instead of returning the resulting set, it is stored in destination.\n\n**Return value**: Integer, the number of elements in the resulting set.\n\nExample:\n\n```\nredis.sinterstore(\"destination\", \"key1\", \"key2\")\n```","summary":"

    This command is equal to SINTER, but instead of returning the resulting set, it is stored in destination.

    ","abstract":false,"args":[{"name":"destination_key","doc":null,"default_value":"","external_name":"destination_key","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"args_string":"(destination_key, *keys : String) : Int64","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L802","def":{"name":"sinterstore","args":[{"name":"destination_key","doc":null,"default_value":"","external_name":"destination_key","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"double_splat":null,"splat_index":1,"yields":null,"block_arg":null,"return_type":"Int64","visibility":"Public","body":"sinterstore(destination_key, keys.to_a)"}},{"id":"sinterstore(destination_key,keys:Array(String)):Int64-instance-method","html_id":"sinterstore(destination_key,keys:Array(String)):Int64-instance-method","name":"sinterstore","doc":"This command is equal to SINTER, but instead of returning the resulting set, it is stored in destination.\n\n**Return value**: Integer, the number of elements in the resulting set.\n\nExample:\n\n```\nredis.sinterstore(\"destination\", \"key1\", \"key2\")\n```","summary":"

    This command is equal to SINTER, but instead of returning the resulting set, it is stored in destination.

    ","abstract":false,"args":[{"name":"destination_key","doc":null,"default_value":"","external_name":"destination_key","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"args_string":"(destination_key, keys : Array(String)) : Int64","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L797","def":{"name":"sinterstore","args":[{"name":"destination_key","doc":null,"default_value":"","external_name":"destination_key","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Int64","visibility":"Public","body":"integer_command(concat([\"SINTERSTORE\", namespaced(destination_key)], namespaced(keys)))"}},{"id":"sismember(key,value)-instance-method","html_id":"sismember(key,value)-instance-method","name":"sismember","doc":"Returns if member is a member of the set stored at key.\n\n**Return value**: Integer, specifically:\n* 1 if the element is a member of the set.\n* 0 if the element is not a member of the set, or if key does not exist.","summary":"

    Returns if member is a member of the set stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"args_string":"(key, value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L727","def":{"name":"sismember","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"value","doc":null,"default_value":"","external_name":"value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"SISMEMBER\", namespaced(key), value.to_s])"}},{"id":"smembers(key)-instance-method","html_id":"smembers(key)-instance-method","name":"smembers","doc":"Returns all the members of the set value stored at key.\n\n**Return value**: Array(String), all elements of the set.","summary":"

    Returns all the members of the set value stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L718","def":{"name":"smembers","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_array_command([\"SMEMBERS\", namespaced(key)])"}},{"id":"smove(source,destination,member)-instance-method","html_id":"smove(source,destination,member)-instance-method","name":"smove","doc":"Move member from the set at source to the set at destination.\n\n**Return value**: Integer, specifically:\n* 1 if the element is moved.\n* 0 if the element is not a member of source and no operation was performed.","summary":"

    Move member from the set at source to the set at destination.

    ","abstract":false,"args":[{"name":"source","doc":null,"default_value":"","external_name":"source","restriction":""},{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""}],"args_string":"(source, destination, member)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L811","def":{"name":"smove","args":[{"name":"source","doc":null,"default_value":"","external_name":"source","restriction":""},{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"SMOVE\", namespaced(source), namespaced(destination), member.to_s])"}},{"id":"sort(key,by=nil,limit=nil,get:Array(RedisValue)?=nil,order="ASC",alpha=false,store=nil)-instance-method","html_id":"sort(key,by=nil,limit=nil,get:Array(RedisValue)?=nil,order=&quot;ASC&quot;,alpha=false,store=nil)-instance-method","name":"sort","doc":"Returns or stores the elements contained in the list, set or sorted set at key.\n\n**Options**:\n\n* by - pattern for sorting by external keys\n* limit - Array of 2 strings [offset, count]\n* get - pattern for retrieving external keys\n* order - either 'ASC' or 'DESC'\n* alpha - true to sort lexicographically\n* store - key of destination list to store the result in\n\n**Return value**: Array(String), the list of sorted elements.\n\nExample:\n\n```\nredis.sort(\"mylist\") # => [...]\nredis.sort(\"mylist\", order: \"DESC\") # => [...]\n```","summary":"

    Returns or stores the elements contained in the list, set or sorted set at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"by","doc":null,"default_value":"nil","external_name":"by","restriction":""},{"name":"limit","doc":null,"default_value":"nil","external_name":"limit","restriction":""},{"name":"get","doc":null,"default_value":"nil","external_name":"get","restriction":"Array(RedisValue) | ::Nil"},{"name":"order","doc":null,"default_value":"\"ASC\"","external_name":"order","restriction":""},{"name":"alpha","doc":null,"default_value":"false","external_name":"alpha","restriction":""},{"name":"store","doc":null,"default_value":"nil","external_name":"store","restriction":""}],"args_string":"(key, by = nil, limit = nil, get : Array(RedisValue)? = nil, order = "ASC", alpha = false, store = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L178","def":{"name":"sort","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"by","doc":null,"default_value":"nil","external_name":"by","restriction":""},{"name":"limit","doc":null,"default_value":"nil","external_name":"limit","restriction":""},{"name":"get","doc":null,"default_value":"nil","external_name":"get","restriction":"Array(RedisValue) | ::Nil"},{"name":"order","doc":null,"default_value":"\"ASC\"","external_name":"order","restriction":""},{"name":"alpha","doc":null,"default_value":"false","external_name":"alpha","restriction":""},{"name":"store","doc":null,"default_value":"nil","external_name":"store","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"SORT\", namespaced(key)]\nif by\n (q << \"BY\") << by.to_s\nend\nif limit\n if limit.size != 2\n raise(Error.new(\"limit must be an array of 2 elements (offset, count)\"))\n end\n offset, count = limit\n ((q << \"LIMIT\") << offset.to_s) << count.to_s\nend\nif get\n get.each do |pattern|\n (q << \"GET\") << pattern\n end\nend\nif order\n _order = order.upcase\n if [\"ASC\", \"DESC\"].includes?(_order)\n else\n raise(Error.new(\"Bad order #{order}\"))\n end\n q << _order\nend\nif alpha\n q << \"ALPHA\"\nend\nif store\n (q << \"STORE\") << (namespaced(store))\nend\nstring_array_or_integer_command(q)\n"}},{"id":"spop(key,count=nil)-instance-method","html_id":"spop(key,count=nil)-instance-method","name":"spop","doc":"Removes and returns one or more random elements from the set value store at key.\n\nThe count argument will be available in a later Redis version and is not available in 2.6, 2.8, 3.0\n\n**Return value**: The removed element, or nil when key does not exist.","summary":"

    Removes and returns one or more random elements from the set value store at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""}],"args_string":"(key, count = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L820","def":{"name":"spop","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"SPOP\", namespaced(key)]\nif count\n q << count.to_s\nend\nstring_array_or_string_or_nil_command(q)\n"}},{"id":"srandmember(key,count=nil)-instance-method","html_id":"srandmember(key,count=nil)-instance-method","name":"srandmember","doc":"When called with just the key argument, return a random element from the set value stored at key.\n\n**Options**:\n\n* count - Starting from Redis version 2.6, when called with the additional count argument, return an array of count distinct elements if count is positive. If called with a negative count the behavior changes and the command is allowed to return the same element multiple times.\n\n**Return value**:\n* String: without the additional count argument the command returns a Bulk Reply with the randomly selected element, or nil when key does not exist.\n* Array: when the additional count argument is passed the command returns an array of elements, or an empty array when key does not exist.","summary":"

    When called with just the key argument, return a random element from the set value stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""}],"args_string":"(key, count = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L838","def":{"name":"srandmember","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"SRANDMEMBER\", namespaced(key)]\nif count\n q << count.to_s\nend\nstring_array_or_string_or_nil_command(q)\n"}},{"id":"srem(key,*values)-instance-method","html_id":"srem(key,*values)-instance-method","name":"srem","doc":"Remove the specified members from the set stored at key.\n\n**Return value**: Integer, The number of members that were removed from the set, not including non existing members.\n\nExample:\n\n```\nredis.srem(\"myset\", \"Hello\")\n```","summary":"

    Remove the specified members from the set stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":""}],"args_string":"(key, *values)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L740","def":{"name":"srem","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":""}],"double_splat":null,"splat_index":1,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"srem(key, values.to_a)"}},{"id":"srem(key,values:Array(RedisValue))-instance-method","html_id":"srem(key,values:Array(RedisValue))-instance-method","name":"srem","doc":null,"summary":null,"abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"Array(RedisValue)"}],"args_string":"(key, values : Array(RedisValue))","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L744","def":{"name":"srem","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"values","doc":null,"default_value":"","external_name":"values","restriction":"Array(RedisValue)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command(concat([\"SREM\", namespaced(key)], values))"}},{"id":"sscan(key,cursor,match=nil,count=nil)-instance-method","html_id":"sscan(key,cursor,match=nil,count=nil)-instance-method","name":"sscan","doc":"The SCAN command and the closely related commands SSCAN, HSCAN and ZSCAN are used in order to incrementally iterate over a collection of elements.\n\n**Options**:\n\n* match - It is possible to only iterate elements matching a given glob-style pattern, similarly to the behavior of the KEYS command that takes a pattern as only argument.\n* count - While SCAN does not provide guarantees about the number of elements returned at every iteration, it is possible to empirically adjust the behavior of SCAN using the COUNT option.\n\n**Return value**: Array(String), a list of Set members.\n\nExample:\n\n```\nredis.sscan(\"myset\", 0)\nredis.sscan(\"myset\", 0, \"foo*\")\nredis.sscan(\"myset\", 0, \"foo*\", 1024)\n```","summary":"

    The SCAN command and the closely related commands SSCAN, HSCAN and ZSCAN are used in order to incrementally iterate over a collection of elements.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"cursor","doc":null,"default_value":"","external_name":"cursor","restriction":""},{"name":"match","doc":null,"default_value":"nil","external_name":"match","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""}],"args_string":"(key, cursor, match = nil, count = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L862","def":{"name":"sscan","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"cursor","doc":null,"default_value":"","external_name":"cursor","restriction":""},{"name":"match","doc":null,"default_value":"nil","external_name":"match","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"SSCAN\", namespaced(key), cursor.to_s]\nif match\n (q << \"MATCH\") << match.to_s\nend\nif count\n (q << \"COUNT\") << count.to_s\nend\nstring_array_command(q)\n"}},{"id":"strlen(key)-instance-method","html_id":"strlen(key)-instance-method","name":"strlen","doc":"Returns the length of the string value stored at key.\n\n**Return value**: Integer, the length of the string at key, or 0 when key does not exist.","summary":"

    Returns the length of the string value stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L382","def":{"name":"strlen","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"STRLEN\", namespaced(key)])"}},{"id":"subscribe(*channels:String)-instance-method","html_id":"subscribe(*channels:String)-instance-method","name":"subscribe","doc":"Subscribes to more channels while already being in a subscription loop.","summary":"

    Subscribes to more channels while already being in a subscription loop.

    ","abstract":false,"args":[{"name":"channels","doc":null,"default_value":"","external_name":"channels","restriction":"String"}],"args_string":"(*channels : String)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1681","def":{"name":"subscribe","args":[{"name":"channels","doc":null,"default_value":"","external_name":"channels","restriction":"String"}],"double_splat":null,"splat_index":0,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"subscribe(channels.to_a)"}},{"id":"subscribe(*channels,&callback_setup_block:Subscription->)-instance-method","html_id":"subscribe(*channels,&callback_setup_block:Subscription->)-instance-method","name":"subscribe","doc":"Subscribes to channels and enters a subscription loop, waiting for events.\n\nThe method yields to the given block and passes a Subscription object, on\nwhich you can set your callbacks for the event subscription.\n\nThe subscription loop will end once you unsubscribe.\n\nSee also: `Subscription` class\nSee also: Example `subscribe.cr`\n\nExample:\n\n```\nredis.subscribe(\"mychannel\") do |on|\n on.message do |channel, message|\n puts \"Received message: #{message}\"\n if message == \"goodbye pal\"\n redis.unsubscribe\n end\n end\nend\n```","summary":"

    Subscribes to channels and enters a subscription loop, waiting for events.

    ","abstract":false,"args":[{"name":"channels","doc":null,"default_value":"","external_name":"channels","restriction":""}],"args_string":"(*channels, &callback_setup_block : Subscription -> )","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1655","def":{"name":"subscribe","args":[{"name":"channels","doc":null,"default_value":"","external_name":"channels","restriction":""}],"double_splat":null,"splat_index":0,"yields":1,"block_arg":{"name":"callback_setup_block","doc":null,"default_value":"","external_name":"callback_setup_block","restriction":"(Subscription -> )"},"return_type":"","visibility":"Public","body":"if already_in_subscription_loop?\n raise(Redis::Error.new(\"Must call subscribe without a subscription block when already inside a subscription loop\"))\nend\nsubscription = Subscription.new\ncallback_setup_block.call(subscription)\n@strategy = Redis::Strategy::SubscriptionLoop.new(connection, subscription)\nsubscribe(*channels)\n"}},{"id":"subscribe(channels:Array(String)):Void-instance-method","html_id":"subscribe(channels:Array(String)):Void-instance-method","name":"subscribe","doc":"Subscribes to more channels while already being in a subscription loop.","summary":"

    Subscribes to more channels while already being in a subscription loop.

    ","abstract":false,"args":[{"name":"channels","doc":null,"default_value":"","external_name":"channels","restriction":"Array(String)"}],"args_string":"(channels : Array(String)) : Void","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1671","def":{"name":"subscribe","args":[{"name":"channels","doc":null,"default_value":"","external_name":"channels","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Void","visibility":"Public","body":"if already_in_subscription_loop?\nelse\n raise(Redis::Error.new(\"Must call subscribe with a subscription block\"))\nend\nvoid_command(concat([\"SUBSCRIBE\"], channels))\n"}},{"id":"sunion(*keys:String)-instance-method","html_id":"sunion(*keys:String)-instance-method","name":"sunion","doc":"Returns the members of the set resulting from the union of all the given sets.\n\n**Return value**: Array(String), with members of the resulting set.","summary":"

    Returns the members of the set resulting from the union of all the given sets.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"args_string":"(*keys : String)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L877","def":{"name":"sunion","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"double_splat":null,"splat_index":0,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"sunion(keys.to_a)"}},{"id":"sunion(keys:Array(String))-instance-method","html_id":"sunion(keys:Array(String))-instance-method","name":"sunion","doc":"Returns the members of the set resulting from the union of all the given sets.\n\n**Return value**: Array(String), with members of the resulting set.","summary":"

    Returns the members of the set resulting from the union of all the given sets.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"args_string":"(keys : Array(String))","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L872","def":{"name":"sunion","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_array_command(concat([\"SUNION\"], namespaced(keys)))"}},{"id":"sunionstore(destination,keys:Array(String)):Int64-instance-method","html_id":"sunionstore(destination,keys:Array(String)):Int64-instance-method","name":"sunionstore","doc":"This command is equal to SUNION, but instead of returning the resulting set, it is stored in destination.\n\n**Return value**: Integer, the number of elements in the resulting set.","summary":"

    This command is equal to SUNION, but instead of returning the resulting set, it is stored in destination.

    ","abstract":false,"args":[{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"args_string":"(destination, keys : Array(String)) : Int64","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L884","def":{"name":"sunionstore","args":[{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Int64","visibility":"Public","body":"integer_command(concat([\"SUNIONSTORE\", namespaced(destination)], namespaced(keys)))"}},{"id":"sunionstore(destination,*keys:String):Int64-instance-method","html_id":"sunionstore(destination,*keys:String):Int64-instance-method","name":"sunionstore","doc":"This command is equal to SUNION, but instead of returning the resulting set, it is stored in destination.\n\n**Return value**: Integer, the number of elements in the resulting set.","summary":"

    This command is equal to SUNION, but instead of returning the resulting set, it is stored in destination.

    ","abstract":false,"args":[{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"args_string":"(destination, *keys : String) : Int64","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L889","def":{"name":"sunionstore","args":[{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"String"}],"double_splat":null,"splat_index":1,"yields":null,"block_arg":null,"return_type":"Int64","visibility":"Public","body":"sunionstore(destination, keys.to_a)"}},{"id":"ttl(key)-instance-method","html_id":"ttl(key)-instance-method","name":"ttl","doc":"Returns the remaining time to live of a key that has a timeout.\n\n**Return value**: Integer: TTL in seconds, or a negative value in order to\nsignal an error (see the description above).","summary":"

    Returns the remaining time to live of a key that has a timeout.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1606","def":{"name":"ttl","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"TTL\", namespaced(key)])"}},{"id":"type(key)-instance-method","html_id":"type(key)-instance-method","name":"type","doc":"Returns the string representation of the type of the value stored at key.\n\n**Return value**: String, the type of key, or none when key does not exist.\n\nExample:\n\n```\nredis.set(\"foo\", 3)\nredis.type(\"foo\") # => \"string\"\n```","summary":"

    Returns the string representation of the type of the value stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1629","def":{"name":"type","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"TYPE\", namespaced(key)])"}},{"id":"unsubscribe(*channels)-instance-method","html_id":"unsubscribe(*channels)-instance-method","name":"unsubscribe","doc":"Unsubscribes the client from the given channels, or from all of them if none is given.","summary":"

    Unsubscribes the client from the given channels, or from all of them if none is given.

    ","abstract":false,"args":[{"name":"channels","doc":null,"default_value":"","external_name":"channels","restriction":""}],"args_string":"(*channels)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1730","def":{"name":"unsubscribe","args":[{"name":"channels","doc":null,"default_value":"","external_name":"channels","restriction":""}],"double_splat":null,"splat_index":0,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"unsubscribe(channels.to_a)"}},{"id":"unsubscribe(channels:Array(String)):Nil-instance-method","html_id":"unsubscribe(channels:Array(String)):Nil-instance-method","name":"unsubscribe","doc":"Unsubscribes the client from the given channels, or from all of them if none is given.","summary":"

    Unsubscribes the client from the given channels, or from all of them if none is given.

    ","abstract":false,"args":[{"name":"channels","doc":null,"default_value":"","external_name":"channels","restriction":"Array(String)"}],"args_string":"(channels : Array(String)) : Nil","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1725","def":{"name":"unsubscribe","args":[{"name":"channels","doc":null,"default_value":"","external_name":"channels","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Nil","visibility":"Public","body":"void_command(concat([\"UNSUBSCRIBE\"], channels))"}},{"id":"unwatch-instance-method","html_id":"unwatch-instance-method","name":"unwatch","doc":"Flushes all the previously watched keys for a transaction.\n\n**Return value**: \"OK\"","summary":"

    Flushes all the previously watched keys for a transaction.

    ","abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1771","def":{"name":"unwatch","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"UNWATCH\"])"}},{"id":"watch(keys:Array(String))-instance-method","html_id":"watch(keys:Array(String))-instance-method","name":"watch","doc":"Marks the given keys to be watched for conditional execution of a transaction.\n\n**Return value**: \"OK\"","summary":"

    Marks the given keys to be watched for conditional execution of a transaction.

    ","abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"args_string":"(keys : Array(String))","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1760","def":{"name":"watch","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command(concat([\"WATCH\"], namespaced(keys)))"}},{"id":"watch(*keys)-instance-method","html_id":"watch(*keys)-instance-method","name":"watch","doc":null,"summary":null,"abstract":false,"args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":""}],"args_string":"(*keys)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1764","def":{"name":"watch","args":[{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":""}],"double_splat":null,"splat_index":0,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"watch(keys.to_a)"}},{"id":"zadd(key,scores_and_members:Array(RedisValue))-instance-method","html_id":"zadd(key,scores_and_members:Array(RedisValue))-instance-method","name":"zadd","doc":null,"summary":null,"abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"scores_and_members","doc":null,"default_value":"","external_name":"scores_and_members","restriction":"Array(RedisValue)"}],"args_string":"(key, scores_and_members : Array(RedisValue))","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1147","def":{"name":"zadd","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"scores_and_members","doc":null,"default_value":"","external_name":"scores_and_members","restriction":"Array(RedisValue)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"if (scores_and_members.size % 2) > 0\n raise(Error.new(\"zadd expects an array of scores mapped to members\"))\nend\ninteger_command(concat([\"ZADD\", namespaced(key)], scores_and_members))\n"}},{"id":"zadd(key,*scores_and_members)-instance-method","html_id":"zadd(key,*scores_and_members)-instance-method","name":"zadd","doc":"Adds all the specified members with the specified scores to the sorted set stored at key.\n\n**Return value**: Integer, the number of elements added to the sorted sets, not including elements already existing for which the score was updated.\n\nExample:\n\n```\nredis.zadd(\"myzset\", 1, \"one\")\nredis.zadd(\"myzset\", 2, \"two\", 3, \"three\")\n```","summary":"

    Adds all the specified members with the specified scores to the sorted set stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"scores_and_members","doc":null,"default_value":"","external_name":"scores_and_members","restriction":""}],"args_string":"(key, *scores_and_members)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1139","def":{"name":"zadd","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"scores_and_members","doc":null,"default_value":"","external_name":"scores_and_members","restriction":""}],"double_splat":null,"splat_index":1,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"if (scores_and_members.size % 2) > 0\n raise(Error.new(\"zadd expects an array of scores mapped to members\"))\nend\ninteger_command(concat([\"ZADD\", namespaced(key)], scores_and_members))\n"}},{"id":"zcard(key)-instance-method","html_id":"zcard(key)-instance-method","name":"zcard","doc":"Returns the sorted set cardinality (number of elements) of the sorted set stored at key.\n\n**Return value**: Integer, the cardinality (number of elements) of the sorted set, or 0 if key does not exist.","summary":"

    Returns the sorted set cardinality (number of elements) of the sorted set stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"args_string":"(key)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1179","def":{"name":"zcard","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"ZCARD\", namespaced(key)])"}},{"id":"zcount(key,min,max)-instance-method","html_id":"zcount(key,min,max)-instance-method","name":"zcount","doc":"Returns the number of elements in the sorted set at key with a score between min and max.\n\n**Return value**: Integer, the number of elements in the specified score range.","summary":"

    Returns the number of elements in the sorted set at key with a score between min and max.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""}],"args_string":"(key, min, max)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1193","def":{"name":"zcount","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"ZCOUNT\", namespaced(key), min.to_s, max.to_s])"}},{"id":"zincrby(key,increment,member)-instance-method","html_id":"zincrby(key,increment,member)-instance-method","name":"zincrby","doc":"Increments the score of member in the sorted set stored at key by increment.\n\n**Return value**: String, the new score of member (a double precision floating point number represented as String).","summary":"

    Increments the score of member in the sorted set stored at key by increment.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"increment","doc":null,"default_value":"","external_name":"increment","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""}],"args_string":"(key, increment, member)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1207","def":{"name":"zincrby","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"increment","doc":null,"default_value":"","external_name":"increment","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_command([\"ZINCRBY\", namespaced(key), increment.to_s, member.to_s])"}},{"id":"zinterstore(destination,keys:Array,weights=nil,aggregate=nil)-instance-method","html_id":"zinterstore(destination,keys:Array,weights=nil,aggregate=nil)-instance-method","name":"zinterstore","doc":"Computes the intersection of numkeys sorted sets given by the specified keys,\nand stores the result in destination.\n\n**Options**:\n\n* weights - nil or Array(String): Using the WEIGHTS option, it is possible to specify a multiplication factor for each input sorted set.\n* aggregate - With the AGGREGATE option, it is possible to specify how the results of the union are aggregated.\n\n**Return value**: Integer, the number of elements in the resulting sorted set at destination.\n\nExample:\n\n```\nredis.zinterstore(\"zset3\", [\"zset1\", \"zset2\"], weights: [2, 3])\n```","summary":"

    Computes the intersection of numkeys sorted sets given by the specified keys, and stores the result in destination.

    ","abstract":false,"args":[{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array"},{"name":"weights","doc":null,"default_value":"nil","external_name":"weights","restriction":""},{"name":"aggregate","doc":null,"default_value":"nil","external_name":"aggregate","restriction":""}],"args_string":"(destination, keys : Array, weights = nil, aggregate = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1252","def":{"name":"zinterstore","args":[{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array"},{"name":"weights","doc":null,"default_value":"nil","external_name":"weights","restriction":""},{"name":"aggregate","doc":null,"default_value":"nil","external_name":"aggregate","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"numkeys = keys.size\nq = concat([\"ZINTERSTORE\", namespaced(destination), numkeys.to_s], namespaced(keys))\nif weights\n q << \"WEIGHTS\"\n concat(q, weights)\nend\nif aggregate\n (q << \"AGGREGATE\") << aggregate.to_s\nend\ninteger_command(q)\n"}},{"id":"zlexcount(key,min,max)-instance-method","html_id":"zlexcount(key,min,max)-instance-method","name":"zlexcount","doc":"When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering, this command returns the number of elements in the sorted set at key with a value between min and max.\n\n**Return value**: Integer, the number of elements in the specified score range.","summary":"

    When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering, this command returns the number of elements in the sorted set at key with a value between min and max.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""}],"args_string":"(key, min, max)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1200","def":{"name":"zlexcount","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"ZLEXCOUNT\", namespaced(key), min.to_s, max.to_s])"}},{"id":"zrange(key,start,stop,with_scores=false)-instance-method","html_id":"zrange(key,start,stop,with_scores=false)-instance-method","name":"zrange","doc":"Returns the specified range of elements in the sorted set stored at key.\n\n**Options**:\n\n* with_scores - true to return the scores of the elements together with the elements.\n\n**Return value**: Array(String), list of elements in the specified range (optionally with their scores, in case the with_scores option is true).\n\nExample:\n\n```\nredis.zrange(\"myzset\", 0, -1, with_scores: true) # => [\"one\", \"1\", \"uno\", \"1\", \"two\", \"2\", \"three\", \"3\"]\n```","summary":"

    Returns the specified range of elements in the sorted set stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start","doc":null,"default_value":"","external_name":"start","restriction":""},{"name":"stop","doc":null,"default_value":"","external_name":"stop","restriction":""},{"name":"with_scores","doc":null,"default_value":"false","external_name":"with_scores","restriction":""}],"args_string":"(key, start, stop, with_scores = false)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1168","def":{"name":"zrange","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start","doc":null,"default_value":"","external_name":"start","restriction":""},{"name":"stop","doc":null,"default_value":"","external_name":"stop","restriction":""},{"name":"with_scores","doc":null,"default_value":"false","external_name":"with_scores","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"ZRANGE\", namespaced(key), start.to_s, stop.to_s]\nif with_scores\n q << \"WITHSCORES\"\nend\nstring_array_command(q)\n"}},{"id":"zrangebylex(key,min,max,limit=nil)-instance-method","html_id":"zrangebylex(key,min,max,limit=nil)-instance-method","name":"zrangebylex","doc":"When all the elements in a sorted set are inserted with the same score,\nin order to force lexicographical ordering, this command returns all the\nelements in the sorted set at key with a value between min and max.\n\n**Options**:\n\n* limit - an array of [offset, count]. Skip offset members, return a maximum of count members.\n\n**Return value**:","summary":"

    When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering, this command returns all the elements in the sorted set at key with a value between min and max.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""},{"name":"limit","doc":null,"default_value":"nil","external_name":"limit","restriction":""}],"args_string":"(key, min, max, limit = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1295","def":{"name":"zrangebylex","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""},{"name":"limit","doc":null,"default_value":"nil","external_name":"limit","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"ZRANGEBYLEX\", namespaced(key), min.to_s, max.to_s]\nif limit\n ((q << \"LIMIT\") << limit[0].to_s) << limit[1].to_s\nend\nstring_array_command(q)\n"}},{"id":"zrangebyscore(key,min,max,limit=nil,with_scores=false)-instance-method","html_id":"zrangebyscore(key,min,max,limit=nil,with_scores=false)-instance-method","name":"zrangebyscore","doc":"Returns all the elements in the sorted set at key with a score between\nmax and min (including elements with score equal to max or min).\n\n**Options**:\n\n* limit - an array of [offset, count]. Skip offset members, return a maximum of count members.\n* with_scores - true to return the scores of the elements together with the elements.\n\n**Return value**: Array(String), the list of elements in the specified score range (optionally with their scores).","summary":"

    Returns all the elements in the sorted set at key with a score between max and min (including elements with score equal to max or min).

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""},{"name":"limit","doc":null,"default_value":"nil","external_name":"limit","restriction":""},{"name":"with_scores","doc":null,"default_value":"false","external_name":"with_scores","restriction":""}],"args_string":"(key, min, max, limit = nil, with_scores = false)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1312","def":{"name":"zrangebyscore","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""},{"name":"limit","doc":null,"default_value":"nil","external_name":"limit","restriction":""},{"name":"with_scores","doc":null,"default_value":"false","external_name":"with_scores","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"ZRANGEBYSCORE\", namespaced(key), min.to_s, max.to_s]\nif limit\n ((q << \"LIMIT\") << limit[0].to_s) << limit[1].to_s\nend\nif with_scores\n q << \"WITHSCORES\"\nend\nstring_array_command(q)\n"}},{"id":"zrank(key,member)-instance-method","html_id":"zrank(key,member)-instance-method","name":"zrank","doc":"Returns the rank of member in the sorted set stored at key, with the scores ordered from low to high.\n\n**Return value**:\n* If member exists in the sorted set, Integer: the rank of member.\n* If member does not exist in the sorted set or key does not exist: nil.","summary":"

    Returns the rank of member in the sorted set stored at key, with the scores ordered from low to high.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""}],"args_string":"(key, member)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1223","def":{"name":"zrank","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_or_nil_command([\"ZRANK\", namespaced(key), member.to_s])"}},{"id":"zrem(key,member)-instance-method","html_id":"zrem(key,member)-instance-method","name":"zrem","doc":"Removes the specified members from the sorted set stored at key.\n\n**Return value**: Integer, the number of members removed from the sorted set, not including non existing members.","summary":"

    Removes the specified members from the sorted set stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""}],"args_string":"(key, member)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1214","def":{"name":"zrem","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"ZREM\", namespaced(key), member.to_s])"}},{"id":"zremrangebylex(key,min,max)-instance-method","html_id":"zremrangebylex(key,min,max)-instance-method","name":"zremrangebylex","doc":"When all the elements in a sorted set are inserted with the same score,\nin order to force lexicographical ordering, this command removes all\nelements in the sorted set stored at key between the lexicographical range\nspecified by min and max.\n\n**Return value**: Integer, the number of elements removed.","summary":"

    When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering, this command removes all elements in the sorted set stored at key between the lexicographical range specified by min and max.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""}],"args_string":"(key, min, max)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1382","def":{"name":"zremrangebylex","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"ZREMRANGEBYLEX\", namespaced(key), min.to_s, max.to_s])"}},{"id":"zremrangebyrank(key,start,stop)-instance-method","html_id":"zremrangebyrank(key,start,stop)-instance-method","name":"zremrangebyrank","doc":"Removes all elements in the sorted set stored at key with rank between start and stop.\n\n**Return value**: Integer, the number of elements removed.","summary":"

    Removes all elements in the sorted set stored at key with rank between start and stop.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start","doc":null,"default_value":"","external_name":"start","restriction":""},{"name":"stop","doc":null,"default_value":"","external_name":"stop","restriction":""}],"args_string":"(key, start, stop)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1389","def":{"name":"zremrangebyrank","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start","doc":null,"default_value":"","external_name":"start","restriction":""},{"name":"stop","doc":null,"default_value":"","external_name":"stop","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"ZREMRANGEBYRANK\", namespaced(key), start.to_s, stop.to_s])"}},{"id":"zremrangebyscore(key,start,stop)-instance-method","html_id":"zremrangebyscore(key,start,stop)-instance-method","name":"zremrangebyscore","doc":"Removes all elements in the sorted set stored at key with a score\nbetween min and max (inclusive).\n\n**Return value**: Integer, the number of elements removed.","summary":"

    Removes all elements in the sorted set stored at key with a score between min and max (inclusive).

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start","doc":null,"default_value":"","external_name":"start","restriction":""},{"name":"stop","doc":null,"default_value":"","external_name":"stop","restriction":""}],"args_string":"(key, start, stop)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1397","def":{"name":"zremrangebyscore","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start","doc":null,"default_value":"","external_name":"start","restriction":""},{"name":"stop","doc":null,"default_value":"","external_name":"stop","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_command([\"ZREMRANGEBYSCORE\", namespaced(key), start.to_s, stop.to_s])"}},{"id":"zrevrange(key,start,stop,with_scores=false)-instance-method","html_id":"zrevrange(key,start,stop,with_scores=false)-instance-method","name":"zrevrange","doc":"Returns the specified range of elements in the sorted set stored at key.\n\n**Options**:\n\n* with_scores - true to return the scores of the elements together with the elements.\n\n**Return value**: Array(String), the list of elements in the specified range (optionally with their scores, in case the with_scores option is true).","summary":"

    Returns the specified range of elements in the sorted set stored at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start","doc":null,"default_value":"","external_name":"start","restriction":""},{"name":"stop","doc":null,"default_value":"","external_name":"stop","restriction":""},{"name":"with_scores","doc":null,"default_value":"false","external_name":"with_scores","restriction":""}],"args_string":"(key, start, stop, with_scores = false)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1330","def":{"name":"zrevrange","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"start","doc":null,"default_value":"","external_name":"start","restriction":""},{"name":"stop","doc":null,"default_value":"","external_name":"stop","restriction":""},{"name":"with_scores","doc":null,"default_value":"false","external_name":"with_scores","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"ZREVRANGE\", namespaced(key), start.to_s, stop.to_s]\nif with_scores\n q << \"WITHSCORES\"\nend\nstring_array_command(q)\n"}},{"id":"zrevrangebylex(key,min,max,limit=nil)-instance-method","html_id":"zrevrangebylex(key,min,max,limit=nil)-instance-method","name":"zrevrangebylex","doc":"When all the elements in a sorted set are inserted with the same score,\nin order to force lexicographical ordering, this command returns all the\nelements in the sorted set at key with a value between min and max.\n\n**Options**:\n\n* limit - an array of [offset, count]. Skip offset members, return a maximum of count members.\n\n**Return value**:","summary":"

    When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering, this command returns all the elements in the sorted set at key with a value between min and max.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""},{"name":"limit","doc":null,"default_value":"nil","external_name":"limit","restriction":""}],"args_string":"(key, min, max, limit = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1348","def":{"name":"zrevrangebylex","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""},{"name":"limit","doc":null,"default_value":"nil","external_name":"limit","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"ZREVRANGEBYLEX\", namespaced(key), min.to_s, max.to_s]\nif limit\n ((q << \"LIMIT\") << limit[0].to_s) << limit[1].to_s\nend\nstring_array_command(q)\n"}},{"id":"zrevrangebyscore(key,min,max,limit=nil,with_scores=false)-instance-method","html_id":"zrevrangebyscore(key,min,max,limit=nil,with_scores=false)-instance-method","name":"zrevrangebyscore","doc":"Returns all the elements in the sorted set at key with a score between\nmax and min (including elements with score equal to max or min).\n\n**Options**:\n\n* limit - an array of [offset, count]. Skip offset members, return a maximum of count members.\n* with_scores - true to return the scores of the elements together with the elements.\n\n**Return value**: Array(String), the list of elements in the specified score range (optionally with their scores).","summary":"

    Returns all the elements in the sorted set at key with a score between max and min (including elements with score equal to max or min).

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""},{"name":"limit","doc":null,"default_value":"nil","external_name":"limit","restriction":""},{"name":"with_scores","doc":null,"default_value":"false","external_name":"with_scores","restriction":""}],"args_string":"(key, min, max, limit = nil, with_scores = false)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1365","def":{"name":"zrevrangebyscore","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"min","doc":null,"default_value":"","external_name":"min","restriction":""},{"name":"max","doc":null,"default_value":"","external_name":"max","restriction":""},{"name":"limit","doc":null,"default_value":"nil","external_name":"limit","restriction":""},{"name":"with_scores","doc":null,"default_value":"false","external_name":"with_scores","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"ZREVRANGEBYSCORE\", namespaced(key), min.to_s, max.to_s]\nif limit\n ((q << \"LIMIT\") << limit[0].to_s) << limit[1].to_s\nend\nif with_scores\n q << \"WITHSCORES\"\nend\nstring_array_command(q)\n"}},{"id":"zrevrank(key,member)-instance-method","html_id":"zrevrank(key,member)-instance-method","name":"zrevrank","doc":"Returns the rank of member in the sorted set stored at key,\nwith the scores ordered from high to low.\n\n**Return value**:\n* If member exists in the sorted set, Integer: the rank of member.\n* If member does not exist in the sorted set or key does not exist: nil.","summary":"

    Returns the rank of member in the sorted set stored at key, with the scores ordered from high to low.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""}],"args_string":"(key, member)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1233","def":{"name":"zrevrank","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"integer_or_nil_command([\"ZREVRANK\", namespaced(key), member.to_s])"}},{"id":"zscan(key,cursor,match=nil,count=nil)-instance-method","html_id":"zscan(key,cursor,match=nil,count=nil)-instance-method","name":"zscan","doc":"The SCAN command and the closely related commands SSCAN, HSCAN and ZSCAN are used in order to incrementally iterate over a collection of elements.\n\n**Options**:\n\n* match - It is possible to only iterate elements matching a given glob-style pattern, similarly to the behavior of the KEYS command that takes a pattern as only argument.\n* count - While SCAN does not provide guarantees about the number of elements returned at every iteration, it is possible to empirically adjust the behavior of SCAN using the COUNT option.\n\n**Return value**: Array(String), contains two elements, a member and its associated score, for every returned element of the sorted set.\n\nExample:\n\n```\nredis.zscan(\"myzset\", 0)\nredis.zscan(\"myzset\", 0, \"foo*\")\nredis.zscan(\"myzset\", 0, \"foo*\", 1024)\n```","summary":"

    The SCAN command and the closely related commands SSCAN, HSCAN and ZSCAN are used in order to incrementally iterate over a collection of elements.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"cursor","doc":null,"default_value":"","external_name":"cursor","restriction":""},{"name":"match","doc":null,"default_value":"nil","external_name":"match","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""}],"args_string":"(key, cursor, match = nil, count = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1417","def":{"name":"zscan","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"cursor","doc":null,"default_value":"","external_name":"cursor","restriction":""},{"name":"match","doc":null,"default_value":"nil","external_name":"match","restriction":""},{"name":"count","doc":null,"default_value":"nil","external_name":"count","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"q = [\"ZSCAN\", namespaced(key), cursor.to_s]\nif match\n (q << \"MATCH\") << match.to_s\nend\nif count\n (q << \"COUNT\") << count.to_s\nend\nstring_array_command(q)\n"}},{"id":"zscore(key,member)-instance-method","html_id":"zscore(key,member)-instance-method","name":"zscore","doc":"Returns the score of member in the sorted set at key.\n\n**Return value**: String, the score of member (a double precision floating point number).","summary":"

    Returns the score of member in the sorted set at key.

    ","abstract":false,"args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""}],"args_string":"(key, member)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1186","def":{"name":"zscore","args":[{"name":"key","doc":null,"default_value":"","external_name":"key","restriction":""},{"name":"member","doc":null,"default_value":"","external_name":"member","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"string_or_nil_command([\"ZSCORE\", namespaced(key), member.to_s])"}},{"id":"zunionstore(destination,keys:Array,weights=nil,aggregate=nil)-instance-method","html_id":"zunionstore(destination,keys:Array,weights=nil,aggregate=nil)-instance-method","name":"zunionstore","doc":"Computes the union of numkeys sorted sets given by the specified keys, and stores the result in destination.\n\n**Options**:\n\n* weights - nil or Array(String): Using the WEIGHTS option, it is possible to specify a multiplication factor for each input sorted set.\n* aggregate - With the AGGREGATE option, it is possible to specify how the results of the union are aggregated.\n\n**Return value**: Integer, the number of elements in the resulting sorted set at destination.","summary":"

    Computes the union of numkeys sorted sets given by the specified keys, and stores the result in destination.

    ","abstract":false,"args":[{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array"},{"name":"weights","doc":null,"default_value":"nil","external_name":"weights","restriction":""},{"name":"aggregate","doc":null,"default_value":"nil","external_name":"aggregate","restriction":""}],"args_string":"(destination, keys : Array, weights = nil, aggregate = nil)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/commands.cr#L1273","def":{"name":"zunionstore","args":[{"name":"destination","doc":null,"default_value":"","external_name":"destination","restriction":""},{"name":"keys","doc":null,"default_value":"","external_name":"keys","restriction":"Array"},{"name":"weights","doc":null,"default_value":"nil","external_name":"weights","restriction":""},{"name":"aggregate","doc":null,"default_value":"nil","external_name":"aggregate","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"numkeys = keys.size\nq = concat([\"ZUNIONSTORE\", namespaced(destination), numkeys.to_s], namespaced(keys))\nif weights\n q << \"WEIGHTS\"\n concat(q, weights)\nend\nif aggregate\n (q << \"AGGREGATE\") << aggregate.to_s\nend\ninteger_command(q)\n"}}],"macros":[],"types":[]},{"html_id":"github.com/stefanwille/crystal-redis/Redis/CommandTimeoutError","path":"Redis/CommandTimeoutError.html","kind":"class","full_name":"Redis::CommandTimeoutError","name":"CommandTimeoutError","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"github.com/stefanwille/crystal-redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/error.cr","line_number":18,"url":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/error.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"Raised when the `command_timeout` option triggers - a command took too long because the Redis-server is blocked by another command or by a dump.","summary":"

    Raised when the command_timeout option triggers - a command took too long because the Redis-server is blocked by another command or by a dump.

    ","class_methods":[],"constructors":[],"instance_methods":[],"macros":[],"types":[]},{"html_id":"github.com/stefanwille/crystal-redis/Redis/ConnectionError","path":"Redis/ConnectionError.html","kind":"class","full_name":"Redis::ConnectionError","name":"ConnectionError","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"github.com/stefanwille/crystal-redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/error.cr","line_number":6,"url":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/error.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/CannotConnectError","kind":"class","full_name":"Redis::CannotConnectError","name":"CannotConnectError"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/ConnectionLostError","kind":"class","full_name":"Redis::ConnectionLostError","name":"ConnectionLostError"}],"including_types":[],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"An error that makes the connection unusable.","summary":"

    An error that makes the connection unusable.

    ","class_methods":[],"constructors":[],"instance_methods":[],"macros":[],"types":[]},{"html_id":"github.com/stefanwille/crystal-redis/Redis/ConnectionLostError","path":"Redis/ConnectionLostError.html","kind":"class","full_name":"Redis::ConnectionLostError","name":"ConnectionLostError","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Redis/ConnectionError","kind":"class","full_name":"Redis::ConnectionError","name":"ConnectionError"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/ConnectionError","kind":"class","full_name":"Redis::ConnectionError","name":"ConnectionError"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"github.com/stefanwille/crystal-redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/error.cr","line_number":14,"url":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/error.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"Raised when the connection to the Redis server is lost.","summary":"

    Raised when the connection to the Redis server is lost.

    ","class_methods":[],"constructors":[],"instance_methods":[],"macros":[],"types":[]},{"html_id":"github.com/stefanwille/crystal-redis/Redis/Error","path":"Redis/Error.html","kind":"class","full_name":"Redis::Error","name":"Error","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/error.cr","line_number":2,"url":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/error.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/CommandTimeoutError","kind":"class","full_name":"Redis::CommandTimeoutError","name":"CommandTimeoutError"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/ConnectionError","kind":"class","full_name":"Redis::ConnectionError","name":"ConnectionError"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/PoolTimeoutError","kind":"class","full_name":"Redis::PoolTimeoutError","name":"PoolTimeoutError"}],"including_types":[],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"Exception for errors raised by this shard.","summary":"

    Exception for errors raised by this shard.

    ","class_methods":[],"constructors":[],"instance_methods":[],"macros":[],"types":[]},{"html_id":"github.com/stefanwille/crystal-redis/Redis/Future","path":"Redis/Future.html","kind":"class","full_name":"Redis::Future","name":"Future","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/future.cr","line_number":6,"url":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/future.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"Futures are handles for values that will become available at a later point in time.\n\nThe API methods Redis#pipelined and Redis#multi make commands return futures instead of actual values.\n\nSee this [example](https://github.com/stefanwille/crystal-redis-examples/blob/master/src/pipelining.cr).","summary":"

    Futures are handles for values that will become available at a later point in time.

    ","class_methods":[],"constructors":[{"id":"new-class-method","html_id":"new-class-method","name":"new","doc":null,"summary":null,"abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/future.cr#L9","def":{"name":"new","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"_ = allocate\n_.initialize\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"id":"value-instance-method","html_id":"value-instance-method","name":"value","doc":null,"summary":null,"abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/future.cr#L14","def":{"name":"value","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"if @ready\n @value\nelse\n raise(Redis::Error.new(\"Future value not ready yet\"))\nend"}},{"id":"value=(new_value)-instance-method","html_id":"value=(new_value)-instance-method","name":"value=","doc":null,"summary":null,"abstract":false,"args":[{"name":"new_value","doc":null,"default_value":"","external_name":"new_value","restriction":""}],"args_string":"(new_value)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/future.cr#L22","def":{"name":"value=","args":[{"name":"new_value","doc":null,"default_value":"","external_name":"new_value","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"@value = new_value\n@ready = true\n"}}],"macros":[],"types":[]},{"html_id":"github.com/stefanwille/crystal-redis/Redis/PipelineApi","path":"Redis/PipelineApi.html","kind":"class","full_name":"Redis::PipelineApi","name":"PipelineApi","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/CommandExecution/FutureOriented","kind":"module","full_name":"Redis::CommandExecution::FutureOriented","name":"FutureOriented"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/pipeline_api.cr","line_number":18,"url":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/pipeline_api.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/CommandExecution/FutureOriented","kind":"module","full_name":"Redis::CommandExecution::FutureOriented","name":"FutureOriented"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"API for sending commands in pipelined mode.\n\nUsed in Redis#pipelined.\n\nExample:\n\n```\nredis.pipelined do |pipeline|\n pipeline.set(\"foo1\", \"first\")\n pipeline.set(\"foo2\", \"second\")\nend\n```\n\nIn this example, the `pipeline` object passed to the block is a PipelineApi\nobject.","summary":"

    API for sending commands in pipelined mode.

    ","class_methods":[],"constructors":[{"id":"new(strategy,namespace="")-class-method","html_id":"new(strategy,namespace=&quot;&quot;)-class-method","name":"new","doc":null,"summary":null,"abstract":false,"args":[{"name":"strategy","doc":null,"default_value":"","external_name":"strategy","restriction":""},{"name":"namespace","doc":null,"default_value":"\"\"","external_name":"namespace","restriction":""}],"args_string":"(strategy, namespace = "")","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/pipeline_api.cr#L22","def":{"name":"new","args":[{"name":"strategy","doc":null,"default_value":"","external_name":"strategy","restriction":""},{"name":"namespace","doc":null,"default_value":"\"\"","external_name":"namespace","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"_ = allocate\n_.initialize(strategy, namespace)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[],"macros":[],"types":[]},{"html_id":"github.com/stefanwille/crystal-redis/Redis/PooledClient","path":"Redis/PooledClient.html","kind":"class","full_name":"Redis::PooledClient","name":"PooledClient","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/pooled_client.cr","line_number":20,"url":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/pooled_client.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"A Redis client object that can be shared across multiple fibers.\nIt is backed by a connection pool of `Redis` instances and will automatically allocate and free these instances from/to the pool, per command.\n\nExample usage:\n\n```Crystal\nredis = Redis::PooledClient.new(host: ..., port: ..., ..., pool_size: 5)\n10.times do |i|\n spawn do\n redis.set(\"foo#{i}\", \"bar\")\n redis.get(\"foo#{i}\") # => \"bar\"\n end\nend\n```\n\nHere 10 fibers access the same `Redis::PooledClient` instance while automatically sharing 5 Redis connections.\n","summary":"

    A Redis client object that can be shared across multiple fibers.

    ","class_methods":[],"constructors":[{"id":"new(*args,pool_size=5,pool_timeout=5.0,**args2)-class-method","html_id":"new(*args,pool_size=5,pool_timeout=5.0,**args2)-class-method","name":"new","doc":"Accepts the same connection parameters like a `Redis` instance, plus the documented ones.\n\n* pool_size - the number of `Redis` to hold in the connection pool.\n* pool_timeout - the time to wait for a `Redis` instance to become available from the pool before dying with `Redis::PoolTimeoutError`.","summary":"

    Accepts the same connection parameters like a Redis instance, plus the documented ones.

    ","abstract":false,"args":[{"name":"args","doc":null,"default_value":"","external_name":"args","restriction":""},{"name":"pool_size","doc":null,"default_value":"5","external_name":"pool_size","restriction":""},{"name":"pool_timeout","doc":null,"default_value":"5.0","external_name":"pool_timeout","restriction":""}],"args_string":"(*args, pool_size = 5, pool_timeout = 5.0, **args2)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/pooled_client.cr#L29","def":{"name":"new","args":[{"name":"args","doc":null,"default_value":"","external_name":"args","restriction":""},{"name":"pool_size","doc":null,"default_value":"5","external_name":"pool_size","restriction":""},{"name":"pool_timeout","doc":null,"default_value":"5.0","external_name":"pool_timeout","restriction":""}],"double_splat":{"name":"args2","doc":null,"default_value":"","external_name":"args2","restriction":""},"splat_index":0,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"_ = allocate\n_.initialize(*args, **args2, pool_size: pool_size, pool_timeout: pool_timeout)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"id":"pool:ConnectionPool(Redis)-instance-method","html_id":"pool:ConnectionPool(Redis)-instance-method","name":"pool","doc":"The connection pool.\nSee [https://github.com/ysbaddaden/pool](https://github.com/ysbaddaden/pool)","summary":"

    The connection pool.

    ","abstract":false,"args":[],"args_string":" : ConnectionPool(Redis)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/pooled_client.cr#L23","def":{"name":"pool","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"@pool"}},{"id":"psubscribe(*channel_patterns,&callback_setup_block:Redis::Subscription->)-instance-method","html_id":"psubscribe(*channel_patterns,&callback_setup_block:Redis::Subscription->)-instance-method","name":"psubscribe","doc":null,"summary":null,"abstract":false,"args":[{"name":"channel_patterns","doc":null,"default_value":"","external_name":"channel_patterns","restriction":""}],"args_string":"(*channel_patterns, &callback_setup_block : Redis::Subscription -> )","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/pooled_client.cr#L59","def":{"name":"psubscribe","args":[{"name":"channel_patterns","doc":null,"default_value":"","external_name":"channel_patterns","restriction":""}],"double_splat":null,"splat_index":0,"yields":1,"block_arg":{"name":"callback_setup_block","doc":null,"default_value":"","external_name":"callback_setup_block","restriction":"(Redis::Subscription -> )"},"return_type":"","visibility":"Public","body":"with_pool_connection(&.psubscribe(*channel_patterns) do |s|\n callback_setup_block.call(s)\nend)"}},{"id":"subscribe(*channels,&callback_setup_block:Redis::Subscription->)-instance-method","html_id":"subscribe(*channels,&callback_setup_block:Redis::Subscription->)-instance-method","name":"subscribe","doc":null,"summary":null,"abstract":false,"args":[{"name":"channels","doc":null,"default_value":"","external_name":"channels","restriction":""}],"args_string":"(*channels, &callback_setup_block : Redis::Subscription -> )","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/pooled_client.cr#L55","def":{"name":"subscribe","args":[{"name":"channels","doc":null,"default_value":"","external_name":"channels","restriction":""}],"double_splat":null,"splat_index":0,"yields":1,"block_arg":{"name":"callback_setup_block","doc":null,"default_value":"","external_name":"callback_setup_block","restriction":"(Redis::Subscription -> )"},"return_type":"","visibility":"Public","body":"with_pool_connection(&.subscribe(*channels) do |s|\n callback_setup_block.call(s)\nend)"}}],"macros":[{"id":"method_missing(call)-macro","html_id":"method_missing(call)-macro","name":"method_missing","doc":null,"summary":null,"abstract":false,"args":[{"name":"call","doc":null,"default_value":"","external_name":"call","restriction":""}],"args_string":"(call)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/pooled_client.cr#L35","def":{"name":"method_missing","args":[{"name":"call","doc":null,"default_value":"","external_name":"call","restriction":""}],"double_splat":null,"splat_index":null,"block_arg":null,"visibility":"Public","body":" \n# Delegates all Redis commands to a `Redis` instance from the connection pool.\n\n with_pool_connection \n{ |conn| conn.\n{{ call }}\n }\n \n"}}],"types":[]},{"html_id":"github.com/stefanwille/crystal-redis/Redis/PoolTimeoutError","path":"Redis/PoolTimeoutError.html","kind":"class","full_name":"Redis::PoolTimeoutError","name":"PoolTimeoutError","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"github.com/stefanwille/crystal-redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/error.cr","line_number":22,"url":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/error.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"Raised when no free connection became available in the pool within a certain time.","summary":"

    Raised when no free connection became available in the pool within a certain time.

    ","class_methods":[],"constructors":[],"instance_methods":[],"macros":[],"types":[]},{"html_id":"github.com/stefanwille/crystal-redis/Redis/SocketWrapper","path":"Redis/SocketWrapper.html","kind":"struct","full_name":"Redis::SocketWrapper","name":"SocketWrapper","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"github.com/stefanwille/crystal-redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/socket_wrapper.cr","line_number":4,"url":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/socket_wrapper.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"Wraps an open socket connection.\n\nThe purpose is to be able to convert all exceptions to Redis:Error's.","summary":"

    Wraps an open socket connection.

    ","class_methods":[],"constructors":[{"id":"new(socket:TCPSocket|UNIXSocket|OpenSSL::SSL::Socket::Client)-class-method","html_id":"new(socket:TCPSocket|UNIXSocket|OpenSSL::SSL::Socket::Client)-class-method","name":"new","doc":null,"summary":null,"abstract":false,"args":[{"name":"socket","doc":null,"default_value":"","external_name":"socket","restriction":"TCPSocket | UNIXSocket | OpenSSL::SSL::Socket::Client"}],"args_string":"(socket : TCPSocket | UNIXSocket | OpenSSL::SSL::Socket::Client)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/socket_wrapper.cr#L5","def":{"name":"new","args":[{"name":"socket","doc":null,"default_value":"","external_name":"socket","restriction":"TCPSocket | UNIXSocket | OpenSSL::SSL::Socket::Client"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"_ = allocate\n_.initialize(socket)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}},{"id":"new(&block)-class-method","html_id":"new(&block)-class-method","name":"new","doc":null,"summary":null,"abstract":false,"args":[],"args_string":"(&block)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/socket_wrapper.cr#L9","def":{"name":"new","args":[],"double_splat":null,"splat_index":null,"yields":0,"block_arg":null,"return_type":"","visibility":"Public","body":"begin\n self.new(yield)\nrescue ex : IO::Timeout | Errno | Socket::Error | OpenSSL::Error\n raise(Redis::CannotConnectError.new(\"#{ex.class}: #{ex.message}\"))\nend"}}],"instance_methods":[{"id":"close-instance-method","html_id":"close-instance-method","name":"close","doc":null,"summary":null,"abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/socket_wrapper.cr#L27","def":{"name":"close","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"begin\n if @connected\n @connected = false\n @socket.close\n end\nrescue Errno\nend"}}],"macros":[{"id":"method_missing(call)-macro","html_id":"method_missing(call)-macro","name":"method_missing","doc":null,"summary":null,"abstract":false,"args":[{"name":"call","doc":null,"default_value":"","external_name":"call","restriction":""}],"args_string":"(call)","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/socket_wrapper.cr#L15","def":{"name":"method_missing","args":[{"name":"call","doc":null,"default_value":"","external_name":"call","restriction":""}],"double_splat":null,"splat_index":null,"block_arg":null,"visibility":"Public","body":" catch_errors \n{ @socket.\n{{ call }}\n }\n \n"}}],"types":[]},{"html_id":"github.com/stefanwille/crystal-redis/Redis/Subscription","path":"Redis/Subscription.html","kind":"class","full_name":"Redis::Subscription","name":"Subscription","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/subscription.cr","line_number":5,"url":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/subscription.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"Models a subscription to one or more publish/subscribe channels.\n\nThe caller sets callbacks on this object that the Redis client will\ntrigger for the matching events.","summary":"

    Models a subscription to one or more publish/subscribe channels.

    ","class_methods":[],"constructors":[],"instance_methods":[{"id":"message(&message_callback:String,String->)-instance-method","html_id":"message(&message_callback:String,String->)-instance-method","name":"message","doc":"Sets the 'message' callback.","summary":"

    Sets the 'message' callback.

    ","abstract":false,"args":[],"args_string":"(&message_callback : String, String -> )","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/subscription.cr#L28","def":{"name":"message","args":[],"double_splat":null,"splat_index":null,"yields":2,"block_arg":{"name":"message_callback","doc":null,"default_value":"","external_name":"message_callback","restriction":"(String, String -> )"},"return_type":"","visibility":"Public","body":"@message_callback = message_callback"}},{"id":"pmessage(&pmessage_callback:String,String,String->)-instance-method","html_id":"pmessage(&pmessage_callback:String,String,String->)-instance-method","name":"pmessage","doc":"Sets the 'pmessage' callback.","summary":"

    Sets the 'pmessage' callback.

    ","abstract":false,"args":[],"args_string":"(&pmessage_callback : String, String, String -> )","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/subscription.cr#L32","def":{"name":"pmessage","args":[],"double_splat":null,"splat_index":null,"yields":3,"block_arg":{"name":"pmessage_callback","doc":null,"default_value":"","external_name":"pmessage_callback","restriction":"(String, String, String -> )"},"return_type":"","visibility":"Public","body":"@pmessage_callback = pmessage_callback"}},{"id":"psubscribe(&psubscribe_callback:String,Int64->)-instance-method","html_id":"psubscribe(&psubscribe_callback:String,Int64->)-instance-method","name":"psubscribe","doc":"Sets the 'psubscribe' callback.","summary":"

    Sets the 'psubscribe' callback.

    ","abstract":false,"args":[],"args_string":"(&psubscribe_callback : String, Int64 -> )","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/subscription.cr#L24","def":{"name":"psubscribe","args":[],"double_splat":null,"splat_index":null,"yields":2,"block_arg":{"name":"psubscribe_callback","doc":null,"default_value":"","external_name":"psubscribe_callback","restriction":"(String, Int64 -> )"},"return_type":"","visibility":"Public","body":"@psubscribe_callback = psubscribe_callback"}},{"id":"punsubscribe(&punsubscribe_callback:String,Int64->)-instance-method","html_id":"punsubscribe(&punsubscribe_callback:String,Int64->)-instance-method","name":"punsubscribe","doc":"Sets the 'punsubscribe' callback.","summary":"

    Sets the 'punsubscribe' callback.

    ","abstract":false,"args":[],"args_string":"(&punsubscribe_callback : String, Int64 -> )","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/subscription.cr#L40","def":{"name":"punsubscribe","args":[],"double_splat":null,"splat_index":null,"yields":2,"block_arg":{"name":"punsubscribe_callback","doc":null,"default_value":"","external_name":"punsubscribe_callback","restriction":"(String, Int64 -> )"},"return_type":"","visibility":"Public","body":"@punsubscribe_callback = punsubscribe_callback"}},{"id":"subscribe(&subscribe_callback:String,Int64->)-instance-method","html_id":"subscribe(&subscribe_callback:String,Int64->)-instance-method","name":"subscribe","doc":"Sets the 'subscribe' callback.","summary":"

    Sets the 'subscribe' callback.

    ","abstract":false,"args":[],"args_string":"(&subscribe_callback : String, Int64 -> )","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/subscription.cr#L20","def":{"name":"subscribe","args":[],"double_splat":null,"splat_index":null,"yields":2,"block_arg":{"name":"subscribe_callback","doc":null,"default_value":"","external_name":"subscribe_callback","restriction":"(String, Int64 -> )"},"return_type":"","visibility":"Public","body":"@subscribe_callback = subscribe_callback"}},{"id":"unsubscribe(&unsubscribe_callback:String,Int64->)-instance-method","html_id":"unsubscribe(&unsubscribe_callback:String,Int64->)-instance-method","name":"unsubscribe","doc":"Sets the 'unsubscribe' callback.","summary":"

    Sets the 'unsubscribe' callback.

    ","abstract":false,"args":[],"args_string":"(&unsubscribe_callback : String, Int64 -> )","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/subscription.cr#L36","def":{"name":"unsubscribe","args":[],"double_splat":null,"splat_index":null,"yields":2,"block_arg":{"name":"unsubscribe_callback","doc":null,"default_value":"","external_name":"unsubscribe_callback","restriction":"(String, Int64 -> )"},"return_type":"","visibility":"Public","body":"@unsubscribe_callback = unsubscribe_callback"}}],"macros":[],"types":[]},{"html_id":"github.com/stefanwille/crystal-redis/Redis/TransactionApi","path":"Redis/TransactionApi.html","kind":"class","full_name":"Redis::TransactionApi","name":"TransactionApi","abstract":false,"superclass":{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/CommandExecution/FutureOriented","kind":"module","full_name":"Redis::CommandExecution::FutureOriented","name":"FutureOriented"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},{"html_id":"github.com/stefanwille/crystal-redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/stefanwille/crystal-redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"redis/transaction_api.cr","line_number":19,"url":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/transaction_api.cr"}],"repository_name":"github.com/stefanwille/crystal-redis","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[{"html_id":"github.com/stefanwille/crystal-redis/Redis/CommandExecution/FutureOriented","kind":"module","full_name":"Redis::CommandExecution::FutureOriented","name":"FutureOriented"},{"html_id":"github.com/stefanwille/crystal-redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":{"html_id":"github.com/stefanwille/crystal-redis/Redis","kind":"class","full_name":"Redis","name":"Redis"},"doc":"API for sending commands in a transaction.\n\nUsed in Redis#multi.\n\n\nExample:\n\n```\nredis.multi do |multi|\n multi.set(\"foo1\", \"first\")\n multi.set(\"foo2\", \"second\")\nend\n```\n\nIn this example, the `multi` object passed to the block is a TransactionApi\nobject.","summary":"

    API for sending commands in a transaction.

    ","class_methods":[],"constructors":[{"id":"new(strategy,namespace="")-class-method","html_id":"new(strategy,namespace=&quot;&quot;)-class-method","name":"new","doc":null,"summary":null,"abstract":false,"args":[{"name":"strategy","doc":null,"default_value":"","external_name":"strategy","restriction":""},{"name":"namespace","doc":null,"default_value":"\"\"","external_name":"namespace","restriction":""}],"args_string":"(strategy, namespace = "")","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/transaction_api.cr#L23","def":{"name":"new","args":[{"name":"strategy","doc":null,"default_value":"","external_name":"strategy","restriction":""},{"name":"namespace","doc":null,"default_value":"\"\"","external_name":"namespace","restriction":""}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"_ = allocate\n_.initialize(strategy, namespace)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"id":"discard-instance-method","html_id":"discard-instance-method","name":"discard","doc":"Aborts the current transaction.\n\n**Example**:\n\n```\nredis.multi do |multi|\n multi.set(\"foo\", \"the new value\")\n multi.discard\nend\n```","summary":"

    Aborts the current transaction.

    ","abstract":false,"args":[],"args_string":"","source_link":"https://github.com/stefanwille/crystal-redis/blob/90dedfc994a72cd97e4b2f38efe66bcc50338348/src/redis/transaction_api.cr#L40","def":{"name":"discard","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"@strategy.discard"}}],"macros":[],"types":[]}]}]}}) \ No newline at end of file