From 33e34fa17b29b1666b3433cdfa4170523fed1d27 Mon Sep 17 00:00:00 2001 From: Jamie Gaskins Date: Tue, 27 Aug 2024 15:21:07 -0500 Subject: [PATCH] Version 0.10.0 --- docs/404.html | 161 +- docs/Redis.html | 309 ++- docs/Redis/BusyGroup.html | 163 +- docs/Redis/Client.html | 211 +- docs/Redis/Cluster.html | 203 +- docs/Redis/Cluster/Ask.html | 163 +- docs/Redis/Cluster/CrossSlot.html | 163 +- docs/Redis/Cluster/Error.html | 163 +- docs/Redis/Cluster/Moved.html | 163 +- docs/Redis/Commands.html | 318 ++- docs/Redis/Commands/EmptyEnumerable.html | 171 +- docs/Redis/Commands/Hash.html | 191 +- docs/Redis/Commands/List.html | 249 ++- docs/Redis/Commands/List/Side.html | 176 +- docs/Redis/Commands/ScriptFlushMode.html | 176 +- docs/Redis/Commands/Set.html | 179 +- docs/Redis/Commands/SortedSet.html | 189 +- docs/Redis/Commands/Stream.html | 225 ++- docs/Redis/Commands/Stream/XGroup.html | 180 +- docs/Redis/Connection.html | 233 ++- docs/Redis/Error.html | 169 +- docs/Redis/FullText.html | 177 +- docs/Redis/FullText/Filter.html | 171 +- docs/Redis/FullText/GeoFilter.html | 169 +- docs/Redis/FullText/GeoUnit.html | 180 +- docs/Redis/FullText/Highlight.html | 169 +- docs/Redis/FullText/SortBy.html | 169 +- docs/Redis/FullText/SortDirection.html | 176 +- docs/Redis/FullText/Summarize.html | 169 +- docs/Redis/Future.html | 169 +- docs/Redis/Future/NotResolved.html | 163 +- docs/Redis/Graph.html | 200 +- docs/Redis/Graph/Cache.html | 1021 ++++++++++ docs/Redis/Graph/Client.html | 452 ++++- docs/Redis/Graph/ConstraintViolation.html | 829 ++++++++ docs/Redis/Graph/Constraints.html | 1068 ++++++++++ docs/Redis/Graph/Constraints/Constraint.html | 982 +++++++++ docs/Redis/Graph/Constraints/EntityType.html | 888 +++++++++ docs/Redis/Graph/Constraints/Status.html | 914 +++++++++ docs/Redis/Graph/Constraints/Type.html | 888 +++++++++ docs/Redis/Graph/Error.html | 179 +- .../Redis/Graph/{Property.html => Field.html} | 177 +- .../Graph/{TypedResult.html => Indices.html} | 421 ++-- .../IndexAlreadyExists.html} | 246 ++- docs/Redis/Graph/List.html | 167 +- docs/Redis/Graph/Map.html | 167 +- docs/Redis/Graph/Node.html | 243 ++- docs/Redis/Graph/Relationship.html | 269 ++- .../Graph/{Result.html => ResultSet.html} | 455 ++++- docs/Redis/Graph/ResultSet/Row.html | 929 +++++++++ docs/Redis/Graph/Serializable.html | 163 +- docs/Redis/Graph/Serializable/Node.html | 292 ++- .../Graph/Serializable/Node/Metadata.html | 169 +- .../Serializable/Node/PropertyMissing.html | 816 ++++++++ docs/Redis/Graph/Serializable/Property.html | 163 +- docs/Redis/Graph/UnexpectedValue.html | 829 ++++++++ docs/Redis/Graph/Value.html | 210 +- docs/Redis/Graph/ValueType.html | 1191 +++++++++++ docs/Redis/JSON.html | 205 +- docs/Redis/NoGroup.html | 163 +- docs/Redis/Parser.html | 169 +- docs/Redis/Pipeline.html | 189 +- docs/Redis/ReplicationClient.html | 1760 +++++++++++++++++ .../Info.html} | 179 +- .../Redis/ReplicationClient/Info/Replica.html | 971 +++++++++ .../ReplicationClient/Info/Replica/State.html | 862 ++++++++ .../ReplicationClient/Info/Replication.html | 1034 ++++++++++ .../Info/Replication/Role.html} | 344 ++-- docs/Redis/Streaming.html | 163 +- docs/Redis/Streaming/Message.html | 169 +- docs/Redis/Streaming/XAutoClaimResponse.html | 169 +- .../Redis/Streaming/XPendingBaseResponse.html | 173 +- .../Streaming/XPendingBaseResponse/Data.html | 169 +- .../Streaming/XPendingExtendedResponse.html | 167 +- .../XPendingExtendedResponse/MessageData.html | 175 +- docs/Redis/Streaming/XReadGroupResponse.html | 167 +- .../Streaming/XReadGroupResponse/Result.html | 169 +- docs/Redis/Subscription.html | 171 +- docs/Redis/Subscription/InvalidMessage.html | 163 +- docs/Redis/TimeSeries.html | 183 +- docs/Redis/TimeSeries/Aggregation.html | 169 +- docs/Redis/TimeSeries/AggregationType.html | 196 +- docs/Redis/TimeSeries/Alignment.html | 176 +- docs/Redis/TimeSeries/BucketTimestamp.html | 210 +- docs/Redis/TimeSeries/Datapoint.html | 169 +- docs/Redis/TimeSeries/Datapoints.html | 173 +- docs/Redis/TimeSeries/DuplicatePolicy.html | 184 +- docs/Redis/TimeSeries/Encoding.html | 176 +- docs/Redis/TimeSeries/Labels.html | 163 +- docs/Redis/TimeSeries/MRangeResponse.html | 173 +- .../MRangeResponse/DatapointMap.html | 163 +- docs/Redis/TimeSeries/Range.html | 165 +- docs/Redis/TimeSeries/RangeOptions.html | 167 +- .../TimeSeries/RangeOptions/Aggregation.html | 169 +- docs/Redis/Transaction.html | 195 +- docs/Redis/Value.html | 163 +- docs/Redis/Writer.html | 167 +- docs/index.html | 161 +- docs/index.json | 2 +- docs/js/doc.js | 2 +- docs/search-index.js | 2 +- shard.yml | 2 +- src/version.cr | 2 +- 103 files changed, 27977 insertions(+), 3281 deletions(-) create mode 100644 docs/Redis/Graph/Cache.html create mode 100644 docs/Redis/Graph/ConstraintViolation.html create mode 100644 docs/Redis/Graph/Constraints.html create mode 100644 docs/Redis/Graph/Constraints/Constraint.html create mode 100644 docs/Redis/Graph/Constraints/EntityType.html create mode 100644 docs/Redis/Graph/Constraints/Status.html create mode 100644 docs/Redis/Graph/Constraints/Type.html rename docs/Redis/Graph/{Property.html => Field.html} (78%) rename docs/Redis/Graph/{TypedResult.html => Indices.html} (69%) rename docs/Redis/Graph/{Serializable/Relationship.html => Indices/IndexAlreadyExists.html} (73%) rename docs/Redis/Graph/{Result.html => ResultSet.html} (63%) create mode 100644 docs/Redis/Graph/ResultSet/Row.html create mode 100644 docs/Redis/Graph/Serializable/Node/PropertyMissing.html create mode 100644 docs/Redis/Graph/UnexpectedValue.html create mode 100644 docs/Redis/Graph/ValueType.html create mode 100644 docs/Redis/ReplicationClient.html rename docs/Redis/{Graph/ResultValue.html => ReplicationClient/Info.html} (78%) create mode 100644 docs/Redis/ReplicationClient/Info/Replica.html create mode 100644 docs/Redis/ReplicationClient/Info/Replica/State.html create mode 100644 docs/Redis/ReplicationClient/Info/Replication.html rename docs/Redis/{Graph/Serializable/Relationship/Metadata.html => ReplicationClient/Info/Replication/Role.html} (73%) diff --git a/docs/404.html b/docs/404.html index 32e8a48..1f8a88e 100644 --- a/docs/404.html +++ b/docs/404.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - redis 0.9.0 + redis 0.10.0 @@ -45,7 +45,7 @@

- 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

@@ -312,33 +377,23 @@

-
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming diff --git a/docs/Redis.html b/docs/Redis.html index 20dba0f..e5178eb 100644 --- a/docs/Redis.html +++ b/docs/Redis.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis - redis 0.9.0 + Redis - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -597,112 +702,140 @@

    - + client.cr
    - + cluster.cr
    - + commands.cr
    - + connection.cr
    - + errors.cr
    - + graph.cr
    - + json.cr
    - + + log.cr + + +
    + + + parser.cr
    - + pipeline.cr
    - + + read_only_commands.cr + + +
    + + + redis.cr
    - + search.cr
    - + streaming.cr
    - + time_series.cr
    - + + to_hash.cr + + +
    + + + transaction.cr
    - + value.cr
    - + + version.cr + + +
    + + + writer.cr @@ -728,8 +861,30 @@

    +
    + Log = ::Log.for(self) +
    + +
    +

    Default Redis log

    +
    + + +
    + READ_ONLY_COMMANDS = (["bf.card", "bf.debug", "bf.exists", "bf.info", "bf.mexists", "bf.scandump", "bitcount", "bitfield_ro", "bitpos", "cf.compact", "cf.count", "cf.debug", "cf.exists", "cf.info", "cf.mexists", "cf.scandump", "cms.info", "cms.query", "dbsize", "dump", "eval_ro", "evalsha_ro", "exists", "expiretime", "fcall_ro", "ft._aliasaddifnx", "ft._aliasdelifx", "ft._list", "ft.aggregate", "ft.aliasadd", "ft.aliasdel", "ft.aliasupdate", "ft.config", "ft.cursor", "ft.debug", "ft.dictadd", "ft.dictdel", "ft.dictdump", "ft.explain", "ft.explaincli", "ft.get", "ft.info", "ft.mget", "ft.profile", "ft.search", "ft.spellcheck", "ft.sugget", "ft.suglen", "ft.syndump", "ft.tagvals", "geodist", "geohash", "geopos", "georadius_ro", "georadiusbymember_ro", "geosearch", "get", "getbit", "getrange", "hexists", "hget", "hgetall", "hkeys", "hlen", "hmget", "hrandfield", "hscan", "hstrlen", "hvals", "json.arrindex", "json.arrlen", "json.debug", "json.get", "json.mget", "json.objkeys", "json.objlen", "json.resp", "json.strlen", "json.type", "keys", "lcs", "lindex", "llen", "lolwut", "lpos", "lrange", "mget", "pexpiretime", "pfcount", "pttl", "randomkey", "redisgears_2.clusterset", "redisgears_2.clustersetfromshard", "redisgears_2.forceshardsconnection", "redisgears_2.hello", "redisgears_2.infocluster", "redisgears_2.innercommunication", "redisgears_2.networktest", "redisgears_2.refreshcluster", "scan", "scard", "sdiff", "sinter", "sintercard", "sismember", "smembers", "smismember", "sort_ro", "srandmember", "sscan", "strlen", "substr", "sunion", "tdigest.byrank", "tdigest.byrevrank", "tdigest.cdf", "tdigest.info", "tdigest.max", "tdigest.min", "tdigest.quantile", "tdigest.rank", "tdigest.revrank", "tdigest.trimmed_mean", "timeseries.clusterset", "timeseries.clustersetfromshard", "timeseries.forceshardsconnection", "timeseries.hello", "timeseries.infocluster", "timeseries.innercommunication", "timeseries.networktest", "timeseries.refreshcluster", "topk.info", "topk.list", "topk.query", "touch", "ts.get", "ts.info", "ts.mget", "ts.mrange", "ts.mrevrange", "ts.queryindex", "ts.range", "ts.revrange", "ttl", "type", "xlen", "xpending", "xrange", "xread", "xrevrange", "zcard", "zcount", "zdiff", "zinter", "zintercard", "zlexcount", "zmscore", "zrandmember", "zrange", "zrangebylex", "zrangebyscore", "zrank", "zrevrange", "zrevrangebylex", "zrevrangebyscore", "zrevrank", "zscan", "zscore", "zunion"] of ::String).to_set +
    + +
    +

    Commands in this set are routed to replicas by Redis::Cluster and +Redis::ReplicationClient.

    +

    You can add additional commands that this shard does not yet know about +(for example, one provided by a custom Redis module) by using the << method:

    +
    Redis::READ_ONLY_COMMANDS << "mymodule.mycommand"
    +
    + +
    - VERSION = "0.9.0" + VERSION = "0.10.0"
    @@ -739,6 +894,28 @@

    +

    + + + + Class Method Summary +

    + + @@ -752,6 +929,48 @@

    +

    + + + + Class Method Detail +

    + +
    +
    + + def self.to_hash(array : Array, value_type : T.class) : Hash(String, T) forall T + + # +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def self.to_hash(array : Array) + + # +
    + +
    +
    + + [View source] + +
    +
    + + diff --git a/docs/Redis/BusyGroup.html b/docs/Redis/BusyGroup.html index 7b7b8ac..ab4cef4 100644 --- a/docs/Redis/BusyGroup.html +++ b/docs/Redis/BusyGroup.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::BusyGroup - redis 0.9.0 + Redis::BusyGroup - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -599,7 +704,7 @@

    - + errors.cr diff --git a/docs/Redis/Client.html b/docs/Redis/Client.html index 5bfd300..fafd9a2 100644 --- a/docs/Redis/Client.html +++ b/docs/Redis/Client.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Client - redis 0.9.0 + Redis::Client - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -633,7 +738,7 @@

    - + client.cr @@ -655,7 +760,7 @@

    - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

  • +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -641,14 +746,14 @@

    - + cluster.cr
    - + errors.cr @@ -955,7 +1060,12 @@

    Instance methods inherited from module unlink(keys : Enumerable(String))
    unlink(*keys : String)
    - unlink
    + unlink, + + + + wait(numreplicas replica_count : Int | String, timeout : Time::Span)
    wait(numreplicas replica_count : Int | String, timeout : Int | String)
    + wait
    @@ -980,8 +1090,8 @@

    Instance methods inherited from module - xadd(key : String, id : String, maxlen, data : Hash(String, String))
    xadd(key : String, id : String, data : Hash(String, String))
    xadd(key : String, id : String, maxlen = nil, **data)
    +
    + xadd(key : String, id : String, maxlen, data : ::Hash(String, String))
    xadd(key : String, id : String, data : ::Hash(String, String))
    xadd(key : String, id : String, maxlen = nil, **data)
    xadd
    , @@ -1020,8 +1130,8 @@

    Instance methods inherited from module - xrange(key : String, start min, end max, count = nil) + + xrange(key : String, start min : String, end max : String, count : String | Int | Nil = nil) xrange, @@ -1176,6 +1286,11 @@

    Instance methods inherited from module + brpoplpush(source : String, destination : String, timeout : Time::Span)
    brpoplpush(source : String, destination : String, timeout : Int | String)
    + brpoplpush
    , + + llen(key : String) llen, @@ -1356,7 +1471,7 @@


    @@ -1391,7 +1506,7 @@


    @@ -1417,7 +1532,7 @@


    @@ -1452,7 +1567,7 @@


    @@ -1473,7 +1588,7 @@


    @@ -1502,7 +1617,7 @@


    @@ -1529,7 +1644,7 @@


    @@ -1550,7 +1665,7 @@


    @@ -1572,7 +1687,7 @@


    diff --git a/docs/Redis/Cluster/Ask.html b/docs/Redis/Cluster/Ask.html index f9f0288..cef05bd 100644 --- a/docs/Redis/Cluster/Ask.html +++ b/docs/Redis/Cluster/Ask.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Cluster::Ask - redis 0.9.0 + Redis::Cluster::Ask - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -599,7 +704,7 @@

    - + errors.cr diff --git a/docs/Redis/Cluster/CrossSlot.html b/docs/Redis/Cluster/CrossSlot.html index 8815584..d477463 100644 --- a/docs/Redis/Cluster/CrossSlot.html +++ b/docs/Redis/Cluster/CrossSlot.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Cluster::CrossSlot - redis 0.9.0 + Redis::Cluster::CrossSlot - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -599,7 +704,7 @@

    - + errors.cr diff --git a/docs/Redis/Cluster/Error.html b/docs/Redis/Cluster/Error.html index 57df1a5..c3d3893 100644 --- a/docs/Redis/Cluster/Error.html +++ b/docs/Redis/Cluster/Error.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Cluster::Error - redis 0.9.0 + Redis::Cluster::Error - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -617,7 +722,7 @@

    - + errors.cr diff --git a/docs/Redis/Cluster/Moved.html b/docs/Redis/Cluster/Moved.html index 17fc87b..de149d8 100644 --- a/docs/Redis/Cluster/Moved.html +++ b/docs/Redis/Cluster/Moved.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Cluster::Moved - redis 0.9.0 + Redis::Cluster::Moved - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -599,7 +704,7 @@

    - + errors.cr diff --git a/docs/Redis/Commands.html b/docs/Redis/Commands.html index d888f2e..1f35a66 100644 --- a/docs/Redis/Commands.html +++ b/docs/Redis/Commands.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Commands - redis 0.9.0 + Redis::Commands - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -638,6 +743,8 @@

  • Redis::Pipeline
  • +
  • Redis::ReplicationClient
  • +
  • Redis::Transaction
  • @@ -655,42 +762,42 @@

    - + commands.cr
    - + commands/hash.cr
    - + graph.cr
    - + json.cr
    - + search.cr
    - + time_series.cr @@ -990,6 +1097,16 @@

  • +
  • + #wait(numreplicas replica_count : Int | String, timeout : Time::Span) + +
  • + +
  • + #wait(numreplicas replica_count : Int | String, timeout : Int | String) + +
  • + @@ -1006,8 +1123,8 @@

    Instance methods inherited from module - xadd(key : String, id : String, maxlen, data : Hash(String, String))
    xadd(key : String, id : String, data : Hash(String, String))
    xadd(key : String, id : String, maxlen = nil, **data)
    +
    + xadd(key : String, id : String, maxlen, data : ::Hash(String, String))
    xadd(key : String, id : String, data : ::Hash(String, String))
    xadd(key : String, id : String, maxlen = nil, **data)
    xadd
    , @@ -1046,8 +1163,8 @@

    Instance methods inherited from module - xrange(key : String, start min, end max, count = nil) + + xrange(key : String, start min : String, end max : String, count : String | Int | Nil = nil) xrange, @@ -1202,6 +1319,11 @@

    Instance methods inherited from module + brpoplpush(source : String, destination : String, timeout : Time::Span)
    brpoplpush(source : String, destination : String, timeout : Int | String)
    + brpoplpush
    , + + llen(key : String) llen, @@ -1363,7 +1485,7 @@


    @@ -1387,7 +1509,7 @@


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


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


    @@ -1469,7 +1591,7 @@


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


    @@ -1537,7 +1659,7 @@


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


    @@ -1597,7 +1719,7 @@


    @@ -1613,7 +1735,7 @@


    @@ -1629,7 +1751,7 @@


    @@ -1645,7 +1767,7 @@


    @@ -1667,7 +1789,7 @@


    @@ -1688,7 +1810,7 @@


    @@ -1709,7 +1831,7 @@


    @@ -1732,7 +1854,7 @@


    @@ -1753,7 +1875,7 @@


    @@ -1777,7 +1899,7 @@


    @@ -1801,7 +1923,7 @@


    @@ -1817,7 +1939,7 @@


    @@ -1840,7 +1962,7 @@


    @@ -1867,7 +1989,7 @@


    @@ -1883,7 +2005,7 @@


    @@ -1899,7 +2021,7 @@


    @@ -1915,7 +2037,7 @@


    @@ -1931,7 +2053,7 @@


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


    @@ -1963,7 +2085,7 @@


    @@ -1979,7 +2101,7 @@


    @@ -2002,7 +2124,7 @@


    @@ -2018,7 +2140,7 @@


    @@ -2040,7 +2162,7 @@


    @@ -2062,7 +2184,7 @@


    @@ -2085,7 +2207,7 @@


    @@ -2107,7 +2229,7 @@


    @@ -2133,7 +2255,7 @@


    @@ -2165,7 +2287,7 @@


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


    @@ -2197,7 +2319,7 @@


    @@ -2219,7 +2341,7 @@


    @@ -2235,7 +2357,7 @@


    @@ -2251,7 +2373,7 @@


    @@ -2267,7 +2389,7 @@


    @@ -2283,7 +2405,39 @@


    - [View source] + [View source] + +
    + + +
    +
    + + def wait(numreplicas replica_count : Int | String, timeout : Time::Span) + + # +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def wait(numreplicas replica_count : Int | String, timeout : Int | String) + + # +
    + +
    +
    + + [View source]
    diff --git a/docs/Redis/Commands/EmptyEnumerable.html b/docs/Redis/Commands/EmptyEnumerable.html index 6277910..226b52c 100644 --- a/docs/Redis/Commands/EmptyEnumerable.html +++ b/docs/Redis/Commands/EmptyEnumerable.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Commands::EmptyEnumerable - redis 0.9.0 + Redis::Commands::EmptyEnumerable - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

    -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -624,7 +729,7 @@

    - + commands.cr @@ -768,7 +873,7 @@


    @@ -809,7 +914,7 @@


    @@ -825,7 +930,7 @@


    @@ -851,7 +956,7 @@


    diff --git a/docs/Redis/Commands/Hash.html b/docs/Redis/Commands/Hash.html index a94bba8..a63392e 100644 --- a/docs/Redis/Commands/Hash.html +++ b/docs/Redis/Commands/Hash.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Commands::Hash - redis 0.9.0 + Redis::Commands::Hash - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -611,7 +716,7 @@

    - + commands/hash.cr @@ -780,7 +885,7 @@


    @@ -806,7 +911,7 @@


    @@ -830,7 +935,7 @@


    @@ -854,7 +959,7 @@


    @@ -879,7 +984,7 @@


    @@ -903,7 +1008,7 @@


    @@ -927,7 +1032,7 @@


    @@ -948,7 +1053,7 @@


    @@ -982,7 +1087,7 @@


    @@ -1008,7 +1113,7 @@


    @@ -1033,7 +1138,7 @@


    @@ -1059,7 +1164,7 @@


    @@ -1084,7 +1189,7 @@


    @@ -1112,7 +1217,7 @@


    diff --git a/docs/Redis/Commands/List.html b/docs/Redis/Commands/List.html index 6392658..5003bf5 100644 --- a/docs/Redis/Commands/List.html +++ b/docs/Redis/Commands/List.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Commands::List - redis 0.9.0 + Redis::Commands::List - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -611,7 +716,7 @@

    - + commands/list.cr @@ -692,6 +797,16 @@

  • +
  • + #brpoplpush(source : String, destination : String, timeout : Time::Span) + +
  • + +
  • + #brpoplpush(source : String, destination : String, timeout : Int | String) + +
  • +
  • #llen(key : String) @@ -835,7 +950,7 @@


    @@ -869,7 +984,7 @@


    @@ -903,7 +1018,7 @@


    @@ -937,7 +1052,7 @@


    @@ -953,7 +1068,7 @@


    @@ -987,7 +1102,7 @@


    @@ -1021,7 +1136,7 @@


    @@ -1055,7 +1170,39 @@


    - [View source] + [View source] + +
    + + +
    +
    + + def brpoplpush(source : String, destination : String, timeout : Time::Span) + + # +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def brpoplpush(source : String, destination : String, timeout : Int | String) + + # +
    + +
    +
    + + [View source]
    @@ -1071,7 +1218,7 @@


    @@ -1099,7 +1246,7 @@


    @@ -1125,7 +1272,7 @@


    @@ -1141,7 +1288,7 @@


    @@ -1166,7 +1313,7 @@


    @@ -1182,7 +1329,7 @@


    @@ -1198,7 +1345,7 @@


    @@ -1222,7 +1369,7 @@


    @@ -1247,7 +1394,7 @@


    @@ -1271,7 +1418,7 @@


    @@ -1296,7 +1443,7 @@


    @@ -1325,7 +1472,7 @@


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


    @@ -1366,7 +1513,7 @@


    diff --git a/docs/Redis/Commands/List/Side.html b/docs/Redis/Commands/List/Side.html index d9ca779..c14f762 100644 --- a/docs/Redis/Commands/List/Side.html +++ b/docs/Redis/Commands/List/Side.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Commands::List::Side - redis 0.9.0 + Redis::Commands::List::Side - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -597,7 +702,7 @@

    - + commands/list.cr @@ -672,6 +777,15 @@

    +

    Class methods inherited from struct Enum

    + + + + from_redis_graph_value(type : Redis::Graph::ValueType, value, cache) + from_redis_graph_value + + + @@ -745,7 +859,7 @@


    @@ -761,7 +875,7 @@


    diff --git a/docs/Redis/Commands/ScriptFlushMode.html b/docs/Redis/Commands/ScriptFlushMode.html index 20250c7..2b71c1d 100644 --- a/docs/Redis/Commands/ScriptFlushMode.html +++ b/docs/Redis/Commands/ScriptFlushMode.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Commands::ScriptFlushMode - redis 0.9.0 + Redis::Commands::ScriptFlushMode - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -597,7 +702,7 @@

    - + commands.cr @@ -672,6 +777,15 @@

    +

    Class methods inherited from struct Enum

    + + + + from_redis_graph_value(type : Redis::Graph::ValueType, value, cache) + from_redis_graph_value + + + @@ -745,7 +859,7 @@


    @@ -761,7 +875,7 @@


    diff --git a/docs/Redis/Commands/Set.html b/docs/Redis/Commands/Set.html index efb32b0..0782511 100644 --- a/docs/Redis/Commands/Set.html +++ b/docs/Redis/Commands/Set.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Commands::Set - redis 0.9.0 + Redis::Commands::Set - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -611,7 +716,7 @@

    - + commands/set.cr @@ -713,7 +818,7 @@


    @@ -729,7 +834,7 @@


    @@ -745,7 +850,7 @@


    @@ -761,7 +866,7 @@


    @@ -777,7 +882,7 @@


    @@ -793,7 +898,7 @@


    @@ -809,7 +914,7 @@


    @@ -825,7 +930,7 @@


    diff --git a/docs/Redis/Commands/SortedSet.html b/docs/Redis/Commands/SortedSet.html index 3e263d5..4865e31 100644 --- a/docs/Redis/Commands/SortedSet.html +++ b/docs/Redis/Commands/SortedSet.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Commands::SortedSet - redis 0.9.0 + Redis::Commands::SortedSet - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -611,7 +716,7 @@

    - + commands/sorted_set.cr @@ -738,7 +843,7 @@


    @@ -754,7 +859,7 @@


    @@ -770,7 +875,7 @@


    @@ -786,7 +891,7 @@


    @@ -802,7 +907,7 @@


    @@ -818,7 +923,7 @@


    @@ -834,7 +939,7 @@


    @@ -850,7 +955,7 @@


    @@ -866,7 +971,7 @@


    @@ -882,7 +987,7 @@


    @@ -898,7 +1003,7 @@


    @@ -914,7 +1019,7 @@


    @@ -930,7 +1035,7 @@


    diff --git a/docs/Redis/Commands/Stream.html b/docs/Redis/Commands/Stream.html index 00f539d..c22f694 100644 --- a/docs/Redis/Commands/Stream.html +++ b/docs/Redis/Commands/Stream.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Commands::Stream - redis 0.9.0 + Redis::Commands::Stream - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -611,7 +716,7 @@

    - + commands/stream.cr @@ -649,14 +754,14 @@

  • - #xadd(key : String, id : String, maxlen, data : Hash(String, String)) + #xadd(key : String, id : String, maxlen, data : ::Hash(String, String))

    Append an entry with the specified data to the stream with the given key and gives it the specified id.

  • - #xadd(key : String, id : String, data : Hash(String, String)) + #xadd(key : String, id : String, data : ::Hash(String, String))

    Append an entry with the specified data to the stream with the given key and gives it the specified id.

    @@ -737,7 +842,7 @@

  • - #xrange(key : String, start min, end max, count = nil) + #xrange(key : String, start min : String, end max : String, count : String | Int | Nil = nil)

    Return the entries in the given stream between the start and end ids.

    @@ -792,7 +897,7 @@


    @@ -808,17 +913,17 @@


    -
    +
    - def xadd(key : String, id : String, maxlen, data : Hash(String, String)) + def xadd(key : String, id : String, maxlen, data : ::Hash(String, String)) - # + #
    @@ -836,17 +941,17 @@


    -
    +
    - def xadd(key : String, id : String, data : Hash(String, String)) + def xadd(key : String, id : String, data : ::Hash(String, String)) - # + #
    @@ -864,7 +969,7 @@


    @@ -892,7 +997,7 @@


    @@ -908,7 +1013,7 @@


    @@ -924,7 +1029,7 @@


    @@ -940,7 +1045,7 @@


    @@ -962,7 +1067,7 @@


    @@ -984,7 +1089,7 @@


    @@ -1006,7 +1111,7 @@


    @@ -1022,7 +1127,7 @@


    @@ -1043,7 +1148,7 @@


    @@ -1064,7 +1169,7 @@


    @@ -1080,7 +1185,7 @@


    @@ -1101,17 +1206,17 @@


    -
    +
    - def xrange(key : String, start min, end max, count = nil) + def xrange(key : String, start min : String, end max : String, count : String | Int | Nil = nil) - # + #
    @@ -1123,7 +1228,7 @@


    @@ -1146,7 +1251,7 @@


    @@ -1176,7 +1281,7 @@


    diff --git a/docs/Redis/Commands/Stream/XGroup.html b/docs/Redis/Commands/Stream/XGroup.html index 9a41b83..9de2334 100644 --- a/docs/Redis/Commands/Stream/XGroup.html +++ b/docs/Redis/Commands/Stream/XGroup.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Commands::Stream::XGroup - redis 0.9.0 + Redis::Commands::Stream::XGroup - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -597,7 +702,7 @@

    - + commands/stream.cr @@ -692,6 +797,15 @@

    +

    Class methods inherited from struct Enum

    + + + + from_redis_graph_value(type : Redis::Graph::ValueType, value, cache) + from_redis_graph_value + + + @@ -765,7 +879,7 @@


    @@ -781,7 +895,7 @@


    @@ -797,7 +911,7 @@


    @@ -813,7 +927,7 @@


    diff --git a/docs/Redis/Connection.html b/docs/Redis/Connection.html index c1cd8ff..75226c6 100644 --- a/docs/Redis/Connection.html +++ b/docs/Redis/Connection.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Connection - redis 0.9.0 + Redis::Connection - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -624,14 +729,14 @@

    - + connection.cr
    - + graph.cr @@ -653,7 +758,7 @@

    - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

  • +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -600,6 +705,10 @@

  • Redis::Graph::Error
  • +
  • Redis::Graph::Indices::IndexAlreadyExists
  • + +
  • Redis::Graph::Serializable::Node::PropertyMissing
  • +
  • Redis::NoGroup
  • Redis::Subscription::InvalidMessage
  • @@ -621,7 +730,7 @@

    - + errors.cr @@ -751,7 +860,7 @@


    diff --git a/docs/Redis/FullText.html b/docs/Redis/FullText.html index 8ca1a90..af85511 100644 --- a/docs/Redis/FullText.html +++ b/docs/Redis/FullText.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::FullText(Runnable) - redis 0.9.0 + Redis::FullText(Runnable) - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -624,7 +729,7 @@

    - + search.cr @@ -789,7 +894,7 @@


    @@ -810,7 +915,7 @@


    @@ -831,7 +936,7 @@


    @@ -853,7 +958,7 @@


    @@ -875,7 +980,7 @@


    @@ -900,7 +1005,7 @@


    @@ -916,7 +1021,7 @@


    diff --git a/docs/Redis/FullText/Filter.html b/docs/Redis/FullText/Filter.html index fddd932..dcdd2b8 100644 --- a/docs/Redis/FullText/Filter.html +++ b/docs/Redis/FullText/Filter.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::FullText::Filter - redis 0.9.0 + Redis::FullText::Filter - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -599,7 +704,7 @@

    - + search.cr @@ -741,7 +846,7 @@


    @@ -757,7 +862,7 @@


    @@ -789,7 +894,7 @@


    @@ -805,7 +910,7 @@


    diff --git a/docs/Redis/FullText/GeoFilter.html b/docs/Redis/FullText/GeoFilter.html index fb5a82c..3dd8638 100644 --- a/docs/Redis/FullText/GeoFilter.html +++ b/docs/Redis/FullText/GeoFilter.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::FullText::GeoFilter - redis 0.9.0 + Redis::FullText::GeoFilter - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -599,7 +704,7 @@

    - + search.cr @@ -746,7 +851,7 @@


    @@ -778,7 +883,7 @@


    @@ -794,7 +899,7 @@


    diff --git a/docs/Redis/FullText/GeoUnit.html b/docs/Redis/FullText/GeoUnit.html index 305e37d..84a9f00 100644 --- a/docs/Redis/FullText/GeoUnit.html +++ b/docs/Redis/FullText/GeoUnit.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::FullText::GeoUnit - redis 0.9.0 + Redis::FullText::GeoUnit - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -612,7 +717,7 @@

    - + search.cr @@ -707,6 +812,15 @@

    +

    Class methods inherited from struct Enum

    + + + + from_redis_graph_value(type : Redis::Graph::ValueType, value, cache) + from_redis_graph_value + + + @@ -780,7 +894,7 @@


    @@ -796,7 +910,7 @@


    @@ -812,7 +926,7 @@


    @@ -828,7 +942,7 @@


    diff --git a/docs/Redis/FullText/Highlight.html b/docs/Redis/FullText/Highlight.html index e92a702..b75004e 100644 --- a/docs/Redis/FullText/Highlight.html +++ b/docs/Redis/FullText/Highlight.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::FullText::Highlight - redis 0.9.0 + Redis::FullText::Highlight - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -599,7 +704,7 @@

    - + search.cr @@ -731,7 +836,7 @@


    @@ -763,7 +868,7 @@


    @@ -779,7 +884,7 @@


    diff --git a/docs/Redis/FullText/SortBy.html b/docs/Redis/FullText/SortBy.html index 0f3da22..8697639 100644 --- a/docs/Redis/FullText/SortBy.html +++ b/docs/Redis/FullText/SortBy.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::FullText::SortBy - redis 0.9.0 + Redis::FullText::SortBy - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -613,7 +718,7 @@

    - + search.cr @@ -745,7 +850,7 @@


    @@ -791,7 +896,7 @@


    @@ -807,7 +912,7 @@


    diff --git a/docs/Redis/FullText/SortDirection.html b/docs/Redis/FullText/SortDirection.html index acf2c52..5467b35 100644 --- a/docs/Redis/FullText/SortDirection.html +++ b/docs/Redis/FullText/SortDirection.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::FullText::SortDirection - redis 0.9.0 + Redis::FullText::SortDirection - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -608,7 +713,7 @@

    - + search.cr @@ -683,6 +788,15 @@

    +

    Class methods inherited from struct Enum

    + + + + from_redis_graph_value(type : Redis::Graph::ValueType, value, cache) + from_redis_graph_value + + + @@ -756,7 +870,7 @@


    @@ -772,7 +886,7 @@


    diff --git a/docs/Redis/FullText/Summarize.html b/docs/Redis/FullText/Summarize.html index c5f2164..cfd19ed 100644 --- a/docs/Redis/FullText/Summarize.html +++ b/docs/Redis/FullText/Summarize.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::FullText::Summarize - redis 0.9.0 + Redis::FullText::Summarize - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -599,7 +704,7 @@

    - + search.cr @@ -741,7 +846,7 @@


    @@ -773,7 +878,7 @@


    @@ -789,7 +894,7 @@


    diff --git a/docs/Redis/Future.html b/docs/Redis/Future.html index 5773c20..d070b33 100644 --- a/docs/Redis/Future.html +++ b/docs/Redis/Future.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Future - redis 0.9.0 + Redis::Future - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -611,7 +716,7 @@

    - + pipeline.cr @@ -723,7 +828,7 @@


    @@ -739,7 +844,7 @@


    @@ -762,7 +867,7 @@


    diff --git a/docs/Redis/Future/NotResolved.html b/docs/Redis/Future/NotResolved.html index 5a3dcd9..484ba63 100644 --- a/docs/Redis/Future/NotResolved.html +++ b/docs/Redis/Future/NotResolved.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Future::NotResolved - redis 0.9.0 + Redis::Future::NotResolved - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -612,7 +717,7 @@

    - + pipeline.cr diff --git a/docs/Redis/Graph.html b/docs/Redis/Graph.html index 5aaa5f9..c515e9d 100644 --- a/docs/Redis/Graph.html +++ b/docs/Redis/Graph.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Graph - redis 0.9.0 + Redis::Graph - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -646,19 +751,54 @@

    - + graph.cr
    - + + graph/cache.cr + + +
    + + + + graph/node.cr + + +
    + + + + graph/relationship.cr + + +
    + + + graph/serializable.cr
    + + + graph/value.cr + + +
    + + + + graph/value_type.cr + + +
    + diff --git a/docs/Redis/Graph/Cache.html b/docs/Redis/Graph/Cache.html new file mode 100644 index 0000000..5d5b821 --- /dev/null +++ b/docs/Redis/Graph/Cache.html @@ -0,0 +1,1021 @@ + + + + + + + + + + + + + + + + + Redis::Graph::Cache - redis 0.10.0 + + + + + + + + + + +
    +

    + + class Redis::Graph::Cache + +

    + + + + + + + + + + + + + + + + + + + + +

    + + + + Defined in: +

    + + + + graph/cache.cr + + +
    + + + + + + +

    + + + + Constructors +

    + + + + + + + + +

    + + + + Instance Method Summary +

    + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + +

    + + + + Constructor Detail +

    + +
    +
    + + def self.new(redis : Redis::Commands, key : String) + + # +
    + +
    +
    + + [View source] + +
    +
    + + + + + + + + +

    + + + + Instance Method Detail +

    + +
    +
    + + def clear + + # +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def key : String + + # +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def label(label_id : Int64) : String + + # +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def labels + + # +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def properties + + # +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def property(property_id : Int64) : String + + # +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def redis : Commands + + # +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def refresh_properties : Nil + + # +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def relationship_types + + # +
    + +
    +
    + + [View source] + +
    +
    + + + +
    + + + diff --git a/docs/Redis/Graph/Client.html b/docs/Redis/Graph/Client.html index 4084186..32cfcce 100644 --- a/docs/Redis/Graph/Client.html +++ b/docs/Redis/Graph/Client.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Graph::Client(Runnable) - redis 0.9.0 + Redis::Graph::Client(Runnable) - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -599,7 +704,7 @@

    - + graph.cr @@ -621,7 +726,7 @@

    - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

  • +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -566,7 +671,7 @@

    - alias Redis::Graph::Property + annotation Redis::Graph::Field

    @@ -576,16 +681,6 @@

    -

    - - - - Alias Definition -

    - Redis::Value - @@ -607,8 +702,8 @@

    - - graph.cr + + graph/serializable.cr
    diff --git a/docs/Redis/Graph/TypedResult.html b/docs/Redis/Graph/Indices.html similarity index 69% rename from docs/Redis/Graph/TypedResult.html rename to docs/Redis/Graph/Indices.html index 924320d..27f0a15 100644 --- a/docs/Redis/Graph/TypedResult.html +++ b/docs/Redis/Graph/Indices.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Graph::TypedResult(T) - redis 0.9.0 + Redis::Graph::Indices(T) - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0
    @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -566,12 +671,12 @@

    - struct Redis::Graph::TypedResult(T) + struct Redis::Graph::Indices(T)

    - + @@ -580,20 +685,6 @@

    -

    - - - - Included Modules -

    -
      - -
    • Enumerable(T)
    • - -
    - @@ -613,8 +704,8 @@

    - - graph.cr + + graph/indices.cr
    @@ -624,6 +715,23 @@

    +

    + + + + Constructors +

    + + @@ -641,65 +749,27 @@

    - - - - - -

    - + - Instance Method Detail + Constructor Detail

    -
    +
    - def cached_execution? : Bool + def self.new(graph : Graph::Client(T)) - # + #
    -
    - -

    Indicates whether the query was cached by RedisGraph

    -
    -
    -
    -
    - - def duration : Time::Span - # -
    - -
    - -

    How long it took RedisGraph to execute the query on the server side.

    -
    - -
    -
    - - [View source] - -
    -
    - -
    -
    - - def each(&) - # -
    - -
    - -

    Iterate over each of the results, yielding a tuple containing instances -of the types in T.

    -
    - -
    -
    - - [View source] - -
    -
    - -
    -
    - - def fields : Array(String) - # -
    - -
    - -

    The names of the fields in a query's RETURN clause

    -
    - -
    -
    - - [View source] - -
    -
    + + + + +

    + + + + Instance Method Detail +

    -
    +
    - def labels_added : Int64 + def clone - # + #
    -
    - -

    How many labels were added in this query

    -
    -
    -
    +
    - def nodes_created : Int64 + def copy_with(graph _graph = @graph) - # + #
    -
    - -

    How many nodes were created in this query

    -
    -
    -
    +
    - def properties_set : Int64 + def create(label : String, property : String) - # + #
    -
    - -

    How many properties were set in this query

    -
    -
    -
    +
    - def relationships_created : Int64 + def create(label : String, properties : Enumerable(String)) - # + #
    -
    - -

    How many relationships were created in this query

    -
    -
    -
    +
    - def rows : Array(T) + def graph : Graph::Client(T) - # + #
    -
    - -

    The values of the fields in a query's RETURN clause

    -
    -
    - [View source] -
    diff --git a/docs/Redis/Graph/Serializable/Relationship.html b/docs/Redis/Graph/Indices/IndexAlreadyExists.html similarity index 73% rename from docs/Redis/Graph/Serializable/Relationship.html rename to docs/Redis/Graph/Indices/IndexAlreadyExists.html index 6502ea8..e10b830 100644 --- a/docs/Redis/Graph/Serializable/Relationship.html +++ b/docs/Redis/Graph/Indices/IndexAlreadyExists.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Graph::Serializable::Relationship - redis 0.9.0 + Redis::Graph::Indices::IndexAlreadyExists - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0
    @@ -242,16 +242,76 @@

    - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

  • +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -566,11 +671,13 @@

    - module Redis::Graph::Serializable::Relationship + class Redis::Graph::Indices::IndexAlreadyExists

    + + @@ -597,8 +704,8 @@

    - - graph/serializable.cr + + graph/indices.cr
    @@ -617,6 +724,81 @@

    + + + +

    Instance methods inherited from class Redis::Error

    + + + + ==(other : self) + ==, + + + + hash(hasher) + hash + + + + + + + + + + + + +

    Macros inherited from class Redis::Error

    + + + + define(type, code = (name.gsub(/\A.*::/, "")).upcase) + define + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    diff --git a/docs/Redis/Graph/List.html b/docs/Redis/Graph/List.html index ffa438d..e6d0da2 100644 --- a/docs/Redis/Graph/List.html +++ b/docs/Redis/Graph/List.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Graph::List - redis 0.9.0 + Redis::Graph::List - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0
    @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -584,7 +689,7 @@

    Alias Definition

    - Array(Array(Array(Redis::Value) | Int64 | Redis::Error | Redis::Graph::Node | Redis::Graph::Relationship | String | Nil) | Array(Redis::Value) | Int64 | Redis::Error | Redis::Graph::Node | Redis::Graph::Relationship | String | Nil) + Array(Redis::Graph::Value) @@ -607,8 +712,8 @@

    - - graph.cr + + graph/value.cr
    diff --git a/docs/Redis/Graph/Map.html b/docs/Redis/Graph/Map.html index 31a2b11..8153dce 100644 --- a/docs/Redis/Graph/Map.html +++ b/docs/Redis/Graph/Map.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Graph::Map - redis 0.9.0 + Redis::Graph::Map - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -584,7 +689,7 @@

    Alias Definition

    - Hash(String, Array(Redis::Value) | Int64 | Redis::Error | String | Nil) + Hash(String, Redis::Graph::Value) @@ -607,8 +712,8 @@

    - - graph.cr + + graph/value.cr
    diff --git a/docs/Redis/Graph/Node.html b/docs/Redis/Graph/Node.html index 38c7d64..ab834cf 100644 --- a/docs/Redis/Graph/Node.html +++ b/docs/Redis/Graph/Node.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Graph::Node - redis 0.9.0 + Redis::Graph::Node - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -619,8 +724,8 @@

    - - graph.cr + + graph/node.cr
    @@ -632,6 +737,28 @@

    +

    + + + + Class Method Summary +

    + + @@ -657,7 +784,7 @@

  • - #properties : Hash(String, Property) + #properties : Hash(String, Value)
  • @@ -711,6 +838,48 @@

    +

    + + + + Class Method Detail +

    + +
    +
    + + def self.from_redis_graph_value(type : ValueType, value, cache : Cache) + + # +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def self.matches_redis_graph_type?(type : Redis::Graph::ValueType) : Bool + + # +
    + +
    +
    + + [View source] + +
    +
    + + @@ -735,7 +904,7 @@


    @@ -751,23 +920,23 @@


    -
    +
    - def properties : Hash(String, Property) + def properties : Hash(String, Value) - # + #

    diff --git a/docs/Redis/Graph/Relationship.html b/docs/Redis/Graph/Relationship.html index efd389f..37a4788 100644 --- a/docs/Redis/Graph/Relationship.html +++ b/docs/Redis/Graph/Relationship.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Graph::Relationship - redis 0.9.0 + Redis::Graph::Relationship - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0
    @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

    -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -619,8 +724,8 @@

    - - graph.cr + + graph/relationship.cr
    @@ -630,7 +735,41 @@

    +

    + + + + Constructors +

    + + + +

    + + + + Class Method Summary +

    + @@ -661,7 +800,7 @@

  • - #properties : Hash(String, Property) + #properties : Hash(String, Value)

    The hash of properties for this relationship.

    @@ -729,7 +868,59 @@

    +

    + + + + Constructor Detail +

    + +
    +
    + + def self.new(id : Int64, type : String, src_node : Int64, dest_node : Int64, properties : Hash(String, Redis::Graph::Value)) + + # +
    + +
    +
    + + [View source] + +
    +
    + + + +

    + + + + Class Method Detail +

    + +
    +
    + + def self.matches_redis_graph_type?(type : Redis::Graph::ValueType) : Bool + + # +
    + +
    +
    + + [View source] + +
    +
    + @@ -762,7 +953,7 @@


    @@ -787,17 +978,17 @@


    -
    +
    - def properties : Hash(String, Property) + def properties : Hash(String, Value) - # + #
    @@ -813,7 +1004,7 @@


    @@ -836,7 +1027,7 @@


    @@ -858,7 +1049,7 @@


    diff --git a/docs/Redis/Graph/Result.html b/docs/Redis/Graph/ResultSet.html similarity index 63% rename from docs/Redis/Graph/Result.html rename to docs/Redis/Graph/ResultSet.html index 033cb34..cf01d7b 100644 --- a/docs/Redis/Graph/Result.html +++ b/docs/Redis/Graph/ResultSet.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Graph::Result - redis 0.9.0 + Redis::Graph::ResultSet(T) - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -566,26 +671,15 @@

    - struct Redis::Graph::Result + struct Redis::Graph::ResultSet(T)

    - - + -

    - - - - Overview -

    - -

    Parses the results of a Cypher query

    @@ -601,7 +695,7 @@

    @@ -624,7 +718,7 @@

    - + graph.cr @@ -646,12 +740,7 @@

    @@ -806,34 +947,18 @@

    Constructor Detail

    -
    -
    - - def self.new(raw : Array) - - # -
    - -
    -
    - - [View source] - -
    -
    - -
    +
    - def self.new(*, fields : Array(String), rows : Array(Array(Array(Array(Redis::Value) | Int64 | Redis::Error | Redis::Graph::Node | Redis::Graph::Relationship | String | Nil) | Array(Redis::Value) | Int64 | Redis::Error | Redis::Graph::Node | Redis::Graph::Relationship | String | Nil)), cached_execution : Bool, duration : Time::Span, labels_added : Int64, nodes_created : Int64, relationships_created : Int64, properties_set : Int64) + def self.new(*, fields : Array(String), rows : Array(T), cached_execution : Bool, duration : Time::Span, labels_added : Int64, labels_removed : Int64, nodes_created : Int64, nodes_deleted : Int64, relationships_created : Int64, relationships_deleted : Int64, properties_set : Int64, properties_removed : Int64, indices_created : Int64, indices_deleted : Int64) - # + #

    @@ -870,7 +995,7 @@


    @@ -891,7 +1016,7 @@


    @@ -907,7 +1032,7 @@

    - Description copied from module Enumerable(Array(Array(Array(Redis::Value) | Int64 | Redis::Error | Redis::Graph::Node | Redis::Graph::Relationship | String | Nil) | Array(Redis::Value) | Int64 | Redis::Error | Redis::Graph::Node | Redis::Graph::Relationship | String | Nil)) + Description copied from module Enumerable(T)

    Must yield this collection's elements to the block.

    @@ -916,7 +1041,29 @@


    - [View source] + [View source] + +
    +

    + +
    +
    + + def each_row(&) + + # +
    + +
    + +

    Iterate over each of the results, yielding a tuple containing instances +of the types in T.

    +
    + +
    +
    + + [View source]
    @@ -937,7 +1084,39 @@


    - [View source] + [View source] + +
    + + +
    +
    + + def indices_created : Int64 + + # +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def indices_deleted : Int64 + + # +
    + +
    +
    + + [View source]
    @@ -958,7 +1137,28 @@


    - [View source] + [View source] + +
    + + +
    +
    + + def labels_removed : Int64 + + # +
    + +
    + +

    How many labels were removed in this query

    +
    + +
    +
    + + [View source]
    @@ -979,7 +1179,49 @@


    - [View source] + [View source] + +
    + + +
    +
    + + def nodes_deleted : Int64 + + # +
    + +
    + +

    How many nodes were deleted in this query

    +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def properties_removed : Int64 + + # +
    + +
    + +

    How many properties were removed in this query

    +
    + +
    +
    + + [View source]
    @@ -1000,7 +1242,7 @@


    @@ -1021,17 +1263,38 @@


    -
    +
    - def rows : Array(List) + def relationships_deleted : Int64 - # + # +
    + +
    + +

    How many relationships were deleted in this query

    +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def rows : Array(T) + + #
    @@ -1042,7 +1305,33 @@


    - [View source] + [View source] + +
    +

    + +
    +
    + + def size + + # +
    + +
    + +
    + Description copied from module Enumerable(T) +
    + +

    Returns the number of elements in the collection.

    +
    [1, 2, 3, 4].size # => 4
    +
    + +
    +
    + + [View source]
    diff --git a/docs/Redis/Graph/ResultSet/Row.html b/docs/Redis/Graph/ResultSet/Row.html new file mode 100644 index 0000000..2bd3398 --- /dev/null +++ b/docs/Redis/Graph/ResultSet/Row.html @@ -0,0 +1,929 @@ + + + + + + + + + + + + + + + + + Redis::Graph::ResultSet::Row(T) - redis 0.10.0 + + + + + + + + + + +
    +

    + + struct Redis::Graph::ResultSet::Row(T) + +

    + + + + + + + + + + + + + + + + + + + + +

    + + + + Defined in: +

    + + + + graph.cr + + +
    + + + + + + +

    + + + + Constructors +

    + + + + + + + + +

    + + + + Instance Method Summary +

    + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + +

    + + + + Constructor Detail +

    + +
    +
    + + def self.new(data : T, field_map : Hash(String, Int32)) + + # +
    + +
    +
    + + [View source] + +
    +
    + + + + + + + + +

    + + + + Instance Method Detail +

    + +
    +
    + + def [](key : Int) + + # +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def [](key : String) + + # +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def data : T + + # +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def first + + # +
    + +
    +
    + + [View source] + +
    +
    + + + +
    + + + diff --git a/docs/Redis/Graph/Serializable.html b/docs/Redis/Graph/Serializable.html index cdbf276..b286fbb 100644 --- a/docs/Redis/Graph/Serializable.html +++ b/docs/Redis/Graph/Serializable.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Graph::Serializable - redis 0.9.0 + Redis::Graph::Serializable - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0
    @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -651,7 +756,7 @@

    - + graph/serializable.cr diff --git a/docs/Redis/Graph/Serializable/Node.html b/docs/Redis/Graph/Serializable/Node.html index 1377407..d2cec75 100644 --- a/docs/Redis/Graph/Serializable/Node.html +++ b/docs/Redis/Graph/Serializable/Node.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Graph::Serializable::Node - redis 0.9.0 + Redis::Graph::Serializable::Node - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -597,7 +702,7 @@

    - + graph/serializable.cr @@ -608,11 +713,62 @@

    +

    + + + + Constructors +

    + + + + +

    + + + + Class Method Summary +

    + +

    + + + + Instance Method Summary +

    + @@ -621,11 +777,89 @@

    +

    + + + + Constructor Detail +

    + +
    +
    + + def self.new(metadata : Redis::Graph::Serializable::Node::Metadata, properties : Array, cache) + # +
    + +
    +
    + + [View source] + +
    +
    + +

    + + + + Class Method Detail +

    + +
    +
    + + def self.from_redis_graph_value(node_type : T.class, value_type : Redis::Graph::ValueType, value, cache) : T forall T + + # +
    + +
    +
    + + [View source] + +
    +
    + + + + + + +

    + + + + Instance Method Detail +

    + +
    +
    + + def unknown_redis_graph_node_property(key, value) + # +
    + +
    +
    + + [View source] + +
    +
    + diff --git a/docs/Redis/Graph/Serializable/Node/Metadata.html b/docs/Redis/Graph/Serializable/Node/Metadata.html index c25149f..fcce16d 100644 --- a/docs/Redis/Graph/Serializable/Node/Metadata.html +++ b/docs/Redis/Graph/Serializable/Node/Metadata.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Graph::Serializable::Node::Metadata - redis 0.9.0 + Redis::Graph::Serializable::Node::Metadata - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -599,7 +704,7 @@

    - + graph/serializable.cr @@ -731,7 +836,7 @@


    @@ -763,7 +868,7 @@


    @@ -779,7 +884,7 @@


    diff --git a/docs/Redis/Graph/Serializable/Node/PropertyMissing.html b/docs/Redis/Graph/Serializable/Node/PropertyMissing.html new file mode 100644 index 0000000..0c21675 --- /dev/null +++ b/docs/Redis/Graph/Serializable/Node/PropertyMissing.html @@ -0,0 +1,816 @@ + + + + + + + + + + + + + + + + + Redis::Graph::Serializable::Node::PropertyMissing - redis 0.10.0 + + + + + + + + + + +
    +

    + + class Redis::Graph::Serializable::Node::PropertyMissing + +

    + + + + + + + + + + + + + + + + + + + + +

    + + + + Defined in: +

    + + + + graph/serializable.cr + + +
    + + + + + + + + + + + + + + +
    + + + +

    Instance methods inherited from class Redis::Error

    + + + + ==(other : self) + ==, + + + + hash(hasher) + hash + + + + + + + + + + + + +

    Macros inherited from class Redis::Error

    + + + + define(type, code = (name.gsub(/\A.*::/, "")).upcase) + define + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + +
    + + + diff --git a/docs/Redis/Graph/Serializable/Property.html b/docs/Redis/Graph/Serializable/Property.html index 10c5292..1e2276c 100644 --- a/docs/Redis/Graph/Serializable/Property.html +++ b/docs/Redis/Graph/Serializable/Property.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Graph::Serializable::Property - redis 0.9.0 + Redis::Graph::Serializable::Property - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -597,7 +702,7 @@

    - + graph/serializable.cr diff --git a/docs/Redis/Graph/UnexpectedValue.html b/docs/Redis/Graph/UnexpectedValue.html new file mode 100644 index 0000000..45e45c5 --- /dev/null +++ b/docs/Redis/Graph/UnexpectedValue.html @@ -0,0 +1,829 @@ + + + + + + + + + + + + + + + + + Redis::Graph::UnexpectedValue - redis 0.10.0 + + + + + + + + + + +
    +

    + + class Redis::Graph::UnexpectedValue + +

    + + + + + + + + + + + + + + + + + + + + +

    + + + + Defined in: +

    + + + + graph.cr + + +
    + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + +

    Instance methods inherited from class Redis::Error

    + + + + ==(other : self) + ==, + + + + hash(hasher) + hash + + + + + + + + + + + + +

    Macros inherited from class Redis::Error

    + + + + define(type, code = (name.gsub(/\A.*::/, "")).upcase) + define + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + +
    + + + diff --git a/docs/Redis/Graph/Value.html b/docs/Redis/Graph/Value.html index a842fd8..33f94d3 100644 --- a/docs/Redis/Graph/Value.html +++ b/docs/Redis/Graph/Value.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Graph::Value - redis 0.9.0 + Redis::Graph::Value - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -584,7 +689,7 @@

    Alias Definition

    - Array(Array(Array(Redis::Value) | Int64 | Redis::Error | Redis::Graph::Node | Redis::Graph::Relationship | String | Nil) | Array(Redis::Value) | Int64 | Redis::Error | Redis::Graph::Node | Redis::Graph::Relationship | String | Nil) | Array(Redis::Value) | Hash(String, Array(Redis::Value) | Int64 | Redis::Error | String | Nil) | Int64 | Redis::Error | Redis::Graph::Node | Redis::Graph::Relationship | String | Nil + Array(Redis::Graph::Value) | Bool | Float64 | Hash(String, Redis::Graph::Value) | Int64 | Redis::Graph::Node | Redis::Graph::Relationship | String | Nil @@ -607,8 +712,8 @@

    - - graph.cr + + graph/value.cr
    @@ -620,6 +725,23 @@

    +

    + + + + Class Method Summary +

    + + @@ -633,6 +755,32 @@

    +

    + + + + Class Method Detail +

    + +
    +
    + + def self.from_redis_graph_value(type : Redis::Graph::ValueType, value, cache) : Redis::Graph::Value + + # +
    + +
    +
    + + [View source] + +
    +
    + + diff --git a/docs/Redis/Graph/ValueType.html b/docs/Redis/Graph/ValueType.html new file mode 100644 index 0000000..777acaf --- /dev/null +++ b/docs/Redis/Graph/ValueType.html @@ -0,0 +1,1191 @@ + + + + + + + + + + + + + + + + + Redis::Graph::ValueType - redis 0.10.0 + + + + + + + + + + +
    +

    + + enum Redis::Graph::ValueType + +

    + + + + + + + + + + + + + + + + + + +

    + + + + Defined in: +

    + + + + graph/value_type.cr + + +
    + + + + + +

    + + + + Enum Members +

    + +
    + +
    + UNKNOWN = 0 +
    + + +
    + NULL = 1 +
    + + +
    + STRING = 2 +
    + + +
    + INTEGER = 3 +
    + + +
    + BOOLEAN = 4 +
    + + +
    + DOUBLE = 5 +
    + + +
    + ARRAY = 6 +
    + + +
    + EDGE = 7 +
    + + +
    + NODE = 8 +
    + + +
    + PATH = 9 +
    + + +
    + MAP = 10 +
    + + +
    + POINT = 11 +
    + + +
    + + + + + +

    + + + + Class Method Summary +

    + + + + + + +

    + + + + Instance Method Summary +

    + + + + +
    + + + + + + + + + +

    Class methods inherited from struct Enum

    + + + + from_redis_graph_value(type : Redis::Graph::ValueType, value, cache) + from_redis_graph_value + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +

    + + + + Class Method Detail +

    + +
    +
    + + def self.value_for(type, value, cache) : Value + + # +
    + +
    +
    + + [View source] + +
    +
    + + + + + + +

    + + + + Instance Method Detail +

    + +
    +
    + + def array? + + # +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def boolean? + + # +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def double? + + # +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def edge? + + # +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def integer? + + # +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def map? + + # +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def node? + + # +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def null? + + # +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def path? + + # +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def point? + + # +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def string? + + # +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def unknown? + + # +
    + +
    +
    + + [View source] + +
    +
    + + + +
    + + + diff --git a/docs/Redis/JSON.html b/docs/Redis/JSON.html index db5c731..357484b 100644 --- a/docs/Redis/JSON.html +++ b/docs/Redis/JSON.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::JSON(Runnable) - redis 0.9.0 + Redis::JSON(Runnable) - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -636,7 +741,7 @@

    - + json.cr @@ -882,7 +987,7 @@


    @@ -920,7 +1025,7 @@


    @@ -942,7 +1047,7 @@


    @@ -966,7 +1071,7 @@


    @@ -988,7 +1093,7 @@


    @@ -1011,7 +1116,7 @@


    @@ -1038,7 +1143,7 @@


    @@ -1061,7 +1166,7 @@


    @@ -1085,7 +1190,7 @@


    @@ -1111,7 +1216,7 @@


    @@ -1127,7 +1232,7 @@


    @@ -1143,7 +1248,7 @@


    @@ -1190,7 +1295,7 @@


    @@ -1214,7 +1319,7 @@


    @@ -1243,7 +1348,7 @@


    @@ -1264,7 +1369,7 @@


    @@ -1293,7 +1398,7 @@


    @@ -1325,7 +1430,7 @@


    @@ -1347,7 +1452,7 @@


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


    @@ -1399,7 +1504,7 @@


    diff --git a/docs/Redis/NoGroup.html b/docs/Redis/NoGroup.html index c0b055f..3649457 100644 --- a/docs/Redis/NoGroup.html +++ b/docs/Redis/NoGroup.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::NoGroup - redis 0.9.0 + Redis::NoGroup - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -599,7 +704,7 @@

    - + errors.cr diff --git a/docs/Redis/Parser.html b/docs/Redis/Parser.html index 7bd9a4f..5554830 100644 --- a/docs/Redis/Parser.html +++ b/docs/Redis/Parser.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Parser - redis 0.9.0 + Redis::Parser - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -599,7 +704,7 @@

    - + parser.cr @@ -732,7 +837,7 @@


    @@ -776,7 +881,7 @@


    @@ -797,7 +902,7 @@


    diff --git a/docs/Redis/Pipeline.html b/docs/Redis/Pipeline.html index 6265a96..965afa1 100644 --- a/docs/Redis/Pipeline.html +++ b/docs/Redis/Pipeline.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Pipeline - redis 0.9.0 + Redis::Pipeline - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -613,7 +718,7 @@

    - + pipeline.cr @@ -866,7 +971,12 @@

    Instance methods inherited from module unlink(keys : Enumerable(String))
    unlink(*keys : String)
    - unlink
    + unlink, + + + + wait(numreplicas replica_count : Int | String, timeout : Time::Span)
    wait(numreplicas replica_count : Int | String, timeout : Int | String)
    + wait
    @@ -891,8 +1001,8 @@

    Instance methods inherited from module - xadd(key : String, id : String, maxlen, data : Hash(String, String))
    xadd(key : String, id : String, data : Hash(String, String))
    xadd(key : String, id : String, maxlen = nil, **data)
    +
    + xadd(key : String, id : String, maxlen, data : ::Hash(String, String))
    xadd(key : String, id : String, data : ::Hash(String, String))
    xadd(key : String, id : String, maxlen = nil, **data)
    xadd
    , @@ -931,8 +1041,8 @@

    Instance methods inherited from module - xrange(key : String, start min, end max, count = nil) + + xrange(key : String, start min : String, end max : String, count : String | Int | Nil = nil) xrange, @@ -1087,6 +1197,11 @@

    Instance methods inherited from module + brpoplpush(source : String, destination : String, timeout : Time::Span)
    brpoplpush(source : String, destination : String, timeout : Int | String)
    + brpoplpush
    , + + llen(key : String) llen, @@ -1265,7 +1380,7 @@


    @@ -1303,7 +1418,7 @@


    @@ -1325,7 +1440,7 @@


    diff --git a/docs/Redis/ReplicationClient.html b/docs/Redis/ReplicationClient.html new file mode 100644 index 0000000..7b5bc8a --- /dev/null +++ b/docs/Redis/ReplicationClient.html @@ -0,0 +1,1760 @@ + + + + + + + + + + + + + + + + + Redis::ReplicationClient - redis 0.10.0 + + + + + + + + + + +
    +

    + + class Redis::ReplicationClient + +

    + + + + + + + +

    + + + + Overview +

    + +

    If you're using Redis replication, you can use ReplicationClient to send +read commands to replicas and reduce load on the primary. This can be important +when your Redis primary is CPU-bound.

    +

    The commands that will be routed to replicas are listed in +Redis::READ_ONLY_COMMANDS.

    +

    NOTE Redis replication does not provide consistency guarantees. Every +mechanism in Redis to improve consistency, such as +WAIT, is best-effort, +but not guaranteed. If you require strong consistency from Redis, stick to +using Redis::Client. if you require strong consistency but your Redis primary +is CPU-bound, you may need to either choose between consistency and performance +or move that workload out of Redis.

    +

    This client is useful for operations where strong consistency isn't typically +needed, such as caching, full-text search with Redis::FullText#search, +querying time-series data with Redis::TimeSeries#mrange, checking the current +state of larger data structures without blocking the primary, etc.

    +

    + +Explicitly routing commands to a primary or replica

    +

    This class provides #on_primary and #on_replica methods to ensure your +command is routed to the server type you want. This is useful in several +scenarios:

    +
      +
    • you want to ensure you retrieve a value that is consistent with the state of +the primary server — for example a value that changes frequently and you +need the canonical state for observability purposes
    • +
    • a read-only command is routed to a primary because this client does not yet +know about it + +
    • +
    +

    + +Topology changes

    +

    If the replication topology changes (for example, new replicas are added, +existing ones removed, or the primary failed over), ReplicationClient will +automatically pick up the changes. You can set how often it checks for these +changes with the #topology_ttl argument to the constructor or leave it at its +default of 10 seconds.

    +

    EXPERIMENTAL ReplicationClient is currently in alpha testing. There may be rough edges.

    + + + + + +

    + + + + Included Modules +

    + + + + + + + + + + + +

    + + + + Defined in: +

    + + + + replication_client.cr + + +
    + + + + + +

    + + + + Constant Summary +

    + +
    + +
    + Log = ::Log.for(self) +
    + + +
    + + + +

    + + + + Constructors +

    + + + + + + + + +

    + + + + Instance Method Summary +

    + + + + +
    + + + +

    Instance methods inherited from module Redis::Commands

    + + + + decr(key : String) + decr, + + + + decrby(key : String, amount : Int | String) + decrby, + + + + del(keys : Enumerable(String))
    del(*keys : String)
    + del
    , + + + + eval(script : String, keys : Enumerable(String) = EmptyEnumerable.new, args : Enumerable(String) = EmptyEnumerable.new) + eval, + + + + eval_ro(script : String, keys : Enumerable(String) = EmptyEnumerable.new, args : Enumerable(String) = EmptyEnumerable.new) + eval_ro, + + + + evalsha(sha : String, keys : Enumerable(String) = EmptyEnumerable.new, args : Enumerable(String) = EmptyEnumerable.new) + evalsha, + + + + evalsha_ro(script : String, keys : Enumerable(String) = EmptyEnumerable.new, args : Enumerable(String) = EmptyEnumerable.new) + evalsha_ro, + + + + exists(*keys : String) + exists, + + + + expire(key : String, ttl : Time::Span)
    expire(key : String, ttl : Int)
    + expire
    , + + + + expireat(key : String, at : Time) + expireat, + + + + flushall + flushall, + + + + flushdb + flushdb, + + + + ft + ft, + + + + get(key : String) + get, + + + + graph(key : String) + graph, + + + + incr(key : String) + incr, + + + + incrby(key : String, amount : Int | String) + incrby, + + + + info + info, + + + + json + json, + + + + keys(pattern = "*") + keys, + + + + mget(keys : Enumerable(String)) + mget, + + + + mset(data : Hash(String, String)) + mset, + + + + pexpire(key : String, ttl : Time::Span)
    pexpire(key : String, ttl : Int)
    + pexpire
    , + + + + pexpireat(key : String, at : Time) + pexpireat, + + + + pttl(key : String) + pttl, + + + + publish(channel : String, message : String) + publish, + + + + run(command) + run, + + + + scan(cursor : String = "0", match : String | Nil = nil, count : String | Int | Nil = nil, type : String | Nil = nil) + scan, + + + + script_exists(shas : Enumerable(String))
    script_exists(*shas : String)
    + script_exists
    , + + + + script_flush(mode : ScriptFlushMode) + script_flush, + + + + script_kill + script_kill, + + + + script_load(script : String) + script_load, + + + + set(key : String, value : String, ex : String | Int | Nil = nil, px : String | Int | Nil = nil, nx = false, xx = false, keepttl = false)
    set(key, value, ex : Time, nx = false, xx = false, keepttl = false)
    set(key, value, ex : Time::Span, nx = false, xx = false, keepttl = false)
    + set
    , + + + + ts + ts, + + + + ttl(key : String) + ttl, + + + + type(key : String) + type, + + + + unlink(keys : Enumerable(String))
    unlink(*keys : String)
    + unlink
    , + + + + wait(numreplicas replica_count : Int | String, timeout : Time::Span)
    wait(numreplicas replica_count : Int | String, timeout : Int | String)
    + wait
    + + + + + + + + + + + + + + + + +

    Instance methods inherited from module Redis::Commands::Stream

    + + + + xack(key : String, group : String, id : String)
    xack(key : String, group : String, ids : Enumerable(String))
    + xack
    , + + + + xadd(key : String, id : String, maxlen, data : ::Hash(String, String))
    xadd(key : String, id : String, data : ::Hash(String, String))
    xadd(key : String, id : String, maxlen = nil, **data)
    + xadd
    , + + + + xautoclaim(key : String, group : String, consumer : String, min_idle_time : Time::Span, start : String, count : Int | String | Nil = nil) + xautoclaim, + + + + xdel(key : String, ids : Enumerable(String))
    xdel(key : String, *ids : String)
    + xdel
    , + + + + xgroup(command : String, key : String, groupname : String)
    xgroup(command : XGroup, key : String, groupname : String, *, id : String | Nil = nil, mkstream = false, consumer_name : String | Nil = nil)
    xgroup(command : String, key : String, groupname : String, *args : String)
    + xgroup
    , + + + + xgroup_create(key : String, groupname : String, *, id : String = "$", mkstream = false) + xgroup_create, + + + + xgroup_create_consumer(key : String, groupname : String, consumer_name : String) + xgroup_create_consumer, + + + + xlen(key : String) + xlen, + + + + xpending(key : String, group : String, start : String, end finish : String, count : String | Int, idle : String | Time::Span | Nil = nil)
    xpending(key : String, group : String)
    + xpending
    , + + + + xrange(key : String, start min : String, end max : String, count : String | Int | Nil = nil) + xrange, + + + + xreadgroup(group : String, consumer : String, count : String | Int | Nil = nil, block : Time::Span | String | Int | Nil = nil, no_ack = false, streams : ::Hash(String, String) = {} of String => String)
    xreadgroup(group : String, consumer : String, count : String | Int | Nil = nil, block : Time::Span | String | Int | Nil = nil, no_ack = false, streams : NamedTuple = NamedTuple.new)
    + xreadgroup
    + + + + + + + + + + + + + + + + +

    Instance methods inherited from module Redis::Commands::SortedSet

    + + + + zadd(key : String, score : String | Int64, value : String)
    zadd(key : String, values : Enumerable(String))
    + zadd
    , + + + + zcard(key : String) + zcard, + + + + zcount(key : String, min : String, max : String) + zcount, + + + + zrange(key : String, starting : String | Int64, ending : String | Int64, with_scores : Bool = false) + zrange, + + + + zrangebyscore(key : String, low : String | Int64, high : String | Int64, limit : Enumerable(String) | Nil = nil) + zrangebyscore, + + + + zrem(key : String, value : String)
    zrem(key : String, values : Enumerable(String))
    zrem(key : String, *values : String)
    + zrem
    , + + + + zremrangebyrank(key : String, low : Int64, high : Int64) + zremrangebyrank, + + + + zremrangebyscore(key : String, low : String | Int64, high : String | Int64) + zremrangebyscore, + + + + zrevrange(key : String, starting : String | Int64, ending : String | Int64, with_scores : Bool = false) + zrevrange, + + + + zscore(key : String, value : String) + zscore + + + + + + + + + + + + + + + + +

    Instance methods inherited from module Redis::Commands::Set

    + + + + sadd(key : String, *values : String) + sadd, + + + + scard(key : String) + scard, + + + + sdiff(first : String, second : String) + sdiff, + + + + sinter(first : String, *others : String) + sinter, + + + + sismember(key : String, value : String) + sismember, + + + + smembers(key : String) + smembers, + + + + srem(key : String, members : Enumerable(String))
    srem(key : String, *values : String)
    + srem
    + + + + + + + + + + + + + + + + +

    Instance methods inherited from module Redis::Commands::List

    + + + + blpop(keys : Enumerable(String), timeout : Time::Span)
    blpop(*keys : String, timeout : Time::Span)
    blpop(*keys : String, timeout : Int | Float)
    blpop(*keys : String, timeout : String)
    + blpop
    , + + + + brpop(keys : Enumerable(String), timeout : Int)
    brpop(*keys : String, timeout : Time::Span)
    brpop(*keys : String, timeout : Number)
    brpop(*keys : String, timeout : String)
    + brpop
    , + + + + brpoplpush(source : String, destination : String, timeout : Time::Span)
    brpoplpush(source : String, destination : String, timeout : Int | String)
    + brpoplpush
    , + + + + llen(key : String) + llen, + + + + lmove(from source : String, to destination : String, from_side source_side : Side, to_side destination_side : Side) + lmove, + + + + lpop(key : String, count : String | Nil = nil) + lpop, + + + + lpush(key : String, values : Enumerable(String))
    lpush(key, *values : String)
    + lpush
    , + + + + lrange(key : String, start : String | Int, finish : String | Int) + lrange, + + + + lrem(key : String, count : Int, value : String) + lrem, + + + + ltrim(key : String, start : String | Int, stop : String | Int)
    ltrim(key : String, range : Range(String, String))
    ltrim(key : String, range : Range(Int32, Int32))
    + ltrim
    , + + + + rpop(key : String) + rpop, + + + + rpoplpush(source : String, destination : String) + rpoplpush, + + + + rpush(key : String, values : Enumerable(String))
    rpush(key, *values : String)
    + rpush
    + + + + + + + + + + + + + + + + +

    Instance methods inherited from module Redis::Commands::Hash

    + + + + hdel(key : String, fields : Enumerable(String))
    hdel(key : String, *fields : String)
    + hdel
    , + + + + hget(key : String, field : String) + hget, + + + + hgetall(key : String) + hgetall, + + + + hincrby(key : String, field : String, increment : Int | String) + hincrby, + + + + hmget(key : String, fields : Enumerable(String))
    hmget(key : String, *fields : String)
    + hmget
    , + + + + hmset(key : String, data : ::Hash(String, String)) + hmset, + + + + hscan(key : String, cursor : String, *, match pattern : String | Nil = nil, count : String | Int | Nil = nil) + hscan, + + + + hset(key : String, fields : Enumerable(String))
    hset(key : String, fields : ::Hash(String, String))
    hset(key : String, *fields : String)
    hset(key : String, **fields : String)
    + hset
    , + + + + hsetnx(key : String, field : String, value : String) + hsetnx + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + +

    + + + + Constructor Detail +

    + +
    +
    + + def self.new(entrypoint : URI, topology_ttl : Time::Span = 10.seconds) + + # +
    + +
    + +

    Have the ReplicationClient discover the master and replicas on its own +when given the URI of a single entrypoint. The cluster topology will be +refreshed with a max staleness of #topology_ttl.

    +
    redis = Redis::ReplicationClient.new(
    +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def self.new(master_uri : URI, replica_uris : Array(URI), topology_ttl : Time::Span = 10.seconds) + + # +
    + +
    + +

    Initialize the client with known master and replica URIs, keeping the +toplogy up to date with at most #topology_ttl staleness. If you don't wish +to keep the replication topology up to date, you can simply set +#topology_ttl to 0.seconds.

    +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def self.new + + # +
    + +
    +
    + + [View source] + +
    +
    + + + + + + + + +

    + + + + Instance Method Detail +

    + +
    +
    + + def close + + # +
    + +
    + +

    Close all connections to both the primary and all replicas.

    +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def closed? : Bool + + # +
    + +
    + +

    Returns true if this ReplicationClient has been explicitly closed, +false otherwise.

    +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def on_master(&) + + # +
    + +
    + +

    Alias of #on_primary.

    +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def on_primary(&) + + # +
    + +
    + +

    Route one or more commands to the primary to avoid consistency issues arising +from replication latency.

    +
    require "redis/replication_client"
    +
    +redis = Redis::ReplicationClient.new
    +
    +redis.incr "counter"
    +value = redis.on_primary &.get("counter")
    +

    This is useful for pipelining commands or executing transactions:

    +
    redis.on_primary &.transaction do |txn|
    +  txn.incr "counter:#{queue}"
    +  txn.sadd "queues", queue
    +  txn.lpush "queue:#{queue}", job_data
    +end
    +

    … which is shorthand for this and removes the need for nesting blocks:

    +
    redis.on_primary do |primary|
    +  primary.transaction do |txn|
    +    txn.incr "counter:#{queue}"
    +    txn.sadd "queues", queue
    +    txn.lpush "queue:#{queue}", job_data
    +  end
    +end
    +

    If you need to route many commands to the primary without necessarily +pipelining or opening transactions, you can omit the &.transaction and +call methods directly on the primary's Redis::Client in the block:

    +
    redis.on_primary do |primary|
    +  counter = primary.incr "counter:#{queue}"
    +  primary.sadd "queues", queue
    +end
    +

    NOTE The object yielded to the block is a Redis::Client, but if you try +to use it outside the block you may run into errors because the replication +topology could change, in which case this Redis::Client might not be the +primary anymore.

    +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def on_replica(&) + + # +
    + +
    + +

    Route one or more commands to replicas. This should rarely be necessary since +read-only commands (which can only be executed on replicas) are automatically +routed to replicas, but if it's a command this shard does not know about (see +Redis::READ_ONLY_COMMANDS) this may be necessary. Alternatively, you can +shovel additional commands into Redis::READ_ONLY_COMMANDS to avoid having to +perform this explicit routing.

    +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def run(command full_command) + + # +
    + +
    + +
    + Description copied from module Redis::Commands +
    + +

    Execute the given command and return the result from the server. Commands +must be an Enumerable and its size method must be re-entrant.

    +
    run({"set", "foo", "bar"})
    +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def topology_ttl : Time::Span + + # +
    + +
    +
    + + [View source] + +
    +
    + + + +
    + + + diff --git a/docs/Redis/Graph/ResultValue.html b/docs/Redis/ReplicationClient/Info.html similarity index 78% rename from docs/Redis/Graph/ResultValue.html rename to docs/Redis/ReplicationClient/Info.html index 8035a47..1b7880b 100644 --- a/docs/Redis/Graph/ResultValue.html +++ b/docs/Redis/ReplicationClient/Info.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Graph::ResultValue - redis 0.9.0 + Redis::ReplicationClient::Info - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -237,21 +237,81 @@

  • -
  • +
  • Graph @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -566,7 +671,7 @@

    - alias Redis::Graph::ResultValue + module Redis::ReplicationClient::Info

    @@ -576,16 +681,6 @@

    -

    - - - - Alias Definition -

    - Array(Redis::Value) | Int64 | Redis::Error | Redis::Graph::Node | Redis::Graph::Relationship | String | Nil - @@ -607,8 +702,8 @@

    - - graph.cr + + replication_client.cr
    diff --git a/docs/Redis/ReplicationClient/Info/Replica.html b/docs/Redis/ReplicationClient/Info/Replica.html new file mode 100644 index 0000000..1373da6 --- /dev/null +++ b/docs/Redis/ReplicationClient/Info/Replica.html @@ -0,0 +1,971 @@ + + + + + + + + + + + + + + + + + Redis::ReplicationClient::Info::Replica - redis 0.10.0 + + + + + + + + + + +
    +

    + + struct Redis::ReplicationClient::Info::Replica + +

    + + + + + + + + + + + + + + + + + + + + +

    + + + + Defined in: +

    + + + + replication_client.cr + + +
    + + + + + + +

    + + + + Constructors +

    + + + + + + + + +

    + + + + Instance Method Summary +

    + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + +

    + + + + Constructor Detail +

    + +
    +
    + + def self.new(ip : String, port : Int32, state : Redis::ReplicationClient::Info::Replica::State, lag : Time::Span) + + # +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def self.new(text : String) + + # +
    + +
    +
    + + [View source] + +
    +
    + + + + + + + + +

    + + + + Instance Method Detail +

    + +
    +
    + + def ==(other : self) + + # +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def ip : String + + # +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def lag : Time::Span + + # +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def port : Int32 + + # +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def state : State + + # +
    + +
    +
    + + [View source] + +
    +
    + + + +
    + + + diff --git a/docs/Redis/ReplicationClient/Info/Replica/State.html b/docs/Redis/ReplicationClient/Info/Replica/State.html new file mode 100644 index 0000000..d43067f --- /dev/null +++ b/docs/Redis/ReplicationClient/Info/Replica/State.html @@ -0,0 +1,862 @@ + + + + + + + + + + + + + + + + + Redis::ReplicationClient::Info::Replica::State - redis 0.10.0 + + + + + + + + + + +
    +

    + + enum Redis::ReplicationClient::Info::Replica::State + +

    + + + + + + + + + + + + + + + + + + +

    + + + + Defined in: +

    + + + + replication_client.cr + + +
    + + + + + +

    + + + + Enum Members +

    + +
    + +
    + StableSync = 0 +
    + + +
    + + + + + + + + + +

    + + + + Instance Method Summary +

    + + + + +
    + + + + + + + + + +

    Class methods inherited from struct Enum

    + + + + from_redis_graph_value(type : Redis::Graph::ValueType, value, cache) + from_redis_graph_value + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + +

    + + + + Instance Method Detail +

    + +
    +
    + + def stable_sync? + + # +
    + +
    +
    + + [View source] + +
    +
    + + + +
    + + + diff --git a/docs/Redis/ReplicationClient/Info/Replication.html b/docs/Redis/ReplicationClient/Info/Replication.html new file mode 100644 index 0000000..b3fec0a --- /dev/null +++ b/docs/Redis/ReplicationClient/Info/Replication.html @@ -0,0 +1,1034 @@ + + + + + + + + + + + + + + + + + Redis::ReplicationClient::Info::Replication - redis 0.10.0 + + + + + + + + + + +
    +

    + + struct Redis::ReplicationClient::Info::Replication + +

    + + + + + + + + + + + + + + + + + + + + +

    + + + + Defined in: +

    + + + + replication_client.cr + + +
    + + + + + + +

    + + + + Constructors +

    + + + + + + + + +

    + + + + Instance Method Summary +

    + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + +

    + + + + Constructor Detail +

    + +
    +
    + + def self.new(text : String) + + # +
    + +
    +
    + + [View source] + +
    +
    + + + + + + + + +

    + + + + Instance Method Detail +

    + +
    +
    + + def connected_replicas : Int32 + + # +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def master_host : String | Nil + + # +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def master_last_io : Time | Nil + + # +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def master_link_status : String | Nil + + # +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def master_port : Int32 | Nil + + # +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def master_replid : String | Nil + + # +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def master_sync_in_progress? : Bool | Nil + + # +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def replicas : Array(Info::Replica) + + # +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def role : Role + + # +
    + +
    +
    + + [View source] + +
    +
    + + + +
    + + + diff --git a/docs/Redis/Graph/Serializable/Relationship/Metadata.html b/docs/Redis/ReplicationClient/Info/Replication/Role.html similarity index 73% rename from docs/Redis/Graph/Serializable/Relationship/Metadata.html rename to docs/Redis/ReplicationClient/Info/Replication/Role.html index f4c9772..256bd2a 100644 --- a/docs/Redis/Graph/Serializable/Relationship/Metadata.html +++ b/docs/Redis/ReplicationClient/Info/Replication/Role.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Graph::Serializable::Relationship::Metadata - redis 0.9.0 + Redis::ReplicationClient::Info::Replication::Role - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0
    @@ -237,21 +237,81 @@

  • -
  • +
  • Graph - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -566,13 +671,11 @@

    - struct Redis::Graph::Serializable::Relationship::Metadata + enum Redis::ReplicationClient::Info::Replication::Role

    - - @@ -599,8 +702,8 @@

    - - graph/serializable.cr + + replication_client.cr
    @@ -608,24 +711,31 @@

    - - -

    - + +

    + - Constructors -

    -
      + Enum Members +

    + +
    -
  • - .new(id : Int64, type : String, source_node : Int64, destination_node : Int64) - -
  • +
    + Master = 0 +
    + - +
    + Replica = 1 +
    + + +
    + + @@ -644,32 +754,12 @@

    + -

    - - - - Constructor Detail -

    - -
    -
    - - def self.new(id : Int64, type : String, source_node : Int64, destination_node : Int64) + + + + + + + + - # -
    - -
    -
    - - [View source] - -
    -
    + + @@ -762,90 +848,34 @@

    Instance Method Detail

    -
    +
    - def clone + def master? - # + #

    -
    +
    - def copy_with(id _id = @id, type _type = @type, source_node _source_node = @source_node, destination_node _destination_node = @destination_node) + def replica? - # + #

    - [View source] - -
    -
    - -
    -
    - - def destination_node : Int64 - - # -
    - -
    -
    - -
    -
    - -
    -
    - - def id : Int64 - - # -
    - -
    -
    - -
    -
    - -
    -
    - - def source_node : Int64 - - # -
    - -
    -
    - -
    -
    - -
    -
    - - def type : String - - # -
    - -
    -
    diff --git a/docs/Redis/Streaming.html b/docs/Redis/Streaming.html index 99f9372..8ee1f78 100644 --- a/docs/Redis/Streaming.html +++ b/docs/Redis/Streaming.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Streaming - redis 0.9.0 + Redis::Streaming - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0
    @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -597,7 +702,7 @@

    - + streaming.cr diff --git a/docs/Redis/Streaming/Message.html b/docs/Redis/Streaming/Message.html index a7fe878..00d0024 100644 --- a/docs/Redis/Streaming/Message.html +++ b/docs/Redis/Streaming/Message.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Streaming::Message - redis 0.9.0 + Redis::Streaming::Message - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -599,7 +704,7 @@

    - + streaming.cr @@ -721,7 +826,7 @@


    @@ -753,7 +858,7 @@


    @@ -769,7 +874,7 @@


    diff --git a/docs/Redis/Streaming/XAutoClaimResponse.html b/docs/Redis/Streaming/XAutoClaimResponse.html index 0d13bd5..6371bbe 100644 --- a/docs/Redis/Streaming/XAutoClaimResponse.html +++ b/docs/Redis/Streaming/XAutoClaimResponse.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Streaming::XAutoClaimResponse - redis 0.9.0 + Redis::Streaming::XAutoClaimResponse - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -599,7 +704,7 @@

    - + streaming.cr @@ -721,7 +826,7 @@


    @@ -753,7 +858,7 @@


    @@ -769,7 +874,7 @@


    diff --git a/docs/Redis/Streaming/XPendingBaseResponse.html b/docs/Redis/Streaming/XPendingBaseResponse.html index db37cd1..a8941a9 100644 --- a/docs/Redis/Streaming/XPendingBaseResponse.html +++ b/docs/Redis/Streaming/XPendingBaseResponse.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Streaming::XPendingBaseResponse - redis 0.9.0 + Redis::Streaming::XPendingBaseResponse - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -599,7 +704,7 @@

    - + streaming.cr @@ -731,7 +836,7 @@


    @@ -763,7 +868,7 @@


    @@ -779,7 +884,7 @@


    @@ -795,7 +900,7 @@


    @@ -811,7 +916,7 @@


    diff --git a/docs/Redis/Streaming/XPendingBaseResponse/Data.html b/docs/Redis/Streaming/XPendingBaseResponse/Data.html index f4d9ed6..fcb4725 100644 --- a/docs/Redis/Streaming/XPendingBaseResponse/Data.html +++ b/docs/Redis/Streaming/XPendingBaseResponse/Data.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Streaming::XPendingBaseResponse::Data - redis 0.9.0 + Redis::Streaming::XPendingBaseResponse::Data - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -599,7 +704,7 @@

    - + streaming.cr @@ -731,7 +836,7 @@


    @@ -763,7 +868,7 @@


    @@ -793,7 +898,7 @@


    diff --git a/docs/Redis/Streaming/XPendingExtendedResponse.html b/docs/Redis/Streaming/XPendingExtendedResponse.html index 21c9e0b..a3368b0 100644 --- a/docs/Redis/Streaming/XPendingExtendedResponse.html +++ b/docs/Redis/Streaming/XPendingExtendedResponse.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Streaming::XPendingExtendedResponse - redis 0.9.0 + Redis::Streaming::XPendingExtendedResponse - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -599,7 +704,7 @@

    - + streaming.cr @@ -716,7 +821,7 @@


    @@ -748,7 +853,7 @@


    diff --git a/docs/Redis/Streaming/XPendingExtendedResponse/MessageData.html b/docs/Redis/Streaming/XPendingExtendedResponse/MessageData.html index 5625bb5..58b8fd8 100644 --- a/docs/Redis/Streaming/XPendingExtendedResponse/MessageData.html +++ b/docs/Redis/Streaming/XPendingExtendedResponse/MessageData.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Streaming::XPendingExtendedResponse::MessageData - redis 0.9.0 + Redis::Streaming::XPendingExtendedResponse::MessageData - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -599,7 +704,7 @@

    - + streaming.cr @@ -736,7 +841,7 @@


    @@ -768,7 +873,7 @@


    @@ -784,7 +889,7 @@


    @@ -800,7 +905,7 @@


    @@ -816,7 +921,7 @@


    @@ -832,7 +937,7 @@


    diff --git a/docs/Redis/Streaming/XReadGroupResponse.html b/docs/Redis/Streaming/XReadGroupResponse.html index 47fac49..f1e6c13 100644 --- a/docs/Redis/Streaming/XReadGroupResponse.html +++ b/docs/Redis/Streaming/XReadGroupResponse.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Streaming::XReadGroupResponse - redis 0.9.0 + Redis::Streaming::XReadGroupResponse - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -599,7 +704,7 @@

    - + streaming.cr @@ -716,7 +821,7 @@


    @@ -748,7 +853,7 @@


    diff --git a/docs/Redis/Streaming/XReadGroupResponse/Result.html b/docs/Redis/Streaming/XReadGroupResponse/Result.html index 4de5221..30392f2 100644 --- a/docs/Redis/Streaming/XReadGroupResponse/Result.html +++ b/docs/Redis/Streaming/XReadGroupResponse/Result.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Streaming::XReadGroupResponse::Result - redis 0.9.0 + Redis::Streaming::XReadGroupResponse::Result - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -599,7 +704,7 @@

    - + streaming.cr @@ -721,7 +826,7 @@


    @@ -753,7 +858,7 @@


    @@ -769,7 +874,7 @@


    diff --git a/docs/Redis/Subscription.html b/docs/Redis/Subscription.html index cd4d12f..ce76cdc 100644 --- a/docs/Redis/Subscription.html +++ b/docs/Redis/Subscription.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Subscription - redis 0.9.0 + Redis::Subscription - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -637,7 +742,7 @@

    - + connection.cr @@ -751,7 +856,7 @@


    @@ -775,7 +880,7 @@


    @@ -797,7 +902,7 @@


    @@ -819,7 +924,7 @@


    diff --git a/docs/Redis/Subscription/InvalidMessage.html b/docs/Redis/Subscription/InvalidMessage.html index a85dde8..a2252cd 100644 --- a/docs/Redis/Subscription/InvalidMessage.html +++ b/docs/Redis/Subscription/InvalidMessage.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Subscription::InvalidMessage - redis 0.9.0 + Redis::Subscription::InvalidMessage - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -599,7 +704,7 @@

    - + connection.cr diff --git a/docs/Redis/TimeSeries.html b/docs/Redis/TimeSeries.html index d1805a3..55fdd1c 100644 --- a/docs/Redis/TimeSeries.html +++ b/docs/Redis/TimeSeries.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::TimeSeries(Runnable) - redis 0.9.0 + Redis::TimeSeries(Runnable) - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -614,7 +719,7 @@

    - + time_series.cr @@ -765,7 +870,7 @@


    @@ -781,7 +886,7 @@


    @@ -797,7 +902,7 @@


    @@ -813,7 +918,7 @@


    @@ -829,7 +934,7 @@


    @@ -845,7 +950,7 @@


    @@ -861,7 +966,7 @@


    @@ -877,7 +982,7 @@


    @@ -893,7 +998,7 @@


    @@ -909,7 +1014,7 @@


    diff --git a/docs/Redis/TimeSeries/Aggregation.html b/docs/Redis/TimeSeries/Aggregation.html index 61bfa93..851fd85 100644 --- a/docs/Redis/TimeSeries/Aggregation.html +++ b/docs/Redis/TimeSeries/Aggregation.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::TimeSeries::Aggregation - redis 0.9.0 + Redis::TimeSeries::Aggregation - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -599,7 +704,7 @@

    - + time_series.cr @@ -746,7 +851,7 @@


    @@ -834,7 +939,7 @@


    @@ -850,7 +955,7 @@


    diff --git a/docs/Redis/TimeSeries/AggregationType.html b/docs/Redis/TimeSeries/AggregationType.html index ca4041f..3375200 100644 --- a/docs/Redis/TimeSeries/AggregationType.html +++ b/docs/Redis/TimeSeries/AggregationType.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::TimeSeries::AggregationType - redis 0.9.0 + Redis::TimeSeries::AggregationType - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -597,7 +702,7 @@

    - + time_series.cr @@ -772,6 +877,15 @@

    +

    Class methods inherited from struct Enum

    + + + + from_redis_graph_value(type : Redis::Graph::ValueType, value, cache) + from_redis_graph_value + + + @@ -845,7 +959,7 @@


    @@ -861,7 +975,7 @@


    @@ -877,7 +991,7 @@


    @@ -893,7 +1007,7 @@


    @@ -909,7 +1023,7 @@


    @@ -925,7 +1039,7 @@


    @@ -941,7 +1055,7 @@


    @@ -957,7 +1071,7 @@


    @@ -973,7 +1087,7 @@


    @@ -989,7 +1103,7 @@


    @@ -1005,7 +1119,7 @@


    @@ -1021,7 +1135,7 @@


    diff --git a/docs/Redis/TimeSeries/Alignment.html b/docs/Redis/TimeSeries/Alignment.html index 66f5d08..32d0d63 100644 --- a/docs/Redis/TimeSeries/Alignment.html +++ b/docs/Redis/TimeSeries/Alignment.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::TimeSeries::Alignment - redis 0.9.0 + Redis::TimeSeries::Alignment - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -597,7 +702,7 @@

    - + time_series.cr @@ -672,6 +777,15 @@

    +

    Class methods inherited from struct Enum

    + + + + from_redis_graph_value(type : Redis::Graph::ValueType, value, cache) + from_redis_graph_value + + + @@ -745,7 +859,7 @@


    @@ -761,7 +875,7 @@


    diff --git a/docs/Redis/TimeSeries/BucketTimestamp.html b/docs/Redis/TimeSeries/BucketTimestamp.html index 1b6ddef..9c70a2b 100644 --- a/docs/Redis/TimeSeries/BucketTimestamp.html +++ b/docs/Redis/TimeSeries/BucketTimestamp.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::TimeSeries::BucketTimestamp - redis 0.9.0 + Redis::TimeSeries::BucketTimestamp - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -597,7 +702,7 @@

    - + time_series.cr @@ -618,8 +723,8 @@

    -
    - HIGH = 0 +
    + START = 0
    @@ -628,8 +733,8 @@

    -
    - LOW = 2 +
    + END = 2
    @@ -654,17 +759,17 @@

    - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

  • +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -599,7 +704,7 @@

    - + time_series.cr @@ -731,7 +836,7 @@


    @@ -763,7 +868,7 @@


    @@ -779,7 +884,7 @@


    diff --git a/docs/Redis/TimeSeries/Datapoints.html b/docs/Redis/TimeSeries/Datapoints.html index 8aba0f2..3d0f38f 100644 --- a/docs/Redis/TimeSeries/Datapoints.html +++ b/docs/Redis/TimeSeries/Datapoints.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::TimeSeries::Datapoints - redis 0.9.0 + Redis::TimeSeries::Datapoints - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -613,7 +718,7 @@

    - + time_series.cr @@ -770,7 +875,7 @@


    @@ -802,7 +907,7 @@


    @@ -818,7 +923,7 @@


    @@ -834,7 +939,7 @@


    @@ -873,7 +978,7 @@


    diff --git a/docs/Redis/TimeSeries/DuplicatePolicy.html b/docs/Redis/TimeSeries/DuplicatePolicy.html index 3c5e7c9..65e7e33 100644 --- a/docs/Redis/TimeSeries/DuplicatePolicy.html +++ b/docs/Redis/TimeSeries/DuplicatePolicy.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::TimeSeries::DuplicatePolicy - redis 0.9.0 + Redis::TimeSeries::DuplicatePolicy - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -597,7 +702,7 @@

    - + time_series.cr @@ -738,6 +843,15 @@

    +

    Class methods inherited from struct Enum

    + + + + from_redis_graph_value(type : Redis::Graph::ValueType, value, cache) + from_redis_graph_value + + + @@ -811,7 +925,7 @@


    @@ -827,7 +941,7 @@


    @@ -843,7 +957,7 @@


    @@ -859,7 +973,7 @@


    @@ -875,7 +989,7 @@


    @@ -891,7 +1005,7 @@


    diff --git a/docs/Redis/TimeSeries/Encoding.html b/docs/Redis/TimeSeries/Encoding.html index 23682f9..25bac07 100644 --- a/docs/Redis/TimeSeries/Encoding.html +++ b/docs/Redis/TimeSeries/Encoding.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::TimeSeries::Encoding - redis 0.9.0 + Redis::TimeSeries::Encoding - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -597,7 +702,7 @@

    - + time_series.cr @@ -672,6 +777,15 @@

    +

    Class methods inherited from struct Enum

    + + + + from_redis_graph_value(type : Redis::Graph::ValueType, value, cache) + from_redis_graph_value + + + @@ -745,7 +859,7 @@


    @@ -761,7 +875,7 @@


    diff --git a/docs/Redis/TimeSeries/Labels.html b/docs/Redis/TimeSeries/Labels.html index 5a9acd1..63ae012 100644 --- a/docs/Redis/TimeSeries/Labels.html +++ b/docs/Redis/TimeSeries/Labels.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::TimeSeries::Labels - redis 0.9.0 + Redis::TimeSeries::Labels - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -607,7 +712,7 @@

    - + time_series.cr diff --git a/docs/Redis/TimeSeries/MRangeResponse.html b/docs/Redis/TimeSeries/MRangeResponse.html index f165296..3455590 100644 --- a/docs/Redis/TimeSeries/MRangeResponse.html +++ b/docs/Redis/TimeSeries/MRangeResponse.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::TimeSeries::MRangeResponse - redis 0.9.0 + Redis::TimeSeries::MRangeResponse - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -613,7 +718,7 @@

    - + time_series.cr @@ -760,7 +865,7 @@


    @@ -792,7 +897,7 @@


    @@ -808,7 +913,7 @@


    @@ -824,7 +929,7 @@


    @@ -849,7 +954,7 @@


    diff --git a/docs/Redis/TimeSeries/MRangeResponse/DatapointMap.html b/docs/Redis/TimeSeries/MRangeResponse/DatapointMap.html index ed0e5f4..8d10d7d 100644 --- a/docs/Redis/TimeSeries/MRangeResponse/DatapointMap.html +++ b/docs/Redis/TimeSeries/MRangeResponse/DatapointMap.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::TimeSeries::MRangeResponse::DatapointMap - redis 0.9.0 + Redis::TimeSeries::MRangeResponse::DatapointMap - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -607,7 +712,7 @@

    - + time_series.cr diff --git a/docs/Redis/TimeSeries/Range.html b/docs/Redis/TimeSeries/Range.html index 8ae30ab..e18e772 100644 --- a/docs/Redis/TimeSeries/Range.html +++ b/docs/Redis/TimeSeries/Range.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::TimeSeries::Range - redis 0.9.0 + Redis::TimeSeries::Range - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -599,7 +704,7 @@

    - + time_series.cr @@ -699,7 +804,7 @@


    diff --git a/docs/Redis/TimeSeries/RangeOptions.html b/docs/Redis/TimeSeries/RangeOptions.html index 8d54c74..8e6cbe8 100644 --- a/docs/Redis/TimeSeries/RangeOptions.html +++ b/docs/Redis/TimeSeries/RangeOptions.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::TimeSeries::RangeOptions - redis 0.9.0 + Redis::TimeSeries::RangeOptions - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -599,7 +704,7 @@

    - + time_series.cr @@ -697,7 +802,7 @@


    @@ -713,7 +818,7 @@


    diff --git a/docs/Redis/TimeSeries/RangeOptions/Aggregation.html b/docs/Redis/TimeSeries/RangeOptions/Aggregation.html index 943bf9b..b060cd5 100644 --- a/docs/Redis/TimeSeries/RangeOptions/Aggregation.html +++ b/docs/Redis/TimeSeries/RangeOptions/Aggregation.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::TimeSeries::RangeOptions::Aggregation - redis 0.9.0 + Redis::TimeSeries::RangeOptions::Aggregation - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -599,7 +704,7 @@

    - + time_series.cr @@ -731,7 +836,7 @@


    @@ -763,7 +868,7 @@


    @@ -779,7 +884,7 @@


    diff --git a/docs/Redis/Transaction.html b/docs/Redis/Transaction.html index 1ba2935..a337a2c 100644 --- a/docs/Redis/Transaction.html +++ b/docs/Redis/Transaction.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Transaction - redis 0.9.0 + Redis::Transaction - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -613,7 +718,7 @@

    - + transaction.cr @@ -877,7 +982,12 @@

    Instance methods inherited from module unlink(keys : Enumerable(String))
    unlink(*keys : String)
    - unlink
    + unlink, + + + + wait(numreplicas replica_count : Int | String, timeout : Time::Span)
    wait(numreplicas replica_count : Int | String, timeout : Int | String)
    + wait
    @@ -902,8 +1012,8 @@

    Instance methods inherited from module - xadd(key : String, id : String, maxlen, data : Hash(String, String))
    xadd(key : String, id : String, data : Hash(String, String))
    xadd(key : String, id : String, maxlen = nil, **data)
    +
    + xadd(key : String, id : String, maxlen, data : ::Hash(String, String))
    xadd(key : String, id : String, data : ::Hash(String, String))
    xadd(key : String, id : String, maxlen = nil, **data)
    xadd
    , @@ -942,8 +1052,8 @@

    Instance methods inherited from module - xrange(key : String, start min, end max, count = nil) + + xrange(key : String, start min : String, end max : String, count : String | Int | Nil = nil) xrange, @@ -1098,6 +1208,11 @@

    Instance methods inherited from module + brpoplpush(source : String, destination : String, timeout : Time::Span)
    brpoplpush(source : String, destination : String, timeout : Int | String)
    + brpoplpush
    , + + llen(key : String) llen, @@ -1271,7 +1386,7 @@


    @@ -1303,7 +1418,7 @@


    @@ -1319,7 +1434,7 @@


    @@ -1335,7 +1450,7 @@


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


    @@ -1378,7 +1493,7 @@


    diff --git a/docs/Redis/Value.html b/docs/Redis/Value.html index 5dfd70d..3e903d0 100644 --- a/docs/Redis/Value.html +++ b/docs/Redis/Value.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Value - redis 0.9.0 + Redis::Value - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -619,7 +724,7 @@

    - + value.cr diff --git a/docs/Redis/Writer.html b/docs/Redis/Writer.html index 442c485..cf30f4c 100644 --- a/docs/Redis/Writer.html +++ b/docs/Redis/Writer.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - Redis::Writer - redis 0.9.0 + Redis::Writer - redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming @@ -599,7 +704,7 @@

    - + writer.cr @@ -735,7 +840,7 @@


    @@ -767,7 +872,7 @@


    diff --git a/docs/index.html b/docs/index.html index f756f65..65ae643 100644 --- a/docs/index.html +++ b/docs/index.html @@ -5,7 +5,7 @@ - + @@ -14,7 +14,7 @@ - redis 0.9.0 + redis 0.10.0 @@ -45,7 +45,7 @@

    - 0.9.0 + 0.10.0 @@ -242,16 +242,76 @@

    @@ -312,33 +377,23 @@

  • -
  • - Relationship - -
  • - - +
  • + UnexpectedValue
  • -
  • - TypedResult +
  • + Value
  • -
  • - Value +
  • + ValueType
  • @@ -367,6 +422,56 @@

    +
  • + ReplicationClient + + + + +
  • +
  • Streaming diff --git a/docs/index.json b/docs/index.json index 20a570a..91878b6 100644 --- a/docs/index.json +++ b/docs/index.json @@ -1 +1 @@ -{"repository_name":"redis","body":"# redis\n\nA pure-Crystal implementation of the Redis protocol\n\n## Installation\n\n1. Add the dependency to your `shard.yml`:\n\n ```yaml\n dependencies:\n redis:\n github: jgaskins/redis\n ```\n\n2. Run `shards`\n\n## Usage\n\n```crystal\nrequire \"redis\"\n\nredis = Redis::Client.new # Defaults to `localhost` port 6379\n\nredis.set \"foo\", \"bar\"\nredis.get \"foo\" # => \"bar\"\n\nredis.incr \"counter\" # => 1\nredis.incr \"counter\" # => 2\nredis.decr \"counter\" # => 1\n\nredis.del \"foo\", \"counter\" # => 2\n```\n\n### Pipelined queries\n\nTo mitigate latency with multiple queries whose inputs and outputs are completely independent of each other, you can \"pipeline\" your queries by sending them all at once before reading them. To do this, you can use the `pipeline` method:\n\n```crystal\nredis.pipeline do |pipe|\n pipe.incr \"foo\"\n pipe.set \"bar\", \"baz\"\n pipe.lpush \"my-list\", \"my value\"\nend\n```\n\nThe return value of `pipeline` will be an array containing the values of each of those calls in the order they were sent. So in this case, it might be `[1, nil, 2]` to match the return values of `incr`, `set`, and `lpush`, respectively.\n\n### Transactions\n\nThe Redis [`MULTI` command](https://redis.io/commands/multi) begins a transaction, so you can use the `multi` method to execute a transaction against the server:\n\n```crystal\nredis.multi do |txn|\n txn.set \"foo\", \"bar\"\n txn.incr \"baz\"\n txn.lpush \"my-list\", \"my value\"\nend\n```\n\nThe transaction is automatically committed with [`EXEC`](https://redis.io/commands/exec) at the end of the block. If an exception occurs within the block, the transaction will be rolled back with [`DISCARD`](https://redis.io/commands/discard) before exiting the block.\n\nYou may also call `txn.discard`, which will effectively disable the transaction (all further methods called on the transaction do nothing), but will not exit the block. You will need to exit the block explicitly with `break` if there are operations within the block that cannot be rolled back, such as sending an email or sending a request to a third-party API.\n\nThe reason for this is that the only way to exit a containing block from an inner method in Crystal is to raise an exception, and this library chooses not to use exceptions for flow control.\n\n### Beyond `localhost`\n\nTo use a Redis server that isn't at `localhost:6379`, pass a `URI` to the client. For example, if you store it in your shell environment:\n\n```crystal\nredis = Redis::Client.new(URI.parse(ENV[\"REDIS_URL\"]))\n\n# ... or ...\n\nredis = Redis::Client.from_env(\"REDIS_URL\")\n```\n\nTo connect via SSL, make sure you use the `rediss://` URL scheme. If your Redis server requires a password or uses a different database slot than `0`, make sure you include them in the URL:\n\n```crystal\nredis = Redis::Client.new(URI.parse(\"rediss://:my_password@example.com/3\"))\n```\n\n### Connection Pool\n\nThe `Redis::Client` maintains a connection pool, so there is no need to run your own within your application. When you execute a command on the `Redis::Client`, it is automatically executed against a connection. When you execute a pipeline or transaction with `multi`, all commands within that block will automatically be routed to the same connection.\n\n**Configuration**\n\nFor this shard, we use the following default setting (outside of the Standard Lib defaults);\n\n```\nmax_idle_pool_size = 25\n```\n\n> You can override this manually using the URI parameters.\n> All other settings follow the DB::Pool defaults.\n\nThe behaviour of the connection pool can be configured from a set of query string parameters in the connection URI.\n\n| Name | Default value |\n| :--- | :--- |\n| initial\\_pool\\_size | 1 |\n| max\\_pool\\_size | 0 \\(unlimited\\) |\n| max\\_idle\\_pool\\_size | 1 |\n| checkout\\_timeout | 5.0 \\(seconds\\) |\n| retry\\_attempts | 1 |\n| retry\\_delay | 1.0 \\(seconds\\) |\n\nSee [Crystal guides](https://crystal-lang.org/reference/1.6/database/connection_pool.html) to learn more.\n\n**Example**\n\n```crystal\npool_params = \"?initial_pool_size=1&max_pool_size=10&checkout_timeout=10&retry_attempts=2&retry_delay=0.5&max_idle_pool_size=50\"\nredis = Redis::Client.new(URI.parse(\"redis://localhost:6379/0#{pool_params}\"))\n```\n\n**Recommendations**\n\nIf you encounter any issues, keep these setting the same;\n\n- `initial_pool_size`\n- `max_pool_size`\n- `max_idle_pool_size`\n\nExample:\n\n```\ninitial_pool_size = 50\nmax_pool_size = 50\nmax_idle_pool_size = 50\n```\n\n### TCP Keep-Alive\n\nThe `Redis::Client` uses a pool of `Redis::Connection` under the hood.\nWithin `Redis::Connection` we create a `TCPSocket`, which can accept keepalive params.\nThe TCP keepalive settings can help you mitigate Redis connection stability issues.\n\n> NOTE: This behaviour is disabled by default. See Configuration below on how to enable it.\n\n**Configuration**\n\nFor this shard, we use the following override setting;\n\n| Name | Default value |\n| :--- | :--- |\n| keepalive | false |\n| keepalive\\_count | 3 |\n| keepalive\\_idle | 60 |\n| keepalive\\_interval | 30 |\n\n> You can override this manually using the URI parameters.\n> The settings above have proven to have good results in production environments. However, every environment is different, so tweaking these settings may be necessary.\n\nSee [Crystal API](https://crystal-lang.org/api/1.6.0/TCPSocket.html) to learn more.\n\n**Example**\n\n```crystal\nparams = \"?keepalive=true&keepalive_count=5&keepalive_idle=10&keepalive_interval=15\"\n\nredis = Redis::Client.new(URI.parse(\"redis://localhost:6379/0#{params}\"))\n# or direct connections\nredis = Redis::Connection.new(URI.parse(\"redis://localhost:6379/0#{params}\"))\n```\n\n**Recommendations**\n\nEnable this setting with the defaults if you are encountering connection issues.\n\nExample:\n\n```crystal\nparams = \"?keepalive=true\"\n\nredis = Redis::Client.new(URI.parse(\"redis://localhost:6379/0#{params}\"))\n# or direct connections\nredis = Redis::Connection.new(URI.parse(\"redis://localhost:6379/0#{params}\"))\n```\n\n## Development\n\nMake sure you have a Redis or KeyDB server running locally on port 6379.\n\nRedis must be installed with a stack server for the full text search (`ft`) and time series modules (`ts`) in order for all specs to run.\n\n### With Docker\n\nYou can use this for your docker-compose file\n\n```yaml\nredis:\n image: redis/redis-stack-server\n ports:\n - \"6379:6379\"\n```\n\n### With Homebrew\n\nInstall the [`redis-stack` from homebrew](https://github.com/redis-stack/homebrew-redis-stack)\n\n\n## Contributing\n\n1. Fork it ()\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n## Contributors\n\n- [Jamie Gaskins](https://github.com/jgaskins) - creator and maintainer\n","program":{"html_id":"redis/toplevel","path":"toplevel.html","kind":"module","full_name":"Top Level Namespace","name":"Top Level Namespace","abstract":false,"locations":[],"repository_name":"redis","program":true,"enum":false,"alias":false,"const":false,"types":[{"html_id":"redis/Redis","path":"Redis.html","kind":"module","full_name":"Redis","name":"Redis","abstract":false,"locations":[{"filename":"src/client.cr","line_number":5,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/client.cr#L5"},{"filename":"src/cluster.cr","line_number":7,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/cluster.cr#L7"},{"filename":"src/commands.cr","line_number":8,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L8"},{"filename":"src/connection.cr","line_number":12,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L12"},{"filename":"src/errors.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/errors.cr#L1"},{"filename":"src/graph.cr","line_number":7,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L7"},{"filename":"src/json.cr","line_number":5,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L5"},{"filename":"src/parser.cr","line_number":4,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/parser.cr#L4"},{"filename":"src/pipeline.cr","line_number":5,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/pipeline.cr#L5"},{"filename":"src/redis.cr","line_number":7,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/redis.cr#L7"},{"filename":"src/search.cr","line_number":3,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L3"},{"filename":"src/streaming.cr","line_number":3,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L3"},{"filename":"src/time_series.cr","line_number":4,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L4"},{"filename":"src/transaction.cr","line_number":4,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/transaction.cr#L4"},{"filename":"src/value.cr","line_number":3,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/value.cr#L3"},{"filename":"src/writer.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/writer.cr#L1"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ERROR_MAP","name":"ERROR_MAP","value":"Hash(String, Error.class).new(default_value: Error)"},{"id":"VERSION","name":"VERSION","value":"\"0.9.0\""}],"types":[{"html_id":"redis/Redis/BusyGroup","path":"Redis/BusyGroup.html","kind":"class","full_name":"Redis::BusyGroup","name":"BusyGroup","abstract":false,"superclass":{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},"ancestors":[{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/errors.cr","line_number":17,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/errors.cr#L17"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"}},{"html_id":"redis/Redis/Client","path":"Redis/Client.html","kind":"class","full_name":"Redis::Client","name":"Client","abstract":false,"superclass":{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},{"html_id":"redis/Redis/Commands/Stream","kind":"module","full_name":"Redis::Commands::Stream","name":"Stream"},{"html_id":"redis/Redis/Commands/SortedSet","kind":"module","full_name":"Redis::Commands::SortedSet","name":"SortedSet"},{"html_id":"redis/Redis/Commands/Set","kind":"module","full_name":"Redis::Commands::Set","name":"Set"},{"html_id":"redis/Redis/Commands/List","kind":"module","full_name":"Redis::Commands::List","name":"List"},{"html_id":"redis/Redis/Commands/Hash","kind":"module","full_name":"Redis::Commands::Hash","name":"Hash"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/client.cr","line_number":19,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/client.cr#L19"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"doc":"The Redis client is the expected entrypoint for this shard. By default, it will connect to localhost:6379, but you can also supply a `URI` to connect to an arbitrary Redis server. SSL, password authentication, and DB selection are all supported.\n\n```\n# Connects to localhost:6379\nredis = Redis::Client.new\n\n# Connects to a server at \"redis.example.com\" on port 6000 over a TLS\n# connection, authenticates with the password \"password\", and uses DB 3\nredis = Redis::Client.new(URI.parse(\"rediss://:password@redis.example.com:6000/3\"))\n\n# Connects to a server at the URL in `ENV[\"REDIS_URL\"]`\nredis = Redis::Client.from_env(\"REDIS_URL\")\n```","summary":"

    The Redis client is the expected entrypoint for this shard.

    ","class_methods":[{"html_id":"from_env(env_var)-class-method","name":"from_env","abstract":false,"args":[{"name":"env_var","external_name":"env_var","restriction":""}],"args_string":"(env_var)","args_html":"(env_var)","location":{"filename":"src/client.cr","line_number":24,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/client.cr#L24"},"def":{"name":"from_env","args":[{"name":"env_var","external_name":"env_var","restriction":""}],"visibility":"Public","body":"new(URI.parse(ENV[env_var]))"}}],"constructors":[{"html_id":"new(uri:URI=URI.parse(ENV.fetch(\"REDIS_URL\",\"redis:///\")))-class-method","name":"new","doc":"The client holds a pool of connections that expands and contracts as\nneeded.","summary":"

    The client holds a pool of connections that expands and contracts as needed.

    ","abstract":false,"args":[{"name":"uri","default_value":"URI.parse(ENV.fetch(\"REDIS_URL\", \"redis:///\"))","external_name":"uri","restriction":"URI"}],"args_string":"(uri : URI = URI.parse(ENV.fetch(\"REDIS_URL\", \"redis:///\")))","args_html":"(uri : URI = URI.parse(ENV.fetch("REDIS_URL", "redis:///")))","location":{"filename":"src/client.cr","line_number":30,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/client.cr#L30"},"def":{"name":"new","args":[{"name":"uri","default_value":"URI.parse(ENV.fetch(\"REDIS_URL\", \"redis:///\"))","external_name":"uri","restriction":"URI"}],"visibility":"Public","body":"_ = allocate\n_.initialize(uri)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"close-instance-method","name":"close","abstract":false,"location":{"filename":"src/client.cr","line_number":90,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/client.cr#L90"},"def":{"name":"close","visibility":"Public","body":"@pool.close"}},{"html_id":"hscan_each(key:String,*,matchpattern:String|Nil=nil,count:String|Int|Nil=nil,&):Nil-instance-method","name":"hscan_each","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"","external_name":"","restriction":""},{"name":"pattern","default_value":"nil","external_name":"match","restriction":"String | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"}],"args_string":"(key : String, *, match pattern : String | Nil = nil, count : String | Int | Nil = nil, &) : Nil","args_html":"(key : String, *, match pattern : String | Nil = nil, count : String | Int | Nil = nil, &) : Nil","location":{"filename":"src/client.cr","line_number":59,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/client.cr#L59"},"def":{"name":"hscan_each","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"","external_name":"","restriction":""},{"name":"pattern","default_value":"nil","external_name":"match","restriction":"String | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"}],"splat_index":1,"yields":1,"block_arity":1,"return_type":"Nil","visibility":"Public","body":"@pool.checkout(&.hscan_each(key: key, match: pattern, count: count) do |key|\n yield key\nend)"}},{"html_id":"multi(&)-instance-method","name":"multi","abstract":false,"location":{"filename":"src/client.cr","line_number":78,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/client.cr#L78"},"def":{"name":"multi","yields":1,"block_arity":1,"visibility":"Public","body":"@pool.checkout(&.multi do |txn|\n yield txn\nend)"}},{"html_id":"pipeline(&)-instance-method","name":"pipeline","abstract":false,"location":{"filename":"src/client.cr","line_number":74,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/client.cr#L74"},"def":{"name":"pipeline","yields":1,"block_arity":1,"visibility":"Public","body":"@pool.checkout(&.pipeline do |pipe|\n yield pipe\nend)"}},{"html_id":"psubscribe(*channels,&)-instance-method","name":"psubscribe","abstract":false,"args":[{"name":"channels","external_name":"channels","restriction":""}],"args_string":"(*channels, &)","args_html":"(*channels, &)","location":{"filename":"src/client.cr","line_number":86,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/client.cr#L86"},"def":{"name":"psubscribe","args":[{"name":"channels","external_name":"channels","restriction":""}],"splat_index":0,"yields":2,"block_arity":2,"visibility":"Public","body":"@pool.checkout(&.psubscribe(*channels) do |subscription, conn|\n yield subscription, conn\nend)"}},{"html_id":"run(command)-instance-method","name":"run","doc":"All Redis commands invoked on the client check out a connection from the\nconnection pool, invoke the command on that connection, and then check the\nconnection back into the pool.\n\n```\nredis = Redis::Client.new\n```","summary":"

    All Redis commands invoked on the client check out a connection from the connection pool, invoke the command on that connection, and then check the connection back into the pool.

    ","abstract":false,"args":[{"name":"command","external_name":"command","restriction":""}],"args_string":"(command)","args_html":"(command)","location":{"filename":"src/client.cr","line_number":70,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/client.cr#L70"},"def":{"name":"run","args":[{"name":"command","external_name":"command","restriction":""}],"visibility":"Public","body":"@pool.checkout(&.run(command))"}},{"html_id":"scan_each(matchpattern:String|Nil=nil,count:String|Int|Nil=nil,type:String|Nil=nil,&):Nil-instance-method","name":"scan_each","abstract":false,"args":[{"name":"pattern","default_value":"nil","external_name":"match","restriction":"String | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"},{"name":"type","default_value":"nil","external_name":"type","restriction":"String | ::Nil"}],"args_string":"(match pattern : String | Nil = nil, count : String | Int | Nil = nil, type : String | Nil = nil, &) : Nil","args_html":"(match pattern : String | Nil = nil, count : String | Int | Nil = nil, type : String | Nil = nil, &) : Nil","location":{"filename":"src/client.cr","line_number":55,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/client.cr#L55"},"def":{"name":"scan_each","args":[{"name":"pattern","default_value":"nil","external_name":"match","restriction":"String | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"},{"name":"type","default_value":"nil","external_name":"type","restriction":"String | ::Nil"}],"yields":1,"block_arity":1,"return_type":"Nil","visibility":"Public","body":"@pool.checkout(&.scan_each(match: pattern, count: count, type: type) do |key|\n yield key\nend)"}},{"html_id":"subscribe(*channels,&)-instance-method","name":"subscribe","abstract":false,"args":[{"name":"channels","external_name":"channels","restriction":""}],"args_string":"(*channels, &)","args_html":"(*channels, &)","location":{"filename":"src/client.cr","line_number":82,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/client.cr#L82"},"def":{"name":"subscribe","args":[{"name":"channels","external_name":"channels","restriction":""}],"splat_index":0,"yields":2,"block_arity":2,"visibility":"Public","body":"@pool.checkout(&.subscribe(*channels) do |subscription, conn|\n yield subscription, conn\nend)"}}]},{"html_id":"redis/Redis/Cluster","path":"Redis/Cluster.html","kind":"class","full_name":"Redis::Cluster","name":"Cluster","abstract":false,"superclass":{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},{"html_id":"redis/Redis/Commands/Stream","kind":"module","full_name":"Redis::Commands::Stream","name":"Stream"},{"html_id":"redis/Redis/Commands/SortedSet","kind":"module","full_name":"Redis::Commands::SortedSet","name":"SortedSet"},{"html_id":"redis/Redis/Commands/Set","kind":"module","full_name":"Redis::Commands::Set","name":"Set"},{"html_id":"redis/Redis/Commands/List","kind":"module","full_name":"Redis::Commands::List","name":"List"},{"html_id":"redis/Redis/Commands/Hash","kind":"module","full_name":"Redis::Commands::Hash","name":"Hash"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/cluster.cr","line_number":31,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/cluster.cr#L31"},{"filename":"src/errors.cr","line_number":19,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/errors.cr#L19"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"doc":"Use in place of a `Redis::Client` when talking to Redis clusters. This class\nwill discover all nodes in a Redis cluster when given a URI for any of them,\nroute commands to appropriate shards based on the keys they operate on, and\nroute commands which do not change state to shard replicas to spread the\nload across the cluster.\n\nIt's important that, when using commands which operate on multiple keys (for\nexample: `MGET`, `DEL`, `RPOPLPUSH`, etc) that _all_ specified keys reside\non the same shard in the cluster. Usually, this means designing your key\nnames with curly braces around parts of them to ensure they hash to the same\n[key slot](https://redis.io/commands/cluster-keyslot). For example:\n\n```\nredis.del \"{comment}:1\", \"{comment}:2\"\nvalue = redis.rpoplpush \"{queue}:default\", \"{queue}:default:pending\"\n```\n\nIf you want to use a Redis module that provides custom commands, you can\nregister them as read-only with `Redis::Cluster.register_read_only_commands`\nand they will automatically be routed to replicas. See\n[`redis/cluster/json.cr`](https://github.com/jgaskins/redis/blob/3e874563dd524df9af6827f72edecca13a615802/src/cluster/json.cr#L5-L15)\nfor example usage.","summary":"

    Use in place of a Redis::Client when talking to Redis clusters.

    \n

    EXPERIMENTAL Cluster support is still under development. Some APIs may change while details are discovered and highly customized clusters (for example, servers handling individual hash slots or multiple hash-slot ranges) are not yet supported.

    ","class_methods":[{"html_id":"register_read_only_command(command:String)-class-method","name":"register_read_only_command","doc":"Tell the cluster driver that the specified Redis command can be routed to\nread-only replicas.\n\n```\nRedis::Cluster.register_read_only_command \"mymodule.get\"\n```","summary":"

    Tell the cluster driver that the specified Redis command can be routed to read-only replicas.

    ","abstract":false,"args":[{"name":"command","external_name":"command","restriction":"String"}],"args_string":"(command : String)","args_html":"(command : String)","location":{"filename":"src/cluster.cr","line_number":66,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/cluster.cr#L66"},"def":{"name":"register_read_only_command","args":[{"name":"command","external_name":"command","restriction":"String"}],"visibility":"Public","body":"READ_ONLY_COMMANDS << command"}},{"html_id":"register_read_only_commands(commands:Enumerable(String))-class-method","name":"register_read_only_commands","doc":"Tell the cluster driver that all the specified Redis commands can be\nrouted to read-only replicas.\n\n```\nRedis::Cluster.register_read_only_commands %w[\n mymodule.get\n mymodule.mget\n]\n```","summary":"

    Tell the cluster driver that all the specified Redis commands can be routed to read-only replicas.

    ","abstract":false,"args":[{"name":"commands","external_name":"commands","restriction":"Enumerable(String)"}],"args_string":"(commands : Enumerable(String))","args_html":"(commands : Enumerable(String))","location":{"filename":"src/cluster.cr","line_number":56,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/cluster.cr#L56"},"def":{"name":"register_read_only_commands","args":[{"name":"commands","external_name":"commands","restriction":"Enumerable(String)"}],"visibility":"Public","body":"commands.each do |command|\n register_read_only_command(command)\nend"}}],"constructors":[{"html_id":"new(uri:URI=URI.parse(ENV[\"REDIS_CLUSTER_URL\"]?||\"redis:///\"))-class-method","name":"new","doc":"Pass a `URI` (defaulting to the `REDIS_CLUSTER_URL` environment variable)\nto connect to the specified Redis cluster — the URI can point to _any_\nserver in the cluster and `Redis::Cluster` will discover the rest.","summary":"

    Pass a URI (defaulting to the REDIS_CLUSTER_URL environment variable) to connect to the specified Redis cluster — the URI can point to any server in the cluster and Redis::Cluster will discover the rest.

    ","abstract":false,"args":[{"name":"uri","default_value":"URI.parse(ENV[\"REDIS_CLUSTER_URL\"]? || \"redis:///\")","external_name":"uri","restriction":"URI"}],"args_string":"(uri : URI = URI.parse(ENV[\"REDIS_CLUSTER_URL\"]? || \"redis:///\"))","args_html":"(uri : URI = URI.parse(ENV["REDIS_CLUSTER_URL"]? || "redis:///"))","location":{"filename":"src/cluster.cr","line_number":73,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/cluster.cr#L73"},"def":{"name":"new","args":[{"name":"uri","default_value":"URI.parse(ENV[\"REDIS_CLUSTER_URL\"]? || \"redis:///\")","external_name":"uri","restriction":"URI"}],"visibility":"Public","body":"_ = allocate\n_.initialize(uri)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"close-instance-method","name":"close","doc":"Close all connections to this Redis cluster","summary":"

    Close all connections to this Redis cluster

    ","abstract":false,"location":{"filename":"src/cluster.cr","line_number":308,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/cluster.cr#L308"},"def":{"name":"close","visibility":"Public","body":"begin\n @write_pools.each do |__temp_53|\n _, pool = __temp_53\n pool.close\n end\n @read_pools.each do |__temp_54|\n _, pool = __temp_54\n pool.close\n end\nensure\n @closed = true\nend"}},{"html_id":"flushdb-instance-method","name":"flushdb","doc":"Executes `flushdb` on each shard in the cluster.","summary":"

    Executes #flushdb on each shard in the cluster.

    ","abstract":false,"location":{"filename":"src/cluster.cr","line_number":213,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/cluster.cr#L213"},"def":{"name":"flushdb","visibility":"Public","body":"each_master(&.run({\"flushdb\"}))"}},{"html_id":"pipeline(key:String,&)-instance-method","name":"pipeline","doc":"Run a pipeline for the specified key\n\n```\ncluster.pipeline \"{widgets}\" do |pipe|\n widget_ids.each do |id|\n pipe.get \"{widgets}:#{id}\"\n end\nend\n```\n\nWARNING: All keys that this pipeline operates on _MUST_ reside on the same\nshard. It's best to pass a pre-hashed key (one containing `{}`) to this\nmethod. See the example above.","summary":"

    Run a pipeline for the specified key

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String, &)","args_html":"(key : String, &)","location":{"filename":"src/cluster.cr","line_number":203,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/cluster.cr#L203"},"def":{"name":"pipeline","args":[{"name":"key","external_name":"key","restriction":"String"}],"yields":1,"block_arity":1,"visibility":"Public","body":"(write_pool_for(key)).checkout(&.pipeline do |pipe|\n yield pipe\nend)"}},{"html_id":"run(commandfull_command)-instance-method","name":"run","doc":"Execute the given command and return the result from the server. Commands\nmust be an `Enumerable` and its `size` method must be re-entrant.\n\n```\nrun({\"set\", \"foo\", \"bar\"})\n```","summary":"

    Execute the given command and return the result from the server.

    ","abstract":false,"args":[{"name":"full_command","external_name":"command","restriction":""}],"args_string":"(command full_command)","args_html":"(command full_command)","location":{"filename":"src/cluster.cr","line_number":273,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/cluster.cr#L273"},"def":{"name":"run","args":[{"name":"full_command","external_name":"command","restriction":""}],"visibility":"Public","body":"if full_command.empty?\n raise(ArgumentError.new(\"Redis commands must have at least one component\"))\nend\ncommand = full_command[0]\nif key = full_command[1]?\n if command =~ (/[A-Z]/)\n command = command.downcase\n end\n started_at = Time.monotonic\n (if READ_ONLY_COMMANDS.includes?(command)\n read_pool_for(key)\n else\n write_pool_for(key)\n end).checkout do |connection|\n connection.run(full_command)\n end.tap do\n LOG.debug(&.emit(command: full_command.join(' '), duration: (Time.monotonic - started_at).total_seconds))\n end\nelse\n raise(Error.new(\"No key was specified for this command, so the cluster driver cannot route it to an appropriate Redis shard. A cluster-specific method must be added to handle cases like these until a generalized solution is added.\"))\nend\n"}},{"html_id":"scan_each(*args,**kwargs,&):Nil-instance-method","name":"scan_each","doc":"Execute `Commands#scan_each` on each shard, yielding any matching keys.","summary":"

    Execute Commands#scan_each on each shard, yielding any matching keys.

    ","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **kwargs, &) : Nil","args_html":"(*args, **kwargs, &) : Nil","location":{"filename":"src/cluster.cr","line_number":208,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/cluster.cr#L208"},"def":{"name":"scan_each","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"kwargs","external_name":"kwargs","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"return_type":"Nil","visibility":"Public","body":"each_unique_replica(&.scan_each(*args, **kwargs) do |key|\n yield key\nend)"}},{"html_id":"slot_for(key:String)-instance-method","name":"slot_for","doc":"Return the Redis hash slot for the given key. This is useful for seeing\nwhich shard your command will be routed to.","summary":"

    Return the Redis hash slot for the given key.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/cluster.cr","line_number":351,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/cluster.cr#L351"},"def":{"name":"slot_for","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"if (hash_start = key.index('{')) && (hash_end = key.index('}', hash_start + 1))\n key = key[(hash_start + 1)..(hash_end - 1)]\nend\n(CRC16.checksum(key)) % 16384\n"}}],"types":[{"html_id":"redis/Redis/Cluster/Ask","path":"Redis/Cluster/Ask.html","kind":"class","full_name":"Redis::Cluster::Ask","name":"Ask","abstract":false,"superclass":{"html_id":"redis/Redis/Cluster/Error","kind":"class","full_name":"Redis::Cluster::Error","name":"Error"},"ancestors":[{"html_id":"redis/Redis/Cluster/Error","kind":"class","full_name":"Redis::Cluster::Error","name":"Error"},{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/errors.cr","line_number":22,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/errors.cr#L22"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Cluster","kind":"class","full_name":"Redis::Cluster","name":"Cluster"}},{"html_id":"redis/Redis/Cluster/CrossSlot","path":"Redis/Cluster/CrossSlot.html","kind":"class","full_name":"Redis::Cluster::CrossSlot","name":"CrossSlot","abstract":false,"superclass":{"html_id":"redis/Redis/Cluster/Error","kind":"class","full_name":"Redis::Cluster::Error","name":"Error"},"ancestors":[{"html_id":"redis/Redis/Cluster/Error","kind":"class","full_name":"Redis::Cluster::Error","name":"Error"},{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/errors.cr","line_number":23,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/errors.cr#L23"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Cluster","kind":"class","full_name":"Redis::Cluster","name":"Cluster"}},{"html_id":"redis/Redis/Cluster/Error","path":"Redis/Cluster/Error.html","kind":"class","full_name":"Redis::Cluster::Error","name":"Error","abstract":false,"superclass":{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},"ancestors":[{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/errors.cr","line_number":20,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/errors.cr#L20"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"subclasses":[{"html_id":"redis/Redis/Cluster/Ask","kind":"class","full_name":"Redis::Cluster::Ask","name":"Ask"},{"html_id":"redis/Redis/Cluster/CrossSlot","kind":"class","full_name":"Redis::Cluster::CrossSlot","name":"CrossSlot"},{"html_id":"redis/Redis/Cluster/Moved","kind":"class","full_name":"Redis::Cluster::Moved","name":"Moved"}],"namespace":{"html_id":"redis/Redis/Cluster","kind":"class","full_name":"Redis::Cluster","name":"Cluster"}},{"html_id":"redis/Redis/Cluster/Moved","path":"Redis/Cluster/Moved.html","kind":"class","full_name":"Redis::Cluster::Moved","name":"Moved","abstract":false,"superclass":{"html_id":"redis/Redis/Cluster/Error","kind":"class","full_name":"Redis::Cluster::Error","name":"Error"},"ancestors":[{"html_id":"redis/Redis/Cluster/Error","kind":"class","full_name":"Redis::Cluster::Error","name":"Error"},{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/errors.cr","line_number":21,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/errors.cr#L21"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Cluster","kind":"class","full_name":"Redis::Cluster","name":"Cluster"}}]},{"html_id":"redis/Redis/Commands","path":"Redis/Commands.html","kind":"module","full_name":"Redis::Commands","name":"Commands","abstract":false,"ancestors":[{"html_id":"redis/Redis/Commands/Stream","kind":"module","full_name":"Redis::Commands::Stream","name":"Stream"},{"html_id":"redis/Redis/Commands/SortedSet","kind":"module","full_name":"Redis::Commands::SortedSet","name":"SortedSet"},{"html_id":"redis/Redis/Commands/Set","kind":"module","full_name":"Redis::Commands::Set","name":"Set"},{"html_id":"redis/Redis/Commands/List","kind":"module","full_name":"Redis::Commands::List","name":"List"},{"html_id":"redis/Redis/Commands/Hash","kind":"module","full_name":"Redis::Commands::Hash","name":"Hash"}],"locations":[{"filename":"src/commands.cr","line_number":14,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L14"},{"filename":"src/commands/hash.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/hash.cr#L1"},{"filename":"src/graph.cr","line_number":495,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L495"},{"filename":"src/json.cr","line_number":341,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L341"},{"filename":"src/search.cr","line_number":335,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L335"},{"filename":"src/time_series.cr","line_number":441,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L441"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"redis/Redis/Commands/Hash","kind":"module","full_name":"Redis::Commands::Hash","name":"Hash"},{"html_id":"redis/Redis/Commands/List","kind":"module","full_name":"Redis::Commands::List","name":"List"},{"html_id":"redis/Redis/Commands/Set","kind":"module","full_name":"Redis::Commands::Set","name":"Set"},{"html_id":"redis/Redis/Commands/SortedSet","kind":"module","full_name":"Redis::Commands::SortedSet","name":"SortedSet"},{"html_id":"redis/Redis/Commands/Stream","kind":"module","full_name":"Redis::Commands::Stream","name":"Stream"}],"including_types":[{"html_id":"redis/Redis/Client","kind":"class","full_name":"Redis::Client","name":"Client"},{"html_id":"redis/Redis/Cluster","kind":"class","full_name":"Redis::Cluster","name":"Cluster"},{"html_id":"redis/Redis/Connection","kind":"class","full_name":"Redis::Connection","name":"Connection"},{"html_id":"redis/Redis/Pipeline","kind":"class","full_name":"Redis::Pipeline","name":"Pipeline"},{"html_id":"redis/Redis/Transaction","kind":"class","full_name":"Redis::Transaction","name":"Transaction"}],"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"doc":"All Redis commands are defined in this module. Any paradigm that needs to\nuse these commands simply overrides `run`, which takes a single `command`\nobject, which must be an `Enumerable`.\n\nTODO: Add more Redis commands from https://redis.io/commands","summary":"

    All Redis commands are defined in this module.

    ","instance_methods":[{"html_id":"decr(key:String)-instance-method","name":"decr","doc":"Atomically decrement and return the integer value for the specified key,\ncreating it if it does not exist\n\n```\nredis.del \"counter\"\nredis.decr \"counter\" # => -1\n```","summary":"

    Atomically decrement and return the integer value for the specified key, creating it if it does not exist

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands.cr","line_number":104,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L104"},"def":{"name":"decr","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"decr\", key})"}},{"html_id":"decrby(key:String,amount:Int|String)-instance-method","name":"decrby","doc":"Atomically decrement and return the integer value for the specified key by\nthe specified amount, creating it if it does not exist\n\n```\nredis.del \"counter\"\nredis.decrby \"counter\", 2 # => -2\n```","summary":"

    Atomically decrement and return the integer value for the specified key by the specified amount, creating it if it does not exist

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"amount","external_name":"amount","restriction":"Int | String"}],"args_string":"(key : String, amount : Int | String)","args_html":"(key : String, amount : Int | String)","location":{"filename":"src/commands.cr","line_number":126,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L126"},"def":{"name":"decrby","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"amount","external_name":"amount","restriction":"Int | String"}],"visibility":"Public","body":"run({\"decrby\", key, amount.to_s})"}},{"html_id":"del(keys:Enumerable(String))-instance-method","name":"del","doc":"Delete all specified keys and return the number of keys deleted.\n\n```\nredis.set \"foo\", \"12\"\nredis.del [\"foo\", \"bar\"] # => 1\nredis.del [\"foo\", \"bar\"] # => 0\n```","summary":"

    Delete all specified keys and return the number of keys deleted.

    ","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"Enumerable(String)"}],"args_string":"(keys : Enumerable(String))","args_html":"(keys : Enumerable(String))","location":{"filename":"src/commands.cr","line_number":148,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L148"},"def":{"name":"del","args":[{"name":"keys","external_name":"keys","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 1 + keys.size)\ncommand << \"del\"\nkeys.each do |key|\n command << key\nend\nrun(command)\n"}},{"html_id":"del(*keys:String)-instance-method","name":"del","doc":"Delete all specified keys and return the number of keys deleted.\n\n```\nredis.set \"foo\", \"12\"\nredis.del \"foo\", \"bar\" # => 1\nredis.del \"foo\", \"bar\" # => 0\n```","summary":"

    Delete all specified keys and return the number of keys deleted.

    ","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"String"}],"args_string":"(*keys : String)","args_html":"(*keys : String)","location":{"filename":"src/commands.cr","line_number":137,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L137"},"def":{"name":"del","args":[{"name":"keys","external_name":"keys","restriction":"String"}],"splat_index":0,"visibility":"Public","body":"run({\"del\"} + keys)"}},{"html_id":"eval(script:String,keys:Enumerable(String)=EmptyEnumerable.new,args:Enumerable(String)=EmptyEnumerable.new)-instance-method","name":"eval","doc":"Evaluate the given Lua script, either referenced by SHA with `evalsha`\nor directly with `eval`.\n\nNOTE: Use `eval` only for very trivial scripts and `evalsha` for larger\nor frequently executed scripts to amortize parse/compile time as well as\nsend fewer bytes along the wire.\n\nNOTE: Use `eval_ro` and `evalsha_ro` in a clustered environment to\nevaluate the scripts on read-only replicas.\n\n```\nscript = <<-LUA\n return \"this script was \" + ARGV[1]\nLUA\n\nsha = redis.script_load(script)\nredis.eval(script, args: [\"evaluated on the fly\"]\nredis.evalsha(sha, args: [\"precompiled\"])\n```","summary":"

    Evaluate the given Lua script, either referenced by SHA with #evalsha or directly with #eval.

    ","abstract":false,"args":[{"name":"script","external_name":"script","restriction":"String"},{"name":"keys","default_value":"EmptyEnumerable.new","external_name":"keys","restriction":"Enumerable(String)"},{"name":"args","default_value":"EmptyEnumerable.new","external_name":"args","restriction":"Enumerable(String)"}],"args_string":"(script : String, keys : Enumerable(String) = EmptyEnumerable.new, args : Enumerable(String) = EmptyEnumerable.new)","args_html":"(script : String, keys : Enumerable(String) = EmptyEnumerable.new, args : Enumerable(String) = EmptyEnumerable.new)","location":{"filename":"src/commands.cr","line_number":277,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L277"},"def":{"name":"eval","args":[{"name":"script","external_name":"script","restriction":"String"},{"name":"keys","default_value":"EmptyEnumerable.new","external_name":"keys","restriction":"Enumerable(String)"},{"name":"args","default_value":"EmptyEnumerable.new","external_name":"args","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: (3 + keys.size) + args.size)\n((command << \"eval\") << script) << keys.size.to_s\nkeys.each do |key|\n command << key\nend\nargs.each do |arg|\n command << arg\nend\nrun(command)\n"}},{"html_id":"eval_ro(script:String,keys:Enumerable(String)=EmptyEnumerable.new,args:Enumerable(String)=EmptyEnumerable.new)-instance-method","name":"eval_ro","doc":"Evaluate the given Lua script, either referenced by SHA with `evalsha`\nor directly with `eval`.\n\nNOTE: Use `eval` only for very trivial scripts and `evalsha` for larger\nor frequently executed scripts to amortize parse/compile time as well as\nsend fewer bytes along the wire.\n\nNOTE: Use `eval_ro` and `evalsha_ro` in a clustered environment to\nevaluate the scripts on read-only replicas.\n\n```\nscript = <<-LUA\n return \"this script was \" + ARGV[1]\nLUA\n\nsha = redis.script_load(script)\nredis.eval(script, args: [\"evaluated on the fly\"]\nredis.evalsha(sha, args: [\"precompiled\"])\n```","summary":"

    Evaluate the given Lua script, either referenced by SHA with #evalsha or directly with #eval.

    ","abstract":false,"args":[{"name":"script","external_name":"script","restriction":"String"},{"name":"keys","default_value":"EmptyEnumerable.new","external_name":"keys","restriction":"Enumerable(String)"},{"name":"args","default_value":"EmptyEnumerable.new","external_name":"args","restriction":"Enumerable(String)"}],"args_string":"(script : String, keys : Enumerable(String) = EmptyEnumerable.new, args : Enumerable(String) = EmptyEnumerable.new)","args_html":"(script : String, keys : Enumerable(String) = EmptyEnumerable.new, args : Enumerable(String) = EmptyEnumerable.new)","location":{"filename":"src/commands.cr","line_number":278,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L278"},"def":{"name":"eval_ro","args":[{"name":"script","external_name":"script","restriction":"String"},{"name":"keys","default_value":"EmptyEnumerable.new","external_name":"keys","restriction":"Enumerable(String)"},{"name":"args","default_value":"EmptyEnumerable.new","external_name":"args","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: (3 + keys.size) + args.size)\n((command << \"eval_ro\") << script) << keys.size.to_s\nkeys.each do |key|\n command << key\nend\nargs.each do |arg|\n command << arg\nend\nrun(command)\n"}},{"html_id":"evalsha(sha:String,keys:Enumerable(String)=EmptyEnumerable.new,args:Enumerable(String)=EmptyEnumerable.new)-instance-method","name":"evalsha","doc":"Evaluate the given Lua script, either referenced by SHA with `evalsha`\nor directly with `eval`.\n\nNOTE: Use `eval` only for very trivial scripts and `evalsha` for larger\nor frequently executed scripts to amortize parse/compile time as well as\nsend fewer bytes along the wire.\n\nNOTE: Use `eval_ro` and `evalsha_ro` in a clustered environment to\nevaluate the scripts on read-only replicas.\n\n```\nscript = <<-LUA\n return \"this script was \" + ARGV[1]\nLUA\n\nsha = redis.script_load(script)\nredis.eval(script, args: [\"evaluated on the fly\"]\nredis.evalsha(sha, args: [\"precompiled\"])\n```","summary":"

    Evaluate the given Lua script, either referenced by SHA with #evalsha or directly with #eval.

    ","abstract":false,"args":[{"name":"sha","external_name":"sha","restriction":"String"},{"name":"keys","default_value":"EmptyEnumerable.new","external_name":"keys","restriction":"Enumerable(String)"},{"name":"args","default_value":"EmptyEnumerable.new","external_name":"args","restriction":"Enumerable(String)"}],"args_string":"(sha : String, keys : Enumerable(String) = EmptyEnumerable.new, args : Enumerable(String) = EmptyEnumerable.new)","args_html":"(sha : String, keys : Enumerable(String) = EmptyEnumerable.new, args : Enumerable(String) = EmptyEnumerable.new)","location":{"filename":"src/commands.cr","line_number":275,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L275"},"def":{"name":"evalsha","args":[{"name":"sha","external_name":"sha","restriction":"String"},{"name":"keys","default_value":"EmptyEnumerable.new","external_name":"keys","restriction":"Enumerable(String)"},{"name":"args","default_value":"EmptyEnumerable.new","external_name":"args","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: (3 + keys.size) + args.size)\n((command << \"evalsha\") << sha) << keys.size.to_s\nkeys.each do |key|\n command << key\nend\nargs.each do |arg|\n command << arg\nend\nrun(command)\n"}},{"html_id":"evalsha_ro(script:String,keys:Enumerable(String)=EmptyEnumerable.new,args:Enumerable(String)=EmptyEnumerable.new)-instance-method","name":"evalsha_ro","doc":"Evaluate the given Lua script, either referenced by SHA with `evalsha`\nor directly with `eval`.\n\nNOTE: Use `eval` only for very trivial scripts and `evalsha` for larger\nor frequently executed scripts to amortize parse/compile time as well as\nsend fewer bytes along the wire.\n\nNOTE: Use `eval_ro` and `evalsha_ro` in a clustered environment to\nevaluate the scripts on read-only replicas.\n\n```\nscript = <<-LUA\n return \"this script was \" + ARGV[1]\nLUA\n\nsha = redis.script_load(script)\nredis.eval(script, args: [\"evaluated on the fly\"]\nredis.evalsha(sha, args: [\"precompiled\"])\n```","summary":"

    Evaluate the given Lua script, either referenced by SHA with #evalsha or directly with #eval.

    ","abstract":false,"args":[{"name":"script","external_name":"script","restriction":"String"},{"name":"keys","default_value":"EmptyEnumerable.new","external_name":"keys","restriction":"Enumerable(String)"},{"name":"args","default_value":"EmptyEnumerable.new","external_name":"args","restriction":"Enumerable(String)"}],"args_string":"(script : String, keys : Enumerable(String) = EmptyEnumerable.new, args : Enumerable(String) = EmptyEnumerable.new)","args_html":"(script : String, keys : Enumerable(String) = EmptyEnumerable.new, args : Enumerable(String) = EmptyEnumerable.new)","location":{"filename":"src/commands.cr","line_number":276,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L276"},"def":{"name":"evalsha_ro","args":[{"name":"script","external_name":"script","restriction":"String"},{"name":"keys","default_value":"EmptyEnumerable.new","external_name":"keys","restriction":"Enumerable(String)"},{"name":"args","default_value":"EmptyEnumerable.new","external_name":"args","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: (3 + keys.size) + args.size)\n((command << \"evalsha_ro\") << script) << keys.size.to_s\nkeys.each do |key|\n command << key\nend\nargs.each do |arg|\n command << arg\nend\nrun(command)\n"}},{"html_id":"exists(*keys:String)-instance-method","name":"exists","doc":"Return the number of specified keys that exist\n\n```\nredis.exists(\"foo\", \"bar\") # => 0\nredis.set \"foo\", \"exists now\"\nredis.exists(\"foo\", \"bar\") # => 1\nredis.set \"bar\", \"also exists now\"\nredis.exists(\"foo\", \"bar\") # => 2\n```","summary":"

    Return the number of specified keys that exist

    ","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"String"}],"args_string":"(*keys : String)","args_html":"(*keys : String)","location":{"filename":"src/commands.cr","line_number":177,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L177"},"def":{"name":"exists","args":[{"name":"keys","external_name":"keys","restriction":"String"}],"splat_index":0,"visibility":"Public","body":"run({\"exists\"} + keys)"}},{"html_id":"expire(key:String,ttl:Time::Span)-instance-method","name":"expire","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"ttl","external_name":"ttl","restriction":"Time::Span"}],"args_string":"(key : String, ttl : Time::Span)","args_html":"(key : String, ttl : Time::Span)","location":{"filename":"src/commands.cr","line_number":292,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L292"},"def":{"name":"expire","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"ttl","external_name":"ttl","restriction":"Time::Span"}],"visibility":"Public","body":"expire(key, ttl.total_seconds.to_i64)"}},{"html_id":"expire(key:String,ttl:Int)-instance-method","name":"expire","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"ttl","external_name":"ttl","restriction":"Int"}],"args_string":"(key : String, ttl : Int)","args_html":"(key : String, ttl : Int)","location":{"filename":"src/commands.cr","line_number":296,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L296"},"def":{"name":"expire","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"ttl","external_name":"ttl","restriction":"Int"}],"visibility":"Public","body":"run({\"expire\", key, ttl.to_s})"}},{"html_id":"expireat(key:String,at:Time)-instance-method","name":"expireat","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"at","external_name":"at","restriction":"Time"}],"args_string":"(key : String, at : Time)","args_html":"(key : String, at : Time)","location":{"filename":"src/commands.cr","line_number":308,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L308"},"def":{"name":"expireat","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"at","external_name":"at","restriction":"Time"}],"visibility":"Public","body":"run({\"expireat\", key, at.to_unix.to_s})"}},{"html_id":"flushall-instance-method","name":"flushall","doc":"Delete all the keys of all the existing databases,\nnot just the currently selected one.","summary":"

    Delete all the keys of all the existing databases, not just the currently selected one.

    ","abstract":false,"location":{"filename":"src/commands.cr","line_number":353,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L353"},"def":{"name":"flushall","visibility":"Public","body":"run({\"flushall\"})"}},{"html_id":"flushdb-instance-method","name":"flushdb","doc":"Delete all the keys of the currently selected DB","summary":"

    Delete all the keys of the currently selected DB

    ","abstract":false,"location":{"filename":"src/commands.cr","line_number":347,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L347"},"def":{"name":"flushdb","visibility":"Public","body":"run({\"flushdb\"})"}},{"html_id":"ft-instance-method","name":"ft","summary":"

    EXPERIMENTAL RediSearch support is still under development. Some APIs may change while details are discovered.

    ","abstract":false,"location":{"filename":"src/search.cr","line_number":337,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L337"},"def":{"name":"ft","visibility":"Public","body":"FullText.new(self)"}},{"html_id":"get(key:String)-instance-method","name":"get","doc":"Get the value for the specified key\n\n```\nredis.set \"foo\", \"bar\"\nredis.get(\"foo\") # => \"bar\"\n```","summary":"

    Get the value for the specified key

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands.cr","line_number":82,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L82"},"def":{"name":"get","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"get\", key})"}},{"html_id":"graph(key:String)-instance-method","name":"graph","doc":"Instantiate a `Redis::Graph::Client` backed by this `Redis::Client`.","summary":"

    Instantiate a Redis::Graph::Client backed by this Redis::Client.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/graph.cr","line_number":497,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L497"},"def":{"name":"graph","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"Graph::Client.new(self, key)"}},{"html_id":"incr(key:String)-instance-method","name":"incr","doc":"Atomically increment and return the integer value for the specified key,\ncreating it if it does not exist\n\n```\nredis.del \"counter\"\nredis.incr \"counter\" # => 1\n```","summary":"

    Atomically increment and return the integer value for the specified key, creating it if it does not exist

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands.cr","line_number":93,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L93"},"def":{"name":"incr","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"incr\", key})"}},{"html_id":"incrby(key:String,amount:Int|String)-instance-method","name":"incrby","doc":"Atomically increment and return the integer value for the specified key by\nthe specified amount, creating it if it does not exist\n\n```\nredis.del \"counter\"\nredis.incrby \"counter\", 2 # => 2\n```","summary":"

    Atomically increment and return the integer value for the specified key by the specified amount, creating it if it does not exist

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"amount","external_name":"amount","restriction":"Int | String"}],"args_string":"(key : String, amount : Int | String)","args_html":"(key : String, amount : Int | String)","location":{"filename":"src/commands.cr","line_number":115,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L115"},"def":{"name":"incrby","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"amount","external_name":"amount","restriction":"Int | String"}],"visibility":"Public","body":"run({\"incrby\", key, amount.to_s})"}},{"html_id":"info-instance-method","name":"info","abstract":false,"location":{"filename":"src/commands.cr","line_number":357,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L357"},"def":{"name":"info","visibility":"Public","body":"((run({\"info\"})).as(String)).lines.reject do |line|\n line =~ (/^(#|$)/)\nend.map(&.split(':', 2)).to_h"}},{"html_id":"json-instance-method","name":"json","doc":"Return a `Redis::JSON` instance that wraps the current `Redis::Client` or\n`Redis::Cluster`.","summary":"

    Return a Redis::JSON instance that wraps the current Redis::Client or Redis::Cluster.

    \n

    EXPERIMENTAL Support for the RedisJSON module is still under development and subject to change.

    ","abstract":false,"location":{"filename":"src/json.cr","line_number":345,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L345"},"def":{"name":"json","visibility":"Public","body":"JSON.new(self)"}},{"html_id":"keys(pattern=\"*\")-instance-method","name":"keys","doc":"Get the keys whose names follow the specified glob pattern. If a pattern\nis not specified, it will return all keys by default. Be careful when\nusing this command on Redis servers with a lot of traffic and millions\nof keys.\n\n```\nredis.keys # => [\"foo\", \"bar\", \"baz\"]\nredis.keys(\"f*\") # => [\"foo\"]\nredis.keys(\"b*\") # => [\"bar\", \"baz\"]\n```","summary":"

    Get the keys whose names follow the specified glob pattern.

    ","abstract":false,"args":[{"name":"pattern","default_value":"\"*\"","external_name":"pattern","restriction":""}],"args_string":"(pattern = \"*\")","args_html":"(pattern = "*")","location":{"filename":"src/commands.cr","line_number":39,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L39"},"def":{"name":"keys","args":[{"name":"pattern","default_value":"\"*\"","external_name":"pattern","restriction":""}],"visibility":"Public","body":"run({\"keys\", pattern})"}},{"html_id":"mget(keys:Enumerable(String))-instance-method","name":"mget","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"Enumerable(String)"}],"args_string":"(keys : Enumerable(String))","args_html":"(keys : Enumerable(String))","location":{"filename":"src/commands.cr","line_number":328,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L328"},"def":{"name":"mget","args":[{"name":"keys","external_name":"keys","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 1 + keys.size)\ncommand << \"mget\"\nkeys.each do |key|\n command << key\nend\nrun(command)\n"}},{"html_id":"mset(data:Hash(String,String))-instance-method","name":"mset","abstract":false,"args":[{"name":"data","external_name":"data","restriction":"Hash(String, String)"}],"args_string":"(data : Hash(String, String))","args_html":"(data : Hash(String, String))","location":{"filename":"src/commands.cr","line_number":336,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L336"},"def":{"name":"mset","args":[{"name":"data","external_name":"data","restriction":"Hash(String, String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 1 + data.size)\ncommand << \"mset\"\ndata.each do |key, value|\n (command << key) << value\nend\nrun(command)\n"}},{"html_id":"pexpire(key:String,ttl:Time::Span)-instance-method","name":"pexpire","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"ttl","external_name":"ttl","restriction":"Time::Span"}],"args_string":"(key : String, ttl : Time::Span)","args_html":"(key : String, ttl : Time::Span)","location":{"filename":"src/commands.cr","line_number":300,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L300"},"def":{"name":"pexpire","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"ttl","external_name":"ttl","restriction":"Time::Span"}],"visibility":"Public","body":"pexpire(key, ttl.total_milliseconds.to_i64)"}},{"html_id":"pexpire(key:String,ttl:Int)-instance-method","name":"pexpire","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"ttl","external_name":"ttl","restriction":"Int"}],"args_string":"(key : String, ttl : Int)","args_html":"(key : String, ttl : Int)","location":{"filename":"src/commands.cr","line_number":304,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L304"},"def":{"name":"pexpire","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"ttl","external_name":"ttl","restriction":"Int"}],"visibility":"Public","body":"run({\"pexpire\", key, ttl.to_s})"}},{"html_id":"pexpireat(key:String,at:Time)-instance-method","name":"pexpireat","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"at","external_name":"at","restriction":"Time"}],"args_string":"(key : String, at : Time)","args_html":"(key : String, at : Time)","location":{"filename":"src/commands.cr","line_number":312,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L312"},"def":{"name":"pexpireat","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"at","external_name":"at","restriction":"Time"}],"visibility":"Public","body":"run({\"pexpireat\", key, at.to_unix_ms.to_s})"}},{"html_id":"pttl(key:String)-instance-method","name":"pttl","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands.cr","line_number":320,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L320"},"def":{"name":"pttl","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"pttl\", key})"}},{"html_id":"publish(channel:String,message:String)-instance-method","name":"publish","abstract":false,"args":[{"name":"channel","external_name":"channel","restriction":"String"},{"name":"message","external_name":"message","restriction":"String"}],"args_string":"(channel : String, message : String)","args_html":"(channel : String, message : String)","location":{"filename":"src/commands.cr","line_number":191,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L191"},"def":{"name":"publish","args":[{"name":"channel","external_name":"channel","restriction":"String"},{"name":"message","external_name":"message","restriction":"String"}],"visibility":"Public","body":"run({\"publish\", channel, message})"}},{"html_id":"run(command)-instance-method","name":"run","doc":"Execute the given command and return the result from the server. Commands\nmust be an `Enumerable` and its `size` method must be re-entrant.\n\n```\nrun({\"set\", \"foo\", \"bar\"})\n```","summary":"

    Execute the given command and return the result from the server.

    ","abstract":true,"args":[{"name":"command","external_name":"command","restriction":""}],"args_string":"(command)","args_html":"(command)","location":{"filename":"src/commands.cr","line_number":27,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L27"},"def":{"name":"run","args":[{"name":"command","external_name":"command","restriction":""}],"visibility":"Public","body":""}},{"html_id":"scan(cursor:String=\"0\",match:String|Nil=nil,count:String|Int|Nil=nil,type:String|Nil=nil)-instance-method","name":"scan","abstract":false,"args":[{"name":"cursor","default_value":"\"0\"","external_name":"cursor","restriction":"String"},{"name":"match","default_value":"nil","external_name":"match","restriction":"String | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"},{"name":"type","default_value":"nil","external_name":"type","restriction":"String | ::Nil"}],"args_string":"(cursor : String = \"0\", match : String | Nil = nil, count : String | Int | Nil = nil, type : String | Nil = nil)","args_html":"(cursor : String = "0", match : String | Nil = nil, count : String | Int | Nil = nil, type : String | Nil = nil)","location":{"filename":"src/commands.cr","line_number":181,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L181"},"def":{"name":"scan","args":[{"name":"cursor","default_value":"\"0\"","external_name":"cursor","restriction":"String"},{"name":"match","default_value":"nil","external_name":"match","restriction":"String | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"},{"name":"type","default_value":"nil","external_name":"type","restriction":"String | ::Nil"}],"visibility":"Public","body":"command = {\"scan\", cursor}\nif match\n command = command + {\"match\", match}\nend\nif count\n command = command + {\"count\", count.to_s}\nend\nif type\n command = command + {\"type\", type}\nend\nrun(command)\n"}},{"html_id":"script_exists(shas:Enumerable(String))-instance-method","name":"script_exists","doc":"Return an array where each entry is `1` if the corresponding entry in the\nlist of `shas` exists or `0` if it does not.","summary":"

    Return an array where each entry is 1 if the corresponding entry in the list of shas exists or 0 if it does not.

    ","abstract":false,"args":[{"name":"shas","external_name":"shas","restriction":"Enumerable(String)"}],"args_string":"(shas : Enumerable(String))","args_html":"(shas : Enumerable(String))","location":{"filename":"src/commands.cr","line_number":229,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L229"},"def":{"name":"script_exists","args":[{"name":"shas","external_name":"shas","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + keys.size)\n(command << \"script\") << \"exists\"\nshas.each do |sha|\n command << sha\nend\nrun(command)\n"}},{"html_id":"script_exists(*shas:String)-instance-method","name":"script_exists","doc":"Return an array where each entry is `1` if the corresponding entry in the\nlist of `shas` exists or `0` if it does not.","summary":"

    Return an array where each entry is 1 if the corresponding entry in the list of shas exists or 0 if it does not.

    ","abstract":false,"args":[{"name":"shas","external_name":"shas","restriction":"String"}],"args_string":"(*shas : String)","args_html":"(*shas : String)","location":{"filename":"src/commands.cr","line_number":224,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L224"},"def":{"name":"script_exists","args":[{"name":"shas","external_name":"shas","restriction":"String"}],"splat_index":0,"visibility":"Public","body":"script_exists(shas)"}},{"html_id":"script_flush(mode:ScriptFlushMode)-instance-method","name":"script_flush","doc":"Flush the Lua scripts cache, see [the official docs](https://redis.io/commands/script-flush/).\n\n```\nredis.script_flush :async # Flush scripts asynchronously\nredis.script_flush :sync # Flush scripts immediately\n```","summary":"

    Flush the Lua scripts cache, see the official docs.

    ","abstract":false,"args":[{"name":"mode","external_name":"mode","restriction":"ScriptFlushMode"}],"args_string":"(mode : ScriptFlushMode)","args_html":"(mode : ScriptFlushMode)","location":{"filename":"src/commands.cr","line_number":213,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L213"},"def":{"name":"script_flush","args":[{"name":"mode","external_name":"mode","restriction":"ScriptFlushMode"}],"visibility":"Public","body":"run({\"script\", \"flush\", mode.to_s})"}},{"html_id":"script_kill-instance-method","name":"script_kill","doc":"Kill the currently executing `eval` script, assuming no write operation\nwas yet performed by the script.","summary":"

    Kill the currently executing #eval script, assuming no write operation was yet performed by the script.

    ","abstract":false,"location":{"filename":"src/commands.cr","line_number":239,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L239"},"def":{"name":"script_kill","visibility":"Public","body":"run({\"script\", \"kill\"})"}},{"html_id":"script_load(script:String)-instance-method","name":"script_load","doc":"Preload a Lua script, returning the SHA of the script to pass to `evalsha`.\n```\nsha = redis.script_load(<<-LUA)\n return \"Hello \" + ARGV[1]\nLUA\n\nredis.evalsha(sha, args: [\"world\"]) # => \"Hello world\"\n```","summary":"

    Preload a Lua script, returning the SHA of the script to pass to #evalsha.

    ","abstract":false,"args":[{"name":"script","external_name":"script","restriction":"String"}],"args_string":"(script : String)","args_html":"(script : String)","location":{"filename":"src/commands.cr","line_number":203,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L203"},"def":{"name":"script_load","args":[{"name":"script","external_name":"script","restriction":"String"}],"visibility":"Public","body":"run({\"script\", \"load\", script})"}},{"html_id":"set(key:String,value:String,ex:String|Int|Nil=nil,px:String|Int|Nil=nil,nx=false,xx=false,keepttl=false)-instance-method","name":"set","doc":"Set a given key to a given value, optionally specifying time-to-live (TTL).\n\n- `ex`: TTL in seconds (mnemonic: \"ex\" = \"expiration\")\n- `px`: TTL in milliseconds\n- `nx`: Only set this key if it does not exist (mnemonic: \"nx\" = it does \"not exist\")\n- `xx`: only set this key if it does exist (mnemonic: \"xx\" = it \"exists exists\" — look, I don't make the rules)\n- `keepttl`: If there is a TTL already set on the key, retain that TTL instead of overwriting it\n\n```\nredis.set \"foo\", \"bar\", ex: 1\nredis.get(\"foo\") # => \"bar\"\nsleep 1.second\nredis.get(\"foo\") # => nil\n```","summary":"

    Set a given key to a given value, optionally specifying time-to-live (TTL).

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"value","external_name":"value","restriction":"String"},{"name":"ex","default_value":"nil","external_name":"ex","restriction":"String | Int | ::Nil"},{"name":"px","default_value":"nil","external_name":"px","restriction":"String | Int | Nil"},{"name":"nx","default_value":"false","external_name":"nx","restriction":""},{"name":"xx","default_value":"false","external_name":"xx","restriction":""},{"name":"keepttl","default_value":"false","external_name":"keepttl","restriction":""}],"args_string":"(key : String, value : String, ex : String | Int | Nil = nil, px : String | Int | Nil = nil, nx = false, xx = false, keepttl = false)","args_html":"(key : String, value : String, ex : String | Int | Nil = nil, px : String | Int | Nil = nil, nx = false, xx = false, keepttl = false)","location":{"filename":"src/commands.cr","line_number":57,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L57"},"def":{"name":"set","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"value","external_name":"value","restriction":"String"},{"name":"ex","default_value":"nil","external_name":"ex","restriction":"String | Int | ::Nil"},{"name":"px","default_value":"nil","external_name":"px","restriction":"String | Int | Nil"},{"name":"nx","default_value":"false","external_name":"nx","restriction":""},{"name":"xx","default_value":"false","external_name":"xx","restriction":""},{"name":"keepttl","default_value":"false","external_name":"keepttl","restriction":""}],"visibility":"Public","body":"command = {\"set\", key, value}\nif ex\n command = command + {\"ex\", ex.to_s}\nend\nif px\n command = command + {\"px\", px.to_s}\nend\nif nx\n command = command + {\"nx\"}\nend\nif xx\n command = command + {\"xx\"}\nend\nif keepttl\n command = command + {\"keepttl\"}\nend\nrun(command)\n"}},{"html_id":"set(key,value,ex:Time,nx=false,xx=false,keepttl=false)-instance-method","name":"set","abstract":false,"args":[{"name":"key","external_name":"key","restriction":""},{"name":"value","external_name":"value","restriction":""},{"name":"ex","external_name":"ex","restriction":"Time"},{"name":"nx","default_value":"false","external_name":"nx","restriction":""},{"name":"xx","default_value":"false","external_name":"xx","restriction":""},{"name":"keepttl","default_value":"false","external_name":"keepttl","restriction":""}],"args_string":"(key, value, ex : Time, nx = false, xx = false, keepttl = false)","args_html":"(key, value, ex : Time, nx = false, xx = false, keepttl = false)","location":{"filename":"src/commands.cr","line_number":68,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L68"},"def":{"name":"set","args":[{"name":"key","external_name":"key","restriction":""},{"name":"value","external_name":"value","restriction":""},{"name":"ex","external_name":"ex","restriction":"Time"},{"name":"nx","default_value":"false","external_name":"nx","restriction":""},{"name":"xx","default_value":"false","external_name":"xx","restriction":""},{"name":"keepttl","default_value":"false","external_name":"keepttl","restriction":""}],"visibility":"Public","body":"set(key, value, ex: ex - Time.utc, nx: nx, xx: xx, keepttl: keepttl)"}},{"html_id":"set(key,value,ex:Time::Span,nx=false,xx=false,keepttl=false)-instance-method","name":"set","abstract":false,"args":[{"name":"key","external_name":"key","restriction":""},{"name":"value","external_name":"value","restriction":""},{"name":"ex","external_name":"ex","restriction":"Time::Span"},{"name":"nx","default_value":"false","external_name":"nx","restriction":""},{"name":"xx","default_value":"false","external_name":"xx","restriction":""},{"name":"keepttl","default_value":"false","external_name":"keepttl","restriction":""}],"args_string":"(key, value, ex : Time::Span, nx = false, xx = false, keepttl = false)","args_html":"(key, value, ex : Time::Span, nx = false, xx = false, keepttl = false)","location":{"filename":"src/commands.cr","line_number":72,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L72"},"def":{"name":"set","args":[{"name":"key","external_name":"key","restriction":""},{"name":"value","external_name":"value","restriction":""},{"name":"ex","external_name":"ex","restriction":"Time::Span"},{"name":"nx","default_value":"false","external_name":"nx","restriction":""},{"name":"xx","default_value":"false","external_name":"xx","restriction":""},{"name":"keepttl","default_value":"false","external_name":"keepttl","restriction":""}],"visibility":"Public","body":"set(key, value, px: ex.total_milliseconds.to_i64, nx: nx, xx: xx, keepttl: keepttl)"}},{"html_id":"ts-instance-method","name":"ts","doc":"Return a `Redis::TimeSeries` that wraps the current `Redis::Client` or\n`Redis::Cluster`.","summary":"

    Return a Redis::TimeSeries that wraps the current Redis::Client or Redis::Cluster.

    ","abstract":false,"location":{"filename":"src/time_series.cr","line_number":444,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L444"},"def":{"name":"ts","visibility":"Public","body":"TimeSeries.new(self)"}},{"html_id":"ttl(key:String)-instance-method","name":"ttl","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands.cr","line_number":316,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L316"},"def":{"name":"ttl","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"ttl\", key})"}},{"html_id":"type(key:String)-instance-method","name":"type","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands.cr","line_number":324,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L324"},"def":{"name":"type","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"type\", key})"}},{"html_id":"unlink(keys:Enumerable(String))-instance-method","name":"unlink","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"Enumerable(String)"}],"args_string":"(keys : Enumerable(String))","args_html":"(keys : Enumerable(String))","location":{"filename":"src/commands.cr","line_number":160,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L160"},"def":{"name":"unlink","args":[{"name":"keys","external_name":"keys","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 1 + keys.size)\ncommand << \"unlink\"\nkeys.each do |key|\n command << key\nend\nrun(command)\n"}},{"html_id":"unlink(*keys:String)-instance-method","name":"unlink","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"String"}],"args_string":"(*keys : String)","args_html":"(*keys : String)","location":{"filename":"src/commands.cr","line_number":156,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L156"},"def":{"name":"unlink","args":[{"name":"keys","external_name":"keys","restriction":"String"}],"splat_index":0,"visibility":"Public","body":"run({\"unlink\"} + keys)"}}],"types":[{"html_id":"redis/Redis/Commands/EmptyEnumerable","path":"Redis/Commands/EmptyEnumerable.html","kind":"struct","full_name":"Redis::Commands::EmptyEnumerable","name":"EmptyEnumerable","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/commands.cr","line_number":281,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L281"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"redis/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"}],"namespace":{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},"doc":"This type exists to avoid allocation of an array on the heap.","summary":"

    This type exists to avoid allocation of an array on the heap.

    ","constructors":[{"html_id":"new-class-method","name":"new","abstract":false,"location":{"filename":"src/commands.cr","line_number":281,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L281"},"def":{"name":"new","visibility":"Public","body":"x = allocate\nif x.responds_to?(:finalize)\n ::GC.add_finalizer(x)\nend\nx\n"}}],"instance_methods":[{"html_id":"each(&block:String->)-instance-method","name":"each","doc":"Must yield this collection's elements to the block.","summary":"

    Must yield this collection's elements to the block.

    ","abstract":false,"location":{"filename":"src/commands.cr","line_number":284,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L284"},"def":{"name":"each","yields":1,"block_arity":1,"block_arg":{"name":"block","external_name":"block","restriction":"(String ->)"},"visibility":"Public","body":""}},{"html_id":"initialize-instance-method","name":"initialize","abstract":false,"location":{"filename":"src/commands.cr","line_number":281,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L281"},"def":{"name":"initialize","visibility":"Public","body":""}},{"html_id":"size-instance-method","name":"size","doc":"Returns the number of elements in the collection.\n\n```\n[1, 2, 3, 4].size # => 4\n```","summary":"

    Returns the number of elements in the collection.

    ","abstract":false,"location":{"filename":"src/commands.cr","line_number":287,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L287"},"def":{"name":"size","visibility":"Public","body":"0"}}]},{"html_id":"redis/Redis/Commands/Hash","path":"Redis/Commands/Hash.html","kind":"module","full_name":"Redis::Commands::Hash","name":"Hash","abstract":false,"locations":[{"filename":"src/commands/hash.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/hash.cr#L1"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"namespace":{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},"instance_methods":[{"html_id":"hdel(key:String,fields:Enumerable(String))-instance-method","name":"hdel","doc":"Delete one or more `fields` from the given `key`, returning the number of\ndeleted fields.\n\n```\nfields = %w[pending nonexistent-field]\nredis.hdel \"my-hash\", fields\n# => 1\n```","summary":"

    Delete one or more fields from the given key, returning the number of deleted fields.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"Enumerable(String)"}],"args_string":"(key : String, fields : Enumerable(String))","args_html":"(key : String, fields : Enumerable(String))","location":{"filename":"src/commands/hash.cr","line_number":23,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/hash.cr#L23"},"def":{"name":"hdel","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + fields.size)\n(command << \"hdel\") << key\nfields.each do |key|\n command << key\nend\nrun(command)\n"}},{"html_id":"hdel(key:String,*fields:String)-instance-method","name":"hdel","doc":"Delete one or more `fields` from the given `key`, returning the number of\ndeleted fields.\n\n```\nredis.hdel \"my-hash\",\n \"pending\",\n \"nonexistent-field\"\n# => 1\n```","summary":"

    Delete one or more fields from the given key, returning the number of deleted fields.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"String"}],"args_string":"(key : String, *fields : String)","args_html":"(key : String, *fields : String)","location":{"filename":"src/commands/hash.cr","line_number":11,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/hash.cr#L11"},"def":{"name":"hdel","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"String"}],"splat_index":1,"visibility":"Public","body":"run({\"hdel\", key} + fields)"}},{"html_id":"hget(key:String,field:String)-instance-method","name":"hget","doc":"Return the value of `field` for `key`, if both exist.\n\n```\nredis.hset \"person:jamie\", email: \"jamie@example.com\"\nredis.hget \"person:jamie\", \"email\" # => \"jamie@example.com\"\nredis.hget \"person:jamie\", \"password\" # => nil\n```","summary":"

    Return the value of field for key, if both exist.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"field","external_name":"field","restriction":"String"}],"args_string":"(key : String, field : String)","args_html":"(key : String, field : String)","location":{"filename":"src/commands/hash.cr","line_number":38,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/hash.cr#L38"},"def":{"name":"hget","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"field","external_name":"field","restriction":"String"}],"visibility":"Public","body":"run({\"hget\", key, field})"}},{"html_id":"hgetall(key:String)-instance-method","name":"hgetall","doc":"Return the entire hash stored at `key` as an `Array`\n\n```\nredis.hset \"person:jamie\", email: \"jamie@example.com\", name: \"Jamie\"\nredis.hgetall \"person:jamie\"\n# => [\"email\", \"jamie@example.com\", \"name\", \"Jamie\"]\n```","summary":"

    Return the entire hash stored at key as an Array

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands/hash.cr","line_number":49,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/hash.cr#L49"},"def":{"name":"hgetall","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"hgetall\", key})"}},{"html_id":"hincrby(key:String,field:String,increment:Int|String)-instance-method","name":"hincrby","doc":"Increment the numeric value for `field` in the hash stored in `key` by\n`increment`, returning the new value.\n\n```\nid = 1234\nredis.hincrby \"posts:#{id}\", \"likes\", 1 # => 1\nredis.hincrby \"posts:#{id}\", \"likes\", 1 # => 2\n```","summary":"

    Increment the numeric value for field in the hash stored in key by increment, returning the new value.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"field","external_name":"field","restriction":"String"},{"name":"increment","external_name":"increment","restriction":"Int | String"}],"args_string":"(key : String, field : String, increment : Int | String)","args_html":"(key : String, field : String, increment : Int | String)","location":{"filename":"src/commands/hash.cr","line_number":169,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/hash.cr#L169"},"def":{"name":"hincrby","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"field","external_name":"field","restriction":"String"},{"name":"increment","external_name":"increment","restriction":"Int | String"}],"visibility":"Public","body":"run({\"hincrby\", key, field, increment.to_s})"}},{"html_id":"hmget(key:String,fields:Enumerable(String))-instance-method","name":"hmget","doc":"Return the values for `fields` in `key` as an `Array`\n\n```\nredis.hset \"person:jamie\", email: \"jamie@example.com\", name: \"Jamie\"\nredis.hmget \"person:jamie\", %w[email name] # => [\"jamie@example.com\", \"Jamie\"]\nredis.hmget \"person:jamie\", %w[nonexistent fake-field] # => [nil, nil]\n```","summary":"

    Return the values for fields in key as an Array

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"Enumerable(String)"}],"args_string":"(key : String, fields : Enumerable(String))","args_html":"(key : String, fields : Enumerable(String))","location":{"filename":"src/commands/hash.cr","line_number":71,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/hash.cr#L71"},"def":{"name":"hmget","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + fields.size)\n(command << \"hmget\") << key\nfields.each do |field|\n command << field\nend\nrun(command)\n"}},{"html_id":"hmget(key:String,*fields:String)-instance-method","name":"hmget","doc":"Return the values for `fields` in `key` as an `Array`\n\n```\nredis.hset \"person:jamie\", email: \"jamie@example.com\", name: \"Jamie\"\nredis.hmget \"person:jamie\", \"email\", \"name\" # => [\"jamie@example.com\", \"Jamie\"]\nredis.hmget \"person:jamie\", \"nonexistent\", \"fake-field\" # => [nil, nil]\n```","summary":"

    Return the values for fields in key as an Array

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"String"}],"args_string":"(key : String, *fields : String)","args_html":"(key : String, *fields : String)","location":{"filename":"src/commands/hash.cr","line_number":60,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/hash.cr#L60"},"def":{"name":"hmget","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"String"}],"splat_index":1,"visibility":"Public","body":"run({\"hmget\", key} + fields)"}},{"html_id":"hmset(key:String,data:::Hash(String,String))-instance-method","name":"hmset","summary":"

    DEPRECATED The Redis HMSET command is deprecated. Use HSET instead. This method will be removed in v1.0.0 of this shard. See https://redis.io/commands/hmset/

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"data","external_name":"data","restriction":"::Hash(String, String)"}],"args_string":"(key : String, data : ::Hash(String, String))","args_html":"(key : String, data : ::Hash(String, String))","location":{"filename":"src/commands/hash.cr","line_number":201,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/hash.cr#L201"},"def":{"name":"hmset","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"data","external_name":"data","restriction":"::Hash(String, String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + data.size)\n(command << \"hmset\") << key\ndata.each do |key, value|\n (command << key) << value\nend\nrun(command)\n"}},{"html_id":"hscan(key:String,cursor:String,*,matchpattern:String|Nil=nil,count:String|Int|Nil=nil)-instance-method","name":"hscan","doc":"Execute the `HSCAN` command to return a subset of keys in the hash stored at\n`key`, allowing you to iterate through the keys in the hash without blocking\nthe Redis server for too long at a time.\n\nNOTE: You probably want to use `Redis::Client#hscan_each` instead of using\nthis method directly.\n\n```\ncursor = \"\"\nuntil cursor == \"0\"\n response = redis.hscan(key, cursor)\n cursor, fields = response.as(Array)\n cursor = cursor.as(String)\n fields.as(Array).each do |field|\n # Do something with that hash field...\n end\nend\n```","summary":"

    Execute the HSCAN command to return a subset of keys in the hash stored at key, allowing you to iterate through the keys in the hash without blocking the Redis server for too long at a time.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"cursor","external_name":"cursor","restriction":"String"},{"name":"","external_name":"","restriction":""},{"name":"pattern","default_value":"nil","external_name":"match","restriction":"String | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"}],"args_string":"(key : String, cursor : String, *, match pattern : String | Nil = nil, count : String | Int | Nil = nil)","args_html":"(key : String, cursor : String, *, match pattern : String | Nil = nil, count : String | Int | Nil = nil)","location":{"filename":"src/commands/hash.cr","line_number":191,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/hash.cr#L191"},"def":{"name":"hscan","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"cursor","external_name":"cursor","restriction":"String"},{"name":"","external_name":"","restriction":""},{"name":"pattern","default_value":"nil","external_name":"match","restriction":"String | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"}],"splat_index":2,"visibility":"Public","body":"command = Array(String).new(initial_capacity: 7)\n((command << \"hscan\") << key) << cursor.to_s\nif pattern\n (command << \"match\") << pattern\nend\nif count\n (command << \"count\") << count.to_s\nend\nrun(command)\n"}},{"html_id":"hset(key:String,fields:Enumerable(String))-instance-method","name":"hset","doc":"Set the values for `fields` in the hash stored in `key`, returning the\nnumber of fields created (not updated)\n\nNOTE: `fields` _MUST_ contain an even number of elements\n\n```\nredis.hset \"person:jamie\", %w[email jamie@example.com name Jamie] # => 2\nredis.hset \"person:jamie\", %w[email jamie@example.dev admin true] # => 1\nredis.hset \"person:jamie\", %w[admin false] # => 0\n```","summary":"

    Set the values for fields in the hash stored in key, returning the number of fields created (not updated)

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"Enumerable(String)"}],"args_string":"(key : String, fields : Enumerable(String))","args_html":"(key : String, fields : Enumerable(String))","location":{"filename":"src/commands/hash.cr","line_number":120,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/hash.cr#L120"},"def":{"name":"hset","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + fields.size)\n(command << \"hset\") << key\nfields.each do |field|\n command << field\nend\nrun(command)\n"}},{"html_id":"hset(key:String,fields:::Hash(String,String))-instance-method","name":"hset","doc":"Set the values for `fields` in the hash stored in `key`, returning the\nnumber of fields created (not updated)\n\n```\nredis.hset \"person:jamie\", {\"email\" => \"jamie@example.com\", \"name\" => \"Jamie\"} # => 2\nredis.hset \"person:jamie\", {\"email\" => \"jamie@example.dev\", \"admin\" => \"true\"} # => 1\nredis.hset \"person:jamie\", {\"admin\" => \"false\"} # => 0\n```","summary":"

    Set the values for fields in the hash stored in key, returning the number of fields created (not updated)

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"::Hash(String, String)"}],"args_string":"(key : String, fields : ::Hash(String, String))","args_html":"(key : String, fields : ::Hash(String, String))","location":{"filename":"src/commands/hash.cr","line_number":137,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/hash.cr#L137"},"def":{"name":"hset","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"::Hash(String, String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + (2 * fields.size))\n(command << \"hset\") << key\nfields.each do |key, value|\n (command << key) << value\nend\nrun(command)\n"}},{"html_id":"hset(key:String,*fields:String)-instance-method","name":"hset","doc":"Set the values for `fields` in the hash stored in `key`, returning the\nnumber of fields created (not updated).\n\nNOTE: You _MUST_ pass an even number of arguments to `fields`\n\n```\nredis.hset \"person:jamie\", \"email\", \"jamie@example.com\", \"name\", \"Jamie\" # => 2\nredis.hset \"person:jamie\", \"email\", \"jamie@example.dev\", \"admin\", \"true\" # => 1\nredis.hset \"person:jamie\", \"admin\", \"false\" # => 0\n```","summary":"

    Set the values for fields in the hash stored in key, returning the number of fields created (not updated).

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"String"}],"args_string":"(key : String, *fields : String)","args_html":"(key : String, *fields : String)","location":{"filename":"src/commands/hash.cr","line_number":106,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/hash.cr#L106"},"def":{"name":"hset","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"String"}],"splat_index":1,"visibility":"Public","body":"run({\"hset\", key} + fields)"}},{"html_id":"hset(key:String,**fields:String)-instance-method","name":"hset","doc":"Set the values for `fields` in the hash stored in `key`, returning the\nnumber of fields created (not updated)\n\n```\nredis.hset \"person:jamie\", email: \"jamie@example.com\", name: \"Jamie\" # => 2\nredis.hset \"person:jamie\", email: \"jamie@example.dev\", admin: \"true\" # => 1\nredis.hset \"person:jamie\", admin: \"false\" # => 0\n```","summary":"

    Set the values for fields in the hash stored in key, returning the number of fields created (not updated)

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String, **fields : String)","args_html":"(key : String, **fields : String)","location":{"filename":"src/commands/hash.cr","line_number":87,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/hash.cr#L87"},"def":{"name":"hset","args":[{"name":"key","external_name":"key","restriction":"String"}],"double_splat":{"name":"fields","external_name":"fields","restriction":"String"},"visibility":"Public","body":"hash = ::Hash(String, String).new(initial_capacity: fields.size)\nfields.each do |key, value|\n hash[key.to_s] = value\nend\nhset(key, hash)\n"}},{"html_id":"hsetnx(key:String,field:String,value:String)-instance-method","name":"hsetnx","doc":"Set `field` in the hash stored in `key` to `value` if and only if it does not exist. Returns `1` if the field was set, `0` if it was not.\n\n```\nid = 1234\n\nredis.hsetnx \"job:#{id}\", \"locked_at\", Time.utc.to_rfc3339 # => 1\n# Returned 1, lock succeeds\n\nredis.hsetnx \"job:#{id}\", \"locked_at\", Time.utc.to_rfc3339 # => 0\n# Returned 0, lock did not succeed, so the job is already being processed\n```","summary":"

    Set field in the hash stored in key to value if and only if it does not exist.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"field","external_name":"field","restriction":"String"},{"name":"value","external_name":"value","restriction":"String"}],"args_string":"(key : String, field : String, value : String)","args_html":"(key : String, field : String, value : String)","location":{"filename":"src/commands/hash.cr","line_number":157,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/hash.cr#L157"},"def":{"name":"hsetnx","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"field","external_name":"field","restriction":"String"},{"name":"value","external_name":"value","restriction":"String"}],"visibility":"Public","body":"run({\"hsetnx\", key, field, value})"}}]},{"html_id":"redis/Redis/Commands/List","path":"Redis/Commands/List.html","kind":"module","full_name":"Redis::Commands::List","name":"List","abstract":false,"locations":[{"filename":"src/commands/list.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L1"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"namespace":{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},"instance_methods":[{"html_id":"blpop(keys:Enumerable(String),timeout:Time::Span)-instance-method","name":"blpop","doc":"Remove and return an element from the end of the given list. If the list\nis empty or the key does not exist, this method waits the specified amount\nof time for an element to be added to it by another connection. If the\nelement *is* added by another connection within that amount of time, this\nmethod will return it immediately. If it *is not*, then this method returns\n`nil`.\n\n```\nkeys = %w[foo bar]\nredis.rpush \"foo\", \"first\"\nspawn do\n sleep 100.milliseconds\n redis.rpush \"foo\", \"second\"\nend\nredis.blpop keys, 1.second # => \"first\"\nredis.blpop keys, 1.second # => \"second\" (after 100 milliseconds)\nredis.blpop keys, 1.second # => nil (after 1 second)\n```","summary":"

    Remove and return an element from the end of the given list.

    ","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"Enumerable(String)"},{"name":"timeout","external_name":"timeout","restriction":"Time::Span"}],"args_string":"(keys : Enumerable(String), timeout : Time::Span)","args_html":"(keys : Enumerable(String), timeout : Time::Span)","location":{"filename":"src/commands/list.cr","line_number":128,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L128"},"def":{"name":"blpop","args":[{"name":"keys","external_name":"keys","restriction":"Enumerable(String)"},{"name":"timeout","external_name":"timeout","restriction":"Time::Span"}],"visibility":"Public","body":"command = Array(String).new(2 + keys.size)\ncommand << \"blpop\"\ncommand.concat(keys)\ncommand << timeout.total_seconds.to_i.to_s\nrun(command)\n"}},{"html_id":"blpop(*keys:String,timeout:Time::Span)-instance-method","name":"blpop","doc":"Remove and return an element from the end of the given list. If the list\nis empty or the key does not exist, this method waits the specified amount\nof time for an element to be added to it by another connection. If the\nelement *is* added by another connection within that amount of time, this\nmethod will return it immediately. If it *is not*, then this method returns\n`nil`.\n\n```\nredis.rpush \"foo\", \"first\"\nspawn do\n sleep 100.milliseconds\n redis.rpush \"foo\", \"second\"\nend\nredis.blpop \"foo\", 1.second # => \"first\"\nredis.blpop \"foo\", 1.second # => \"second\" (after 100 milliseconds)\nredis.blpop \"foo\", 1.second # => nil (after 1 second)\n```","summary":"

    Remove and return an element from the end of the given list.

    ","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"Time::Span"}],"args_string":"(*keys : String, timeout : Time::Span)","args_html":"(*keys : String, timeout : Time::Span)","location":{"filename":"src/commands/list.cr","line_number":154,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L154"},"def":{"name":"blpop","args":[{"name":"keys","external_name":"keys","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"Time::Span"}],"splat_index":0,"visibility":"Public","body":"blpop(*keys, timeout: timeout.total_seconds.to_i.to_s)"}},{"html_id":"blpop(*keys:String,timeout:Int|Float)-instance-method","name":"blpop","doc":"Remove and return an element from the end of the given list. If the list\nis empty or the key does not exist, this method waits the specified number\nof seconds for an element to be added to it by another connection. If the\nelement *is* added by another connection within that number of seconds,\nthis method will return it immediately. If it *is not*, then this method\nreturns `nil`.\n\n```\nredis.lpush \"foo\", \"first\"\nspawn do\n sleep 100.milliseconds\n redis.lpush \"foo\", \"second\"\nend\nredis.blpop \"foo\", 1 # => \"first\"\nredis.blpop \"foo\", 1 # => \"second\" (after 100 milliseconds)\nredis.blpop \"foo\", 1 # => nil (after 1 second)\n```","summary":"

    Remove and return an element from the end of the given list.

    ","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"Int | Float"}],"args_string":"(*keys : String, timeout : Int | Float)","args_html":"(*keys : String, timeout : Int | Float)","location":{"filename":"src/commands/list.cr","line_number":175,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L175"},"def":{"name":"blpop","args":[{"name":"keys","external_name":"keys","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"Int | Float"}],"splat_index":0,"visibility":"Public","body":"if timeout == timeout.to_i\n timeout = timeout.to_i\nend\nblpop(*keys, timeout: timeout.to_s)\n"}},{"html_id":"blpop(*keys:String,timeout:String)-instance-method","name":"blpop","doc":"Remove and return an element from the end of the given list. If the list\nis empty or the key does not exist, this method waits the specified number\nof seconds for an element to be added to it by another connection. If the\nelement *is* added by another connection within that number of seconds,\nthis method will return it immediately. If it *is not*, then this method\nreturns `nil`.\n\n```\nredis.lpush \"foo\", \"first\"\nspawn do\n sleep 100.milliseconds\n redis.lpush \"foo\", \"second\"\nend\nredis.blpop \"foo\", \"1\" # => \"first\"\nredis.blpop \"foo\", \"1\" # => \"second\" (after 100 milliseconds)\nredis.blpop \"foo\", \"1\" # => nil (after 1 second)\n```","summary":"

    Remove and return an element from the end of the given list.

    ","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"String"}],"args_string":"(*keys : String, timeout : String)","args_html":"(*keys : String, timeout : String)","location":{"filename":"src/commands/list.cr","line_number":197,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L197"},"def":{"name":"blpop","args":[{"name":"keys","external_name":"keys","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"String"}],"splat_index":0,"visibility":"Public","body":"run(({\"blpop\"} + keys) + {timeout})"}},{"html_id":"brpop(keys:Enumerable(String),timeout:Int)-instance-method","name":"brpop","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"Enumerable(String)"},{"name":"timeout","external_name":"timeout","restriction":"Int"}],"args_string":"(keys : Enumerable(String), timeout : Int)","args_html":"(keys : Enumerable(String), timeout : Int)","location":{"filename":"src/commands/list.cr","line_number":316,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L316"},"def":{"name":"brpop","args":[{"name":"keys","external_name":"keys","restriction":"Enumerable(String)"},{"name":"timeout","external_name":"timeout","restriction":"Int"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + keys.size)\ncommand << \"brpop\"\nkeys.each do |key|\n command << key\nend\ncommand << timeout.to_s\nrun(command)\n"}},{"html_id":"brpop(*keys:String,timeout:Time::Span)-instance-method","name":"brpop","doc":"Remove and return an element from the end of the given list. If the list\nis empty or the key does not exist, this method waits the specified amount\nof time for an element to be added to it by another connection. If the\nelement *is* added by another connection within that amount of time, this\nmethod will return it immediately. If it *is not*, then this method returns\n`nil`.\n\n```\nredis.lpush \"foo\", \"first\"\nspawn do\n sleep 100.milliseconds\n redis.lpush \"foo\", \"second\"\nend\nredis.brpop \"foo\", 1.second # => \"first\"\nredis.brpop \"foo\", 1.second # => \"second\" (after 100 milliseconds)\nredis.brpop \"foo\", 1.second # => nil (after 1 second)\n```","summary":"

    Remove and return an element from the end of the given list.

    ","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"Time::Span"}],"args_string":"(*keys : String, timeout : Time::Span)","args_html":"(*keys : String, timeout : Time::Span)","location":{"filename":"src/commands/list.cr","line_number":218,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L218"},"def":{"name":"brpop","args":[{"name":"keys","external_name":"keys","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"Time::Span"}],"splat_index":0,"visibility":"Public","body":"brpop(*keys, timeout: timeout.total_seconds)"}},{"html_id":"brpop(*keys:String,timeout:Number)-instance-method","name":"brpop","doc":"Remove and return an element from the end of the given list. If the list\nis empty or the key does not exist, this method waits the specified number\nof seconds for an element to be added to it by another connection. If the\nelement *is* added by another connection within that number of seconds,\nthis method will return it immediately. If it *is not*, then this method\nreturns `nil`.\n\n```\nredis.lpush \"foo\", \"first\"\nspawn do\n sleep 100.milliseconds\n redis.lpush \"foo\", \"second\"\nend\nredis.brpop \"foo\", 1 # => \"first\"\nredis.brpop \"foo\", 1 # => \"second\" (after 100 milliseconds)\nredis.brpop \"foo\", 1 # => nil (after 1 second)\n```","summary":"

    Remove and return an element from the end of the given list.

    ","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"Number"}],"args_string":"(*keys : String, timeout : Number)","args_html":"(*keys : String, timeout : Number)","location":{"filename":"src/commands/list.cr","line_number":239,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L239"},"def":{"name":"brpop","args":[{"name":"keys","external_name":"keys","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"Number"}],"splat_index":0,"visibility":"Public","body":"if timeout == timeout.to_i\n timeout = timeout.to_i\nend\nbrpop(*keys, timeout: timeout.to_s)\n"}},{"html_id":"brpop(*keys:String,timeout:String)-instance-method","name":"brpop","doc":"Remove and return an element from the end of the given list. If the list\nis empty or the key does not exist, this method waits the specified number\nof seconds for an element to be added to it by another connection. If the\nelement *is* added by another connection within that number of seconds,\nthis method will return it immediately. If it *is not*, then this method\nreturns `nil`.\n\n```\nredis.lpush \"foo\", \"first\"\nspawn do\n sleep 100.milliseconds\n redis.lpush \"foo\", \"second\"\nend\nredis.brpop \"foo\", \"1\" # => \"first\"\nredis.brpop \"foo\", \"1\" # => \"second\" (after 100 milliseconds)\nredis.brpop \"foo\", \"1\" # => nil (after 1 second)\n```","summary":"

    Remove and return an element from the end of the given list.

    ","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"String"}],"args_string":"(*keys : String, timeout : String)","args_html":"(*keys : String, timeout : String)","location":{"filename":"src/commands/list.cr","line_number":261,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L261"},"def":{"name":"brpop","args":[{"name":"keys","external_name":"keys","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"String"}],"splat_index":0,"visibility":"Public","body":"run(({\"brpop\"} + keys) + {timeout})"}},{"html_id":"llen(key:String)-instance-method","name":"llen","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands/list.cr","line_number":265,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L265"},"def":{"name":"llen","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"llen\", key})"}},{"html_id":"lmove(fromsource:String,todestination:String,from_sidesource_side:Side,to_sidedestination_side:Side)-instance-method","name":"lmove","doc":"Atomically remove an item from the end of a list and insert it at the\nbeginning of another. Returns that list item. If the first list is empty,\nnothing happens and this method returns `nil`.\n\n```\nredis.del \"foo\"\nredis.lpush \"foo\", \"hello\", \"world\"\nredis.lmove \"foo\", \"bar\" # => \"hello\"\nredis.lmove \"foo\", \"bar\" # => \"world\"\nredis.lmove \"foo\", \"bar\" # => nil\n```","summary":"

    Atomically remove an item from the end of a list and insert it at the beginning of another.

    ","abstract":false,"args":[{"name":"source","external_name":"from","restriction":"String"},{"name":"destination","external_name":"to","restriction":"String"},{"name":"source_side","external_name":"from_side","restriction":"Side"},{"name":"destination_side","external_name":"to_side","restriction":"Side"}],"args_string":"(from source : String, to destination : String, from_side source_side : Side, to_side destination_side : Side)","args_html":"(from source : String, to destination : String, from_side source_side : Side, to_side destination_side : Side)","location":{"filename":"src/commands/list.cr","line_number":53,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L53"},"def":{"name":"lmove","args":[{"name":"source","external_name":"from","restriction":"String"},{"name":"destination","external_name":"to","restriction":"String"},{"name":"source_side","external_name":"from_side","restriction":"Side"},{"name":"destination_side","external_name":"to_side","restriction":"Side"}],"visibility":"Public","body":"run({\"lmove\", source, destination, source_side.to_s, destination_side.to_s})"}},{"html_id":"lpop(key:String,count:String|Nil=nil)-instance-method","name":"lpop","doc":"Remove an item from the beginning of a list, returning the item or `nil`\nif the list was empty.\n\n```\nredis.del \"my-list\" # Delete so we know it's empty\nredis.lpush \"my-list\", \"foo\"\nredis.lpop \"my-list\" # => \"foo\"\nredis.lpop \"my-list\" # => nil\n```","summary":"

    Remove an item from the beginning of a list, returning the item or nil if the list was empty.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | ::Nil"}],"args_string":"(key : String, count : String | Nil = nil)","args_html":"(key : String, count : String | Nil = nil)","location":{"filename":"src/commands/list.cr","line_number":31,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L31"},"def":{"name":"lpop","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | ::Nil"}],"visibility":"Public","body":"command = {\"lpop\", key}\nif count\n command = command + {count}\nend\nrun(command)\n"}},{"html_id":"lpush(key:String,values:Enumerable(String))-instance-method","name":"lpush","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"Enumerable(String)"}],"args_string":"(key : String, values : Enumerable(String))","args_html":"(key : String, values : Enumerable(String))","location":{"filename":"src/commands/list.cr","line_number":14,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L14"},"def":{"name":"lpush","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + values.size)\n(command << \"lpush\") << key\nvalues.each do |value|\n command << value\nend\nrun(command)\n"}},{"html_id":"lpush(key,*values:String)-instance-method","name":"lpush","doc":"Insert an item at the beginning of a list, returning the number of items\nin the list after the insert.\n\n```\nredis.del \"my-list\" # Delete so we know it's empty\nredis.lpush \"my-list\", \"foo\", \"bar\" # => 2\nredis.lpush \"my-list\", \"foo\", \"bar\" # => 4\n```","summary":"

    Insert an item at the beginning of a list, returning the number of items in the list after the insert.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":""},{"name":"values","external_name":"values","restriction":"String"}],"args_string":"(key, *values : String)","args_html":"(key, *values : String)","location":{"filename":"src/commands/list.cr","line_number":10,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L10"},"def":{"name":"lpush","args":[{"name":"key","external_name":"key","restriction":""},{"name":"values","external_name":"values","restriction":"String"}],"splat_index":1,"visibility":"Public","body":"run({\"lpush\", key} + values)"}},{"html_id":"lrange(key:String,start:String|Int,finish:String|Int)-instance-method","name":"lrange","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"start","external_name":"start","restriction":"String | Int"},{"name":"finish","external_name":"finish","restriction":"String | Int"}],"args_string":"(key : String, start : String | Int, finish : String | Int)","args_html":"(key : String, start : String | Int, finish : String | Int)","location":{"filename":"src/commands/list.cr","line_number":38,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L38"},"def":{"name":"lrange","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"start","external_name":"start","restriction":"String | Int"},{"name":"finish","external_name":"finish","restriction":"String | Int"}],"visibility":"Public","body":"run({\"lrange\", key, start.to_s, finish.to_s})"}},{"html_id":"lrem(key:String,count:Int,value:String)-instance-method","name":"lrem","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"count","external_name":"count","restriction":"Int"},{"name":"value","external_name":"value","restriction":"String"}],"args_string":"(key : String, count : Int, value : String)","args_html":"(key : String, count : Int, value : String)","location":{"filename":"src/commands/list.cr","line_number":269,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L269"},"def":{"name":"lrem","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"count","external_name":"count","restriction":"Int"},{"name":"value","external_name":"value","restriction":"String"}],"visibility":"Public","body":"run({\"lrem\", key, count.to_s, value})"}},{"html_id":"ltrim(key:String,start:String|Int,stop:String|Int)-instance-method","name":"ltrim","doc":"Trim the list contained in `key` so that it contains only the values at the\nindices in the given range.\n\n```\nredis.rpush \"ids\", %w[0 1 2 3 4 5 6 7 8 9]\nredis.ltrim \"ids\", 1, 2\n```","summary":"

    Trim the list contained in key so that it contains only the values at the indices in the given range.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"start","external_name":"start","restriction":"String | Int"},{"name":"stop","external_name":"stop","restriction":"String | Int"}],"args_string":"(key : String, start : String | Int, stop : String | Int)","args_html":"(key : String, start : String | Int, stop : String | Int)","location":{"filename":"src/commands/list.cr","line_number":312,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L312"},"def":{"name":"ltrim","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"start","external_name":"start","restriction":"String | Int"},{"name":"stop","external_name":"stop","restriction":"String | Int"}],"visibility":"Public","body":"run({\"ltrim\", key, start.to_s, stop.to_s})"}},{"html_id":"ltrim(key:String,range:Range(String,String))-instance-method","name":"ltrim","doc":"Trim the list contained in `key` so that it contains only the values at the\nindices in the given range.\n\n```\nredis.rpush \"ids\", %w[0 1 2 3 4 5 6 7 8 9]\nstart, stop = \"1,2\".split(',')\nredis.ltrim \"ids\", start..stop\n```","summary":"

    Trim the list contained in key so that it contains only the values at the indices in the given range.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"range","external_name":"range","restriction":"Range(String, String)"}],"args_string":"(key : String, range : Range(String, String))","args_html":"(key : String, range : Range(String, String))","location":{"filename":"src/commands/list.cr","line_number":281,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L281"},"def":{"name":"ltrim","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"range","external_name":"range","restriction":"Range(String, String)"}],"visibility":"Public","body":"if range.excludes_end?\n ltrim(key, range.begin.to_i, range.end.to_i)\nelse\n ltrim(key, range.begin, range.end)\nend"}},{"html_id":"ltrim(key:String,range:Range(Int32,Int32))-instance-method","name":"ltrim","doc":"Trim the list contained in `key` so that it contains only the values at the\nindices in the given range.\n\n```\nredis.rpush \"ids\", %w[0 1 2 3 4 5 6 7 8 9]\nredis.ltrim \"ids\", 1..2\n```","summary":"

    Trim the list contained in key so that it contains only the values at the indices in the given range.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"range","external_name":"range","restriction":"Range(Int32, Int32)"}],"args_string":"(key : String, range : Range(Int32, Int32))","args_html":"(key : String, range : Range(Int32, Int32))","location":{"filename":"src/commands/list.cr","line_number":296,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L296"},"def":{"name":"ltrim","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"range","external_name":"range","restriction":"Range(Int32, Int32)"}],"visibility":"Public","body":"range_end = range.end\nif range.excludes_end?\n range_end = range_end - 1\nend\nltrim(key, range.begin, range_end)\n"}},{"html_id":"rpop(key:String)-instance-method","name":"rpop","doc":"Remove and return an element from the end of the given list. If the list\nis empty or the key does not exist, this method returns `nil`\n\n```\nredis.lpush \"foo\", \"hello\"\nredis.rpop \"foo\" # => \"hello\"\nredis.rpop \"foo\" # => nil\n```","summary":"

    Remove and return an element from the end of the given list.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands/list.cr","line_number":86,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L86"},"def":{"name":"rpop","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"rpop\", key})"}},{"html_id":"rpoplpush(source:String,destination:String)-instance-method","name":"rpoplpush","doc":"Atomically remove an item from the end of a list and insert it at the\nbeginning of another. Returns that list item. If the first list is empty,\nnothing happens and this method returns `nil`.\n\n```\nredis.del \"foo\"\nredis.lpush \"foo\", \"hello\", \"world\"\nredis.rpoplpush \"foo\", \"bar\" # => \"hello\"\nredis.rpoplpush \"foo\", \"bar\" # => \"world\"\nredis.rpoplpush \"foo\", \"bar\" # => nil\n```","summary":"

    Atomically remove an item from the end of a list and insert it at the beginning of another.

    \n

    DEPRECATED Use the #lmove method instead. See the Redis docs for more inforamtion.

    ","abstract":false,"args":[{"name":"source","external_name":"source","restriction":"String"},{"name":"destination","external_name":"destination","restriction":"String"}],"args_string":"(source : String, destination : String)","args_html":"(source : String, destination : String)","location":{"filename":"src/commands/list.cr","line_number":74,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L74"},"def":{"name":"rpoplpush","args":[{"name":"source","external_name":"source","restriction":"String"},{"name":"destination","external_name":"destination","restriction":"String"}],"visibility":"Public","body":"run({\"rpoplpush\", source, destination})"}},{"html_id":"rpush(key:String,values:Enumerable(String))-instance-method","name":"rpush","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"Enumerable(String)"}],"args_string":"(key : String, values : Enumerable(String))","args_html":"(key : String, values : Enumerable(String))","location":{"filename":"src/commands/list.cr","line_number":102,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L102"},"def":{"name":"rpush","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + values.size)\n(command << \"rpush\") << key\nvalues.each do |value|\n command << value\nend\nrun(command)\n"}},{"html_id":"rpush(key,*values:String)-instance-method","name":"rpush","doc":"Insert an item at the end of a list, returning the number of items\nin the list after the insert.\n\n```\nredis.del \"my-list\" # Delete so we know it's empty\nredis.rpush \"my-list\", \"foo\", \"bar\" # => 2\nredis.rpush \"my-list\", \"foo\", \"bar\" # => 4\n```","summary":"

    Insert an item at the end of a list, returning the number of items in the list after the insert.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":""},{"name":"values","external_name":"values","restriction":"String"}],"args_string":"(key, *values : String)","args_html":"(key, *values : String)","location":{"filename":"src/commands/list.cr","line_number":98,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L98"},"def":{"name":"rpush","args":[{"name":"key","external_name":"key","restriction":""},{"name":"values","external_name":"values","restriction":"String"}],"splat_index":1,"visibility":"Public","body":"run({\"rpush\", key} + values)"}}],"types":[{"html_id":"redis/Redis/Commands/List/Side","path":"Redis/Commands/List/Side.html","kind":"enum","full_name":"Redis::Commands::List::Side","name":"Side","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/commands/list.cr","line_number":57,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L57"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"LEFT","name":"LEFT","value":"0"},{"id":"RIGHT","name":"RIGHT","value":"1"}],"namespace":{"html_id":"redis/Redis/Commands/List","kind":"module","full_name":"Redis::Commands::List","name":"List"},"instance_methods":[{"html_id":"left?-instance-method","name":"left?","abstract":false,"location":{"filename":"src/commands/list.cr","line_number":58,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L58"},"def":{"name":"left?","visibility":"Public","body":"self == LEFT"}},{"html_id":"right?-instance-method","name":"right?","abstract":false,"location":{"filename":"src/commands/list.cr","line_number":59,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L59"},"def":{"name":"right?","visibility":"Public","body":"self == RIGHT"}}]}]},{"html_id":"redis/Redis/Commands/ScriptFlushMode","path":"Redis/Commands/ScriptFlushMode.html","kind":"enum","full_name":"Redis::Commands::ScriptFlushMode","name":"ScriptFlushMode","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/commands.cr","line_number":217,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L217"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"ASYNC","name":"ASYNC","value":"0"},{"id":"SYNC","name":"SYNC","value":"1"}],"namespace":{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},"instance_methods":[{"html_id":"async?-instance-method","name":"async?","abstract":false,"location":{"filename":"src/commands.cr","line_number":218,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L218"},"def":{"name":"async?","visibility":"Public","body":"self == ASYNC"}},{"html_id":"sync?-instance-method","name":"sync?","abstract":false,"location":{"filename":"src/commands.cr","line_number":219,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L219"},"def":{"name":"sync?","visibility":"Public","body":"self == SYNC"}}]},{"html_id":"redis/Redis/Commands/Set","path":"Redis/Commands/Set.html","kind":"module","full_name":"Redis::Commands::Set","name":"Set","abstract":false,"locations":[{"filename":"src/commands/set.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/set.cr#L1"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"namespace":{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},"instance_methods":[{"html_id":"sadd(key:String,*values:String)-instance-method","name":"sadd","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"String"}],"args_string":"(key : String, *values : String)","args_html":"(key : String, *values : String)","location":{"filename":"src/commands/set.cr","line_number":2,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/set.cr#L2"},"def":{"name":"sadd","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"String"}],"splat_index":1,"visibility":"Public","body":"run({\"sadd\", key} + values)"}},{"html_id":"scard(key:String)-instance-method","name":"scard","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands/set.cr","line_number":36,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/set.cr#L36"},"def":{"name":"scard","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"scard\", key})"}},{"html_id":"sdiff(first:String,second:String)-instance-method","name":"sdiff","abstract":false,"args":[{"name":"first","external_name":"first","restriction":"String"},{"name":"second","external_name":"second","restriction":"String"}],"args_string":"(first : String, second : String)","args_html":"(first : String, second : String)","location":{"filename":"src/commands/set.cr","line_number":28,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/set.cr#L28"},"def":{"name":"sdiff","args":[{"name":"first","external_name":"first","restriction":"String"},{"name":"second","external_name":"second","restriction":"String"}],"visibility":"Public","body":"run({\"sdiff\", first, second})"}},{"html_id":"sinter(first:String,*others:String)-instance-method","name":"sinter","abstract":false,"args":[{"name":"first","external_name":"first","restriction":"String"},{"name":"others","external_name":"others","restriction":"String"}],"args_string":"(first : String, *others : String)","args_html":"(first : String, *others : String)","location":{"filename":"src/commands/set.cr","line_number":32,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/set.cr#L32"},"def":{"name":"sinter","args":[{"name":"first","external_name":"first","restriction":"String"},{"name":"others","external_name":"others","restriction":"String"}],"splat_index":1,"visibility":"Public","body":"run({\"sinter\", first} + others)"}},{"html_id":"sismember(key:String,value:String)-instance-method","name":"sismember","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"value","external_name":"value","restriction":"String"}],"args_string":"(key : String, value : String)","args_html":"(key : String, value : String)","location":{"filename":"src/commands/set.cr","line_number":6,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/set.cr#L6"},"def":{"name":"sismember","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"value","external_name":"value","restriction":"String"}],"visibility":"Public","body":"run({\"sismember\", key, value})"}},{"html_id":"smembers(key:String)-instance-method","name":"smembers","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands/set.cr","line_number":10,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/set.cr#L10"},"def":{"name":"smembers","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"smembers\", key})"}},{"html_id":"srem(key:String,members:Enumerable(String))-instance-method","name":"srem","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"members","external_name":"members","restriction":"Enumerable(String)"}],"args_string":"(key : String, members : Enumerable(String))","args_html":"(key : String, members : Enumerable(String))","location":{"filename":"src/commands/set.cr","line_number":18,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/set.cr#L18"},"def":{"name":"srem","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"members","external_name":"members","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + members.size)\n(command << \"srem\") << key\nmembers.each do |member|\n command << member\nend\nrun(command)\n"}},{"html_id":"srem(key:String,*values:String)-instance-method","name":"srem","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"String"}],"args_string":"(key : String, *values : String)","args_html":"(key : String, *values : String)","location":{"filename":"src/commands/set.cr","line_number":14,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/set.cr#L14"},"def":{"name":"srem","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"String"}],"splat_index":1,"visibility":"Public","body":"run({\"srem\", key} + values)"}}]},{"html_id":"redis/Redis/Commands/SortedSet","path":"Redis/Commands/SortedSet.html","kind":"module","full_name":"Redis::Commands::SortedSet","name":"SortedSet","abstract":false,"locations":[{"filename":"src/commands/sorted_set.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/sorted_set.cr#L1"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"namespace":{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},"instance_methods":[{"html_id":"zadd(key:String,score:String|Int64,value:String)-instance-method","name":"zadd","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"score","external_name":"score","restriction":"String | Int64"},{"name":"value","external_name":"value","restriction":"String"}],"args_string":"(key : String, score : String | Int64, value : String)","args_html":"(key : String, score : String | Int64, value : String)","location":{"filename":"src/commands/sorted_set.cr","line_number":42,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/sorted_set.cr#L42"},"def":{"name":"zadd","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"score","external_name":"score","restriction":"String | Int64"},{"name":"value","external_name":"value","restriction":"String"}],"visibility":"Public","body":"run({\"zadd\", key, score.to_s, value})"}},{"html_id":"zadd(key:String,values:Enumerable(String))-instance-method","name":"zadd","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"Enumerable(String)"}],"args_string":"(key : String, values : Enumerable(String))","args_html":"(key : String, values : Enumerable(String))","location":{"filename":"src/commands/sorted_set.cr","line_number":46,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/sorted_set.cr#L46"},"def":{"name":"zadd","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + values.size)\n(command << \"zadd\") << key\nvalues.each do |value|\n command << value\nend\nrun(command)\n"}},{"html_id":"zcard(key:String)-instance-method","name":"zcard","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands/sorted_set.cr","line_number":2,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/sorted_set.cr#L2"},"def":{"name":"zcard","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"zcard\", key})"}},{"html_id":"zcount(key:String,min:String,max:String)-instance-method","name":"zcount","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"min","external_name":"min","restriction":"String"},{"name":"max","external_name":"max","restriction":"String"}],"args_string":"(key : String, min : String, max : String)","args_html":"(key : String, min : String, max : String)","location":{"filename":"src/commands/sorted_set.cr","line_number":70,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/sorted_set.cr#L70"},"def":{"name":"zcount","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"min","external_name":"min","restriction":"String"},{"name":"max","external_name":"max","restriction":"String"}],"visibility":"Public","body":"run({\"zcount\", key, min, max})"}},{"html_id":"zrange(key:String,starting:String|Int64,ending:String|Int64,with_scores:Bool=false)-instance-method","name":"zrange","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"starting","external_name":"starting","restriction":"String | Int64"},{"name":"ending","external_name":"ending","restriction":"String | Int64"},{"name":"with_scores","default_value":"false","external_name":"with_scores","restriction":"Bool"}],"args_string":"(key : String, starting : String | Int64, ending : String | Int64, with_scores : Bool = false)","args_html":"(key : String, starting : String | Int64, ending : String | Int64, with_scores : Bool = false)","location":{"filename":"src/commands/sorted_set.cr","line_number":15,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/sorted_set.cr#L15"},"def":{"name":"zrange","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"starting","external_name":"starting","restriction":"String | Int64"},{"name":"ending","external_name":"ending","restriction":"String | Int64"},{"name":"with_scores","default_value":"false","external_name":"with_scores","restriction":"Bool"}],"visibility":"Public","body":"command = {\"zrange\", key, starting.to_s, ending.to_s}\nif with_scores\n command = command + {\"withscores\"}\nend\nrun(command)\n"}},{"html_id":"zrangebyscore(key:String,low:String|Int64,high:String|Int64,limit:Enumerable(String)|Nil=nil)-instance-method","name":"zrangebyscore","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"low","external_name":"low","restriction":"String | Int64"},{"name":"high","external_name":"high","restriction":"String | Int64"},{"name":"limit","default_value":"nil","external_name":"limit","restriction":"Enumerable(String) | ::Nil"}],"args_string":"(key : String, low : String | Int64, high : String | Int64, limit : Enumerable(String) | Nil = nil)","args_html":"(key : String, low : String | Int64, high : String | Int64, limit : Enumerable(String) | Nil = nil)","location":{"filename":"src/commands/sorted_set.cr","line_number":24,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/sorted_set.cr#L24"},"def":{"name":"zrangebyscore","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"low","external_name":"low","restriction":"String | Int64"},{"name":"high","external_name":"high","restriction":"String | Int64"},{"name":"limit","default_value":"nil","external_name":"limit","restriction":"Enumerable(String) | ::Nil"}],"visibility":"Public","body":"command = {\"zrangebyscore\", key, low.to_s, high.to_s}\nif limit\n command = command + {\"limit\", limit[0], limit[1]}\nend\nrun(command)\n"}},{"html_id":"zrem(key:String,value:String)-instance-method","name":"zrem","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"value","external_name":"value","restriction":"String"}],"args_string":"(key : String, value : String)","args_html":"(key : String, value : String)","location":{"filename":"src/commands/sorted_set.cr","line_number":54,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/sorted_set.cr#L54"},"def":{"name":"zrem","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"value","external_name":"value","restriction":"String"}],"visibility":"Public","body":"run({\"zrem\", key, value})"}},{"html_id":"zrem(key:String,values:Enumerable(String))-instance-method","name":"zrem","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"Enumerable(String)"}],"args_string":"(key : String, values : Enumerable(String))","args_html":"(key : String, values : Enumerable(String))","location":{"filename":"src/commands/sorted_set.cr","line_number":62,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/sorted_set.cr#L62"},"def":{"name":"zrem","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + values.size)\n(command << \"zrem\") << key\nvalues.each do |value|\n command << (value.as(String))\nend\nrun(command)\n"}},{"html_id":"zrem(key:String,*values:String)-instance-method","name":"zrem","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"String"}],"args_string":"(key : String, *values : String)","args_html":"(key : String, *values : String)","location":{"filename":"src/commands/sorted_set.cr","line_number":58,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/sorted_set.cr#L58"},"def":{"name":"zrem","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"String"}],"splat_index":1,"visibility":"Public","body":"run({\"zrem\", key} + values)"}},{"html_id":"zremrangebyrank(key:String,low:Int64,high:Int64)-instance-method","name":"zremrangebyrank","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"low","external_name":"low","restriction":"Int64"},{"name":"high","external_name":"high","restriction":"Int64"}],"args_string":"(key : String, low : Int64, high : Int64)","args_html":"(key : String, low : Int64, high : Int64)","location":{"filename":"src/commands/sorted_set.cr","line_number":38,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/sorted_set.cr#L38"},"def":{"name":"zremrangebyrank","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"low","external_name":"low","restriction":"Int64"},{"name":"high","external_name":"high","restriction":"Int64"}],"visibility":"Public","body":"run({\"zremrangebyrank\", key, low.to_s, high.to_s})"}},{"html_id":"zremrangebyscore(key:String,low:String|Int64,high:String|Int64)-instance-method","name":"zremrangebyscore","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"low","external_name":"low","restriction":"String | Int64"},{"name":"high","external_name":"high","restriction":"String | Int64"}],"args_string":"(key : String, low : String | Int64, high : String | Int64)","args_html":"(key : String, low : String | Int64, high : String | Int64)","location":{"filename":"src/commands/sorted_set.cr","line_number":34,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/sorted_set.cr#L34"},"def":{"name":"zremrangebyscore","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"low","external_name":"low","restriction":"String | Int64"},{"name":"high","external_name":"high","restriction":"String | Int64"}],"visibility":"Public","body":"run({\"zremrangebyscore\", key, low.to_s, high.to_s})"}},{"html_id":"zrevrange(key:String,starting:String|Int64,ending:String|Int64,with_scores:Bool=false)-instance-method","name":"zrevrange","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"starting","external_name":"starting","restriction":"String | Int64"},{"name":"ending","external_name":"ending","restriction":"String | Int64"},{"name":"with_scores","default_value":"false","external_name":"with_scores","restriction":"Bool"}],"args_string":"(key : String, starting : String | Int64, ending : String | Int64, with_scores : Bool = false)","args_html":"(key : String, starting : String | Int64, ending : String | Int64, with_scores : Bool = false)","location":{"filename":"src/commands/sorted_set.cr","line_number":6,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/sorted_set.cr#L6"},"def":{"name":"zrevrange","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"starting","external_name":"starting","restriction":"String | Int64"},{"name":"ending","external_name":"ending","restriction":"String | Int64"},{"name":"with_scores","default_value":"false","external_name":"with_scores","restriction":"Bool"}],"visibility":"Public","body":"command = {\"zrevrange\", key, starting.to_s, ending.to_s}\nif with_scores\n command = command + {\"withscores\"}\nend\nrun(command)\n"}},{"html_id":"zscore(key:String,value:String)-instance-method","name":"zscore","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"value","external_name":"value","restriction":"String"}],"args_string":"(key : String, value : String)","args_html":"(key : String, value : String)","location":{"filename":"src/commands/sorted_set.cr","line_number":74,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/sorted_set.cr#L74"},"def":{"name":"zscore","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"value","external_name":"value","restriction":"String"}],"visibility":"Public","body":"run({\"zscore\", key, value})"}}]},{"html_id":"redis/Redis/Commands/Stream","path":"Redis/Commands/Stream.html","kind":"module","full_name":"Redis::Commands::Stream","name":"Stream","abstract":false,"locations":[{"filename":"src/commands/stream.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L1"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"namespace":{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},"instance_methods":[{"html_id":"xack(key:String,group:String,id:String)-instance-method","name":"xack","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"group","external_name":"group","restriction":"String"},{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(key : String, group : String, id : String)","args_html":"(key : String, group : String, id : String)","location":{"filename":"src/commands/stream.cr","line_number":249,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L249"},"def":{"name":"xack","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"group","external_name":"group","restriction":"String"},{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"run({\"xack\", key, group, id})"}},{"html_id":"xack(key:String,group:String,ids:Enumerable(String))-instance-method","name":"xack","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"group","external_name":"group","restriction":"String"},{"name":"ids","external_name":"ids","restriction":"Enumerable(String)"}],"args_string":"(key : String, group : String, ids : Enumerable(String))","args_html":"(key : String, group : String, ids : Enumerable(String))","location":{"filename":"src/commands/stream.cr","line_number":253,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L253"},"def":{"name":"xack","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"group","external_name":"group","restriction":"String"},{"name":"ids","external_name":"ids","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: ids.size + 3)\n((command << \"xack\") << key) << group\nids.each do |id|\n command << id\nend\nrun(command)\n"}},{"html_id":"xadd(key:String,id:String,maxlen,data:Hash(String,String))-instance-method","name":"xadd","doc":"Append an entry with the specified data to the stream with the given `key`\nand gives it the specified `id`. If the id is `\"*\"`, Redis will assign it\nan id of the form `\"#{Time.utc.to_unix_ms}-#{autoincrementing_index}\"`.\nIf `maxlen` is provided, Redis will trim the stream to the specified\nlength. If `maxlen` is of the form `~ 1000`, Redis will trim it to\n*approximately* that length, removing entries when it can do so\nefficiently. This method returns the `id` that Redis stores.\n\n```\nredis.xadd \"my-stream\", \"*\", {\"name\" => \"foo\", \"id\" => UUID.random.to_s}\n```","summary":"

    Append an entry with the specified data to the stream with the given key and gives it the specified id.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"id","external_name":"id","restriction":"String"},{"name":"maxlen","external_name":"maxlen","restriction":""},{"name":"data","external_name":"data","restriction":"Hash(String, String)"}],"args_string":"(key : String, id : String, maxlen, data : Hash(String, String))","args_html":"(key : String, id : String, maxlen, data : Hash(String, String))","location":{"filename":"src/commands/stream.cr","line_number":59,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L59"},"def":{"name":"xadd","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"id","external_name":"id","restriction":"String"},{"name":"maxlen","external_name":"maxlen","restriction":""},{"name":"data","external_name":"data","restriction":"Hash(String, String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: (data.size * 2) + 3)\n(command << \"xadd\") << key\nif maxlen\n (command << \"maxlen\") << maxlen\nend\ncommand << id\ndata.each do |key, value|\n (command << key) << value\nend\nrun(command)\n"}},{"html_id":"xadd(key:String,id:String,data:Hash(String,String))-instance-method","name":"xadd","doc":"Append an entry with the specified data to the stream with the given `key`\nand gives it the specified `id`. If the id is `\"*\"`, Redis will assign it\nan id of the form `\"#{Time.utc.to_unix_ms}-#{autoincrementing_index}\"`.\nIf `maxlen` is provided, Redis will trim the stream to the specified\nlength. If `maxlen` is of the form `~ 1000`, Redis will trim it to\n*approximately* that length, removing entries when it can do so\nefficiently. This method returns the `id` that Redis stores.\n\n```\nredis.xadd \"my-stream\", \"*\", {\"name\" => \"foo\", \"id\" => UUID.random.to_s}\n```","summary":"

    Append an entry with the specified data to the stream with the given key and gives it the specified id.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"id","external_name":"id","restriction":"String"},{"name":"data","external_name":"data","restriction":"Hash(String, String)"}],"args_string":"(key : String, id : String, data : Hash(String, String))","args_html":"(key : String, id : String, data : Hash(String, String))","location":{"filename":"src/commands/stream.cr","line_number":44,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L44"},"def":{"name":"xadd","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"id","external_name":"id","restriction":"String"},{"name":"data","external_name":"data","restriction":"Hash(String, String)"}],"visibility":"Public","body":"xadd(key, id, maxlen: nil, data: data)"}},{"html_id":"xadd(key:String,id:String,maxlen=nil,**data)-instance-method","name":"xadd","doc":"Append an entry with the specified data to the stream with the given `key`\nand gives it the specified `id`. If the id is `\"*\"`, Redis will assign it\nan id of the form `\"#{Time.utc.to_unix_ms}-#{autoincrementing_index}\"`.\nIf `maxlen` is provided, Redis will trim the stream to the specified\nlength. If `maxlen` is of the form `~ 1000`, Redis will trim it to\n*approximately* that length, removing entries when it can do so\nefficiently. This method returns the `id` that Redis stores.\n\n```\nredis.xadd \"my-stream\", \"*\", name: \"foo\", id: UUID.random.to_s\n```","summary":"

    Append an entry with the specified data to the stream with the given key and gives it the specified id.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"id","external_name":"id","restriction":"String"},{"name":"maxlen","default_value":"nil","external_name":"maxlen","restriction":""}],"args_string":"(key : String, id : String, maxlen = nil, **data)","args_html":"(key : String, id : String, maxlen = nil, **data)","location":{"filename":"src/commands/stream.cr","line_number":13,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L13"},"def":{"name":"xadd","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"id","external_name":"id","restriction":"String"},{"name":"maxlen","default_value":"nil","external_name":"maxlen","restriction":""}],"double_splat":{"name":"data","external_name":"data","restriction":""},"visibility":"Public","body":"command = Array(String).new(initial_capacity: (data.size * 2) + 6)\n(command << \"xadd\") << key\nif maxlen\n command << \"maxlen\"\n case maxlen\n when Tuple\n maxlen.each do |entry|\n command << entry\n end\n when String\n command << maxlen\n end\nend\ncommand << id\ndata.each do |key, value|\n (command << key.to_s) << value\nend\nrun(command)\n"}},{"html_id":"xautoclaim(key:String,group:String,consumer:String,min_idle_time:Time::Span,start:String,count:Int|String|Nil=nil)-instance-method","name":"xautoclaim","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"group","external_name":"group","restriction":"String"},{"name":"consumer","external_name":"consumer","restriction":"String"},{"name":"min_idle_time","external_name":"min_idle_time","restriction":"Time::Span"},{"name":"start","external_name":"start","restriction":"String"},{"name":"count","default_value":"nil","external_name":"count","restriction":"Int | String | Nil"}],"args_string":"(key : String, group : String, consumer : String, min_idle_time : Time::Span, start : String, count : Int | String | Nil = nil)","args_html":"(key : String, group : String, consumer : String, min_idle_time : Time::Span, start : String, count : Int | String | Nil = nil)","location":{"filename":"src/commands/stream.cr","line_number":261,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L261"},"def":{"name":"xautoclaim","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"group","external_name":"group","restriction":"String"},{"name":"consumer","external_name":"consumer","restriction":"String"},{"name":"min_idle_time","external_name":"min_idle_time","restriction":"Time::Span"},{"name":"start","external_name":"start","restriction":"String"},{"name":"count","default_value":"nil","external_name":"count","restriction":"Int | String | Nil"}],"visibility":"Public","body":"min_idle_time = min_idle_time.total_milliseconds.to_i.to_s\ncommand = {\"xautoclaim\", key, group, consumer, min_idle_time, start}\nif count\n command = command + {\"count\", count.to_s}\nend\nrun(command)\n"}},{"html_id":"xdel(key:String,ids:Enumerable(String))-instance-method","name":"xdel","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"ids","external_name":"ids","restriction":"Enumerable(String)"}],"args_string":"(key : String, ids : Enumerable(String))","args_html":"(key : String, ids : Enumerable(String))","location":{"filename":"src/commands/stream.cr","line_number":75,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L75"},"def":{"name":"xdel","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"ids","external_name":"ids","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + ids.size)\n(command << \"xdel\") << key\nids.each do |id|\n command << id\nend\nrun(command)\n"}},{"html_id":"xdel(key:String,*ids:String)-instance-method","name":"xdel","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"ids","external_name":"ids","restriction":"String"}],"args_string":"(key : String, *ids : String)","args_html":"(key : String, *ids : String)","location":{"filename":"src/commands/stream.cr","line_number":71,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L71"},"def":{"name":"xdel","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"ids","external_name":"ids","restriction":"String"}],"splat_index":1,"visibility":"Public","body":"xdel(key, ids)"}},{"html_id":"xgroup(command:String,key:String,groupname:String)-instance-method","name":"xgroup","doc":"Run a Redis XGROUP subcommand for a given stream. See the [XGROUP command in the Redis documentation](https://redis.io/commands/xgroup) for more information.\n\n```\nredis.xgroup \"DESTROY\", \"my-stream\", \"my-group\"\n```","summary":"

    Run a Redis XGROUP subcommand for a given stream.

    ","abstract":false,"args":[{"name":"command","external_name":"command","restriction":"String"},{"name":"key","external_name":"key","restriction":"String"},{"name":"groupname","external_name":"groupname","restriction":"String"}],"args_string":"(command : String, key : String, groupname : String)","args_html":"(command : String, key : String, groupname : String)","location":{"filename":"src/commands/stream.cr","line_number":135,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L135"},"def":{"name":"xgroup","args":[{"name":"command","external_name":"command","restriction":"String"},{"name":"key","external_name":"key","restriction":"String"},{"name":"groupname","external_name":"groupname","restriction":"String"}],"visibility":"Public","body":"run({\"xgroup\", command, key, groupname})"}},{"html_id":"xgroup(command:XGroup,key:String,groupname:String,*,id:String|Nil=nil,mkstream=false,consumer_name:String|Nil=nil)-instance-method","name":"xgroup","doc":"Run a Redis XGROUP subcommand for a given stream. See the [XGROUP command in the Redis documentation](https://redis.io/commands/xgroup) for more information.\n\n```\nredis.xgroup :create, \"my-stream\", \"my-group\", mkstream: true\n```","summary":"

    Run a Redis XGROUP subcommand for a given stream.

    ","abstract":false,"args":[{"name":"command","external_name":"command","restriction":"XGroup"},{"name":"key","external_name":"key","restriction":"String"},{"name":"groupname","external_name":"groupname","restriction":"String"},{"name":"","external_name":"","restriction":""},{"name":"id","default_value":"nil","external_name":"id","restriction":"String | ::Nil"},{"name":"mkstream","default_value":"false","external_name":"mkstream","restriction":""},{"name":"consumer_name","default_value":"nil","external_name":"consumer_name","restriction":"String | ::Nil"}],"args_string":"(command : XGroup, key : String, groupname : String, *, id : String | Nil = nil, mkstream = false, consumer_name : String | Nil = nil)","args_html":"(command : XGroup, key : String, groupname : String, *, id : String | Nil = nil, mkstream = false, consumer_name : String | Nil = nil)","location":{"filename":"src/commands/stream.cr","line_number":113,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L113"},"def":{"name":"xgroup","args":[{"name":"command","external_name":"command","restriction":"XGroup"},{"name":"key","external_name":"key","restriction":"String"},{"name":"groupname","external_name":"groupname","restriction":"String"},{"name":"","external_name":"","restriction":""},{"name":"id","default_value":"nil","external_name":"id","restriction":"String | ::Nil"},{"name":"mkstream","default_value":"false","external_name":"mkstream","restriction":""},{"name":"consumer_name","default_value":"nil","external_name":"consumer_name","restriction":"String | ::Nil"}],"splat_index":3,"visibility":"Public","body":"cmd = Array(String).new(initial_capacity: 7)\n(((cmd << \"xgroup\") << command.to_s) << key) << groupname\nif id\n cmd << id\nend\nif mkstream\n cmd << \"mkstream\"\nend\nif consumer_name\n cmd << consumer_name\nend\nrun(cmd)\n"}},{"html_id":"xgroup(command:String,key:String,groupname:String,*args:String)-instance-method","name":"xgroup","doc":"Run a Redis XGROUP subcommand for a given stream. See the [XGROUP command in the Redis documentation](https://redis.io/commands/xgroup) for more information.\n\n```\nredis.xgroup \"CREATE\", \"my-stream\", \"my-group\", \"0\"\n```","summary":"

    Run a Redis XGROUP subcommand for a given stream.

    ","abstract":false,"args":[{"name":"command","external_name":"command","restriction":"String"},{"name":"key","external_name":"key","restriction":"String"},{"name":"groupname","external_name":"groupname","restriction":"String"},{"name":"args","external_name":"args","restriction":"String"}],"args_string":"(command : String, key : String, groupname : String, *args : String)","args_html":"(command : String, key : String, groupname : String, *args : String)","location":{"filename":"src/commands/stream.cr","line_number":144,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L144"},"def":{"name":"xgroup","args":[{"name":"command","external_name":"command","restriction":"String"},{"name":"key","external_name":"key","restriction":"String"},{"name":"groupname","external_name":"groupname","restriction":"String"},{"name":"args","external_name":"args","restriction":"String"}],"splat_index":3,"visibility":"Public","body":"run({\"xgroup\", command, key, groupname} + args)"}},{"html_id":"xgroup_create(key:String,groupname:String,*,id:String=\"$\",mkstream=false)-instance-method","name":"xgroup_create","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"groupname","external_name":"groupname","restriction":"String"},{"name":"","external_name":"","restriction":""},{"name":"id","default_value":"\"$\"","external_name":"id","restriction":"String"},{"name":"mkstream","default_value":"false","external_name":"mkstream","restriction":""}],"args_string":"(key : String, groupname : String, *, id : String = \"$\", mkstream = false)","args_html":"(key : String, groupname : String, *, id : String = "$", mkstream = false)","location":{"filename":"src/commands/stream.cr","line_number":99,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L99"},"def":{"name":"xgroup_create","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"groupname","external_name":"groupname","restriction":"String"},{"name":"","external_name":"","restriction":""},{"name":"id","default_value":"\"$\"","external_name":"id","restriction":"String"},{"name":"mkstream","default_value":"false","external_name":"mkstream","restriction":""}],"splat_index":2,"visibility":"Public","body":"xgroup(XGroup::CREATE, key, groupname, id: id, mkstream: mkstream)"}},{"html_id":"xgroup_create_consumer(key:String,groupname:String,consumer_name:String)-instance-method","name":"xgroup_create_consumer","doc":"XGROUP CREATECONSUMER key groupname consumername","summary":"

    XGROUP CREATECONSUMER key groupname consumername

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"groupname","external_name":"groupname","restriction":"String"},{"name":"consumer_name","external_name":"consumer_name","restriction":"String"}],"args_string":"(key : String, groupname : String, consumer_name : String)","args_html":"(key : String, groupname : String, consumer_name : String)","location":{"filename":"src/commands/stream.cr","line_number":104,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L104"},"def":{"name":"xgroup_create_consumer","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"groupname","external_name":"groupname","restriction":"String"},{"name":"consumer_name","external_name":"consumer_name","restriction":"String"}],"visibility":"Public","body":"xgroup(XGroup::CREATECONSUMER, key, groupname, consumer_name: consumer_name)"}},{"html_id":"xlen(key:String)-instance-method","name":"xlen","doc":"Return the number of entries in the given stream","summary":"

    Return the number of entries in the given stream

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands/stream.cr","line_number":84,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L84"},"def":{"name":"xlen","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"xlen\", key})"}},{"html_id":"xpending(key:String,group:String,start:String,endfinish:String,count:String|Int,idle:String|Time::Span|Nil=nil)-instance-method","name":"xpending","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"group","external_name":"group","restriction":"String"},{"name":"start","external_name":"start","restriction":"String"},{"name":"finish","external_name":"end","restriction":"String"},{"name":"count","external_name":"count","restriction":"String | Int"},{"name":"idle","default_value":"nil","external_name":"idle","restriction":"String | Time::Span | Nil"}],"args_string":"(key : String, group : String, start : String, end finish : String, count : String | Int, idle : String | Time::Span | Nil = nil)","args_html":"(key : String, group : String, start : String, end finish : String, count : String | Int, idle : String | Time::Span | Nil = nil)","location":{"filename":"src/commands/stream.cr","line_number":229,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L229"},"def":{"name":"xpending","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"group","external_name":"group","restriction":"String"},{"name":"start","external_name":"start","restriction":"String"},{"name":"finish","external_name":"end","restriction":"String"},{"name":"count","external_name":"count","restriction":"String | Int"},{"name":"idle","default_value":"nil","external_name":"idle","restriction":"String | Time::Span | Nil"}],"visibility":"Public","body":"command = {\"xpending\", key, group}\ncase idle\nwhen String\n command = command + {\"idle\", idle}\nwhen Time::Span\n command = command + {\"idle\", idle.total_milliseconds.to_i.to_s}\nend\ncommand = command + {start, finish, count.to_s}\nrun(command)\n"}},{"html_id":"xpending(key:String,group:String)-instance-method","name":"xpending","doc":"XPENDING key group [[IDLE min-idle-time] start end count [consumer]]","summary":"

    XPENDING key group [[IDLE min-idle-time] start end count [consumer]]

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"group","external_name":"group","restriction":"String"}],"args_string":"(key : String, group : String)","args_html":"(key : String, group : String)","location":{"filename":"src/commands/stream.cr","line_number":225,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L225"},"def":{"name":"xpending","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"group","external_name":"group","restriction":"String"}],"visibility":"Public","body":"run({\"xpending\", key, group})"}},{"html_id":"xrange(key:String,startmin,endmax,count=nil)-instance-method","name":"xrange","doc":"Return the entries in the given stream between the `start` and `end` ids.\nIf `count` is provided, Redis will return only that number of entries.","summary":"

    Return the entries in the given stream between the start and end ids.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"min","external_name":"start","restriction":""},{"name":"max","external_name":"end","restriction":""},{"name":"count","default_value":"nil","external_name":"count","restriction":""}],"args_string":"(key : String, start min, end max, count = nil)","args_html":"(key : String, start min, end max, count = nil)","location":{"filename":"src/commands/stream.cr","line_number":90,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L90"},"def":{"name":"xrange","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"min","external_name":"start","restriction":""},{"name":"max","external_name":"end","restriction":""},{"name":"count","default_value":"nil","external_name":"count","restriction":""}],"visibility":"Public","body":"command = {\"xrange\", key, min, max}\nif count\n command = command + {\"count\", count}\nend\nrun(command)\n"}},{"html_id":"xreadgroup(group:String,consumer:String,count:String|Int|Nil=nil,block:Time::Span|String|Int|Nil=nil,no_ack=false,streams:::Hash(String,String)={}ofString=>String)-instance-method","name":"xreadgroup","doc":"Execute an `XREADGROUP` command on the Redis server.\n\nThis is returned in its raw form from Redis, but you can pass it to a\n`Redis::Streaming::XReadGroupResponse` to make it easier to work with.","summary":"

    Execute an XREADGROUP command on the Redis server.

    ","abstract":false,"args":[{"name":"group","external_name":"group","restriction":"String"},{"name":"consumer","external_name":"consumer","restriction":"String"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"},{"name":"block","default_value":"nil","external_name":"block","restriction":"Time::Span | String | Int | Nil"},{"name":"no_ack","default_value":"false","external_name":"no_ack","restriction":""},{"name":"streams","default_value":"{} of String => String","external_name":"streams","restriction":"::Hash(String, String)"}],"args_string":"(group : String, consumer : String, count : String | Int | Nil = nil, block : Time::Span | String | Int | Nil = nil, no_ack = false, streams : ::Hash(String, String) = {} of String => String)","args_html":"(group : String, consumer : String, count : String | Int | Nil = nil, block : Time::Span | String | Int | Nil = nil, no_ack = false, streams : ::Hash(String, String) = {} of String => String)","location":{"filename":"src/commands/stream.cr","line_number":152,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L152"},"def":{"name":"xreadgroup","args":[{"name":"group","external_name":"group","restriction":"String"},{"name":"consumer","external_name":"consumer","restriction":"String"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"},{"name":"block","default_value":"nil","external_name":"block","restriction":"Time::Span | String | Int | Nil"},{"name":"no_ack","default_value":"false","external_name":"no_ack","restriction":""},{"name":"streams","default_value":"{} of String => String","external_name":"streams","restriction":"::Hash(String, String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 9 + (streams.size * 2))\n(((command << \"xreadgroup\") << \"group\") << group) << consumer\nif count\n (command << \"count\") << count.to_s\nend\ncase block\nin Time::Span\n (command << \"block\") << block.total_milliseconds.to_i.to_s\nin String\n (command << \"block\") << block\nin Int\n (command << \"block\") << block.to_s\nin Nil\nend\nif no_ack\n command << \"noack\"\nend\ncommand << \"streams\"\nstreams.each_key do |key|\n command << key\nend\nstreams.each_value do |value|\n command << value\nend\nrun(command)\n"}},{"html_id":"xreadgroup(group:String,consumer:String,count:String|Int|Nil=nil,block:Time::Span|String|Int|Nil=nil,no_ack=false,streams:NamedTuple=NamedTuple.new)-instance-method","name":"xreadgroup","doc":"Execute an `XREADGROUP` command on the Redis server. If `block` is not nil, the server will block for up to that much time (if you pass a number, it will be interpreted as milliseconds) until any new messages enter the stream.\n\nThis is returned in its raw form from Redis, but you can pass it to a\n`Redis::Streaming::XReadGroupResponse` to make it easier to work with.\n\n```\n# Long-poll for up to 10 messages from the stream with key `my_stream`,\n# blocking for up to 2 seconds if there are no messages waiting.\nresponse = redis.xreadgroup \"group\", \"consumer\",\n streams: {my_stream: \">\"},\n count: 10,\n block: 2.seconds\nresponse = Redis::Streaming::XReadGroupResponse.new(response)\n```","summary":"

    Execute an XREADGROUP command on the Redis server.

    ","abstract":false,"args":[{"name":"group","external_name":"group","restriction":"String"},{"name":"consumer","external_name":"consumer","restriction":"String"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"},{"name":"block","default_value":"nil","external_name":"block","restriction":"Time::Span | String | Int | Nil"},{"name":"no_ack","default_value":"false","external_name":"no_ack","restriction":""},{"name":"streams","default_value":"NamedTuple.new","external_name":"streams","restriction":"NamedTuple"}],"args_string":"(group : String, consumer : String, count : String | Int | Nil = nil, block : Time::Span | String | Int | Nil = nil, no_ack = false, streams : NamedTuple = NamedTuple.new)","args_html":"(group : String, consumer : String, count : String | Int | Nil = nil, block : Time::Span | String | Int | Nil = nil, no_ack = false, streams : NamedTuple = NamedTuple.new)","location":{"filename":"src/commands/stream.cr","line_number":195,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L195"},"def":{"name":"xreadgroup","args":[{"name":"group","external_name":"group","restriction":"String"},{"name":"consumer","external_name":"consumer","restriction":"String"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"},{"name":"block","default_value":"nil","external_name":"block","restriction":"Time::Span | String | Int | Nil"},{"name":"no_ack","default_value":"false","external_name":"no_ack","restriction":""},{"name":"streams","default_value":"NamedTuple.new","external_name":"streams","restriction":"NamedTuple"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 9 + (streams.size * 2))\n(((command << \"xreadgroup\") << \"group\") << group) << consumer\nif count\n (command << \"count\") << count.to_s\nend\ncase block\nin Time::Span\n (command << \"block\") << block.total_milliseconds.to_i.to_s\nin String\n (command << \"block\") << block\nin Int\n (command << \"block\") << block.to_s\nin Nil\nend\nif no_ack\n command << \"noack\"\nend\ncommand << \"streams\"\nstreams.each_key do |key|\n command << key.to_s\nend\nstreams.each_value do |value|\n command << value\nend\nrun(command)\n"}}],"types":[{"html_id":"redis/Redis/Commands/Stream/XGroup","path":"Redis/Commands/Stream/XGroup.html","kind":"enum","full_name":"Redis::Commands::Stream::XGroup","name":"XGroup","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/commands/stream.cr","line_number":123,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L123"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"CREATE","name":"CREATE","value":"0"},{"id":"DESTROY","name":"DESTROY","value":"1"},{"id":"CREATECONSUMER","name":"CREATECONSUMER","value":"2"},{"id":"DELCONSUMER","name":"DELCONSUMER","value":"3"}],"namespace":{"html_id":"redis/Redis/Commands/Stream","kind":"module","full_name":"Redis::Commands::Stream","name":"Stream"},"instance_methods":[{"html_id":"create?-instance-method","name":"create?","abstract":false,"location":{"filename":"src/commands/stream.cr","line_number":124,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L124"},"def":{"name":"create?","visibility":"Public","body":"self == CREATE"}},{"html_id":"createconsumer?-instance-method","name":"createconsumer?","abstract":false,"location":{"filename":"src/commands/stream.cr","line_number":126,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L126"},"def":{"name":"createconsumer?","visibility":"Public","body":"self == CREATECONSUMER"}},{"html_id":"delconsumer?-instance-method","name":"delconsumer?","abstract":false,"location":{"filename":"src/commands/stream.cr","line_number":127,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L127"},"def":{"name":"delconsumer?","visibility":"Public","body":"self == DELCONSUMER"}},{"html_id":"destroy?-instance-method","name":"destroy?","abstract":false,"location":{"filename":"src/commands/stream.cr","line_number":125,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L125"},"def":{"name":"destroy?","visibility":"Public","body":"self == DESTROY"}}]}]}]},{"html_id":"redis/Redis/Connection","path":"Redis/Connection.html","kind":"class","full_name":"Redis::Connection","name":"Connection","abstract":false,"superclass":{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},{"html_id":"redis/Redis/Commands/Stream","kind":"module","full_name":"Redis::Commands::Stream","name":"Stream"},{"html_id":"redis/Redis/Commands/SortedSet","kind":"module","full_name":"Redis::Commands::SortedSet","name":"SortedSet"},{"html_id":"redis/Redis/Commands/Set","kind":"module","full_name":"Redis::Commands::Set","name":"Set"},{"html_id":"redis/Redis/Commands/List","kind":"module","full_name":"Redis::Commands::List","name":"List"},{"html_id":"redis/Redis/Commands/Hash","kind":"module","full_name":"Redis::Commands::Hash","name":"Hash"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/connection.cr","line_number":14,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L14"},{"filename":"src/graph.cr","line_number":502,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L502"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"doc":"The connection wraps the TCP connection to the Redis server.","summary":"

    The connection wraps the TCP connection to the Redis server.

    ","constructors":[{"html_id":"new(uri:URI=URI.parse(\"redis:///\"))-class-method","name":"new","doc":"We receive all connection information in the URI.\n\nSSL connections require specifying the `rediss://` scheme.\nPassword authentication uses the URI password.\nDB selection uses the URI path.","summary":"

    We receive all connection information in the URI.

    ","abstract":false,"args":[{"name":"uri","default_value":"URI.parse(\"redis:///\")","external_name":"uri","restriction":"::URI"}],"args_string":"(uri : URI = URI.parse(\"redis:///\"))","args_html":"(uri : URI = URI.parse("redis:///"))","location":{"filename":"src/connection.cr","line_number":27,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L27"},"def":{"name":"new","args":[{"name":"uri","default_value":"URI.parse(\"redis:///\")","external_name":"uri","restriction":"::URI"}],"visibility":"Public","body":"_ = allocate\n_.initialize(uri)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"close-instance-method","name":"close","doc":"Close the connection to the server.","summary":"

    Close the connection to the server.

    ","abstract":false,"location":{"filename":"src/connection.cr","line_number":402,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L402"},"def":{"name":"close","visibility":"Public","body":"@socket.close"}},{"html_id":"encode(command)-instance-method","name":"encode","doc":"Send the given command over the wire without waiting for a reply. This is\nuseful for query pipelining or sending commands that have no return value.\n\nWARNING: Be careful with this because you can get the client out of sync\nwith the server. You should almost never have to use this, but it can be\nuseful if a command like this has not been implemented yet.","summary":"

    Send the given command over the wire without waiting for a reply.

    ","abstract":false,"args":[{"name":"command","external_name":"command","restriction":""}],"args_string":"(command)","args_html":"(command)","location":{"filename":"src/connection.cr","line_number":449,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L449"},"def":{"name":"encode","args":[{"name":"command","external_name":"command","restriction":""}],"visibility":"Public","body":"@writer.encode(command)"}},{"html_id":"flush-instance-method","name":"flush","doc":"Flush the connection buffer and make sure we've sent everything to the\nserver.","summary":"

    Flush the connection buffer and make sure we've sent everything to the server.

    ","abstract":false,"location":{"filename":"src/connection.cr","line_number":413,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L413"},"def":{"name":"flush","visibility":"Public","body":"@socket.flush"}},{"html_id":"hscan_each(key:String,matchpattern:String|Nil=nil,count:String|Int|Nil=nil,&):Nil-instance-method","name":"hscan_each","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"pattern","default_value":"nil","external_name":"match","restriction":"String | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"}],"args_string":"(key : String, match pattern : String | Nil = nil, count : String | Int | Nil = nil, &) : Nil","args_html":"(key : String, match pattern : String | Nil = nil, count : String | Int | Nil = nil, &) : Nil","location":{"filename":"src/connection.cr","line_number":388,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L388"},"def":{"name":"hscan_each","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"pattern","default_value":"nil","external_name":"match","restriction":"String | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"}],"yields":1,"block_arity":1,"return_type":"Nil","visibility":"Public","body":"cursor = \"\"\nwhile !(cursor == \"0\")\n response = hscan(key, cursor, match: pattern, count: count)\n cursor, results = response.as(Array)\n cursor = cursor.as(String)\n (results.as(Array)).each do |key|\n yield key.as(String)\n end\nend\n"}},{"html_id":"multi(retries=5,&)-instance-method","name":"multi","doc":"Execute a transaction within the server. The transaction is automatically\ncommitted at the end of the block or can be rolled back with\n`Transaction#discard`. Transactions are also rolled back if an exception\nis raised.\n\n```\nredis.multi do |redis|\n redis.set \"foo\", \"bar\"\n redis.incr \"counter\"\n raise \"Oops!\"\nend\n\nredis.get \"foo\" # => nil\nredis.get \"counter\" # => nil\n```","summary":"

    Execute a transaction within the server.

    ","abstract":false,"args":[{"name":"retries","default_value":"5","external_name":"retries","restriction":""}],"args_string":"(retries = 5, &)","args_html":"(retries = 5, &)","location":{"filename":"src/connection.cr","line_number":115,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L115"},"def":{"name":"multi","args":[{"name":"retries","default_value":"5","external_name":"retries","restriction":""}],"yields":1,"block_arity":1,"visibility":"Public","body":"loop do\n begin\n txn = Transaction.new(self)\n begin\n txn.start!\n yield txn\n if txn.discarded?\n return [] of Value\n else\n return txn.exec.as(Array)\n end\n rescue ex\n txn.discard\n raise(ex)\n end\n rescue ex : IO::Error\n if retries > 0\n retries = retries - 1\n initialize(@uri)\n else\n raise(ex)\n end\n end\nend"}},{"html_id":"pipeline(&)-instance-method","name":"pipeline","doc":"Execute a pipeline of commands. A pipeline sends all commands to the\nserver before reading any of the results.\n\n```\nredis.pipeline do |redis|\n redis.set \"foo\", \"bar\"\n redis.incr \"counter\"\nend\n```","summary":"

    Execute a pipeline of commands.

    ","abstract":false,"location":{"filename":"src/connection.cr","line_number":81,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L81"},"def":{"name":"pipeline","yields":1,"block_arity":1,"visibility":"Public","body":"pipeline = Pipeline.new(self)\nerror = nil\nbegin\n yield pipeline\nrescue ex\n error = ex\nend\nflush\nresult = pipeline.commit\nif error\n raise(error)\nelse\n result\nend\n"}},{"html_id":"psubscribe(*channels:String,&block:Subscription,self->)-instance-method","name":"psubscribe","doc":"Subscribe to the given pubsub channels. The block yields a subscription\nobject and the connection. You can setup `on_message`, `on_subscribe`,\nand `on_unsubscribe` on the subscription.\n\n```\nredis.subscribe \"channel1\", \"channel2\" do |subscription, connection|\n subscription.on_message do |channel, message|\n if message == \"unsubscribe\"\n connection.unsubscribe channel\n end\n\n # ...\n end\n\n # Respond to new subscribers\n subscription.on_subscribe do |channel, sub_count|\n connection.set \"sub_count:#{channel}\", sub_count.to_s\n end\n\n # Respond to losing subscribers\n subscription.on_unsubscribe do |channel, sub_count|\n connection.set \"sub_count:#{channel}\", sub_count.to_s\n end\nend\n```\n\nFor more information, see the documentation for:\n- [`SUBSCRIBE`](https://redis.io/commands/subscribe/)\n- [`PSUBSCRIBE`](https://redis.io/commands/psubscribe/)","summary":"

    Subscribe to the given pubsub channels.

    ","abstract":false,"args":[{"name":"channels","external_name":"channels","restriction":"String"}],"args_string":"(*channels : String, &block : Subscription, self -> )","args_html":"(*channels : String, &block : Subscription, self -> )","location":{"filename":"src/connection.cr","line_number":141,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L141"},"def":{"name":"psubscribe","args":[{"name":"channels","external_name":"channels","restriction":"String"}],"splat_index":0,"yields":2,"block_arity":2,"block_arg":{"name":"block","external_name":"block","restriction":"(Subscription, self ->)"},"visibility":"Public","body":"subscription = Subscription.new(self)\n@writer.encode({\"psubscribe\"} + channels)\nflush\nyield subscription, self\nsubscription.call\n"}},{"html_id":"punsubscribe(*channels:String)-instance-method","name":"punsubscribe","abstract":false,"args":[{"name":"channels","external_name":"channels","restriction":"String"}],"args_string":"(*channels : String)","args_html":"(*channels : String)","location":{"filename":"src/connection.cr","line_number":202,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L202"},"def":{"name":"punsubscribe","args":[{"name":"channels","external_name":"channels","restriction":"String"}],"splat_index":0,"visibility":"Public","body":"@writer.encode({\"punsubscribe\"} + channels)\nflush\n"}},{"html_id":"read-instance-method","name":"read","doc":"Read the next value from the server","summary":"

    Read the next value from the server

    ","abstract":false,"location":{"filename":"src/connection.cr","line_number":418,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L418"},"def":{"name":"read","visibility":"Public","body":"case value = @parser.read\nwhen Error\n raise(value)\nelse\n value\nend"}},{"html_id":"read?-instance-method","name":"read?","doc":"Read the next value from the server, returning `nil` if the connection is\nclosed.","summary":"

    Read the next value from the server, returning nil if the connection is closed.

    ","abstract":false,"location":{"filename":"src/connection.cr","line_number":429,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L429"},"def":{"name":"read?","visibility":"Public","body":"case value = @parser.read?\nwhen Error\n raise(value)\nelse\n value\nend"}},{"html_id":"readonly!:Nil-instance-method","name":"readonly!","doc":"Put this connection in a readonly state. This is typically used when\ntalking to replicas, and used automatically by `Cluster` for cluster\nreplicas.","summary":"

    Put this connection in a readonly state.

    ","abstract":false,"location":{"filename":"src/connection.cr","line_number":210,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L210"},"def":{"name":"readonly!","return_type":"Nil","visibility":"Public","body":"run({\"readonly\"})"}},{"html_id":"run(command,retries=5):Value-instance-method","name":"run","doc":"Execute the given command and return the result from the server. Commands must be an `Enumerable`.\n\n```\nrun({\"set\", \"foo\", \"bar\"})\n```","summary":"

    Execute the given command and return the result from the server.

    ","abstract":false,"args":[{"name":"command","external_name":"command","restriction":""},{"name":"retries","default_value":"5","external_name":"retries","restriction":""}],"args_string":"(command, retries = 5) : Value","args_html":"(command, retries = 5) : Value","location":{"filename":"src/connection.cr","line_number":351,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L351"},"def":{"name":"run","args":[{"name":"command","external_name":"command","restriction":""},{"name":"retries","default_value":"5","external_name":"retries","restriction":""}],"return_type":"Value","visibility":"Public","body":"start = Time.monotonic\nloop do\n begin\n @writer.encode(command)\n flush\n result = read\n LOG.debug(&.emit(\"redis\", command: command[0...2].join(' '), duration_ms: (Time.monotonic - start).total_milliseconds))\n return result\n rescue ex : IO::Error\n if retries > 0\n retries = retries - 1\n initialize(@uri)\n else\n raise(ex)\n end\n end\nend\n"}},{"html_id":"scan_each(matchpattern:String|Nil=nil,count:String|Int|Nil=nil,type:String|Nil=nil,&):Nil-instance-method","name":"scan_each","doc":"Iterate over keys that match the given pattern or all keys if no pattern\nis supplied, yielding each key to the block. This is a much more efficient\nway to iterate over keys than `keys.each` — it avoids loading every key in\nmemory at the same time and also doesn't block the Redis server while it\ngenerates the array of all those keys.","summary":"

    Iterate over keys that match the given pattern or all keys if no pattern is supplied, yielding each key to the block.

    ","abstract":false,"args":[{"name":"pattern","default_value":"nil","external_name":"match","restriction":"String | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"},{"name":"type","default_value":"nil","external_name":"type","restriction":"String | ::Nil"}],"args_string":"(match pattern : String | Nil = nil, count : String | Int | Nil = nil, type : String | Nil = nil, &) : Nil","args_html":"(match pattern : String | Nil = nil, count : String | Int | Nil = nil, type : String | Nil = nil, &) : Nil","location":{"filename":"src/connection.cr","line_number":375,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L375"},"def":{"name":"scan_each","args":[{"name":"pattern","default_value":"nil","external_name":"match","restriction":"String | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"},{"name":"type","default_value":"nil","external_name":"type","restriction":"String | ::Nil"}],"yields":1,"block_arity":1,"return_type":"Nil","visibility":"Public","body":"cursor = \"\"\nwhile !(cursor == \"0\")\n response = scan(cursor, match: pattern, count: count, type: type)\n cursor, results = response.as(Array)\n cursor = cursor.as(String)\n (results.as(Array)).each do |key|\n yield key.as(String)\n end\nend\n"}},{"html_id":"subscribe(*channels:String,&block:Subscription,self->)-instance-method","name":"subscribe","doc":"Subscribe to the given pubsub channels. The block yields a subscription\nobject and the connection. You can setup `on_message`, `on_subscribe`,\nand `on_unsubscribe` on the subscription.\n\n```\nredis.subscribe \"channel1\", \"channel2\" do |subscription, connection|\n subscription.on_message do |channel, message|\n if message == \"unsubscribe\"\n connection.unsubscribe channel\n end\n\n # ...\n end\n\n # Respond to new subscribers\n subscription.on_subscribe do |channel, sub_count|\n connection.set \"sub_count:#{channel}\", sub_count.to_s\n end\n\n # Respond to losing subscribers\n subscription.on_unsubscribe do |channel, sub_count|\n connection.set \"sub_count:#{channel}\", sub_count.to_s\n end\nend\n```\n\nFor more information, see the documentation for:\n- [`SUBSCRIBE`](https://redis.io/commands/subscribe/)\n- [`PSUBSCRIBE`](https://redis.io/commands/psubscribe/)","summary":"

    Subscribe to the given pubsub channels.

    ","abstract":false,"args":[{"name":"channels","external_name":"channels","restriction":"String"}],"args_string":"(*channels : String, &block : Subscription, self -> )","args_html":"(*channels : String, &block : Subscription, self -> )","location":{"filename":"src/connection.cr","line_number":141,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L141"},"def":{"name":"subscribe","args":[{"name":"channels","external_name":"channels","restriction":"String"}],"splat_index":0,"yields":2,"block_arity":2,"block_arg":{"name":"block","external_name":"block","restriction":"(Subscription, self ->)"},"visibility":"Public","body":"subscription = Subscription.new(self)\n@writer.encode({\"subscribe\"} + channels)\nflush\nyield subscription, self\nsubscription.call\n"}},{"html_id":"subscribe(*channels:String)-instance-method","name":"subscribe","doc":"Subscribe to the given channels without having to pass a block, which\nwould block execution. This is useful to run inside of other subscription\nblocks to add new subscriptions.","summary":"

    Subscribe to the given channels without having to pass a block, which would block execution.

    ","abstract":false,"args":[{"name":"channels","external_name":"channels","restriction":"String"}],"args_string":"(*channels : String)","args_html":"(*channels : String)","location":{"filename":"src/connection.cr","line_number":185,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L185"},"def":{"name":"subscribe","args":[{"name":"channels","external_name":"channels","restriction":"String"}],"splat_index":0,"visibility":"Public","body":"@writer.encode({\"subscribe\"} + channels)\nflush\n"}},{"html_id":"unsubscribe-instance-method","name":"unsubscribe","doc":"Unsubscribe this connection from all subscriptions.","summary":"

    Unsubscribe this connection from all subscriptions.

    ","abstract":false,"location":{"filename":"src/connection.cr","line_number":191,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L191"},"def":{"name":"unsubscribe","visibility":"Public","body":"@writer.encode({\"unsubscribe\"})\nflush\n"}},{"html_id":"unsubscribe(*channels:String)-instance-method","name":"unsubscribe","doc":"Unsubscribe this connection the given channels.","summary":"

    Unsubscribe this connection the given channels.

    ","abstract":false,"args":[{"name":"channels","external_name":"channels","restriction":"String"}],"args_string":"(*channels : String)","args_html":"(*channels : String)","location":{"filename":"src/connection.cr","line_number":197,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L197"},"def":{"name":"unsubscribe","args":[{"name":"channels","external_name":"channels","restriction":"String"}],"splat_index":0,"visibility":"Public","body":"@writer.encode({\"unsubscribe\"} + channels)\nflush\n"}},{"html_id":"url-instance-method","name":"url","doc":"The URI","summary":"

    The URI

    ","abstract":false,"location":{"filename":"src/connection.cr","line_number":439,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L439"},"def":{"name":"url","visibility":"Public","body":"@uri.to_s"}}],"macros":[{"html_id":"set_return_types!-macro","name":"set_return_types!","abstract":false,"location":{"filename":"src/connection.cr","line_number":232,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L232"},"def":{"name":"set_return_types!","visibility":"Public","body":" \n# When new commands are added to the Commands mixin, add an entry here to\n\n \n# make sure the return type is set when run directly on the connection.\n\n ::Redis::Connection.override_return_types(\n{\n keys: Array,\n del: Int64,\n unlink: Int64,\n ttl: Int64,\n pttl: Int64,\n script_load: String,\n\n \n# String commands\n\n append: Int64,\n decr: Int64,\n decrby: Int64,\n get: String?,\n getdel: String?,\n getex: String?,\n getrange: String,\n getset: String?,\n incr: Int64,\n incrby: Int64,\n incrbyfloat: String,\n mget: Array,\n mset: String,\n msetnx: Int64,\n psetex: String,\n set: String?,\n setex: String,\n setnx: Int64,\n setrange: Int64,\n strlen: Int64,\n substr: String,\n\n \n# List commands\n\n blmove: String?,\n blmpop: Array(Value)?,\n blpop: Array(Value)?,\n brpop: Array(Value)?,\n brpoplpush: String?,\n lindex: String?,\n linsert: Int64?,\n llen: Int64,\n lmove: String?,\n lmpop: Array(Value)?,\n lpop: String | Array(Value) | Nil,\n lpos: Int64 | Array(Value) | Nil,\n lpush: Int64,\n lpushx: Int64,\n lrange: Array,\n lrem: Int64,\n lset: String,\n ltrim: String,\n rpop: String?,\n rpoplpush: String?,\n rpush: Int64,\n rpushx: Int64,\n\n \n# Hash commands\n\n hdel: Int64,\n hexists: Int64,\n hget: String?,\n hgetall: Array,\n hincrby: Int64,\n hincrbyfloat: String,\n hkeys: Array,\n hlen: Int64,\n hmget: Array,\n hmset: String,\n hrandfield: String | Array(Value),\n hscan: Array,\n hset: Int64,\n hsetnx: Int64,\n hstrlen: Int64,\n hvals: Array,\n\n \n# Sets\n\n sadd: Int64,\n scard: Int64,\n sdiff: Array,\n sdiffstore: Int64,\n sinter: Array,\n sintercard: Int64,\n sinterstore: Int64,\n sismember: Int64,\n smembers: Array,\n smismember: Array,\n smove: Int64,\n spop: String | Array(Value) | Nil,\n srandmember: String | Array(Value) | Nil,\n srem: Int64,\n sscan: Array,\n sunion: Array,\n sunionstore: Int64,\n\n \n# Streams\n\n xack: Int64,\n xadd: String?,\n xautoclaim: Array,\n xclaim: Array,\n xdel: Int64,\n xgroup: String | Int64,\n xinfo: Array,\n xlen: Int64,\n xpending: Array,\n xrange: Array,\n xreadgroup: Array(Value)?,\n xrevrange: Array,\n xtrim: Int64,\n })\n \n"}}]},{"html_id":"redis/Redis/Error","path":"Redis/Error.html","kind":"class","full_name":"Redis::Error","name":"Error","abstract":false,"superclass":{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},"ancestors":[{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/errors.cr","line_number":4,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/errors.cr#L4"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"subclasses":[{"html_id":"redis/Redis/BusyGroup","kind":"class","full_name":"Redis::BusyGroup","name":"BusyGroup"},{"html_id":"redis/Redis/Cluster/Error","kind":"class","full_name":"Redis::Cluster::Error","name":"Error"},{"html_id":"redis/Redis/Graph/Error","kind":"class","full_name":"Redis::Graph::Error","name":"Error"},{"html_id":"redis/Redis/NoGroup","kind":"class","full_name":"Redis::NoGroup","name":"NoGroup"},{"html_id":"redis/Redis/Subscription/InvalidMessage","kind":"class","full_name":"Redis::Subscription::InvalidMessage","name":"InvalidMessage"}],"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"instance_methods":[{"html_id":"==(other:self)-instance-method","name":"==","doc":"Returns `true` if this reference is the same as *other*. Invokes `same?`.","summary":"

    Returns true if this reference is the same as other.

    ","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"self"}],"args_string":"(other : self)","args_html":"(other : self)","def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"self"}],"visibility":"Public","body":"if same?(other)\n return true\nend\ntrue\n"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"

    See Object#hash(hasher)

    ","abstract":false,"args":[{"name":"hasher","external_name":"hasher","restriction":""}],"args_string":"(hasher)","args_html":"(hasher)","def":{"name":"hash","args":[{"name":"hasher","external_name":"hasher","restriction":""}],"visibility":"Public","body":"hasher"}}],"macros":[{"html_id":"define(type,code=(name.gsub(/\\A.*::/,\"\")).upcase)-macro","name":"define","abstract":false,"args":[{"name":"type","external_name":"type","restriction":""},{"name":"code","default_value":"(name.gsub(/\\A.*::/, \"\")).upcase","external_name":"code","restriction":""}],"args_string":"(type, code = (name.gsub(/\\A.*::/, \"\")).upcase)","args_html":"(type, code = (name.gsub(/\\A.*::/, "")).upcase)","location":{"filename":"src/errors.cr","line_number":5,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/errors.cr#L5"},"def":{"name":"define","args":[{"name":"type","external_name":"type","restriction":""},{"name":"code","default_value":"(name.gsub(/\\A.*::/, \"\")).upcase","external_name":"code","restriction":""}],"visibility":"Public","body":" class \n{{ type }}\n < \n{{ @type }}\n\n \n{% if code != nil %}\n ERROR_MAP[{{ code }}] = self\n {% end %}\n\n \nend\n \n"}}]},{"html_id":"redis/Redis/FullText","path":"Redis/FullText.html","kind":"struct","full_name":"Redis::FullText(Runnable)","name":"FullText","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/search.cr","line_number":23,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L23"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"doc":"`Redis::FullText` wraps a `Redis::Client` or `Redis::Cluster` to execute\ncommands against a fulltext search index located on a given server.\n\n```\nredis = Redis::Client.new\nredis.ft.create <<-INDEX\n people-index ON HASH\n PREFIX 1 person:\n SCHEMA\n name TEXT NOSTEM SORTABLE\n email TEXT NOSTEM SORTABLE\n location GEO\nINDEX\n```\n\nIf your Redis server is running in Cluster mode, you can\n`require \"redis/cluster/search\"` to send read-only `FullText` commands to\nshard replicas.","summary":"

    Redis::FullText wraps a Redis::Client or Redis::Cluster to execute commands against a fulltext search index located on a given server.

    \n

    EXPERIMENTAL RediSearch support is still under development. Some APIs may change while details are discovered.

    ","instance_methods":[{"html_id":"create(string:String)-instance-method","name":"create","doc":"Create a search index using the syntax specified in the [RediSearch\n`FT.CREATE` docs](https://oss.redis.com/redisearch/Commands/#ftcreate).\n\n```\nredis = Redis::Client.new\nredis.ft.create <<-INDEX\n people-index ON HASH\n PREFIX 1 person:\n SCHEMA\n name TEXT NOSTEM SORTABLE\n email TEXT NOSTEM SORTABLE\n location GEO\nINDEX\n```\n\nNOTE: This method returns immediately, before the index is complete. You can run searches against an incomplete index, but you will also have incomplete results. To find how far along the index is, you can use the `info` method.\nTODO: Add a method that generates the string passed into this overload.","summary":"

    Create a search index using the syntax specified in the RediSearch FT.CREATE docs.

    ","abstract":false,"args":[{"name":"string","external_name":"string","restriction":"String"}],"args_string":"(string : String)","args_html":"(string : String)","location":{"filename":"src/search.cr","line_number":75,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L75"},"def":{"name":"create","args":[{"name":"string","external_name":"string","restriction":"String"}],"visibility":"Public","body":"command = [] of String\nstart = 0\nin_quotes = false\nstart.upto(string.size - 1) do |index|\n if string[index] == '\"'\n if in_quotes\n part = string[start...index].strip\n if part.empty?\n else\n command << part\n end\n in_quotes = false\n else\n in_quotes = true\n end\n start = index + 1\n else\n if (string[index].whitespace? && (!string[index - 1].whitespace?)) && (!in_quotes)\n part = part = string[start...index].strip\n if part.empty?\n else\n command << part\n end\n start = index + 1\n end\n end\nend\ncommand << string[start..-1]\n@redis.run([\"ft.create\"] + command)\n"}},{"html_id":"drop(index:String,keepdocs=false)-instance-method","name":"drop","doc":"Drop the specified `index`.","summary":"

    Drop the specified index.

    ","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"String"},{"name":"keepdocs","default_value":"false","external_name":"keepdocs","restriction":""}],"args_string":"(index : String, keepdocs = false)","args_html":"(index : String, keepdocs = false)","location":{"filename":"src/search.cr","line_number":308,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L308"},"def":{"name":"drop","args":[{"name":"index","external_name":"index","restriction":"String"},{"name":"keepdocs","default_value":"false","external_name":"keepdocs","restriction":""}],"visibility":"Public","body":"dropindex(index, keepdocs)"}},{"html_id":"dropindex(key:String,keepdocs=false)-instance-method","name":"dropindex","doc":"Drop the specified `index`.","summary":"

    Drop the specified index.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"keepdocs","default_value":"false","external_name":"keepdocs","restriction":""}],"args_string":"(key : String, keepdocs = false)","args_html":"(key : String, keepdocs = false)","location":{"filename":"src/search.cr","line_number":313,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L313"},"def":{"name":"dropindex","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"keepdocs","default_value":"false","external_name":"keepdocs","restriction":""}],"visibility":"Public","body":"command = [\"ft.dropindex\", key]\nif keepdocs\n command << \"keepdocs\"\nend\n@redis.run(command)\n"}},{"html_id":"info(index:String)-instance-method","name":"info","doc":"Get information about the search index contained in `index`. For more\ndetails, see [the `FT.INFO` documentation](https://oss.redis.com/redisearch/Commands/#ftinfo).","summary":"

    Get information about the search index contained in index.

    ","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"String"}],"args_string":"(index : String)","args_html":"(index : String)","location":{"filename":"src/search.cr","line_number":104,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L104"},"def":{"name":"info","args":[{"name":"index","external_name":"index","restriction":"String"}],"visibility":"Public","body":"@redis.run({\"ft.info\", index})"}},{"html_id":"profile(index:String,query:String)-instance-method","name":"profile","doc":"Profile the given search. For further details, see [the `FT.PROFILE`\ndocumentation](https://oss.redis.com/redisearch/Commands/#ftprofile).","summary":"

    Profile the given search.

    ","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"String"},{"name":"query","external_name":"query","restriction":"String"}],"args_string":"(index : String, query : String)","args_html":"(index : String, query : String)","location":{"filename":"src/search.cr","line_number":303,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L303"},"def":{"name":"profile","args":[{"name":"index","external_name":"index","restriction":"String"},{"name":"query","external_name":"query","restriction":"String"}],"visibility":"Public","body":"@redis.run({\"ft.profile\", index, \"search\", \"query\", query})"}},{"html_id":"search(index:String,query:String,nocontent=false,verbatim=false,nostopwords=false,withscores=false,withpayloads=false,withsortkeys=false,filter:Array(Filter)|Nil=nil,geofilter:GeoFilter|Nil=nil,inkeys:Array(String)|Nil=nil,infields:Array(String)|Nil=nil,returnreturn_value:Array(String)|Nil=nil,summarize:Summarize|Nil=nil,highlight:Highlight|Nil=nil,slop:Int|Nil=nil,timeout:Time::Span|Nil=nil,inorder:Bool|Nil=nil,language:String|Nil=nil,expander:String|Nil=nil,scorer:String|Nil=nil,explainscore:Bool|Nil=nil,payload:String|Bytes|Nil=nil,sortby:SortBy|Nil=nil,limit:Tuple(Int,Int)|Nil=nil,params:NamedTuple|Hash(String,String)|Nil=nil,dialect:Int|Nil=nil)-instance-method","name":"search","doc":"Run the specified `query` against `index`. Customize the search with various other arguments. For details about what each one does and the return value, see [the `FT.SEARCH`\ndocumentation](https://oss.redis.com/redisearch/Commands/#ftsearch).\n\n```\nresult = redis.ft.search \"people-index\", \"@name:Jamie\",\n return: %w[name email],\n sortby: Redis::FullText::SortBy.new(\"name\", :asc)\n```","summary":"

    Run the specified query against index.

    ","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"String"},{"name":"query","external_name":"query","restriction":"String"},{"name":"nocontent","default_value":"false","external_name":"nocontent","restriction":""},{"name":"verbatim","default_value":"false","external_name":"verbatim","restriction":""},{"name":"nostopwords","default_value":"false","external_name":"nostopwords","restriction":""},{"name":"withscores","default_value":"false","external_name":"withscores","restriction":""},{"name":"withpayloads","default_value":"false","external_name":"withpayloads","restriction":""},{"name":"withsortkeys","default_value":"false","external_name":"withsortkeys","restriction":""},{"name":"filter","default_value":"nil","external_name":"filter","restriction":"Array(Filter) | ::Nil"},{"name":"geofilter","default_value":"nil","external_name":"geofilter","restriction":"GeoFilter | ::Nil"},{"name":"inkeys","default_value":"nil","external_name":"inkeys","restriction":"Array(String) | ::Nil"},{"name":"infields","default_value":"nil","external_name":"infields","restriction":"Array(String) | ::Nil"},{"name":"return_value","default_value":"nil","external_name":"return","restriction":"Array(String) | ::Nil"},{"name":"summarize","default_value":"nil","external_name":"summarize","restriction":"Summarize | ::Nil"},{"name":"highlight","default_value":"nil","external_name":"highlight","restriction":"Highlight | ::Nil"},{"name":"slop","default_value":"nil","external_name":"slop","restriction":"Int | ::Nil"},{"name":"timeout","default_value":"nil","external_name":"timeout","restriction":"Time::Span | ::Nil"},{"name":"inorder","default_value":"nil","external_name":"inorder","restriction":"Bool | ::Nil"},{"name":"language","default_value":"nil","external_name":"language","restriction":"String | ::Nil"},{"name":"expander","default_value":"nil","external_name":"expander","restriction":"String | ::Nil"},{"name":"scorer","default_value":"nil","external_name":"scorer","restriction":"String | ::Nil"},{"name":"explainscore","default_value":"nil","external_name":"explainscore","restriction":"Bool | ::Nil"},{"name":"payload","default_value":"nil","external_name":"payload","restriction":"String | Bytes | Nil"},{"name":"sortby","default_value":"nil","external_name":"sortby","restriction":"SortBy | ::Nil"},{"name":"limit","default_value":"nil","external_name":"limit","restriction":"::Tuple(Int, Int) | ::Nil"},{"name":"params","default_value":"nil","external_name":"params","restriction":"NamedTuple | Hash(String, String) | Nil"},{"name":"dialect","default_value":"nil","external_name":"dialect","restriction":"Int | ::Nil"}],"args_string":"(index : String, query : String, nocontent = false, verbatim = false, nostopwords = false, withscores = false, withpayloads = false, withsortkeys = false, filter : Array(Filter) | Nil = nil, geofilter : GeoFilter | Nil = nil, inkeys : Array(String) | Nil = nil, infields : Array(String) | Nil = nil, return return_value : Array(String) | Nil = nil, summarize : Summarize | Nil = nil, highlight : Highlight | Nil = nil, slop : Int | Nil = nil, timeout : Time::Span | Nil = nil, inorder : Bool | Nil = nil, language : String | Nil = nil, expander : String | Nil = nil, scorer : String | Nil = nil, explainscore : Bool | Nil = nil, payload : String | Bytes | Nil = nil, sortby : SortBy | Nil = nil, limit : Tuple(Int, Int) | Nil = nil, params : NamedTuple | Hash(String, String) | Nil = nil, dialect : Int | Nil = nil)","args_html":"(index : String, query : String, nocontent = false, verbatim = false, nostopwords = false, withscores = false, withpayloads = false, withsortkeys = false, filter : Array(Filter) | Nil = nil, geofilter : GeoFilter | Nil = nil, inkeys : Array(String) | Nil = nil, infields : Array(String) | Nil = nil, return return_value : Array(String) | Nil = nil, summarize : Summarize | Nil = nil, highlight : Highlight | Nil = nil, slop : Int | Nil = nil, timeout : Time::Span | Nil = nil, inorder : Bool | Nil = nil, language : String | Nil = nil, expander : String | Nil = nil, scorer : String | Nil = nil, explainscore : Bool | Nil = nil, payload : String | Bytes | Nil = nil, sortby : SortBy | Nil = nil, limit : Tuple(Int, Int) | Nil = nil, params : NamedTuple | Hash(String, String) | Nil = nil, dialect : Int | Nil = nil)","location":{"filename":"src/search.cr","line_number":120,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L120"},"def":{"name":"search","args":[{"name":"index","external_name":"index","restriction":"String"},{"name":"query","external_name":"query","restriction":"String"},{"name":"nocontent","default_value":"false","external_name":"nocontent","restriction":""},{"name":"verbatim","default_value":"false","external_name":"verbatim","restriction":""},{"name":"nostopwords","default_value":"false","external_name":"nostopwords","restriction":""},{"name":"withscores","default_value":"false","external_name":"withscores","restriction":""},{"name":"withpayloads","default_value":"false","external_name":"withpayloads","restriction":""},{"name":"withsortkeys","default_value":"false","external_name":"withsortkeys","restriction":""},{"name":"filter","default_value":"nil","external_name":"filter","restriction":"Array(Filter) | ::Nil"},{"name":"geofilter","default_value":"nil","external_name":"geofilter","restriction":"GeoFilter | ::Nil"},{"name":"inkeys","default_value":"nil","external_name":"inkeys","restriction":"Array(String) | ::Nil"},{"name":"infields","default_value":"nil","external_name":"infields","restriction":"Array(String) | ::Nil"},{"name":"return_value","default_value":"nil","external_name":"return","restriction":"Array(String) | ::Nil"},{"name":"summarize","default_value":"nil","external_name":"summarize","restriction":"Summarize | ::Nil"},{"name":"highlight","default_value":"nil","external_name":"highlight","restriction":"Highlight | ::Nil"},{"name":"slop","default_value":"nil","external_name":"slop","restriction":"Int | ::Nil"},{"name":"timeout","default_value":"nil","external_name":"timeout","restriction":"Time::Span | ::Nil"},{"name":"inorder","default_value":"nil","external_name":"inorder","restriction":"Bool | ::Nil"},{"name":"language","default_value":"nil","external_name":"language","restriction":"String | ::Nil"},{"name":"expander","default_value":"nil","external_name":"expander","restriction":"String | ::Nil"},{"name":"scorer","default_value":"nil","external_name":"scorer","restriction":"String | ::Nil"},{"name":"explainscore","default_value":"nil","external_name":"explainscore","restriction":"Bool | ::Nil"},{"name":"payload","default_value":"nil","external_name":"payload","restriction":"String | Bytes | Nil"},{"name":"sortby","default_value":"nil","external_name":"sortby","restriction":"SortBy | ::Nil"},{"name":"limit","default_value":"nil","external_name":"limit","restriction":"::Tuple(Int, Int) | ::Nil"},{"name":"params","default_value":"nil","external_name":"params","restriction":"NamedTuple | Hash(String, String) | Nil"},{"name":"dialect","default_value":"nil","external_name":"dialect","restriction":"Int | ::Nil"}],"visibility":"Public","body":"command = Array(String).new((((((((((((((((((((((((((((((((1 + 1) + 1) + 1) + 1) + 1) + 1) + 4) + 6) + (inkeys.try(&.size) || 0)) + 1) + (infields.try(&.size) || 0)) + 1) + (return_value.try(&.size) || 0)) + 1) + (summarize.try(&.fields).try(&.size) || 0)) + 8) + (highlight.try(&.fields).try(&.size) || 0)) + 6) + 2) + 2) + 1) + 2) + 2) + 2) + 1) + 2) + 3) + 3) + 1) + (params.try do |params|\n params.size * 2\nend || 0)) + 2) + 0)\n((command << \"ft.search\") << index) << query\nif nocontent\n command << \"nocontent\"\nend\nif verbatim\n command << \"verbatim\"\nend\nif nostopwords\n command << \"nostopwords\"\nend\nif withscores\n command << \"withscores\"\nend\nif withpayloads\n command << \"withpayloads\"\nend\nif withsortkeys\n command << \"withsortkeys\"\nend\nif filter\n filter.each do |f|\n (((command << \"filter\") << f.field) << f.min) << f.max\n end\nend\nif geofilter\n (((((command << \"geofilter\") << geofilter.field) << geofilter.longitude.to_s) << geofilter.latitude.to_s) << geofilter.radius.to_s) << geofilter.unit.to_s.downcase\nend\nif inkeys\n command << \"inkeys\"\n command.concat(inkeys)\nend\nif infields\n command << \"infields\"\n command.concat(infields)\nend\nif return_value\n (command << \"return\") << return_value.size.to_s\n command.concat(return_value)\nend\nif summarize\n command << \"summarize\"\n if fields = summarize.fields\n (command << \"fields\") << fields.size.to_s\n command.concat(fields)\n end\n if frags = summarize.frags\n (command << \"frags\") << frags.to_s\n end\n if len = summarize.len\n (command << \"len\") << len.to_s\n end\n if separator = summarize.separator\n (command << \"separator\") << separator\n end\nend\nif highlight\n command << \"highlight\"\n if fields = highlight.fields\n field_names = fields\n (command << \"fields\") << fields.size.to_s\n if field_names\n command.concat(field_names)\n end\n end\n if tags = highlight.tags\n command << \"tags\"\n command.concat(tags)\n end\nend\nif slop\n (command << \"slop\") << slop.to_s\nend\nif inorder\n command << \"inorder\"\nend\nif language\n (command << \"language\") << language\nend\nif expander\n (command << \"expander\") << expander\nend\nif scorer\n (command << \"scorer\") << scorer\nend\nif explainscore\n command << \"explainscore\"\nend\ncase payload\nwhen String\n command << payload\nwhen Bytes\n command << (String.new(payload))\nend\nif sortby\n ((command << \"sortby\") << sortby.attribute) << sortby.direction.to_s\nend\nif limit\n command << \"limit\"\n command.concat(limit.map(&.to_s).to_a)\nend\nif params\n (command << \"params\") << (params.size * 2).to_s\n case params\n in NamedTuple\n params.each do |key, value|\n (command << key.to_s) << value.to_s\n end\n in Hash\n params.each do |__temp_65|\n key, value = __temp_65\n (command << key) << value\n end\n in Nil\n end\n dialect || (dialect = 2)\nend\nif dialect\n (command << \"dialect\") << dialect.to_s\nend\n(@redis.run(command)).as(Array)\n"}},{"html_id":"tagvals(index:String,field:String)-instance-method","name":"tagvals","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"String"},{"name":"field","external_name":"field","restriction":"String"}],"args_string":"(index : String, field : String)","args_html":"(index : String, field : String)","location":{"filename":"src/search.cr","line_number":108,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L108"},"def":{"name":"tagvals","args":[{"name":"index","external_name":"index","restriction":"String"},{"name":"field","external_name":"field","restriction":"String"}],"visibility":"Public","body":"@redis.run({\"ft.tagvals\", index, field})"}}],"types":[{"html_id":"redis/Redis/FullText/Filter","path":"Redis/FullText/Filter.html","kind":"struct","full_name":"Redis::FullText::Filter","name":"Filter","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/search.cr","line_number":320,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L320"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/FullText","kind":"struct","full_name":"Redis::FullText(Runnable)","name":"FullText"},"constructors":[{"html_id":"new(field:String,min:String,max:String)-class-method","name":"new","abstract":false,"args":[{"name":"field","external_name":"field","restriction":"String"},{"name":"min","external_name":"min","restriction":"String"},{"name":"max","external_name":"max","restriction":"String"}],"args_string":"(field : String, min : String, max : String)","args_html":"(field : String, min : String, max : String)","location":{"filename":"src/search.cr","line_number":320,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L320"},"def":{"name":"new","args":[{"name":"field","external_name":"field","restriction":"String"},{"name":"min","external_name":"min","restriction":"String"},{"name":"max","external_name":"max","restriction":"String"}],"visibility":"Public","body":"_ = allocate\n_.initialize(field, min, max)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}},{"html_id":"new(field:String,range:Range(B,E))forallB,E-class-method","name":"new","abstract":false,"args":[{"name":"field","external_name":"field","restriction":"String"},{"name":"range","external_name":"range","restriction":"Range(B, E)"}],"args_string":"(field : String, range : Range(B, E)) forall B, E","args_html":"(field : String, range : Range(B, E)) forall B, E","location":{"filename":"src/search.cr","line_number":321,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L321"},"def":{"name":"new","args":[{"name":"field","external_name":"field","restriction":"String"},{"name":"range","external_name":"range","restriction":"Range(B, E)"}],"visibility":"Public","body":"new(field, min: (range.begin || \"-inf\").to_s, max: (range.end || \"+inf\").to_s)"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/search.cr","line_number":320,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L320"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@field.clone, @min.clone, @max.clone)"}},{"html_id":"copy_with(field_field=@field,min_min=@min,max_max=@max)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_field","default_value":"@field","external_name":"field","restriction":""},{"name":"_min","default_value":"@min","external_name":"min","restriction":""},{"name":"_max","default_value":"@max","external_name":"max","restriction":""}],"args_string":"(field _field = @field, min _min = @min, max _max = @max)","args_html":"(field _field = @field, min _min = @min, max _max = @max)","location":{"filename":"src/search.cr","line_number":320,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L320"},"def":{"name":"copy_with","args":[{"name":"_field","default_value":"@field","external_name":"field","restriction":""},{"name":"_min","default_value":"@min","external_name":"min","restriction":""},{"name":"_max","default_value":"@max","external_name":"max","restriction":""}],"visibility":"Public","body":"self.class.new(_field, _min, _max)"}},{"html_id":"field:String-instance-method","name":"field","abstract":false,"def":{"name":"field","return_type":"String","visibility":"Public","body":"@field"}},{"html_id":"max:String-instance-method","name":"max","abstract":false,"def":{"name":"max","return_type":"String","visibility":"Public","body":"@max"}},{"html_id":"min:String-instance-method","name":"min","abstract":false,"def":{"name":"min","return_type":"String","visibility":"Public","body":"@min"}}]},{"html_id":"redis/Redis/FullText/GeoFilter","path":"Redis/FullText/GeoFilter.html","kind":"struct","full_name":"Redis::FullText::GeoFilter","name":"GeoFilter","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/search.cr","line_number":327,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L327"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/FullText","kind":"struct","full_name":"Redis::FullText(Runnable)","name":"FullText"},"constructors":[{"html_id":"new(field:String,longitude:Float64,latitude:Float64,radius:Int64|Float64,unit:GeoUnit)-class-method","name":"new","abstract":false,"args":[{"name":"field","external_name":"field","restriction":"String"},{"name":"longitude","external_name":"longitude","restriction":"Float64"},{"name":"latitude","external_name":"latitude","restriction":"Float64"},{"name":"radius","external_name":"radius","restriction":"Int64 | Float64"},{"name":"unit","external_name":"unit","restriction":"GeoUnit"}],"args_string":"(field : String, longitude : Float64, latitude : Float64, radius : Int64 | Float64, unit : GeoUnit)","args_html":"(field : String, longitude : Float64, latitude : Float64, radius : Int64 | Float64, unit : GeoUnit)","location":{"filename":"src/search.cr","line_number":327,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L327"},"def":{"name":"new","args":[{"name":"field","external_name":"field","restriction":"String"},{"name":"longitude","external_name":"longitude","restriction":"Float64"},{"name":"latitude","external_name":"latitude","restriction":"Float64"},{"name":"radius","external_name":"radius","restriction":"Int64 | Float64"},{"name":"unit","external_name":"unit","restriction":"GeoUnit"}],"visibility":"Public","body":"_ = allocate\n_.initialize(field, longitude, latitude, radius, unit)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/search.cr","line_number":327,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L327"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@field.clone, @longitude.clone, @latitude.clone, @radius.clone, @unit.clone)"}},{"html_id":"copy_with(field_field=@field,longitude_longitude=@longitude,latitude_latitude=@latitude,radius_radius=@radius,unit_unit=@unit)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_field","default_value":"@field","external_name":"field","restriction":""},{"name":"_longitude","default_value":"@longitude","external_name":"longitude","restriction":""},{"name":"_latitude","default_value":"@latitude","external_name":"latitude","restriction":""},{"name":"_radius","default_value":"@radius","external_name":"radius","restriction":""},{"name":"_unit","default_value":"@unit","external_name":"unit","restriction":""}],"args_string":"(field _field = @field, longitude _longitude = @longitude, latitude _latitude = @latitude, radius _radius = @radius, unit _unit = @unit)","args_html":"(field _field = @field, longitude _longitude = @longitude, latitude _latitude = @latitude, radius _radius = @radius, unit _unit = @unit)","location":{"filename":"src/search.cr","line_number":327,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L327"},"def":{"name":"copy_with","args":[{"name":"_field","default_value":"@field","external_name":"field","restriction":""},{"name":"_longitude","default_value":"@longitude","external_name":"longitude","restriction":""},{"name":"_latitude","default_value":"@latitude","external_name":"latitude","restriction":""},{"name":"_radius","default_value":"@radius","external_name":"radius","restriction":""},{"name":"_unit","default_value":"@unit","external_name":"unit","restriction":""}],"visibility":"Public","body":"self.class.new(_field, _longitude, _latitude, _radius, _unit)"}},{"html_id":"field:String-instance-method","name":"field","abstract":false,"def":{"name":"field","return_type":"String","visibility":"Public","body":"@field"}},{"html_id":"latitude:Float64-instance-method","name":"latitude","abstract":false,"def":{"name":"latitude","return_type":"Float64","visibility":"Public","body":"@latitude"}},{"html_id":"longitude:Float64-instance-method","name":"longitude","abstract":false,"def":{"name":"longitude","return_type":"Float64","visibility":"Public","body":"@longitude"}},{"html_id":"radius:Int64|Float64-instance-method","name":"radius","abstract":false,"def":{"name":"radius","return_type":"Int64 | Float64","visibility":"Public","body":"@radius"}},{"html_id":"unit:GeoUnit-instance-method","name":"unit","abstract":false,"def":{"name":"unit","return_type":"GeoUnit","visibility":"Public","body":"@unit"}}]},{"html_id":"redis/Redis/FullText/GeoUnit","path":"Redis/FullText/GeoUnit.html","kind":"enum","full_name":"Redis::FullText::GeoUnit","name":"GeoUnit","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/search.cr","line_number":45,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L45"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"M","name":"M","value":"0"},{"id":"KM","name":"KM","value":"1"},{"id":"MI","name":"MI","value":"2"},{"id":"FT","name":"FT","value":"3"}],"namespace":{"html_id":"redis/Redis/FullText","kind":"struct","full_name":"Redis::FullText(Runnable)","name":"FullText"},"doc":"Pass to the `search` method's `geofilter` argument to filter within the\nspecified range. For example, to search for pizza places within 25 miles\nof the Baltimore Ravens stadium:\n\n```\nredis.ft.search \"places-index\", \"pizza\",\n geofilter: {\"location\", -76.622400, 39.277751, 25, :mi}\n```","summary":"

    Pass to the search method's geofilter argument to filter within the specified range.

    ","instance_methods":[{"html_id":"ft?-instance-method","name":"ft?","abstract":false,"location":{"filename":"src/search.cr","line_number":49,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L49"},"def":{"name":"ft?","visibility":"Public","body":"self == FT"}},{"html_id":"km?-instance-method","name":"km?","abstract":false,"location":{"filename":"src/search.cr","line_number":47,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L47"},"def":{"name":"km?","visibility":"Public","body":"self == KM"}},{"html_id":"m?-instance-method","name":"m?","abstract":false,"location":{"filename":"src/search.cr","line_number":46,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L46"},"def":{"name":"m?","visibility":"Public","body":"self == M"}},{"html_id":"mi?-instance-method","name":"mi?","abstract":false,"location":{"filename":"src/search.cr","line_number":48,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L48"},"def":{"name":"mi?","visibility":"Public","body":"self == MI"}}]},{"html_id":"redis/Redis/FullText/Highlight","path":"Redis/FullText/Highlight.html","kind":"struct","full_name":"Redis::FullText::Highlight","name":"Highlight","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/search.cr","line_number":296,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L296"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/FullText","kind":"struct","full_name":"Redis::FullText(Runnable)","name":"FullText"},"constructors":[{"html_id":"new(fields:Array(String)|Nil=nil,tags:Tuple(String,String)|Nil=nil)-class-method","name":"new","abstract":false,"args":[{"name":"fields","default_value":"nil","external_name":"fields","restriction":"Array(String) | ::Nil"},{"name":"tags","default_value":"nil","external_name":"tags","restriction":"::Tuple(String, String) | ::Nil"}],"args_string":"(fields : Array(String) | Nil = nil, tags : Tuple(String, String) | Nil = nil)","args_html":"(fields : Array(String) | Nil = nil, tags : Tuple(String, String) | Nil = nil)","location":{"filename":"src/search.cr","line_number":296,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L296"},"def":{"name":"new","args":[{"name":"fields","default_value":"nil","external_name":"fields","restriction":"Array(String) | ::Nil"},{"name":"tags","default_value":"nil","external_name":"tags","restriction":"::Tuple(String, String) | ::Nil"}],"visibility":"Public","body":"_ = allocate\n_.initialize(fields, tags)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/search.cr","line_number":296,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L296"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@fields.clone, @tags.clone)"}},{"html_id":"copy_with(fields_fields=@fields,tags_tags=@tags)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_fields","default_value":"@fields","external_name":"fields","restriction":""},{"name":"_tags","default_value":"@tags","external_name":"tags","restriction":""}],"args_string":"(fields _fields = @fields, tags _tags = @tags)","args_html":"(fields _fields = @fields, tags _tags = @tags)","location":{"filename":"src/search.cr","line_number":296,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L296"},"def":{"name":"copy_with","args":[{"name":"_fields","default_value":"@fields","external_name":"fields","restriction":""},{"name":"_tags","default_value":"@tags","external_name":"tags","restriction":""}],"visibility":"Public","body":"self.class.new(_fields, _tags)"}},{"html_id":"fields:Array(String)|Nil-instance-method","name":"fields","abstract":false,"def":{"name":"fields","return_type":"Array(String) | ::Nil","visibility":"Public","body":"@fields"}},{"html_id":"tags:Tuple(String,String)|Nil-instance-method","name":"tags","abstract":false,"def":{"name":"tags","return_type":"::Tuple(String, String) | ::Nil","visibility":"Public","body":"@tags"}}]},{"html_id":"redis/Redis/FullText/SortBy","path":"Redis/FullText/SortBy.html","kind":"struct","full_name":"Redis::FullText::SortBy","name":"SortBy","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/search.cr","line_number":35,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L35"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/FullText","kind":"struct","full_name":"Redis::FullText(Runnable)","name":"FullText"},"doc":"Pass to the `search` method's `sortby` argument to sort the results on the\ngiven attribute.\n\n```\nredis.ft.search \"people-index\", \"@name:Jamie\",\n sortby: Redis::FullText::SortBy.new(\"name\", :asc)\n```","summary":"

    Pass to the search method's sortby argument to sort the results on the given attribute.

    ","constructors":[{"html_id":"new(attribute:String,direction:SortDirection=:asc)-class-method","name":"new","abstract":false,"args":[{"name":"attribute","external_name":"attribute","restriction":"String"},{"name":"direction","default_value":":asc","external_name":"direction","restriction":"SortDirection"}],"args_string":"(attribute : String, direction : SortDirection = :asc)","args_html":"(attribute : String, direction : SortDirection = :asc)","location":{"filename":"src/search.cr","line_number":35,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L35"},"def":{"name":"new","args":[{"name":"attribute","external_name":"attribute","restriction":"String"},{"name":"direction","default_value":":asc","external_name":"direction","restriction":"SortDirection"}],"visibility":"Public","body":"_ = allocate\n_.initialize(attribute, direction)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"attribute:String-instance-method","name":"attribute","abstract":false,"def":{"name":"attribute","return_type":"String","visibility":"Public","body":"@attribute"}},{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/search.cr","line_number":35,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L35"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@attribute.clone, @direction.clone)"}},{"html_id":"copy_with(attribute_attribute=@attribute,direction_direction=@direction)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_attribute","default_value":"@attribute","external_name":"attribute","restriction":""},{"name":"_direction","default_value":"@direction","external_name":"direction","restriction":""}],"args_string":"(attribute _attribute = @attribute, direction _direction = @direction)","args_html":"(attribute _attribute = @attribute, direction _direction = @direction)","location":{"filename":"src/search.cr","line_number":35,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L35"},"def":{"name":"copy_with","args":[{"name":"_attribute","default_value":"@attribute","external_name":"attribute","restriction":""},{"name":"_direction","default_value":"@direction","external_name":"direction","restriction":""}],"visibility":"Public","body":"self.class.new(_attribute, _direction)"}},{"html_id":"direction:SortDirection-instance-method","name":"direction","abstract":false,"def":{"name":"direction","return_type":"SortDirection","visibility":"Public","body":"@direction"}}]},{"html_id":"redis/Redis/FullText/SortDirection","path":"Redis/FullText/SortDirection.html","kind":"enum","full_name":"Redis::FullText::SortDirection","name":"SortDirection","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/search.cr","line_number":53,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L53"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"ASC","name":"ASC","value":"0"},{"id":"DESC","name":"DESC","value":"1"}],"namespace":{"html_id":"redis/Redis/FullText","kind":"struct","full_name":"Redis::FullText(Runnable)","name":"FullText"},"doc":"Pass to a `SortBy` constructor to specify a fulltext search sort direction.","summary":"

    Pass to a SortBy constructor to specify a fulltext search sort direction.

    ","instance_methods":[{"html_id":"asc?-instance-method","name":"asc?","abstract":false,"location":{"filename":"src/search.cr","line_number":54,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L54"},"def":{"name":"asc?","visibility":"Public","body":"self == ASC"}},{"html_id":"desc?-instance-method","name":"desc?","abstract":false,"location":{"filename":"src/search.cr","line_number":55,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L55"},"def":{"name":"desc?","visibility":"Public","body":"self == DESC"}}]},{"html_id":"redis/Redis/FullText/Summarize","path":"Redis/FullText/Summarize.html","kind":"struct","full_name":"Redis::FullText::Summarize","name":"Summarize","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/search.cr","line_number":289,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L289"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/FullText","kind":"struct","full_name":"Redis::FullText(Runnable)","name":"FullText"},"constructors":[{"html_id":"new(fields:Array(String)|Nil=nil,frags:Int32|Nil=nil,len:Int32|Nil=nil,separator:String|Nil=nil)-class-method","name":"new","abstract":false,"args":[{"name":"fields","default_value":"nil","external_name":"fields","restriction":"Array(String) | ::Nil"},{"name":"frags","default_value":"nil","external_name":"frags","restriction":"Int32 | ::Nil"},{"name":"len","default_value":"nil","external_name":"len","restriction":"Int32 | ::Nil"},{"name":"separator","default_value":"nil","external_name":"separator","restriction":"String | ::Nil"}],"args_string":"(fields : Array(String) | Nil = nil, frags : Int32 | Nil = nil, len : Int32 | Nil = nil, separator : String | Nil = nil)","args_html":"(fields : Array(String) | Nil = nil, frags : Int32 | Nil = nil, len : Int32 | Nil = nil, separator : String | Nil = nil)","location":{"filename":"src/search.cr","line_number":289,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L289"},"def":{"name":"new","args":[{"name":"fields","default_value":"nil","external_name":"fields","restriction":"Array(String) | ::Nil"},{"name":"frags","default_value":"nil","external_name":"frags","restriction":"Int32 | ::Nil"},{"name":"len","default_value":"nil","external_name":"len","restriction":"Int32 | ::Nil"},{"name":"separator","default_value":"nil","external_name":"separator","restriction":"String | ::Nil"}],"visibility":"Public","body":"_ = allocate\n_.initialize(fields, frags, len, separator)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/search.cr","line_number":289,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L289"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@fields.clone, @frags.clone, @len.clone, @separator.clone)"}},{"html_id":"copy_with(fields_fields=@fields,frags_frags=@frags,len_len=@len,separator_separator=@separator)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_fields","default_value":"@fields","external_name":"fields","restriction":""},{"name":"_frags","default_value":"@frags","external_name":"frags","restriction":""},{"name":"_len","default_value":"@len","external_name":"len","restriction":""},{"name":"_separator","default_value":"@separator","external_name":"separator","restriction":""}],"args_string":"(fields _fields = @fields, frags _frags = @frags, len _len = @len, separator _separator = @separator)","args_html":"(fields _fields = @fields, frags _frags = @frags, len _len = @len, separator _separator = @separator)","location":{"filename":"src/search.cr","line_number":289,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L289"},"def":{"name":"copy_with","args":[{"name":"_fields","default_value":"@fields","external_name":"fields","restriction":""},{"name":"_frags","default_value":"@frags","external_name":"frags","restriction":""},{"name":"_len","default_value":"@len","external_name":"len","restriction":""},{"name":"_separator","default_value":"@separator","external_name":"separator","restriction":""}],"visibility":"Public","body":"self.class.new(_fields, _frags, _len, _separator)"}},{"html_id":"fields:Array(String)|Nil-instance-method","name":"fields","abstract":false,"def":{"name":"fields","return_type":"Array(String) | ::Nil","visibility":"Public","body":"@fields"}},{"html_id":"frags:Int32|Nil-instance-method","name":"frags","abstract":false,"def":{"name":"frags","return_type":"Int32 | ::Nil","visibility":"Public","body":"@frags"}},{"html_id":"len:Int32|Nil-instance-method","name":"len","abstract":false,"def":{"name":"len","return_type":"Int32 | ::Nil","visibility":"Public","body":"@len"}},{"html_id":"separator:String|Nil-instance-method","name":"separator","abstract":false,"def":{"name":"separator","return_type":"String | ::Nil","visibility":"Public","body":"@separator"}}]}]},{"html_id":"redis/Redis/Future","path":"Redis/Future.html","kind":"class","full_name":"Redis::Future","name":"Future","abstract":false,"superclass":{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/pipeline.cr","line_number":33,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/pipeline.cr#L33"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"doc":"A `Redis::Future` is what pipelined commands return. They will be resolved\nwith the value of the command that spawned them.","summary":"

    A Redis::Future is what pipelined commands return.

    ","instance_methods":[{"html_id":"resolve(value:Value)-instance-method","name":"resolve","doc":"Resolves a Future with the supplied Redis::Value","summary":"

    Resolves a Future with the supplied Redis::Value

    ","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"Value"}],"args_string":"(value : Value)","args_html":"(value : Value)","location":{"filename":"src/pipeline.cr","line_number":38,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/pipeline.cr#L38"},"def":{"name":"resolve","args":[{"name":"value","external_name":"value","restriction":"Value"}],"visibility":"Public","body":"@resolved = true\n@value = value\n"}},{"html_id":"resolved?:Bool-instance-method","name":"resolved?","abstract":false,"location":{"filename":"src/pipeline.cr","line_number":35,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/pipeline.cr#L35"},"def":{"name":"resolved?","visibility":"Public","body":"@resolved"}},{"html_id":"value-instance-method","name":"value","doc":"Read the value contained in this Future after it is resolved. If this\nmethod is called before the Future is resolved, it will raise a\n`Redis::Future::NotResolved` exception.","summary":"

    Read the value contained in this Future after it is resolved.

    ","abstract":false,"location":{"filename":"src/pipeline.cr","line_number":46,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/pipeline.cr#L46"},"def":{"name":"value","visibility":"Public","body":"if resolved?\n @value\nelse\n raise(NotResolved.new(\"Attempted to get the value of an unresolved Redis::Future\"))\nend"}}],"types":[{"html_id":"redis/Redis/Future/NotResolved","path":"Redis/Future/NotResolved.html","kind":"class","full_name":"Redis::Future::NotResolved","name":"NotResolved","abstract":false,"superclass":{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},"ancestors":[{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/pipeline.cr","line_number":57,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/pipeline.cr#L57"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Future","kind":"class","full_name":"Redis::Future","name":"Future"},"doc":"A `Redis::Future::NotResolved` is raised when attempting to access the\nvalue of a `Future` that has not been resolved yet. For example, calling\n`pipeline.get(\"my-key\").value`.","summary":"

    A Redis::Future::NotResolved is raised when attempting to access the value of a Future that has not been resolved yet.

    "}]},{"html_id":"redis/Redis/Graph","path":"Redis/Graph.html","kind":"module","full_name":"Redis::Graph","name":"Graph","abstract":false,"locations":[{"filename":"src/graph.cr","line_number":52,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L52"},{"filename":"src/graph/serializable.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph/serializable.cr#L1"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"doc":"[RedisGraph](https://redis.io/docs/stack/graph/) is a graph database built\non top of Redis that you query using the [Cypher](https://opencypher.org)\nquery language.\n\nIf your Redis server is running RedisGraph (for example, using [Redis\nStack](https://redis.io/docs/stack/)), you can branch off of your existing\n`Redis::Client` using the `Redis::Client#graph` method:\n\n```\nrequire \"redis/graph\"\n\nstruct Person\n include Redis::Graph::Serializable::Node\n\n getter id : Int64\n getter name : String\nend\n\nredis = Redis::Client.new\n\n# Store the graph data in the Redis key \"my-graph\"\ngraph = redis.graph(key: \"my-graph\")\n\n# Create some data in our graph\ngraph.write_query <<-CYPHER, id: 123, name: \"Jamie\"\n CREATE (person:Person{id: $id, name: $name})\nCYPHER\n\n# The `return` argument specifies the return types of the results in your\n# Cypher query's `RETURN` clause\npp graph.read_query(<<-CYPHER, {id: 123}, return: {Person})\n MATCH (person:Person{id: $id})\n RETURN person\nCYPHER\n# => [{Person(\n# @id=123,\n# @name=\"Jamie\",\n# @node=\n# Redis::Graph::Serializable::Node::Metadata(@id=0, @labels=[\"Person\"]))}]\n```\n\nIn addition to basic Redis property types, `Redis::Graph::Serializable` types\nalso support `Bool`, `UUID`, and `Time`.","summary":"

    RedisGraph is a graph database built on top of Redis that you query using the Cypher query language.

    \n

    EXPERIMENTAL The Redis::Graph API is experimental and may be subject to change.

    ","types":[{"html_id":"redis/Redis/Graph/Client","path":"Redis/Graph/Client.html","kind":"struct","full_name":"Redis::Graph::Client(Runnable)","name":"Client","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph.cr","line_number":56,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L56"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"},"constructors":[{"html_id":"new(redis:Runnable,key:String)-class-method","name":"new","abstract":false,"args":[{"name":"redis","external_name":"redis","restriction":"Runnable"},{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(redis : Runnable, key : String)","args_html":"(redis : Runnable, key : String)","location":{"filename":"src/graph.cr","line_number":57,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L57"},"def":{"name":"new","args":[{"name":"redis","external_name":"redis","restriction":"Runnable"},{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"_ = Client(Runnable).allocate\n_.initialize(redis, key)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"multi(&)-instance-method","name":"multi","doc":"Execute a transaction within the given graph\n\n```\ngraph.multi do |txn|\n txn.write_query <<-CYPHER, team_id: 123\n MATCH (\n CYPHER\nend\n```","summary":"

    Execute a transaction within the given graph

    \n

    EXPERIMENTAL This method may be difficult to use, since it relies primarily on Redis::Client#multi, which is not graph-aware. It is currently intended primarily to roll back previous writes if others do not succeed when a single query is not feasible. This may be iterated on in the future.

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":165,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L165"},"def":{"name":"multi","yields":1,"block_arity":1,"visibility":"Public","body":"@redis.multi do |txn|\n yield Client.new(txn.@connection, @key)\nend"}},{"html_id":"read_query(cypher:String,params:NamedTuple|Hash,returntypes:Tuple(*T))forallT-instance-method","name":"read_query","doc":"Query the graph with the given Cypher query, passing in the given\nparams, and returning the given types corresponding to the values in\nyour Cypher `RETURN` clause.\n\n```\ngraph.read_query <<-CYPHER, {team_id: 123}, return: {Person}\n MATCH (team:Team{id: $team_id})\n MATCH (person)-[:MEMBER_OF]->(team)\n RETURN person\nCYPHER\n```","summary":"

    Query the graph with the given Cypher query, passing in the given params, and returning the given types corresponding to the values in your Cypher RETURN clause.

    ","abstract":false,"args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"params","external_name":"params","restriction":"NamedTuple | Hash"},{"name":"types","external_name":"return","restriction":"Tuple(*T)"}],"args_string":"(cypher : String, params : NamedTuple | Hash, return types : Tuple(*T)) forall T","args_html":"(cypher : String, params : NamedTuple | Hash, return types : Tuple(*T)) forall T","location":{"filename":"src/graph.cr","line_number":141,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L141"},"def":{"name":"read_query","args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"params","external_name":"params","restriction":"NamedTuple | Hash"},{"name":"types","external_name":"return","restriction":"Tuple(*T)"}],"visibility":"Public","body":"{% if true %}\n result = Result.new(@redis.run({\"GRAPH.RO_QUERY\", @key, build_query(cypher, params)}).as(Array))\n TypedResult({ {{ (T.type_vars.map(&.instance).join(\", \")).id }} }).new(result)\n {% end %}"}},{"html_id":"read_query(cypher:String,params:NamedTuple|Hash,returntype:T.class)forallT-instance-method","name":"read_query","abstract":false,"args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"params","external_name":"params","restriction":"NamedTuple | Hash"},{"name":"type","external_name":"return","restriction":"T.class"}],"args_string":"(cypher : String, params : NamedTuple | Hash, return type : T.class) forall T","args_html":"(cypher : String, params : NamedTuple | Hash, return type : T.class) forall T","location":{"filename":"src/graph.cr","line_number":148,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L148"},"def":{"name":"read_query","args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"params","external_name":"params","restriction":"NamedTuple | Hash"},{"name":"type","external_name":"return","restriction":"T.class"}],"visibility":"Public","body":"{% if true %}\n result = Result.new(@redis.run({\"GRAPH.RO_QUERY\", @key, build_query(cypher, params)}).as(Array))\n TypedResult({{ T.instance }}).new(result)\n {% end %}"}},{"html_id":"read_query(cypher:String,returntypes:Tuple(*T))forallT-instance-method","name":"read_query","abstract":false,"args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"types","external_name":"return","restriction":"Tuple(*T)"}],"args_string":"(cypher : String, return types : Tuple(*T)) forall T","args_html":"(cypher : String, return types : Tuple(*T)) forall T","location":{"filename":"src/graph.cr","line_number":126,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L126"},"def":{"name":"read_query","args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"types","external_name":"return","restriction":"Tuple(*T)"}],"visibility":"Public","body":"read_query(cypher, params: NamedTuple.new, return: types)"}},{"html_id":"read_query(cypher:String)-instance-method","name":"read_query","doc":"Query the graph with the given Cypher query.\n\n```\ngraph.read_query <<-CYPHER\n MATCH (person:Person)\n RETURN person\nCYPHER\n```","summary":"

    Query the graph with the given Cypher query.

    ","abstract":false,"args":[{"name":"cypher","external_name":"cypher","restriction":"String"}],"args_string":"(cypher : String)","args_html":"(cypher : String)","location":{"filename":"src/graph.cr","line_number":108,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L108"},"def":{"name":"read_query","args":[{"name":"cypher","external_name":"cypher","restriction":"String"}],"visibility":"Public","body":"Result.new((@redis.run({\"GRAPH.RO_QUERY\", @key, cypher})).as(Array))"}},{"html_id":"read_query(cypher:String,**params)-instance-method","name":"read_query","doc":"Query the graph with the given Cypher query, passing in the given\nparams.\n\n```\ngraph.read_query <<-CYPHER, team_id: 123\n MATCH (team:Team{id: $team_id})\n MATCH (person)-[membership:MEMBER_OF]->(team)\n RETURN person, membership, team\nCYPHER\n```","summary":"

    Query the graph with the given Cypher query, passing in the given params.

    ","abstract":false,"args":[{"name":"cypher","external_name":"cypher","restriction":"String"}],"args_string":"(cypher : String, **params)","args_html":"(cypher : String, **params)","location":{"filename":"src/graph.cr","line_number":122,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L122"},"def":{"name":"read_query","args":[{"name":"cypher","external_name":"cypher","restriction":"String"}],"double_splat":{"name":"params","external_name":"params","restriction":""},"visibility":"Public","body":"Result.new((@redis.run({\"GRAPH.RO_QUERY\", @key, build_query(cypher, params)})).as(Array))"}},{"html_id":"write_query(cypher:String,params:NamedTuple|Hash,returntypes:Tuple(*T))forallT-instance-method","name":"write_query","doc":"Write data to the graph using the given cypher query, passing in the\ngiven params and returning the given types for the values in your\nquery's `RETURN` clause.\n\n```\ngraph.write_query <<-CYPHER, {id: 123, now: Time.utc.to_unix_ms}, return: {Person}\n MATCH (person:Person{id: $id})\n SET person.confirmed_at = $now\n RETURN person\nCYPHER\n```","summary":"

    Write data to the graph using the given cypher query, passing in the given params and returning the given types for the values in your query's RETURN clause.

    ","abstract":false,"args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"params","external_name":"params","restriction":"NamedTuple | Hash"},{"name":"types","external_name":"return","restriction":"Tuple(*T)"}],"args_string":"(cypher : String, params : NamedTuple | Hash, return types : Tuple(*T)) forall T","args_html":"(cypher : String, params : NamedTuple | Hash, return types : Tuple(*T)) forall T","location":{"filename":"src/graph.cr","line_number":80,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L80"},"def":{"name":"write_query","args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"params","external_name":"params","restriction":"NamedTuple | Hash"},{"name":"types","external_name":"return","restriction":"Tuple(*T)"}],"visibility":"Public","body":"{% if true %}\n result = Result.new(@redis.run({\"GRAPH.QUERY\", @key, build_query(cypher, params)}).as(Array))\n TypedResult({ {{ (T.type_vars.map(&.instance).join(\", \")).id }} }).new(result)\n {% end %}"}},{"html_id":"write_query(cypher:String,params:NamedTuple|Hash,returntype:T.class)forallT-instance-method","name":"write_query","abstract":false,"args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"params","external_name":"params","restriction":"NamedTuple | Hash"},{"name":"type","external_name":"return","restriction":"T.class"}],"args_string":"(cypher : String, params : NamedTuple | Hash, return type : T.class) forall T","args_html":"(cypher : String, params : NamedTuple | Hash, return type : T.class) forall T","location":{"filename":"src/graph.cr","line_number":87,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L87"},"def":{"name":"write_query","args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"params","external_name":"params","restriction":"NamedTuple | Hash"},{"name":"type","external_name":"return","restriction":"T.class"}],"visibility":"Public","body":"{% if true %}\n result = Result.new(@redis.run({\"GRAPH.QUERY\", @key, build_query(cypher, params)}).as(Array))\n TypedResult({{ T.instance }}).new(result)\n {% end %}"}},{"html_id":"write_query(cypher:String)-instance-method","name":"write_query","doc":"Write data to this graph using the given Cypher query.\n\n```\ngraph.write_query \"MATCH (u:User{active: true}) SET u:ActiveUser, u.active = null\"\n```","summary":"

    Write data to this graph using the given Cypher query.

    ","abstract":false,"args":[{"name":"cypher","external_name":"cypher","restriction":"String"}],"args_string":"(cypher : String)","args_html":"(cypher : String)","location":{"filename":"src/graph.cr","line_number":65,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L65"},"def":{"name":"write_query","args":[{"name":"cypher","external_name":"cypher","restriction":"String"}],"visibility":"Public","body":"Result.new((@redis.run({\"GRAPH.QUERY\", @key, cypher})).as(Array))"}},{"html_id":"write_query(cypher:String,**params)-instance-method","name":"write_query","doc":"Write data to the graph using the given cypher query, passing in the\ngiven query parameters.","summary":"

    Write data to the graph using the given cypher query, passing in the given query parameters.

    ","abstract":false,"args":[{"name":"cypher","external_name":"cypher","restriction":"String"}],"args_string":"(cypher : String, **params)","args_html":"(cypher : String, **params)","location":{"filename":"src/graph.cr","line_number":96,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L96"},"def":{"name":"write_query","args":[{"name":"cypher","external_name":"cypher","restriction":"String"}],"double_splat":{"name":"params","external_name":"params","restriction":""},"visibility":"Public","body":"Result.new((@redis.run({\"GRAPH.QUERY\", @key, build_query(cypher, params)})).as(Array))"}}]},{"html_id":"redis/Redis/Graph/Error","path":"Redis/Graph/Error.html","kind":"class","full_name":"Redis::Graph::Error","name":"Error","abstract":false,"superclass":{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},"ancestors":[{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph.cr","line_number":53,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L53"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"}},{"html_id":"redis/Redis/Graph/List","path":"Redis/Graph/List.html","kind":"alias","full_name":"Redis::Graph::List","name":"List","abstract":false,"locations":[{"filename":"src/graph.cr","line_number":339,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L339"}],"repository_name":"redis","program":false,"enum":false,"alias":true,"aliased":"Array(Array(Array(Redis::Value) | Int64 | Redis::Error | Redis::Graph::Node | Redis::Graph::Relationship | String | Nil) | Array(Redis::Value) | Int64 | Redis::Error | Redis::Graph::Node | Redis::Graph::Relationship | String | Nil)","aliased_html":"Array(Array(Array(Redis::Value) | Int64 | Redis::Error | Redis::Graph::Node | Redis::Graph::Relationship | String | Nil) | Array(Redis::Value) | Int64 | Redis::Error | Redis::Graph::Node | Redis::Graph::Relationship | String | Nil)","const":false,"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"}},{"html_id":"redis/Redis/Graph/Map","path":"Redis/Graph/Map.html","kind":"alias","full_name":"Redis::Graph::Map","name":"Map","abstract":false,"locations":[{"filename":"src/graph.cr","line_number":340,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L340"}],"repository_name":"redis","program":false,"enum":false,"alias":true,"aliased":"Hash(String, Array(Redis::Value) | Int64 | Redis::Error | String | Nil)","aliased_html":"Hash(String, Array(Redis::Value) | Int64 | Redis::Error | String | Nil)","const":false,"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"}},{"html_id":"redis/Redis/Graph/Node","path":"Redis/Graph/Node.html","kind":"struct","full_name":"Redis::Graph::Node","name":"Node","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph.cr","line_number":233,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L233"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"},"doc":"Represents a node in the graph.\n\n```\nresult = graph.read_query(<<-CYPHER)\n MATCH (u:User)\n RETURN u\nCYPHER\n\nresult.each do |(user)|\n user = user.as(Redis::Graph::Node)\n # ...\nend\n```","summary":"

    Represents a node in the graph.

    ","instance_methods":[{"html_id":"id:Int64-instance-method","name":"id","abstract":false,"location":{"filename":"src/graph.cr","line_number":234,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L234"},"def":{"name":"id","return_type":"Int64","visibility":"Public","body":"@id"}},{"html_id":"labels:Array(String)-instance-method","name":"labels","abstract":false,"location":{"filename":"src/graph.cr","line_number":235,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L235"},"def":{"name":"labels","return_type":"Array(String)","visibility":"Public","body":"@labels"}},{"html_id":"properties:Hash(String,Property)-instance-method","name":"properties","abstract":false,"location":{"filename":"src/graph.cr","line_number":236,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L236"},"def":{"name":"properties","return_type":"Hash(String, Property)","visibility":"Public","body":"@properties"}}]},{"html_id":"redis/Redis/Graph/Property","path":"Redis/Graph/Property.html","kind":"alias","full_name":"Redis::Graph::Property","name":"Property","abstract":false,"locations":[{"filename":"src/graph.cr","line_number":337,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L337"}],"repository_name":"redis","program":false,"enum":false,"alias":true,"aliased":"Redis::Value","aliased_html":"Redis::Value","const":false,"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"}},{"html_id":"redis/Redis/Graph/Relationship","path":"Redis/Graph/Relationship.html","kind":"struct","full_name":"Redis::Graph::Relationship","name":"Relationship","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph.cr","line_number":274,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L274"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"},"doc":"Represents a relationship in your graph\n\n```\nresult = graph.read_query(<<-CYPHER)\n MATCH (:User)-[membership:MEMBER_OF]->(:Team)\n RETURN membership\nCYPHER\n\nresult.each do |(membership)|\n membership = membership.as(Redis::Graph::Relationship)\n # ...\nend\n```","summary":"

    Represents a relationship in your graph

    ","instance_methods":[{"html_id":"dest_node:Int64-instance-method","name":"dest_node","doc":"The node that this relationship points to, for example with\n`(person)-[membership]->(team)`, it will be the node id of `team`.\n\nWARNING: This will not match an `id` *property* of the destination node.","summary":"

    The node that this relationship points to, for example with (person)-[membership]->(team), it will be the node id of team.

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":297,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L297"},"def":{"name":"dest_node","return_type":"Int64","visibility":"Public","body":"@dest_node"}},{"html_id":"id:Int64-instance-method","name":"id","doc":"The identifier of the relationship.\n\nNOTE: If this relationship has an `id` property, this is *not* that.\nWARNING: Do not try to query against this. RedisGraph provides no\nguarantees that this relationship will be at the same offset it was at\nthe last time you queried it.","summary":"

    The identifier of the relationship.

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":281,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L281"},"def":{"name":"id","return_type":"Int64","visibility":"Public","body":"@id"}},{"html_id":"properties:Hash(String,Property)-instance-method","name":"properties","doc":"The hash of properties for this relationship.\n\n```\nresult = graph.write_query <<-CYPHER, now: Time.utc.to_unix_ms\n CREATE (person)-[membership{since: $now}]->(team)\n RETURN membership\nCYPHER\nresult.first.properties # => {\"since\" => 2022-05-15T05:48:23 UTC}\n```","summary":"

    The hash of properties for this relationship.

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":308,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L308"},"def":{"name":"properties","return_type":"Hash(String, Property)","visibility":"Public","body":"@properties"}},{"html_id":"src_node:Int64-instance-method","name":"src_node","doc":"The node that this relationship originates from, for example with\n`(person)-[membership]->(team)`, it will be the node id of `person`.\n\nWARNING: This will not match an `id` *property* of the source node.","summary":"

    The node that this relationship originates from, for example with (person)-[membership]->(team), it will be the node id of person.

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":291,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L291"},"def":{"name":"src_node","return_type":"Int64","visibility":"Public","body":"@src_node"}},{"html_id":"type:String-instance-method","name":"type","doc":"The type of relationship, for example with `[:MEMBER_OF]`, the `type`\nwill be `\"MEMBER_OF\"`.","summary":"

    The type of relationship, for example with [:MEMBER_OF], the #type will be "MEMBER_OF".

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":285,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L285"},"def":{"name":"type","return_type":"String","visibility":"Public","body":"@type"}}]},{"html_id":"redis/Redis/Graph/Result","path":"Redis/Graph/Result.html","kind":"struct","full_name":"Redis::Graph::Result","name":"Result","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph.cr","line_number":344,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L344"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"redis/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"}],"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"},"doc":"Parses the results of a Cypher query","summary":"

    Parses the results of a Cypher query

    ","constructors":[{"html_id":"new(raw:Array)-class-method","name":"new","abstract":false,"args":[{"name":"raw","external_name":"raw","restriction":"Array"}],"args_string":"(raw : Array)","args_html":"(raw : Array)","location":{"filename":"src/graph.cr","line_number":371,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L371"},"def":{"name":"new","args":[{"name":"raw","external_name":"raw","restriction":"Array"}],"visibility":"Public","body":"case raw.size\nwhen 1\n fields = [] of String\n rows = [] of Redis::Value\n metadata = raw.first\nwhen 3\n fields, rows, metadata = raw\nelse\n raise(Error.new(\"Don't know how to process this result: #{raw.inspect}\"))\nend\nlabels_added = 0_i64\nnodes_created = 0_i64\nrelationships_created = 0_i64\nproperties_set = 0_i64\ncached = false\nquery_time = 0.seconds\n(metadata.as(Array)).each do |item|\n case item\n when /Labels added: (\\d+)/\n labels_added = $~[1].to_i64\n when /Nodes created: (\\d+)/\n nodes_created = $~[1].to_i64\n when /Relationships created: (\\d+)/\n relationships_created = $~[1].to_i64\n when /Properties set: (\\d+)/\n properties_set = $~[1].to_i64\n when /Query internal execution time: (\\d+\\.\\d+) milliseconds/\n query_time = $~[1].to_f64.milliseconds\n when /Cached execution: (\\d+)/\n cached = ($~[1] != \"0\")\n end\nend\nnew(fields: (fields.as(Array)).map() do |__arg11|\n __arg11.as(String)\nend, rows: (rows.as(Array)).map do |row|\n row = row.as(Array)\n list = List.new(initial_capacity: row.size)\n row.each do |item|\n (case item\n in String, Int64, Nil\n list << item\n in Array\n list << (((Node.from?(item)) || (Relationship.from?(item))) || item)\n in Redis::Error\n raise(item)\n end).as(ResultValue | List)\n end\n list\nend, cached_execution: !(!cached), duration: query_time, labels_added: labels_added, nodes_created: nodes_created, relationships_created: relationships_created, properties_set: properties_set)\n"}},{"html_id":"new(*,fields:Array(String),rows:Array(Array(Array(Array(Redis::Value)|Int64|Redis::Error|Redis::Graph::Node|Redis::Graph::Relationship|String|Nil)|Array(Redis::Value)|Int64|Redis::Error|Redis::Graph::Node|Redis::Graph::Relationship|String|Nil)),cached_execution:Bool,duration:Time::Span,labels_added:Int64,nodes_created:Int64,relationships_created:Int64,properties_set:Int64)-class-method","name":"new","abstract":false,"args":[{"name":"","external_name":"","restriction":""},{"name":"fields","external_name":"fields","restriction":"::Array(::String)"},{"name":"rows","external_name":"rows","restriction":"::Array(::Array(::Array(::Array(::Redis::Value) | ::Int64 | ::Redis::Error | ::Redis::Graph::Node | ::Redis::Graph::Relationship | ::String | ::Nil) | ::Array(::Redis::Value) | ::Int64 | ::Redis::Error | ::Redis::Graph::Node | ::Redis::Graph::Relationship | ::String | ::Nil))"},{"name":"cached_execution","external_name":"cached_execution","restriction":"::Bool"},{"name":"duration","external_name":"duration","restriction":"::Time::Span"},{"name":"labels_added","external_name":"labels_added","restriction":"::Int64"},{"name":"nodes_created","external_name":"nodes_created","restriction":"::Int64"},{"name":"relationships_created","external_name":"relationships_created","restriction":"::Int64"},{"name":"properties_set","external_name":"properties_set","restriction":"::Int64"}],"args_string":"(*, fields : Array(String), rows : Array(Array(Array(Array(Redis::Value) | Int64 | Redis::Error | Redis::Graph::Node | Redis::Graph::Relationship | String | Nil) | Array(Redis::Value) | Int64 | Redis::Error | Redis::Graph::Node | Redis::Graph::Relationship | String | Nil)), cached_execution : Bool, duration : Time::Span, labels_added : Int64, nodes_created : Int64, relationships_created : Int64, properties_set : Int64)","args_html":"(*, fields : Array(String), rows : Array(Array(Array(Array(Redis::Value) | Int64 | Redis::Error | Redis::Graph::Node | Redis::Graph::Relationship | String | Nil) | Array(Redis::Value) | Int64 | Redis::Error | Redis::Graph::Node | Redis::Graph::Relationship | String | Nil)), cached_execution : Bool, duration : Time::Span, labels_added : Int64, nodes_created : Int64, relationships_created : Int64, properties_set : Int64)","location":{"filename":"src/graph.cr","line_number":433,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L433"},"def":{"name":"new","args":[{"name":"","external_name":"","restriction":""},{"name":"fields","external_name":"fields","restriction":"::Array(::String)"},{"name":"rows","external_name":"rows","restriction":"::Array(::Array(::Array(::Array(::Redis::Value) | ::Int64 | ::Redis::Error | ::Redis::Graph::Node | ::Redis::Graph::Relationship | ::String | ::Nil) | ::Array(::Redis::Value) | ::Int64 | ::Redis::Error | ::Redis::Graph::Node | ::Redis::Graph::Relationship | ::String | ::Nil))"},{"name":"cached_execution","external_name":"cached_execution","restriction":"::Bool"},{"name":"duration","external_name":"duration","restriction":"::Time::Span"},{"name":"labels_added","external_name":"labels_added","restriction":"::Int64"},{"name":"nodes_created","external_name":"nodes_created","restriction":"::Int64"},{"name":"relationships_created","external_name":"relationships_created","restriction":"::Int64"},{"name":"properties_set","external_name":"properties_set","restriction":"::Int64"}],"splat_index":0,"visibility":"Public","body":"_ = allocate\n_.initialize(fields: fields, rows: rows, cached_execution: cached_execution, duration: duration, labels_added: labels_added, nodes_created: nodes_created, relationships_created: relationships_created, properties_set: properties_set)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"cached_execution?:Bool-instance-method","name":"cached_execution?","doc":"Indicates whether the query was cached by RedisGraph","summary":"

    Indicates whether the query was cached by RedisGraph

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":354,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L354"},"def":{"name":"cached_execution?","return_type":"Bool","visibility":"Public","body":"@cached_execution"}},{"html_id":"duration:Time::Span-instance-method","name":"duration","doc":"How long it took RedisGraph to execute the query on the server side.","summary":"

    How long it took RedisGraph to execute the query on the server side.

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":357,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L357"},"def":{"name":"duration","return_type":"Time::Span","visibility":"Public","body":"@duration"}},{"html_id":"each(&)-instance-method","name":"each","doc":"Must yield this collection's elements to the block.","summary":"

    Must yield this collection's elements to the block.

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":436,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L436"},"def":{"name":"each","yields":1,"block_arity":1,"visibility":"Public","body":"@rows.each do |row|\n yield row\nend"}},{"html_id":"fields:Array(String)-instance-method","name":"fields","doc":"The names of the fields in a query's `RETURN` clause","summary":"

    The names of the fields in a query's RETURN clause

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":348,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L348"},"def":{"name":"fields","return_type":"Array(String)","visibility":"Public","body":"@fields"}},{"html_id":"labels_added:Int64-instance-method","name":"labels_added","doc":"How many labels were added in this query","summary":"

    How many labels were added in this query

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":360,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L360"},"def":{"name":"labels_added","return_type":"Int64","visibility":"Public","body":"@labels_added"}},{"html_id":"nodes_created:Int64-instance-method","name":"nodes_created","doc":"How many nodes were created in this query","summary":"

    How many nodes were created in this query

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":363,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L363"},"def":{"name":"nodes_created","return_type":"Int64","visibility":"Public","body":"@nodes_created"}},{"html_id":"properties_set:Int64-instance-method","name":"properties_set","doc":"How many properties were set in this query","summary":"

    How many properties were set in this query

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":369,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L369"},"def":{"name":"properties_set","return_type":"Int64","visibility":"Public","body":"@properties_set"}},{"html_id":"relationships_created:Int64-instance-method","name":"relationships_created","doc":"How many relationships were created in this query","summary":"

    How many relationships were created in this query

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":366,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L366"},"def":{"name":"relationships_created","return_type":"Int64","visibility":"Public","body":"@relationships_created"}},{"html_id":"rows:Array(List)-instance-method","name":"rows","doc":"The values of the fields in a query's `RETURN` clause","summary":"

    The values of the fields in a query's RETURN clause

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":351,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L351"},"def":{"name":"rows","return_type":"Array(List)","visibility":"Public","body":"@rows"}}]},{"html_id":"redis/Redis/Graph/ResultValue","path":"Redis/Graph/ResultValue.html","kind":"alias","full_name":"Redis::Graph::ResultValue","name":"ResultValue","abstract":false,"locations":[{"filename":"src/graph.cr","line_number":338,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L338"}],"repository_name":"redis","program":false,"enum":false,"alias":true,"aliased":"(Array(Redis::Value) | Int64 | Redis::Error | Redis::Graph::Node | Redis::Graph::Relationship | String | Nil)","aliased_html":"Array(Redis::Value) | Int64 | Redis::Error | Redis::Graph::Node | Redis::Graph::Relationship | String | Nil","const":false,"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"}},{"html_id":"redis/Redis/Graph/Serializable","path":"Redis/Graph/Serializable.html","kind":"module","full_name":"Redis::Graph::Serializable","name":"Serializable","abstract":false,"locations":[{"filename":"src/graph/serializable.cr","line_number":49,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph/serializable.cr#L49"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"},"doc":"The `Redis::Graph::Serializable::*` mixins tell `Redis::Graph::Client` how\nto deserialize nodes and relationships as your own Crystal object types,\nsimilar to [`DB::Serializable`](http://crystal-lang.github.io/crystal-db/api/0.11.0/DB/Serializable.html).\n\n```\nrequire \"redis/graph\"\n\nstruct Person\n include Redis::Graph::Serializable::Node\n\n getter id : UUID\n getter name : String\n getter created_at : Time\nend\n\nstruct Team\n include Redis::Graph::Serializable::Node\n\n getter name : String\nend\n\nstruct Membership\n include Redis::Graph::Serializable::Relationship\n\n getter since : Time\nend\n\nredis = Redis::Client.new\nredis.del \"my-graph\"\n\n# Store the graph data in the Redis key \"my-graph\"\ngraph = redis.graph(key: \"my-graph\")\n\nid = UUID.random\n\n# Create some data in our graph\npp graph.write_query <<-CYPHER, id: id, name: \"Jamie\", now: Time.utc.to_unix_ms, team_name: \"My Team\"\n CREATE (:Person{id: $id, name: $name, created_at: $now})-[:MEMBER_OF{since: $now}]->(team:Team{name: $team_name})\nCYPHER\n\n# The `return` argument specifies the return types of the results in your\n# Cypher query's `RETURN` clause\npp graph.read_query(<<-CYPHER, {id: id}, return: {Person, Membership, Team})\n MATCH (person:Person{id: $id})-[membership:MEMBER_OF]->(team:Team)\n RETURN person, membership, team\nCYPHER\n```","summary":"

    The Redis::Graph::Serializable::* mixins tell Redis::Graph::Client how to deserialize nodes and relationships as your own Crystal object types, similar to DB::Serializable.

    ","types":[{"html_id":"redis/Redis/Graph/Serializable/Node","path":"Redis/Graph/Serializable/Node.html","kind":"module","full_name":"Redis::Graph::Serializable::Node","name":"Node","abstract":false,"locations":[{"filename":"src/graph/serializable.cr","line_number":53,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph/serializable.cr#L53"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph/Serializable","kind":"module","full_name":"Redis::Graph::Serializable","name":"Serializable"},"types":[{"html_id":"redis/Redis/Graph/Serializable/Node/Metadata","path":"Redis/Graph/Serializable/Node/Metadata.html","kind":"struct","full_name":"Redis::Graph::Serializable::Node::Metadata","name":"Metadata","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph/serializable.cr","line_number":54,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph/serializable.cr#L54"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph/Serializable/Node","kind":"module","full_name":"Redis::Graph::Serializable::Node","name":"Node"},"constructors":[{"html_id":"new(id:Int64,labels:Array(String))-class-method","name":"new","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"Int64"},{"name":"labels","external_name":"labels","restriction":"Array(String)"}],"args_string":"(id : Int64, labels : Array(String))","args_html":"(id : Int64, labels : Array(String))","location":{"filename":"src/graph/serializable.cr","line_number":54,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph/serializable.cr#L54"},"def":{"name":"new","args":[{"name":"id","external_name":"id","restriction":"Int64"},{"name":"labels","external_name":"labels","restriction":"Array(String)"}],"visibility":"Public","body":"_ = allocate\n_.initialize(id, labels)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/graph/serializable.cr","line_number":54,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph/serializable.cr#L54"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@id.clone, @labels.clone)"}},{"html_id":"copy_with(id_id=@id,labels_labels=@labels)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_id","default_value":"@id","external_name":"id","restriction":""},{"name":"_labels","default_value":"@labels","external_name":"labels","restriction":""}],"args_string":"(id _id = @id, labels _labels = @labels)","args_html":"(id _id = @id, labels _labels = @labels)","location":{"filename":"src/graph/serializable.cr","line_number":54,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph/serializable.cr#L54"},"def":{"name":"copy_with","args":[{"name":"_id","default_value":"@id","external_name":"id","restriction":""},{"name":"_labels","default_value":"@labels","external_name":"labels","restriction":""}],"visibility":"Public","body":"self.class.new(_id, _labels)"}},{"html_id":"id:Int64-instance-method","name":"id","abstract":false,"def":{"name":"id","return_type":"Int64","visibility":"Public","body":"@id"}},{"html_id":"labels:Array(String)-instance-method","name":"labels","abstract":false,"def":{"name":"labels","return_type":"Array(String)","visibility":"Public","body":"@labels"}}]}]},{"html_id":"redis/Redis/Graph/Serializable/Property","path":"Redis/Graph/Serializable/Property.html","kind":"annotation","full_name":"Redis::Graph::Serializable::Property","name":"Property","abstract":false,"locations":[{"filename":"src/graph/serializable.cr","line_number":50,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph/serializable.cr#L50"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph/Serializable","kind":"module","full_name":"Redis::Graph::Serializable","name":"Serializable"}},{"html_id":"redis/Redis/Graph/Serializable/Relationship","path":"Redis/Graph/Serializable/Relationship.html","kind":"module","full_name":"Redis::Graph::Serializable::Relationship","name":"Relationship","abstract":false,"locations":[{"filename":"src/graph/serializable.cr","line_number":130,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph/serializable.cr#L130"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph/Serializable","kind":"module","full_name":"Redis::Graph::Serializable","name":"Serializable"},"types":[{"html_id":"redis/Redis/Graph/Serializable/Relationship/Metadata","path":"Redis/Graph/Serializable/Relationship/Metadata.html","kind":"struct","full_name":"Redis::Graph::Serializable::Relationship::Metadata","name":"Metadata","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph/serializable.cr","line_number":131,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph/serializable.cr#L131"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph/Serializable/Relationship","kind":"module","full_name":"Redis::Graph::Serializable::Relationship","name":"Relationship"},"constructors":[{"html_id":"new(id:Int64,type:String,source_node:Int64,destination_node:Int64)-class-method","name":"new","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"Int64"},{"name":"type","external_name":"type","restriction":"String"},{"name":"source_node","external_name":"source_node","restriction":"Int64"},{"name":"destination_node","external_name":"destination_node","restriction":"Int64"}],"args_string":"(id : Int64, type : String, source_node : Int64, destination_node : Int64)","args_html":"(id : Int64, type : String, source_node : Int64, destination_node : Int64)","location":{"filename":"src/graph/serializable.cr","line_number":131,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph/serializable.cr#L131"},"def":{"name":"new","args":[{"name":"id","external_name":"id","restriction":"Int64"},{"name":"type","external_name":"type","restriction":"String"},{"name":"source_node","external_name":"source_node","restriction":"Int64"},{"name":"destination_node","external_name":"destination_node","restriction":"Int64"}],"visibility":"Public","body":"_ = allocate\n_.initialize(id, type, source_node, destination_node)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/graph/serializable.cr","line_number":131,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph/serializable.cr#L131"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@id.clone, @type.clone, @source_node.clone, @destination_node.clone)"}},{"html_id":"copy_with(id_id=@id,type_type=@type,source_node_source_node=@source_node,destination_node_destination_node=@destination_node)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_id","default_value":"@id","external_name":"id","restriction":""},{"name":"_type","default_value":"@type","external_name":"type","restriction":""},{"name":"_source_node","default_value":"@source_node","external_name":"source_node","restriction":""},{"name":"_destination_node","default_value":"@destination_node","external_name":"destination_node","restriction":""}],"args_string":"(id _id = @id, type _type = @type, source_node _source_node = @source_node, destination_node _destination_node = @destination_node)","args_html":"(id _id = @id, type _type = @type, source_node _source_node = @source_node, destination_node _destination_node = @destination_node)","location":{"filename":"src/graph/serializable.cr","line_number":131,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph/serializable.cr#L131"},"def":{"name":"copy_with","args":[{"name":"_id","default_value":"@id","external_name":"id","restriction":""},{"name":"_type","default_value":"@type","external_name":"type","restriction":""},{"name":"_source_node","default_value":"@source_node","external_name":"source_node","restriction":""},{"name":"_destination_node","default_value":"@destination_node","external_name":"destination_node","restriction":""}],"visibility":"Public","body":"self.class.new(_id, _type, _source_node, _destination_node)"}},{"html_id":"destination_node:Int64-instance-method","name":"destination_node","abstract":false,"def":{"name":"destination_node","return_type":"Int64","visibility":"Public","body":"@destination_node"}},{"html_id":"id:Int64-instance-method","name":"id","abstract":false,"def":{"name":"id","return_type":"Int64","visibility":"Public","body":"@id"}},{"html_id":"source_node:Int64-instance-method","name":"source_node","abstract":false,"def":{"name":"source_node","return_type":"Int64","visibility":"Public","body":"@source_node"}},{"html_id":"type:String-instance-method","name":"type","abstract":false,"def":{"name":"type","return_type":"String","visibility":"Public","body":"@type"}}]}]}]},{"html_id":"redis/Redis/Graph/TypedResult","path":"Redis/Graph/TypedResult.html","kind":"struct","full_name":"Redis::Graph::TypedResult(T)","name":"TypedResult","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph.cr","line_number":441,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L441"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"redis/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"}],"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"},"instance_methods":[{"html_id":"cached_execution?:Bool-instance-method","name":"cached_execution?","doc":"Indicates whether the query was cached by RedisGraph","summary":"

    Indicates whether the query was cached by RedisGraph

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":449,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L449"},"def":{"name":"cached_execution?","return_type":"Bool","visibility":"Public","body":"@cached_execution"}},{"html_id":"duration:Time::Span-instance-method","name":"duration","doc":"How long it took RedisGraph to execute the query on the server side.","summary":"

    How long it took RedisGraph to execute the query on the server side.

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":451,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L451"},"def":{"name":"duration","return_type":"Time::Span","visibility":"Public","body":"@duration"}},{"html_id":"each(&)-instance-method","name":"each","doc":"Iterate over each of the results, yielding a tuple containing instances\nof the types in `T`.","summary":"

    Iterate over each of the results, yielding a tuple containing instances of the types in T.

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":489,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L489"},"def":{"name":"each","yields":1,"block_arity":1,"visibility":"Public","body":"@rows.each do |row|\n yield row\nend"}},{"html_id":"fields:Array(String)-instance-method","name":"fields","doc":"The names of the fields in a query's `RETURN` clause","summary":"

    The names of the fields in a query's RETURN clause

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":445,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L445"},"def":{"name":"fields","return_type":"Array(String)","visibility":"Public","body":"@fields"}},{"html_id":"labels_added:Int64-instance-method","name":"labels_added","doc":"How many labels were added in this query","summary":"

    How many labels were added in this query

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":453,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L453"},"def":{"name":"labels_added","return_type":"Int64","visibility":"Public","body":"@labels_added"}},{"html_id":"nodes_created:Int64-instance-method","name":"nodes_created","doc":"How many nodes were created in this query","summary":"

    How many nodes were created in this query

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":455,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L455"},"def":{"name":"nodes_created","return_type":"Int64","visibility":"Public","body":"@nodes_created"}},{"html_id":"properties_set:Int64-instance-method","name":"properties_set","doc":"How many properties were set in this query","summary":"

    How many properties were set in this query

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":459,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L459"},"def":{"name":"properties_set","return_type":"Int64","visibility":"Public","body":"@properties_set"}},{"html_id":"relationships_created:Int64-instance-method","name":"relationships_created","doc":"How many relationships were created in this query","summary":"

    How many relationships were created in this query

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":457,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L457"},"def":{"name":"relationships_created","return_type":"Int64","visibility":"Public","body":"@relationships_created"}},{"html_id":"rows:Array(T)-instance-method","name":"rows","doc":"The values of the fields in a query's `RETURN` clause","summary":"

    The values of the fields in a query's RETURN clause

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":447,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L447"},"def":{"name":"rows","return_type":"Array(T)","visibility":"Public","body":"@rows"}}]},{"html_id":"redis/Redis/Graph/Value","path":"Redis/Graph/Value.html","kind":"alias","full_name":"Redis::Graph::Value","name":"Value","abstract":false,"locations":[{"filename":"src/graph.cr","line_number":341,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L341"}],"repository_name":"redis","program":false,"enum":false,"alias":true,"aliased":"(Array(Array(Array(Redis::Value) | Int64 | Redis::Error | Redis::Graph::Node | Redis::Graph::Relationship | String | Nil) | Array(Redis::Value) | Int64 | Redis::Error | Redis::Graph::Node | Redis::Graph::Relationship | String | Nil) | Array(Redis::Value) | Hash(String, Array(Redis::Value) | Int64 | Redis::Error | String | Nil) | Int64 | Redis::Error | Redis::Graph::Node | Redis::Graph::Relationship | String | Nil)","aliased_html":"Array(Array(Array(Redis::Value) | Int64 | Redis::Error | Redis::Graph::Node | Redis::Graph::Relationship | String | Nil) | Array(Redis::Value) | Int64 | Redis::Error | Redis::Graph::Node | Redis::Graph::Relationship | String | Nil) | Array(Redis::Value) | Hash(String, Array(Redis::Value) | Int64 | Redis::Error | String | Nil) | Int64 | Redis::Error | Redis::Graph::Node | Redis::Graph::Relationship | String | Nil","const":false,"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"}}]},{"html_id":"redis/Redis/JSON","path":"Redis/JSON.html","kind":"struct","full_name":"Redis::JSON(Runnable)","name":"JSON","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/json.cr","line_number":36,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L36"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"doc":"`Redis::JSON` wraps a `Redis::Client` or `Redis::Cluster` to execute\ncommands against keys storing JSON data using the\n[RedisJSON](https://oss.redis.com/redisjson/) plugin for Redis.\n\n```\nrequire \"redis\"\nrequire \"redis/json\"\nrequire \"uuid/json\"\n\nstruct Person\n include JSON::Serializable\n\n getter id : UUID\n getter name : String\n getter email : String\n\n def initialize(@id, @name, @email)\n end\nend\n\nredis = Redis::Client.new\n\nid = UUID.random\n\nredis.json.set \"person:#{id}\", \".\", Person.new(id, \"Jamie\", \"jamie@example.com\")\nredis.json.get(\"person:#{id}\", \".\", as: Person)\n# => Person(@email=\"jamie@example.com\", @id=UUID(081af617-6b50-48d3-b53f-dbc17a1072f5), @name=\"Jamie\")\nredis.json.get(\"person:#{id}\", \".name\", as: String)\n# => \"Jamie\"\n```","summary":"

    Redis::JSON wraps a Redis::Client or Redis::Cluster to execute commands against keys storing JSON data using the RedisJSON plugin for Redis.

    ","constructors":[{"html_id":"new(redis:Runnable)-class-method","name":"new","abstract":false,"args":[{"name":"redis","external_name":"redis","restriction":"Runnable"}],"args_string":"(redis : Runnable)","args_html":"(redis : Runnable)","location":{"filename":"src/json.cr","line_number":37,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L37"},"def":{"name":"new","args":[{"name":"redis","external_name":"redis","restriction":"Runnable"}],"visibility":"Public","body":"_ = JSON(Runnable).allocate\n_.initialize(redis)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"arrappend(key:String,path:String,value)-instance-method","name":"arrappend","doc":"Append `value` as JSON to the array located at the JSONPath in `key`\n\n```\nredis.json.arrappend \"posts:#{id}\", \".tags\", \"redis\"\n```","summary":"

    Append value as JSON to the array located at the JSONPath in key

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"value","external_name":"value","restriction":""}],"args_string":"(key : String, path : String, value)","args_html":"(key : String, path : String, value)","location":{"filename":"src/json.cr","line_number":219,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L219"},"def":{"name":"arrappend","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"value","external_name":"value","restriction":""}],"visibility":"Public","body":"@redis.run({\"json.arrappend\", key, path, value.to_json})"}},{"html_id":"arrappend(key:String,path:String,*,values:Array)-instance-method","name":"arrappend","doc":"Append `values` as JSON to the array located at the JSONPath in `key`\n\n```\nredis.json.arrappend \"posts:#{id}\", \".tags\", %w[redis crystal]\n```","summary":"

    Append values as JSON to the array located at the JSONPath in key

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"","external_name":"","restriction":""},{"name":"values","external_name":"values","restriction":"Array"}],"args_string":"(key : String, path : String, *, values : Array)","args_html":"(key : String, path : String, *, values : Array)","location":{"filename":"src/json.cr","line_number":228,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L228"},"def":{"name":"arrappend","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"","external_name":"","restriction":""},{"name":"values","external_name":"values","restriction":"Array"}],"splat_index":2,"visibility":"Public","body":"command = Array(String).new(initial_capacity: 3 + values.size)\n((command << \"json.arrappend\") << key) << path\nvalues.each do |value|\n command << value.to_json\nend\n@redis.run(command)\n"}},{"html_id":"arrindex(key:String,path:String,value,betweenrange:Range(Int,Int|Nil))-instance-method","name":"arrindex","doc":"Get the index of `value` in the array located at the JSONPath in `key` if\nand only if it falls in the specified `range`\n\n```\nredis.json.arrindex \"posts:#{id}\", \".tags\", \"redis\", between: 1..3\n# => 2\n```","summary":"

    Get the index of value in the array located at the JSONPath in key if and only if it falls in the specified range

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"value","external_name":"value","restriction":""},{"name":"range","external_name":"between","restriction":"Range(Int, Int | ::Nil)"}],"args_string":"(key : String, path : String, value, between range : Range(Int, Int | Nil))","args_html":"(key : String, path : String, value, between range : Range(Int, Int | Nil))","location":{"filename":"src/json.cr","line_number":254,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L254"},"def":{"name":"arrindex","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"value","external_name":"value","restriction":""},{"name":"range","external_name":"between","restriction":"Range(Int, Int | ::Nil)"}],"visibility":"Public","body":"command = {\"json.arrindex\", key, path, value.to_json, range.begin.to_s}\nif last = range.end\n if range.excludes_end?\n command = command + {last.to_s}\n else\n command = command + {(last + 1).to_s}\n end\nend\n@redis.run(command)\n"}},{"html_id":"arrindex(key:String,path:String,value)-instance-method","name":"arrindex","doc":"Get the index of `value` in the array located at the JSONPath in `key`\n\n```\nredis.json.arrindex \"posts:#{id}\", \".tags\", \"redis\" # => 2\n```","summary":"

    Get the index of value in the array located at the JSONPath in key

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"value","external_name":"value","restriction":""}],"args_string":"(key : String, path : String, value)","args_html":"(key : String, path : String, value)","location":{"filename":"src/json.cr","line_number":243,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L243"},"def":{"name":"arrindex","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"value","external_name":"value","restriction":""}],"visibility":"Public","body":"@redis.run({\"json.arrindex\", key, path, value.to_json})"}},{"html_id":"arrinsert(key:String,path:String,index:Int,value)-instance-method","name":"arrinsert","doc":"Insert `value` into the array located at the JSONPath in `key` at `index`\n\n```\nredis.json.arrinsert \"posts:#{id}\", \".tags\", index: 1, value: \"redis\"\n# => 3\n```","summary":"

    Insert value into the array located at the JSONPath in key at index

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"index","external_name":"index","restriction":"Int"},{"name":"value","external_name":"value","restriction":""}],"args_string":"(key : String, path : String, index : Int, value)","args_html":"(key : String, path : String, index : Int, value)","location":{"filename":"src/json.cr","line_number":273,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L273"},"def":{"name":"arrinsert","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"index","external_name":"index","restriction":"Int"},{"name":"value","external_name":"value","restriction":""}],"visibility":"Public","body":"@redis.run({\"json.arrinsert\", key, path, index.to_s, value.to_json})"}},{"html_id":"arrinsert(key:String,path:String,index:Int,*,values:Array)-instance-method","name":"arrinsert","doc":"Insert the elements of `values` into the array located at the JSONPath in\n`key` at `index`\n\n```\nredis.json.arrinsert \"posts:#{id}\", \".tags\", index: 1, values: %w[\n redis\n crystal\n]\n# => 4\n```","summary":"

    Insert the elements of values into the array located at the JSONPath in key at index

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"index","external_name":"index","restriction":"Int"},{"name":"","external_name":"","restriction":""},{"name":"values","external_name":"values","restriction":"Array"}],"args_string":"(key : String, path : String, index : Int, *, values : Array)","args_html":"(key : String, path : String, index : Int, *, values : Array)","location":{"filename":"src/json.cr","line_number":287,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L287"},"def":{"name":"arrinsert","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"index","external_name":"index","restriction":"Int"},{"name":"","external_name":"","restriction":""},{"name":"values","external_name":"values","restriction":"Array"}],"splat_index":3,"visibility":"Public","body":"command = Array(String).new(initial_capacity: 4 + values.size)\n(((command << \"json.arrinsert\") << key) << path) << index.to_s\nvalues.each do |value|\n command << value.to_json\nend\n@redis.run(command)\n"}},{"html_id":"arrlen(key:String,path:String)-instance-method","name":"arrlen","doc":"Get the number of elements in the array located at the JSONPath in `key`\n\n```\nredis.json.arrlen \"posts:#{id}\", \".tags\"\n# => 4\n```","summary":"

    Get the number of elements in the array located at the JSONPath in key

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"}],"args_string":"(key : String, path : String)","args_html":"(key : String, path : String)","location":{"filename":"src/json.cr","line_number":303,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L303"},"def":{"name":"arrlen","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"}],"visibility":"Public","body":"@redis.run({\"json.arrlen\", key, path})"}},{"html_id":"arrpop(key:String,path:String|Nil=nil,*,index:Int=-1)-instance-method","name":"arrpop","doc":"Remove and return the value located at `index` (defaulting to the last\nelement) in the array located at the JSONPath in `key`\n\n```\nredis.json.arrlen \"posts:#{id}\", \".tags\"\n# => 4\n```","summary":"

    Remove and return the value located at index (defaulting to the last element) in the array located at the JSONPath in key

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","default_value":"nil","external_name":"path","restriction":"String | ::Nil"},{"name":"","external_name":"","restriction":""},{"name":"index","default_value":"-1","external_name":"index","restriction":"Int"}],"args_string":"(key : String, path : String | Nil = nil, *, index : Int = -1)","args_html":"(key : String, path : String | Nil = nil, *, index : Int = -1)","location":{"filename":"src/json.cr","line_number":314,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L314"},"def":{"name":"arrpop","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","default_value":"nil","external_name":"path","restriction":"String | ::Nil"},{"name":"","external_name":"","restriction":""},{"name":"index","default_value":"-1","external_name":"index","restriction":"Int"}],"splat_index":2,"visibility":"Public","body":"command = {\"json.arrpop\", key}\nif path\n command = command + {path}\n if index != -1\n command = command + {index.to_s}\n end\nend\n@redis.run(command)\n"}},{"html_id":"arrpop(key:String,path:String,*,index:Int=-1,as:T.class):T|NilforallT-instance-method","name":"arrpop","doc":"Remove and return the value located at `index` (defaulting to the last\nelement) in the array located at the JSONPath in `key`\n\n```\nredis.json.arrlen \"posts:#{id}\", \".tags\"\n# => 4\n```\n\nNOTE: This method cannot be invoked on a pipeline or the transaction\nyielded to a `Redis::Connection#multi` block.","summary":"

    Remove and return the value located at index (defaulting to the last element) in the array located at the JSONPath in key

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"","external_name":"","restriction":""},{"name":"index","default_value":"-1","external_name":"index","restriction":"Int"},{"name":"as","external_name":"as","restriction":"T.class"}],"args_string":"(key : String, path : String, *, index : Int = -1, as : T.class) : T | Nil forall T","args_html":"(key : String, path : String, *, index : Int = -1, as : T.class) : T | Nil forall T","location":{"filename":"src/json.cr","line_number":334,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L334"},"def":{"name":"arrpop","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"","external_name":"","restriction":""},{"name":"index","default_value":"-1","external_name":"index","restriction":"Int"},{"name":"as","external_name":"as","restriction":"T.class"}],"splat_index":2,"return_type":"T | ::Nil","visibility":"Public","body":"if result = arrpop(key, path, index: index)\n T.from_json(result.as(String))\nend"}},{"html_id":"clear(key:String,path:String|Nil=nil)-instance-method","name":"clear","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","default_value":"nil","external_name":"path","restriction":"String | ::Nil"}],"args_string":"(key : String, path : String | Nil = nil)","args_html":"(key : String, path : String | Nil = nil)","location":{"filename":"src/json.cr","line_number":166,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L166"},"def":{"name":"clear","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","default_value":"nil","external_name":"path","restriction":"String | ::Nil"}],"visibility":"Public","body":"command = {\"json.clear\", key}\nif path\n command = command + {path}\nend\n@redis.run(command)\n"}},{"html_id":"del(key:String,path:String|Nil=nil)-instance-method","name":"del","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","default_value":"nil","external_name":"path","restriction":"String | ::Nil"}],"args_string":"(key : String, path : String | Nil = nil)","args_html":"(key : String, path : String | Nil = nil)","location":{"filename":"src/json.cr","line_number":173,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L173"},"def":{"name":"del","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","default_value":"nil","external_name":"path","restriction":"String | ::Nil"}],"visibility":"Public","body":"command = {\"json.del\", key}\nif path\n command = command + {path}\nend\n@redis.run(command)\n"}},{"html_id":"get(key:String,path:String,astype:T.class):T|NilforallT-instance-method","name":"get","doc":"Get the value stored at the given JSONPath inside the given `key`,\ndeserializing the value into the type `T`. You can use this to deserialize\nyour custom `JSON::Serializable` objects.\n\n```\nstruct Order\n include JSON::Serializable\n getter id : UUID\n getter customer_id : UUID\n getter line_items : Array(LineItem)\nend\n\nstruct LineItem\n include JSON::Serializable\n getter product_id : UUID\n getter quantity : Int32\n getter unit_price_cents : Int32\nend\n\n# Get the Order at the root\nredis.json.get(\"order:#{id}\", \".\", as: Order)\n# Get the LineItems at the `.line_items` JSONPath\n# Note the `$` at the beginning to make it an array\nredis.json.get(\"order:#{id}\", \"$.line_items\", as: Array(LineItem))\n# Get only the `product_id` properties of all the `line_items`\nredis.json.get(\"order:#{id}\", \"$.line_items..product_id\", as: Array(UUID))\n```\n\nNOTE: This method _cannot_ be used in a pipeline or `Redis::Connection#multi`\nblock because it operates on the value returned from the Redis server\ninside the method, which isn't possible when using pipelines or `multi`.","summary":"

    Get the value stored at the given JSONPath inside the given key, deserializing the value into the type T.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"type","external_name":"as","restriction":"T.class"}],"args_string":"(key : String, path : String, as type : T.class) : T | Nil forall T","args_html":"(key : String, path : String, as type : T.class) : T | Nil forall T","location":{"filename":"src/json.cr","line_number":138,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L138"},"def":{"name":"get","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"type","external_name":"as","restriction":"T.class"}],"return_type":"T | ::Nil","visibility":"Public","body":"if result = @redis.run({\"json.get\", key, path})\n T.from_json(result.as(String))\nend"}},{"html_id":"get(key:String,path:String)-instance-method","name":"get","doc":"Get the raw JSON string representation at the given `key` nested at the\ngiven JSONPath.\n\n```\nemail = redis.json.get(\"user:#{id}\", \".email\").as(String)\n# => \"me@example.com\"\n```","summary":"

    Get the raw JSON string representation at the given key nested at the given JSONPath.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"}],"args_string":"(key : String, path : String)","args_html":"(key : String, path : String)","location":{"filename":"src/json.cr","line_number":84,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L84"},"def":{"name":"get","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"}],"visibility":"Public","body":"@redis.run({\"json.get\", key, path})"}},{"html_id":"get(key:String,paths:Array(String),astype:T.class=::JSON::Any)forallT-instance-method","name":"get","doc":"Get the values stored at the specifed JSONPaths, deserializing them into\nthe specified type as values in a `Hash`.\n\n```\nif result = redis.json.get(\"posts:#{id}\", %w[title tags], as: String | Array(String))\n result # => {\"title\" => \"JSON with Redis\", tags: [\"redis\", \"json\", \"crystal\"]}\n typeof(result) # => Hash(String, String | Array(String))\nend\n```\n\nNOTE: This method _cannot_ be used in a pipeline or `Redis::Connection#multi`\nblock because it operates on the value returned from the Redis server,\nwhich isn't a thing when using pipelines or `multi`.","summary":"

    Get the values stored at the specifed JSONPaths, deserializing them into the specified type as values in a Hash.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"paths","external_name":"paths","restriction":"Array(String)"},{"name":"type","default_value":"::JSON::Any","external_name":"as","restriction":"T.class"}],"args_string":"(key : String, paths : Array(String), as type : T.class = ::JSON::Any) forall T","args_html":"(key : String, paths : Array(String), as type : T.class = ::JSON::Any) forall T","location":{"filename":"src/json.cr","line_number":101,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L101"},"def":{"name":"get","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"paths","external_name":"paths","restriction":"Array(String)"},{"name":"type","default_value":"::JSON::Any","external_name":"as","restriction":"T.class"}],"visibility":"Public","body":"if result = @redis.run([\"json.get\", key] + paths)\n Hash(String, T).from_json(result.as(String))\nend"}},{"html_id":"get(key:String)-instance-method","name":"get","doc":"Get the raw JSON string at the specified `key`","summary":"

    Get the raw JSON string at the specified key

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/json.cr","line_number":73,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L73"},"def":{"name":"get","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"@redis.run({\"json.get\", key})"}},{"html_id":"mget(keys:Array(String),path:String,astype:T.class):Array(T|Nil)forallT-instance-method","name":"mget","doc":"Get the values for all `keys` at the specified JSONPaths.\n\nNOTE: This method _cannot_ be used in a pipeline or `Redis::Connection#multi`\nblock because it operates on the value returned from the Redis server\ninside the method, which isn't possible when using pipelines or `multi`.\nNOTE: If you are using a cluster, the `keys` _must_ all be on the same\nshard, or you may only get some of them back with this method. When using\n`mget` in a cluster, you'll most likely want to use subhashed keys (with\n`{}` around the same part of the name) to ensure all keys are on the same\nshard.","summary":"

    Get the values for all keys at the specified JSONPaths.

    ","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"Array(String)"},{"name":"path","external_name":"path","restriction":"String"},{"name":"type","external_name":"as","restriction":"T.class"}],"args_string":"(keys : Array(String), path : String, as type : T.class) : Array(T | Nil) forall T","args_html":"(keys : Array(String), path : String, as type : T.class) : Array(T | Nil) forall T","location":{"filename":"src/json.cr","line_number":154,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L154"},"def":{"name":"mget","args":[{"name":"keys","external_name":"keys","restriction":"Array(String)"},{"name":"path","external_name":"path","restriction":"String"},{"name":"type","external_name":"as","restriction":"T.class"}],"return_type":"Array(T | ::Nil)","visibility":"Public","body":"if result = @redis.run(([\"json.mget\"] + keys) + [path])\n (result.as(Array)).map do |value|\n if value\n T.from_json(value.as(String))\n end\n end\nelse\n raise(\"lolwut?\")\nend"}},{"html_id":"numincrby(key:String,path:String,count:String|Int,astype:T.class):TforallT-instance-method","name":"numincrby","doc":"Increment the number at the specified JSONPath\n\n```\nredis.json.numincrby \"product:#{id}\", \".purchase_count\", 1, as: Int64\n# => 2\n```\n\nIf `key` exists and an incrementable number exists at the specified\nJSONPath (including the possibility of incrementing multiple numbers if\nthe JSONPath resolves to multiple numeric values), then this method\nreturns a value of type `T`. If the JSONPath resolves to multiple values\n(for example, it begins with \"$\" or is recursive), you will need to\nspecify that it can be an `Array` of that type.\n\nNOTE: This method cannot be used on deferred command runners like\n`Redis::Pipeline` or `Redis::Transaction`. It eagerly consumes the\nresult from the server, so the result must not be deferred.","summary":"

    Increment the number at the specified JSONPath

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"count","external_name":"count","restriction":"String | Int"},{"name":"type","external_name":"as","restriction":"T.class"}],"args_string":"(key : String, path : String, count : String | Int, as type : T.class) : T forall T","args_html":"(key : String, path : String, count : String | Int, as type : T.class) : T forall T","location":{"filename":"src/json.cr","line_number":206,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L206"},"def":{"name":"numincrby","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"count","external_name":"count","restriction":"String | Int"},{"name":"type","external_name":"as","restriction":"T.class"}],"return_type":"T","visibility":"Public","body":"T.from_json((numincrby(key, path, count)).as(String))"}},{"html_id":"numincrby(key:String,path:String,count:String|Int)-instance-method","name":"numincrby","doc":"Increment the number at the specified JSONPath\n\n```\nredis.json.numincrby \"product:#{id}\", \".purchase_count\", 1\n```","summary":"

    Increment the number at the specified JSONPath

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"count","external_name":"count","restriction":"String | Int"}],"args_string":"(key : String, path : String, count : String | Int)","args_html":"(key : String, path : String, count : String | Int)","location":{"filename":"src/json.cr","line_number":185,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L185"},"def":{"name":"numincrby","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"count","external_name":"count","restriction":"String | Int"}],"visibility":"Public","body":"@redis.run({\"json.numincrby\", key, path, count.to_s})"}},{"html_id":"set(key:String,path:String,value,*,nx=false,xx=false)-instance-method","name":"set","doc":"Set the given key to the given JSON `value`. The `value` will have\n`to_json` called on it automatically. The `nx` and `xx` arguments are\nidentical to `Redis::Commands#set`.\n\nStore a user at the root JSONPath (`.`) of the specified key:\n\n```\nstruct User\n include JSON::Serializable\n\n getter id : UUID\n getter name : String\n getter email : String\nend\n\nredis.json.set \"user:#{user.id}\", \".\", user\n```\n\nUpdate (with `xx` so we ensure the key exists) a user's email by setting\nthe new email value at the `.email` JSONPath:\n\n```\nredis.json.set \"user:#{id}\", \".email\", new_email, xx: true\n```","summary":"

    Set the given key to the given JSON value.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"value","external_name":"value","restriction":""},{"name":"","external_name":"","restriction":""},{"name":"nx","default_value":"false","external_name":"nx","restriction":""},{"name":"xx","default_value":"false","external_name":"xx","restriction":""}],"args_string":"(key : String, path : String, value, *, nx = false, xx = false)","args_html":"(key : String, path : String, value, *, nx = false, xx = false)","location":{"filename":"src/json.cr","line_number":64,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L64"},"def":{"name":"set","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"value","external_name":"value","restriction":""},{"name":"","external_name":"","restriction":""},{"name":"nx","default_value":"false","external_name":"nx","restriction":""},{"name":"xx","default_value":"false","external_name":"xx","restriction":""}],"splat_index":3,"visibility":"Public","body":"command = {\"json.set\", key, path, value.to_json}\nif nx\n command = command + {\"nx\"}\nend\nif xx\n command = command + {\"xx\"}\nend\n@redis.run(command)\n"}},{"html_id":"toggle(key:String,path:String)-instance-method","name":"toggle","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"}],"args_string":"(key : String, path : String)","args_html":"(key : String, path : String)","location":{"filename":"src/json.cr","line_number":210,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L210"},"def":{"name":"toggle","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"}],"visibility":"Public","body":"@redis.run({\"json.toggle\", key, path})"}}]},{"html_id":"redis/Redis/NoGroup","path":"Redis/NoGroup.html","kind":"class","full_name":"Redis::NoGroup","name":"NoGroup","abstract":false,"superclass":{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},"ancestors":[{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/errors.cr","line_number":16,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/errors.cr#L16"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"}},{"html_id":"redis/Redis/Parser","path":"Redis/Parser.html","kind":"struct","full_name":"Redis::Parser","name":"Parser","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/parser.cr","line_number":5,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/parser.cr#L5"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"constructors":[{"html_id":"new(io:IO)-class-method","name":"new","doc":"Initialize a parser to read from the given IO","summary":"

    Initialize a parser to read from the given IO

    ","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/parser.cr","line_number":7,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/parser.cr#L7"},"def":{"name":"new","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"_ = allocate\n_.initialize(io)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"read:Value-instance-method","name":"read","doc":"Read a `Redis::Value` from the parser's `IO`\n\nExample:\n\n```\nio = IO::Memory.new\nio << \"$3\\r\\n\"\nio << \"foo\\r\\n\"\nio.rewind\n\nParser.new(io).read # => \"foo\"\n```","summary":"

    Read a Redis::Value from the parser's IO

    ","abstract":false,"location":{"filename":"src/parser.cr","line_number":22,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/parser.cr#L22"},"def":{"name":"read","return_type":"Value","visibility":"Public","body":"read do\n raise(IO::Error.new(\"Connection closed\"))\nend"}},{"html_id":"read?-instance-method","name":"read?","doc":"Reads a value from the `IO`, returning `nil` on EOF.","summary":"

    Reads a value from the IO, returning nil on EOF.

    ","abstract":false,"location":{"filename":"src/parser.cr","line_number":27,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/parser.cr#L27"},"def":{"name":"read?","visibility":"Public","body":"if @io.closed?\n return\nend\nread do\n nil\nend\n"}}]},{"html_id":"redis/Redis/Pipeline","path":"Redis/Pipeline.html","kind":"class","full_name":"Redis::Pipeline","name":"Pipeline","abstract":false,"superclass":{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},{"html_id":"redis/Redis/Commands/Stream","kind":"module","full_name":"Redis::Commands::Stream","name":"Stream"},{"html_id":"redis/Redis/Commands/SortedSet","kind":"module","full_name":"Redis::Commands::SortedSet","name":"SortedSet"},{"html_id":"redis/Redis/Commands/Set","kind":"module","full_name":"Redis::Commands::Set","name":"Set"},{"html_id":"redis/Redis/Commands/List","kind":"module","full_name":"Redis::Commands::List","name":"List"},{"html_id":"redis/Redis/Commands/Hash","kind":"module","full_name":"Redis::Commands::Hash","name":"Hash"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/pipeline.cr","line_number":6,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/pipeline.cr#L6"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"constructors":[{"html_id":"new(connection:Connection)-class-method","name":"new","doc":"Wraps a connection so that our `run` and `commit` methods can execute against it.","summary":"

    Wraps a connection so that our #run and #commit methods can execute against it.

    ","abstract":false,"args":[{"name":"connection","external_name":"connection","restriction":"Connection"}],"args_string":"(connection : Connection)","args_html":"(connection : Connection)","location":{"filename":"src/pipeline.cr","line_number":12,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/pipeline.cr#L12"},"def":{"name":"new","args":[{"name":"connection","external_name":"connection","restriction":"Connection"}],"visibility":"Public","body":"_ = allocate\n_.initialize(connection)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"commit-instance-method","name":"commit","doc":"Read all of the return values from all of the commands we've sent to Redis\nand resolve all `Redis::Future`s with them in the order they were sent.","summary":"

    Read all of the return values from all of the commands we've sent to Redis and resolve all Redis::Futures with them in the order they were sent.

    ","abstract":false,"location":{"filename":"src/pipeline.cr","line_number":26,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/pipeline.cr#L26"},"def":{"name":"commit","visibility":"Public","body":"@futures.map(&.resolve(@connection.read))"}},{"html_id":"run(command)-instance-method","name":"run","doc":"The `run` method is required by the `Commands` mixin. When you run a Redis\ncommand, it gets pushed to the server via this method.","summary":"

    The #run method is required by the Commands mixin.

    ","abstract":false,"args":[{"name":"command","external_name":"command","restriction":""}],"args_string":"(command)","args_html":"(command)","location":{"filename":"src/pipeline.cr","line_number":17,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/pipeline.cr#L17"},"def":{"name":"run","args":[{"name":"command","external_name":"command","restriction":""}],"visibility":"Public","body":"@connection.encode(command)\nfuture = Future.new\n@futures << future\nfuture\n"}}]},{"html_id":"redis/Redis/Streaming","path":"Redis/Streaming.html","kind":"module","full_name":"Redis::Streaming","name":"Streaming","abstract":false,"locations":[{"filename":"src/streaming.cr","line_number":4,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L4"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"types":[{"html_id":"redis/Redis/Streaming/Message","path":"Redis/Streaming/Message.html","kind":"struct","full_name":"Redis::Streaming::Message","name":"Message","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/streaming.cr","line_number":92,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L92"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Streaming","kind":"module","full_name":"Redis::Streaming","name":"Streaming"},"constructors":[{"html_id":"new(message:Array)-class-method","name":"new","abstract":false,"args":[{"name":"message","external_name":"message","restriction":"Array"}],"args_string":"(message : Array)","args_html":"(message : Array)","location":{"filename":"src/streaming.cr","line_number":95,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L95"},"def":{"name":"new","args":[{"name":"message","external_name":"message","restriction":"Array"}],"visibility":"Public","body":"_ = allocate\n_.initialize(message)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"id:String-instance-method","name":"id","abstract":false,"location":{"filename":"src/streaming.cr","line_number":93,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L93"},"def":{"name":"id","visibility":"Public","body":"@id"}},{"html_id":"values:Hash(String,String)-instance-method","name":"values","abstract":false,"location":{"filename":"src/streaming.cr","line_number":93,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L93"},"def":{"name":"values","visibility":"Public","body":"@values"}}]},{"html_id":"redis/Redis/Streaming/XAutoClaimResponse","path":"Redis/Streaming/XAutoClaimResponse.html","kind":"struct","full_name":"Redis::Streaming::XAutoClaimResponse","name":"XAutoClaimResponse","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/streaming.cr","line_number":77,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L77"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Streaming","kind":"module","full_name":"Redis::Streaming","name":"Streaming"},"constructors":[{"html_id":"new(response:Array)-class-method","name":"new","abstract":false,"args":[{"name":"response","external_name":"response","restriction":"Array"}],"args_string":"(response : Array)","args_html":"(response : Array)","location":{"filename":"src/streaming.cr","line_number":81,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L81"},"def":{"name":"new","args":[{"name":"response","external_name":"response","restriction":"Array"}],"visibility":"Public","body":"_ = allocate\n_.initialize(response)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"id:String-instance-method","name":"id","abstract":false,"location":{"filename":"src/streaming.cr","line_number":78,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L78"},"def":{"name":"id","return_type":"String","visibility":"Public","body":"@id"}},{"html_id":"messages:Array(Message)-instance-method","name":"messages","abstract":false,"location":{"filename":"src/streaming.cr","line_number":79,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L79"},"def":{"name":"messages","return_type":"Array(Message)","visibility":"Public","body":"@messages"}}]},{"html_id":"redis/Redis/Streaming/XPendingBaseResponse","path":"Redis/Streaming/XPendingBaseResponse.html","kind":"struct","full_name":"Redis::Streaming::XPendingBaseResponse","name":"XPendingBaseResponse","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/streaming.cr","line_number":5,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L5"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Streaming","kind":"module","full_name":"Redis::Streaming","name":"Streaming"},"constructors":[{"html_id":"new(response:Array)-class-method","name":"new","abstract":false,"args":[{"name":"response","external_name":"response","restriction":"Array"}],"args_string":"(response : Array)","args_html":"(response : Array)","location":{"filename":"src/streaming.cr","line_number":8,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L8"},"def":{"name":"new","args":[{"name":"response","external_name":"response","restriction":"Array"}],"visibility":"Public","body":"_ = allocate\n_.initialize(response)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"count:Int64-instance-method","name":"count","abstract":false,"location":{"filename":"src/streaming.cr","line_number":6,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L6"},"def":{"name":"count","visibility":"Public","body":"@count"}},{"html_id":"data:Array(Data)-instance-method","name":"data","abstract":false,"location":{"filename":"src/streaming.cr","line_number":6,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L6"},"def":{"name":"data","return_type":"Array(Data)","visibility":"Public","body":"@data"}},{"html_id":"earliest:String-instance-method","name":"earliest","abstract":false,"location":{"filename":"src/streaming.cr","line_number":6,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L6"},"def":{"name":"earliest","visibility":"Public","body":"@earliest"}},{"html_id":"latest:String-instance-method","name":"latest","abstract":false,"location":{"filename":"src/streaming.cr","line_number":6,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L6"},"def":{"name":"latest","visibility":"Public","body":"@latest"}}],"types":[{"html_id":"redis/Redis/Streaming/XPendingBaseResponse/Data","path":"Redis/Streaming/XPendingBaseResponse/Data.html","kind":"struct","full_name":"Redis::Streaming::XPendingBaseResponse::Data","name":"Data","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/streaming.cr","line_number":21,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L21"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Streaming/XPendingBaseResponse","kind":"struct","full_name":"Redis::Streaming::XPendingBaseResponse","name":"XPendingBaseResponse"},"constructors":[{"html_id":"new(consumer:String,pending_count:Int64)-class-method","name":"new","abstract":false,"args":[{"name":"consumer","external_name":"consumer","restriction":"String"},{"name":"pending_count","external_name":"pending_count","restriction":"Int64"}],"args_string":"(consumer : String, pending_count : Int64)","args_html":"(consumer : String, pending_count : Int64)","location":{"filename":"src/streaming.cr","line_number":21,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L21"},"def":{"name":"new","args":[{"name":"consumer","external_name":"consumer","restriction":"String"},{"name":"pending_count","external_name":"pending_count","restriction":"Int64"}],"visibility":"Public","body":"_ = allocate\n_.initialize(consumer, pending_count)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/streaming.cr","line_number":21,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L21"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@consumer.clone, @pending_count.clone)"}},{"html_id":"consumer:String-instance-method","name":"consumer","abstract":false,"def":{"name":"consumer","return_type":"String","visibility":"Public","body":"@consumer"}},{"html_id":"copy_with(consumer_consumer=@consumer,pending_count_pending_count=@pending_count)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_consumer","default_value":"@consumer","external_name":"consumer","restriction":""},{"name":"_pending_count","default_value":"@pending_count","external_name":"pending_count","restriction":""}],"args_string":"(consumer _consumer = @consumer, pending_count _pending_count = @pending_count)","args_html":"(consumer _consumer = @consumer, pending_count _pending_count = @pending_count)","location":{"filename":"src/streaming.cr","line_number":21,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L21"},"def":{"name":"copy_with","args":[{"name":"_consumer","default_value":"@consumer","external_name":"consumer","restriction":""},{"name":"_pending_count","default_value":"@pending_count","external_name":"pending_count","restriction":""}],"visibility":"Public","body":"self.class.new(_consumer, _pending_count)"}},{"html_id":"pending_count:Int64-instance-method","name":"pending_count","abstract":false,"def":{"name":"pending_count","return_type":"Int64","visibility":"Public","body":"@pending_count"}}]}]},{"html_id":"redis/Redis/Streaming/XPendingExtendedResponse","path":"Redis/Streaming/XPendingExtendedResponse.html","kind":"struct","full_name":"Redis::Streaming::XPendingExtendedResponse","name":"XPendingExtendedResponse","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/streaming.cr","line_number":24,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L24"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Streaming","kind":"module","full_name":"Redis::Streaming","name":"Streaming"},"constructors":[{"html_id":"new(data:Array,now:Time=Time.utc)-class-method","name":"new","abstract":false,"args":[{"name":"data","external_name":"data","restriction":"Array"},{"name":"now","default_value":"Time.utc","external_name":"now","restriction":"Time"}],"args_string":"(data : Array, now : Time = Time.utc)","args_html":"(data : Array, now : Time = Time.utc)","location":{"filename":"src/streaming.cr","line_number":27,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L27"},"def":{"name":"new","args":[{"name":"data","external_name":"data","restriction":"Array"},{"name":"now","default_value":"Time.utc","external_name":"now","restriction":"Time"}],"visibility":"Public","body":"_ = allocate\n_.initialize(data, now)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"messages:Array(MessageData)-instance-method","name":"messages","abstract":false,"location":{"filename":"src/streaming.cr","line_number":25,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L25"},"def":{"name":"messages","return_type":"Array(MessageData)","visibility":"Public","body":"@messages"}}],"types":[{"html_id":"redis/Redis/Streaming/XPendingExtendedResponse/MessageData","path":"Redis/Streaming/XPendingExtendedResponse/MessageData.html","kind":"struct","full_name":"Redis::Streaming::XPendingExtendedResponse::MessageData","name":"MessageData","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/streaming.cr","line_number":40,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L40"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Streaming/XPendingExtendedResponse","kind":"struct","full_name":"Redis::Streaming::XPendingExtendedResponse","name":"XPendingExtendedResponse"},"constructors":[{"html_id":"new(id:String,consumer:String,last_delivered_at:Time,delivery_count:Int64)-class-method","name":"new","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"::String"},{"name":"consumer","external_name":"consumer","restriction":"::String"},{"name":"last_delivered_at","external_name":"last_delivered_at","restriction":"::Time"},{"name":"delivery_count","external_name":"delivery_count","restriction":"::Int64"}],"args_string":"(id : String, consumer : String, last_delivered_at : Time, delivery_count : Int64)","args_html":"(id : String, consumer : String, last_delivered_at : Time, delivery_count : Int64)","location":{"filename":"src/streaming.cr","line_number":46,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L46"},"def":{"name":"new","args":[{"name":"id","external_name":"id","restriction":"::String"},{"name":"consumer","external_name":"consumer","restriction":"::String"},{"name":"last_delivered_at","external_name":"last_delivered_at","restriction":"::Time"},{"name":"delivery_count","external_name":"delivery_count","restriction":"::Int64"}],"visibility":"Public","body":"_ = allocate\n_.initialize(id, consumer, last_delivered_at, delivery_count)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"age-instance-method","name":"age","abstract":false,"location":{"filename":"src/streaming.cr","line_number":49,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L49"},"def":{"name":"age","visibility":"Public","body":"Time.utc - last_delivered_at"}},{"html_id":"consumer:String-instance-method","name":"consumer","abstract":false,"location":{"filename":"src/streaming.cr","line_number":42,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L42"},"def":{"name":"consumer","return_type":"String","visibility":"Public","body":"@consumer"}},{"html_id":"delivery_count:Int64-instance-method","name":"delivery_count","abstract":false,"location":{"filename":"src/streaming.cr","line_number":44,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L44"},"def":{"name":"delivery_count","return_type":"Int64","visibility":"Public","body":"@delivery_count"}},{"html_id":"id:String-instance-method","name":"id","abstract":false,"location":{"filename":"src/streaming.cr","line_number":41,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L41"},"def":{"name":"id","return_type":"String","visibility":"Public","body":"@id"}},{"html_id":"last_delivered_at:Time-instance-method","name":"last_delivered_at","abstract":false,"location":{"filename":"src/streaming.cr","line_number":43,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L43"},"def":{"name":"last_delivered_at","return_type":"Time","visibility":"Public","body":"@last_delivered_at"}}]}]},{"html_id":"redis/Redis/Streaming/XReadGroupResponse","path":"Redis/Streaming/XReadGroupResponse.html","kind":"struct","full_name":"Redis::Streaming::XReadGroupResponse","name":"XReadGroupResponse","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/streaming.cr","line_number":55,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L55"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Streaming","kind":"module","full_name":"Redis::Streaming","name":"Streaming"},"constructors":[{"html_id":"new(response:Array(Redis::Value))-class-method","name":"new","abstract":false,"args":[{"name":"response","external_name":"response","restriction":"Array(Redis::Value)"}],"args_string":"(response : Array(Redis::Value))","args_html":"(response : Array(Redis::Value))","location":{"filename":"src/streaming.cr","line_number":58,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L58"},"def":{"name":"new","args":[{"name":"response","external_name":"response","restriction":"Array(Redis::Value)"}],"visibility":"Public","body":"_ = allocate\n_.initialize(response)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"results:Array(Redis::Streaming::XReadGroupResponse::Result)-instance-method","name":"results","abstract":false,"location":{"filename":"src/streaming.cr","line_number":56,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L56"},"def":{"name":"results","visibility":"Public","body":"@results"}}],"types":[{"html_id":"redis/Redis/Streaming/XReadGroupResponse/Result","path":"Redis/Streaming/XReadGroupResponse/Result.html","kind":"struct","full_name":"Redis::Streaming::XReadGroupResponse::Result","name":"Result","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/streaming.cr","line_number":67,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L67"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Streaming/XReadGroupResponse","kind":"struct","full_name":"Redis::Streaming::XReadGroupResponse","name":"XReadGroupResponse"},"constructors":[{"html_id":"new(key:String,messages:Array)-class-method","name":"new","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"messages","external_name":"messages","restriction":"Array"}],"args_string":"(key : String, messages : Array)","args_html":"(key : String, messages : Array)","location":{"filename":"src/streaming.cr","line_number":71,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L71"},"def":{"name":"new","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"messages","external_name":"messages","restriction":"Array"}],"visibility":"Public","body":"_ = allocate\n_.initialize(key, messages)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"key:String-instance-method","name":"key","abstract":false,"location":{"filename":"src/streaming.cr","line_number":69,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L69"},"def":{"name":"key","return_type":"String","visibility":"Public","body":"@key"}},{"html_id":"messages:Array(Message)-instance-method","name":"messages","abstract":false,"location":{"filename":"src/streaming.cr","line_number":68,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L68"},"def":{"name":"messages","return_type":"Array(Message)","visibility":"Public","body":"@messages"}}]}]}]},{"html_id":"redis/Redis/Subscription","path":"Redis/Subscription.html","kind":"class","full_name":"Redis::Subscription","name":"Subscription","abstract":false,"superclass":{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/connection.cr","line_number":484,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L484"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"doc":"The `Subscription` is what is yielded to a `Connection#subscribe` block. It\nis used to setup callbacks when messages come in, the connection is\nsubscribed to other channels or patterns, or unsubscribed from any channels\nor patterns.\n\n```\nredis.subscribe \"channel1\", \"channel2\" do |subscription, connection|\n subscription.on_message do |channel, message|\n if message == \"unsubscribe\"\n connection.unsubscribe channel\n end\n\n # ...\n end\n\n # Respond to new subscribers\n subscription.on_subscribe do |channel, sub_count|\n connection.incr \"sub_count:#{channel}\"\n end\n\n # Respond to losing subscribers\n subscription.on_unsubscribe do |channel, sub_count|\n connection.incr \"sub_count:#{channel}\"\n end\nend\n```\n\nFor more information, see the documentation for:\n- [`SUBSCRIBE`](https://redis.io/commands/subscribe/)\n- [`PSUBSCRIBE`](https://redis.io/commands/psubscribe/)","summary":"

    The Subscription is what is yielded to a Connection#subscribe block.

    ","instance_methods":[{"html_id":"close-instance-method","name":"close","abstract":false,"location":{"filename":"src/connection.cr","line_number":571,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L571"},"def":{"name":"close","visibility":"Public","body":"@channels.each do |channel|\n @connection.unsubscribe(channel)\nend"}},{"html_id":"on_message(&on_message:String,String,String->)-instance-method","name":"on_message","doc":"Define a callback for when a new message is received.\n\n```\nsubscription.on_message do |channel, message|\n pp channel: channel, message: message\nend\n```","summary":"

    Define a callback for when a new message is received.

    ","abstract":false,"location":{"filename":"src/connection.cr","line_number":501,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L501"},"def":{"name":"on_message","yields":3,"block_arity":3,"block_arg":{"name":"on_message","external_name":"on_message","restriction":"(String, String, String ->)"},"visibility":"Public","body":"@on_message = on_message\nself\n"}},{"html_id":"on_subscribe(&on_subscribe:String,Int64->)-instance-method","name":"on_subscribe","doc":"Define a callback to execute when the connection is subscribed to another\nchannel.","summary":"

    Define a callback to execute when the connection is subscribed to another channel.

    ","abstract":false,"location":{"filename":"src/connection.cr","line_number":507,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L507"},"def":{"name":"on_subscribe","yields":2,"block_arity":2,"block_arg":{"name":"on_subscribe","external_name":"on_subscribe","restriction":"(String, Int64 ->)"},"visibility":"Public","body":"@on_subscribe = on_subscribe\nself\n"}},{"html_id":"on_unsubscribe(&on_unsubscribe:String,Int64->)-instance-method","name":"on_unsubscribe","doc":"Define a callback to execute when the connection is unsubscribed from\nanother channel.","summary":"

    Define a callback to execute when the connection is unsubscribed from another channel.

    ","abstract":false,"location":{"filename":"src/connection.cr","line_number":513,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L513"},"def":{"name":"on_unsubscribe","yields":2,"block_arity":2,"block_arg":{"name":"on_unsubscribe","external_name":"on_unsubscribe","restriction":"(String, Int64 ->)"},"visibility":"Public","body":"@on_unsubscribe = on_unsubscribe\nself\n"}}],"types":[{"html_id":"redis/Redis/Subscription/InvalidMessage","path":"Redis/Subscription/InvalidMessage.html","kind":"class","full_name":"Redis::Subscription::InvalidMessage","name":"InvalidMessage","abstract":false,"superclass":{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},"ancestors":[{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/connection.cr","line_number":577,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L577"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Subscription","kind":"class","full_name":"Redis::Subscription","name":"Subscription"}}]},{"html_id":"redis/Redis/TimeSeries","path":"Redis/TimeSeries.html","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":13,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L13"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"doc":"Time-series support for Redis using the\n[RedisTimeSeries module](https://oss.redis.com/redistimeseries/).\n\n```\nrequire \"redis\"\nrequire \"redis/time_series\"\n```","summary":"

    Time-series support for Redis using the RedisTimeSeries module.

    \n

    EXPERIMENTAL Support for the Redis TimeSeries module is subject to change.

    ","instance_methods":[{"html_id":"add(key:String,value:Float64|Int64,retention:Time::Span|Nil=nil,encoding:Encoding|Nil=nil,chunk_size:Int64|Nil=nil,on_duplicateduplicate_policy:DuplicatePolicy|Nil=nil,labels:Hash(String,String|Int32|Int64)|Nil=nil)-instance-method","name":"add","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"value","external_name":"value","restriction":"Float64 | Int64"},{"name":"retention","default_value":"nil","external_name":"retention","restriction":"Time::Span | ::Nil"},{"name":"encoding","default_value":"nil","external_name":"encoding","restriction":"Encoding | ::Nil"},{"name":"chunk_size","default_value":"nil","external_name":"chunk_size","restriction":"Int64 | ::Nil"},{"name":"duplicate_policy","default_value":"nil","external_name":"on_duplicate","restriction":"DuplicatePolicy | ::Nil"},{"name":"labels","default_value":"nil","external_name":"labels","restriction":"Hash(String, String | Int32 | Int64) | ::Nil"}],"args_string":"(key : String, value : Float64 | Int64, retention : Time::Span | Nil = nil, encoding : Encoding | Nil = nil, chunk_size : Int64 | Nil = nil, on_duplicate duplicate_policy : DuplicatePolicy | Nil = nil, labels : Hash(String, String | Int32 | Int64) | Nil = nil)","args_html":"(key : String, value : Float64 | Int64, retention : Time::Span | Nil = nil, encoding : Encoding | Nil = nil, chunk_size : Int64 | Nil = nil, on_duplicate duplicate_policy : DuplicatePolicy | Nil = nil, labels : Hash(String, String | Int32 | Int64) | Nil = nil)","location":{"filename":"src/time_series.cr","line_number":54,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L54"},"def":{"name":"add","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"value","external_name":"value","restriction":"Float64 | Int64"},{"name":"retention","default_value":"nil","external_name":"retention","restriction":"Time::Span | ::Nil"},{"name":"encoding","default_value":"nil","external_name":"encoding","restriction":"Encoding | ::Nil"},{"name":"chunk_size","default_value":"nil","external_name":"chunk_size","restriction":"Int64 | ::Nil"},{"name":"duplicate_policy","default_value":"nil","external_name":"on_duplicate","restriction":"DuplicatePolicy | ::Nil"},{"name":"labels","default_value":"nil","external_name":"labels","restriction":"Hash(String, String | Int32 | Int64) | ::Nil"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 12 + ((labels.try(&.size) || 0) * 2))\n(((command << \"ts.add\") << key) << \"*\") << value.to_s\nif retention\n (command << \"retention\") << retention.total_milliseconds.to_i64.to_s\nend\nif encoding\n (command << \"encoding\") << encoding.to_s\nend\nif chunk_size\n (command << \"chunk_size\") << chunk_size.to_s\nend\nif duplicate_policy\n (command << \"on_duplicate\") << duplicate_policy.to_s\nend\nif labels && labels.any?\n command << \"labels\"\n labels.each do |key, value|\n (command << key) << value.to_s\n end\nend\n@redis.run(command)\n"}},{"html_id":"add(key:String,timestamp:Time,value:Float64|Int64,retention:Time::Span|Nil=nil,encoding:Encoding|Nil=nil,chunk_size:Int64|Nil=nil,on_duplicateduplicate_policy:DuplicatePolicy|Nil=nil,labels:Hash(String,String|Int32|Int64)|Nil=nil)-instance-method","name":"add","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"timestamp","external_name":"timestamp","restriction":"Time"},{"name":"value","external_name":"value","restriction":"Float64 | Int64"},{"name":"retention","default_value":"nil","external_name":"retention","restriction":"Time::Span | ::Nil"},{"name":"encoding","default_value":"nil","external_name":"encoding","restriction":"Encoding | ::Nil"},{"name":"chunk_size","default_value":"nil","external_name":"chunk_size","restriction":"Int64 | ::Nil"},{"name":"duplicate_policy","default_value":"nil","external_name":"on_duplicate","restriction":"DuplicatePolicy | ::Nil"},{"name":"labels","default_value":"nil","external_name":"labels","restriction":"Hash(String, String | Int32 | Int64) | ::Nil"}],"args_string":"(key : String, timestamp : Time, value : Float64 | Int64, retention : Time::Span | Nil = nil, encoding : Encoding | Nil = nil, chunk_size : Int64 | Nil = nil, on_duplicate duplicate_policy : DuplicatePolicy | Nil = nil, labels : Hash(String, String | Int32 | Int64) | Nil = nil)","args_html":"(key : String, timestamp : Time, value : Float64 | Int64, retention : Time::Span | Nil = nil, encoding : Encoding | Nil = nil, chunk_size : Int64 | Nil = nil, on_duplicate duplicate_policy : DuplicatePolicy | Nil = nil, labels : Hash(String, String | Int32 | Int64) | Nil = nil)","location":{"filename":"src/time_series.cr","line_number":91,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L91"},"def":{"name":"add","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"timestamp","external_name":"timestamp","restriction":"Time"},{"name":"value","external_name":"value","restriction":"Float64 | Int64"},{"name":"retention","default_value":"nil","external_name":"retention","restriction":"Time::Span | ::Nil"},{"name":"encoding","default_value":"nil","external_name":"encoding","restriction":"Encoding | ::Nil"},{"name":"chunk_size","default_value":"nil","external_name":"chunk_size","restriction":"Int64 | ::Nil"},{"name":"duplicate_policy","default_value":"nil","external_name":"on_duplicate","restriction":"DuplicatePolicy | ::Nil"},{"name":"labels","default_value":"nil","external_name":"labels","restriction":"Hash(String, String | Int32 | Int64) | ::Nil"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 13 + ((labels.try(&.size) || 0) * 2))\n(((command << \"ts.add\") << key) << timestamp.to_unix_ms.to_s) << value.to_s\nif retention\n (command << \"retention\") << retention.total_milliseconds.to_i64.to_s\nend\nif encoding\n (command << \"encoding\") << encoding.to_s\nend\nif chunk_size\n (command << \"chunk_size\") << chunk_size.to_s\nend\nif duplicate_policy\n (command << \"on_duplicate\") << duplicate_policy.to_s\nend\nif labels && labels.any?\n command << \"labels\"\n labels.each do |key, value|\n (command << key) << value.to_s\n end\nend\n@redis.run(command)\n"}},{"html_id":"aggregation(aggregator:AggregationType,bucket_duration:Time::Span,align:Alignment|Time|Nil=nil,buckettimestamp:BucketTimestamp|Nil=nil,empty:Bool|Nil=nil)-instance-method","name":"aggregation","abstract":false,"args":[{"name":"aggregator","external_name":"aggregator","restriction":"AggregationType"},{"name":"bucket_duration","external_name":"bucket_duration","restriction":"Time::Span"},{"name":"align","default_value":"nil","external_name":"align","restriction":"Alignment | Time | Nil"},{"name":"buckettimestamp","default_value":"nil","external_name":"buckettimestamp","restriction":"BucketTimestamp | ::Nil"},{"name":"empty","default_value":"nil","external_name":"empty","restriction":"Bool | ::Nil"}],"args_string":"(aggregator : AggregationType, bucket_duration : Time::Span, align : Alignment | Time | Nil = nil, buckettimestamp : BucketTimestamp | Nil = nil, empty : Bool | Nil = nil)","args_html":"(aggregator : AggregationType, bucket_duration : Time::Span, align : Alignment | Time | Nil = nil, buckettimestamp : BucketTimestamp | Nil = nil, empty : Bool | Nil = nil)","location":{"filename":"src/time_series.cr","line_number":153,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L153"},"def":{"name":"aggregation","args":[{"name":"aggregator","external_name":"aggregator","restriction":"AggregationType"},{"name":"bucket_duration","external_name":"bucket_duration","restriction":"Time::Span"},{"name":"align","default_value":"nil","external_name":"align","restriction":"Alignment | Time | Nil"},{"name":"buckettimestamp","default_value":"nil","external_name":"buckettimestamp","restriction":"BucketTimestamp | ::Nil"},{"name":"empty","default_value":"nil","external_name":"empty","restriction":"Bool | ::Nil"}],"visibility":"Public","body":"Aggregation.new(aggregator: aggregator, bucket_duration: bucket_duration, alignment: align, buckettimestamp: buckettimestamp, empty: empty)"}},{"html_id":"create(key:String,retention:Time::Span|Nil=nil,encoding:Encoding|Nil=nil,chunk_size:Int64|Nil=nil,duplicate_policy:DuplicatePolicy|Nil=nil,labels:Hash(String,String|Int32|Int64)|Nil=nil)-instance-method","name":"create","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"retention","default_value":"nil","external_name":"retention","restriction":"Time::Span | ::Nil"},{"name":"encoding","default_value":"nil","external_name":"encoding","restriction":"Encoding | ::Nil"},{"name":"chunk_size","default_value":"nil","external_name":"chunk_size","restriction":"Int64 | ::Nil"},{"name":"duplicate_policy","default_value":"nil","external_name":"duplicate_policy","restriction":"DuplicatePolicy | ::Nil"},{"name":"labels","default_value":"nil","external_name":"labels","restriction":"Hash(String, String | Int32 | Int64) | ::Nil"}],"args_string":"(key : String, retention : Time::Span | Nil = nil, encoding : Encoding | Nil = nil, chunk_size : Int64 | Nil = nil, duplicate_policy : DuplicatePolicy | Nil = nil, labels : Hash(String, String | Int32 | Int64) | Nil = nil)","args_html":"(key : String, retention : Time::Span | Nil = nil, encoding : Encoding | Nil = nil, chunk_size : Int64 | Nil = nil, duplicate_policy : DuplicatePolicy | Nil = nil, labels : Hash(String, String | Int32 | Int64) | Nil = nil)","location":{"filename":"src/time_series.cr","line_number":18,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L18"},"def":{"name":"create","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"retention","default_value":"nil","external_name":"retention","restriction":"Time::Span | ::Nil"},{"name":"encoding","default_value":"nil","external_name":"encoding","restriction":"Encoding | ::Nil"},{"name":"chunk_size","default_value":"nil","external_name":"chunk_size","restriction":"Int64 | ::Nil"},{"name":"duplicate_policy","default_value":"nil","external_name":"duplicate_policy","restriction":"DuplicatePolicy | ::Nil"},{"name":"labels","default_value":"nil","external_name":"labels","restriction":"Hash(String, String | Int32 | Int64) | ::Nil"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 11 + ((labels.try(&.size) || 0) * 2))\n(command << \"ts.create\") << key\nif retention\n (command << \"retention\") << retention.total_milliseconds.to_i64.to_s\nend\nif encoding\n (command << \"encoding\") << encoding.to_s\nend\nif chunk_size\n (command << \"chunk_size\") << chunk_size.to_s\nend\nif duplicate_policy\n (command << \"duplicate_policy\") << duplicate_policy.to_s\nend\nif labels && labels.any?\n command << \"labels\"\n labels.each do |key, value|\n (command << key) << value.to_s\n end\nend\n@redis.run(command)\n"}},{"html_id":"get(key:String)-instance-method","name":"get","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/time_series.cr","line_number":126,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L126"},"def":{"name":"get","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"@redis.run({\"ts.get\", key})"}},{"html_id":"info(key:String)-instance-method","name":"info","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/time_series.cr","line_number":145,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L145"},"def":{"name":"info","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"@redis.run({\"ts.info\", key})"}},{"html_id":"mrange(time_range:::Range(Time,Time|Nil),filter:String,filter_by_ts:Enumerable(Time)|Nil=nil,filter_by_value:::Range(Float64,Float64)|Nil=nil,withlabels:Bool|Nil=nil,selected_labels:Enumerable(String)|Nil=nil,count:Int|Nil=nil,aggregation:Aggregation|Nil=nil,groupby:String|Nil=nil,reduce:String|Nil=nil)-instance-method","name":"mrange","abstract":false,"args":[{"name":"time_range","external_name":"time_range","restriction":"::Range(Time, Time | ::Nil)"},{"name":"filter","external_name":"filter","restriction":"String"},{"name":"filter_by_ts","default_value":"nil","external_name":"filter_by_ts","restriction":"Enumerable(Time) | ::Nil"},{"name":"filter_by_value","default_value":"nil","external_name":"filter_by_value","restriction":"::Range(Float64, Float64) | ::Nil"},{"name":"withlabels","default_value":"nil","external_name":"withlabels","restriction":"Bool | ::Nil"},{"name":"selected_labels","default_value":"nil","external_name":"selected_labels","restriction":"Enumerable(String) | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"Int | ::Nil"},{"name":"aggregation","default_value":"nil","external_name":"aggregation","restriction":"Aggregation | ::Nil"},{"name":"groupby","default_value":"nil","external_name":"groupby","restriction":"String | ::Nil"},{"name":"reduce","default_value":"nil","external_name":"reduce","restriction":"String | ::Nil"}],"args_string":"(time_range : ::Range(Time, Time | Nil), filter : String, filter_by_ts : Enumerable(Time) | Nil = nil, filter_by_value : ::Range(Float64, Float64) | Nil = nil, withlabels : Bool | Nil = nil, selected_labels : Enumerable(String) | Nil = nil, count : Int | Nil = nil, aggregation : Aggregation | Nil = nil, groupby : String | Nil = nil, reduce : String | Nil = nil)","args_html":"(time_range : ::Range(Time, Time | Nil), filter : String, filter_by_ts : Enumerable(Time) | Nil = nil, filter_by_value : ::Range(Float64, Float64) | Nil = nil, withlabels : Bool | Nil = nil, selected_labels : Enumerable(String) | Nil = nil, count : Int | Nil = nil, aggregation : Aggregation | Nil = nil, groupby : String | Nil = nil, reduce : String | Nil = nil)","location":{"filename":"src/time_series.cr","line_number":181,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L181"},"def":{"name":"mrange","args":[{"name":"time_range","external_name":"time_range","restriction":"::Range(Time, Time | ::Nil)"},{"name":"filter","external_name":"filter","restriction":"String"},{"name":"filter_by_ts","default_value":"nil","external_name":"filter_by_ts","restriction":"Enumerable(Time) | ::Nil"},{"name":"filter_by_value","default_value":"nil","external_name":"filter_by_value","restriction":"::Range(Float64, Float64) | ::Nil"},{"name":"withlabels","default_value":"nil","external_name":"withlabels","restriction":"Bool | ::Nil"},{"name":"selected_labels","default_value":"nil","external_name":"selected_labels","restriction":"Enumerable(String) | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"Int | ::Nil"},{"name":"aggregation","default_value":"nil","external_name":"aggregation","restriction":"Aggregation | ::Nil"},{"name":"groupby","default_value":"nil","external_name":"groupby","restriction":"String | ::Nil"},{"name":"reduce","default_value":"nil","external_name":"reduce","restriction":"String | ::Nil"}],"visibility":"Public","body":"mrange(time_range: time_range, filter: [filter], filter_by_ts: filter_by_ts, filter_by_value: filter_by_value, withlabels: withlabels, selected_labels: selected_labels, count: count, aggregation: aggregation, groupby: groupby, reduce: reduce)"}},{"html_id":"mrange(time_range:::Range(Time,Time|Nil),filter:Array(String),filter_by_ts:Enumerable(Time)|Nil=nil,filter_by_value:::Range(Float64,Float64)|Nil=nil,withlabels:Bool|Nil=nil,selected_labels:Enumerable(String)|Nil=nil,count:Int|Nil=nil,aggregation:Aggregation|Nil=nil,groupby:String|Nil=nil,reduce:String|Nil=nil)-instance-method","name":"mrange","abstract":false,"args":[{"name":"time_range","external_name":"time_range","restriction":"::Range(Time, Time | ::Nil)"},{"name":"filter","external_name":"filter","restriction":"Array(String)"},{"name":"filter_by_ts","default_value":"nil","external_name":"filter_by_ts","restriction":"Enumerable(Time) | ::Nil"},{"name":"filter_by_value","default_value":"nil","external_name":"filter_by_value","restriction":"::Range(Float64, Float64) | ::Nil"},{"name":"withlabels","default_value":"nil","external_name":"withlabels","restriction":"Bool | ::Nil"},{"name":"selected_labels","default_value":"nil","external_name":"selected_labels","restriction":"Enumerable(String) | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"Int | ::Nil"},{"name":"aggregation","default_value":"nil","external_name":"aggregation","restriction":"Aggregation | ::Nil"},{"name":"groupby","default_value":"nil","external_name":"groupby","restriction":"String | ::Nil"},{"name":"reduce","default_value":"nil","external_name":"reduce","restriction":"String | ::Nil"}],"args_string":"(time_range : ::Range(Time, Time | Nil), filter : Array(String), filter_by_ts : Enumerable(Time) | Nil = nil, filter_by_value : ::Range(Float64, Float64) | Nil = nil, withlabels : Bool | Nil = nil, selected_labels : Enumerable(String) | Nil = nil, count : Int | Nil = nil, aggregation : Aggregation | Nil = nil, groupby : String | Nil = nil, reduce : String | Nil = nil)","args_html":"(time_range : ::Range(Time, Time | Nil), filter : Array(String), filter_by_ts : Enumerable(Time) | Nil = nil, filter_by_value : ::Range(Float64, Float64) | Nil = nil, withlabels : Bool | Nil = nil, selected_labels : Enumerable(String) | Nil = nil, count : Int | Nil = nil, aggregation : Aggregation | Nil = nil, groupby : String | Nil = nil, reduce : String | Nil = nil)","location":{"filename":"src/time_series.cr","line_number":207,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L207"},"def":{"name":"mrange","args":[{"name":"time_range","external_name":"time_range","restriction":"::Range(Time, Time | ::Nil)"},{"name":"filter","external_name":"filter","restriction":"Array(String)"},{"name":"filter_by_ts","default_value":"nil","external_name":"filter_by_ts","restriction":"Enumerable(Time) | ::Nil"},{"name":"filter_by_value","default_value":"nil","external_name":"filter_by_value","restriction":"::Range(Float64, Float64) | ::Nil"},{"name":"withlabels","default_value":"nil","external_name":"withlabels","restriction":"Bool | ::Nil"},{"name":"selected_labels","default_value":"nil","external_name":"selected_labels","restriction":"Enumerable(String) | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"Int | ::Nil"},{"name":"aggregation","default_value":"nil","external_name":"aggregation","restriction":"Aggregation | ::Nil"},{"name":"groupby","default_value":"nil","external_name":"groupby","restriction":"String | ::Nil"},{"name":"reduce","default_value":"nil","external_name":"reduce","restriction":"String | ::Nil"}],"visibility":"Public","body":"from = time_range.begin\nto = time_range.end || (Time::UNIX_EPOCH + Int32::MAX.seconds)\ncommand_size = (((((((((((1 + 2) + 1) + (filter_by_ts.try(&.size) || 0)) + 3) + 1) + 1) + (selected_labels.try(&.size) || 0)) + 2) + 8) + 1) + filter.size) + 4\ncommand = Array(String).new(initial_capacity: command_size)\n((command << \"ts.mrange\") << from.to_unix_ms.to_s) << to.to_unix_ms.to_s\nif filter_by_ts\n command << \"filter_by_ts\"\n filter_by_ts.each do |ts|\n command << ts.to_unix_ms.to_s\n end\nend\nif filter_by_value\n command << \"filter_by_value\"\n command << filter_by_value.begin.to_s\n command << filter_by_value.end.to_s\nend\nif withlabels\n command << \"withlabels\"\nend\nif selected_labels\n command << \"selected_labels\"\n selected_labels.each do |label|\n command << label\n end\nend\nif count\n (command << \"count\") << count.to_s\nend\nif aggregation\n case alignment = aggregation.alignment\n in Alignment\n (command << \"align\") << alignment.to_s.downcase\n in Time\n (command << \"align\") << alignment.to_unix_ms.to_s\n in Nil\n end\n ((command << \"aggregation\") << aggregation.aggregator.to_s) << aggregation.bucket_duration.total_milliseconds.to_i64.to_s\n if bucket_ts = aggregation.buckettimestamp\n (command << \"buckettimestamp\") << bucket_ts.to_s\n end\n if aggregation.empty\n command << \"empty\"\n end\nend\ncommand << \"filter\"\nfilter.each do |filter_expr|\n command << filter_expr\nend\nif groupby && reduce\n (((command << \"groupby\") << groupby) << \"reduce\") << reduce\nend\n@redis.run(command)\n"}},{"html_id":"queryindex(filter:String)-instance-method","name":"queryindex","abstract":false,"args":[{"name":"filter","external_name":"filter","restriction":"String"}],"args_string":"(filter : String)","args_html":"(filter : String)","location":{"filename":"src/time_series.cr","line_number":149,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L149"},"def":{"name":"queryindex","args":[{"name":"filter","external_name":"filter","restriction":"String"}],"visibility":"Public","body":"@redis.run({\"ts.queryindex\", filter})"}},{"html_id":"range(key:String,time_range:::Range(Time,Time),&:RangeOptions->)-instance-method","name":"range","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"time_range","external_name":"time_range","restriction":"::Range(Time, Time)"}],"args_string":"(key : String, time_range : ::Range(Time, Time), & : RangeOptions -> )","args_html":"(key : String, time_range : ::Range(Time, Time), & : RangeOptions -> )","location":{"filename":"src/time_series.cr","line_number":130,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L130"},"def":{"name":"range","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"time_range","external_name":"time_range","restriction":"::Range(Time, Time)"}],"yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(RangeOptions ->)"},"visibility":"Public","body":"command = Array(String).new(initial_capacity: 14)\noptions = RangeOptions.new\n(((command << \"ts.range\") << key) << time_range.begin.to_unix_ms.to_s) << time_range.end.to_unix_ms.to_s\nyield options\nif agg = options.aggregation\n ((command << \"aggregation\") << agg.type.to_s) << agg.time_bucket.total_milliseconds.to_i.to_s\nend\n@redis.run(command)\n"}}],"types":[{"html_id":"redis/Redis/TimeSeries/Aggregation","path":"Redis/TimeSeries/Aggregation.html","kind":"struct","full_name":"Redis::TimeSeries::Aggregation","name":"Aggregation","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":169,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L169"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/TimeSeries","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries"},"constructors":[{"html_id":"new(aggregator:AggregationType,bucket_duration:Time::Span,alignment:Alignment|Time|Nil=nil,buckettimestamp:BucketTimestamp|Nil=nil,empty:Bool|Nil=nil)-class-method","name":"new","abstract":false,"args":[{"name":"aggregator","external_name":"aggregator","restriction":"AggregationType"},{"name":"bucket_duration","external_name":"bucket_duration","restriction":"Time::Span"},{"name":"alignment","default_value":"nil","external_name":"alignment","restriction":"Alignment | Time | Nil"},{"name":"buckettimestamp","default_value":"nil","external_name":"buckettimestamp","restriction":"BucketTimestamp | ::Nil"},{"name":"empty","default_value":"nil","external_name":"empty","restriction":"Bool | ::Nil"}],"args_string":"(aggregator : AggregationType, bucket_duration : Time::Span, alignment : Alignment | Time | Nil = nil, buckettimestamp : BucketTimestamp | Nil = nil, empty : Bool | Nil = nil)","args_html":"(aggregator : AggregationType, bucket_duration : Time::Span, alignment : Alignment | Time | Nil = nil, buckettimestamp : BucketTimestamp | Nil = nil, empty : Bool | Nil = nil)","location":{"filename":"src/time_series.cr","line_number":169,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L169"},"def":{"name":"new","args":[{"name":"aggregator","external_name":"aggregator","restriction":"AggregationType"},{"name":"bucket_duration","external_name":"bucket_duration","restriction":"Time::Span"},{"name":"alignment","default_value":"nil","external_name":"alignment","restriction":"Alignment | Time | Nil"},{"name":"buckettimestamp","default_value":"nil","external_name":"buckettimestamp","restriction":"BucketTimestamp | ::Nil"},{"name":"empty","default_value":"nil","external_name":"empty","restriction":"Bool | ::Nil"}],"visibility":"Public","body":"_ = allocate\n_.initialize(aggregator, bucket_duration, alignment, buckettimestamp, empty)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"aggregator:AggregationType-instance-method","name":"aggregator","abstract":false,"def":{"name":"aggregator","return_type":"AggregationType","visibility":"Public","body":"@aggregator"}},{"html_id":"alignment:Alignment|Time|Nil-instance-method","name":"alignment","abstract":false,"def":{"name":"alignment","return_type":"Alignment | Time | Nil","visibility":"Public","body":"@alignment"}},{"html_id":"bucket_duration:Time::Span-instance-method","name":"bucket_duration","abstract":false,"def":{"name":"bucket_duration","return_type":"Time::Span","visibility":"Public","body":"@bucket_duration"}},{"html_id":"buckettimestamp:BucketTimestamp|Nil-instance-method","name":"buckettimestamp","abstract":false,"def":{"name":"buckettimestamp","return_type":"BucketTimestamp | ::Nil","visibility":"Public","body":"@buckettimestamp"}},{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/time_series.cr","line_number":169,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L169"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@aggregator.clone, @bucket_duration.clone, @alignment.clone, @buckettimestamp.clone, @empty.clone)"}},{"html_id":"copy_with(aggregator_aggregator=@aggregator,bucket_duration_bucket_duration=@bucket_duration,alignment_alignment=@alignment,buckettimestamp_buckettimestamp=@buckettimestamp,empty_empty=@empty)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_aggregator","default_value":"@aggregator","external_name":"aggregator","restriction":""},{"name":"_bucket_duration","default_value":"@bucket_duration","external_name":"bucket_duration","restriction":""},{"name":"_alignment","default_value":"@alignment","external_name":"alignment","restriction":""},{"name":"_buckettimestamp","default_value":"@buckettimestamp","external_name":"buckettimestamp","restriction":""},{"name":"_empty","default_value":"@empty","external_name":"empty","restriction":""}],"args_string":"(aggregator _aggregator = @aggregator, bucket_duration _bucket_duration = @bucket_duration, alignment _alignment = @alignment, buckettimestamp _buckettimestamp = @buckettimestamp, empty _empty = @empty)","args_html":"(aggregator _aggregator = @aggregator, bucket_duration _bucket_duration = @bucket_duration, alignment _alignment = @alignment, buckettimestamp _buckettimestamp = @buckettimestamp, empty _empty = @empty)","location":{"filename":"src/time_series.cr","line_number":169,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L169"},"def":{"name":"copy_with","args":[{"name":"_aggregator","default_value":"@aggregator","external_name":"aggregator","restriction":""},{"name":"_bucket_duration","default_value":"@bucket_duration","external_name":"bucket_duration","restriction":""},{"name":"_alignment","default_value":"@alignment","external_name":"alignment","restriction":""},{"name":"_buckettimestamp","default_value":"@buckettimestamp","external_name":"buckettimestamp","restriction":""},{"name":"_empty","default_value":"@empty","external_name":"empty","restriction":""}],"visibility":"Public","body":"self.class.new(_aggregator, _bucket_duration, _alignment, _buckettimestamp, _empty)"}},{"html_id":"empty:Bool|Nil-instance-method","name":"empty","abstract":false,"def":{"name":"empty","return_type":"Bool | ::Nil","visibility":"Public","body":"@empty"}}]},{"html_id":"redis/Redis/TimeSeries/AggregationType","path":"Redis/TimeSeries/AggregationType.html","kind":"enum","full_name":"Redis::TimeSeries::AggregationType","name":"AggregationType","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":392,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L392"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"AVG","name":"AVG","value":"0"},{"id":"SUM","name":"SUM","value":"1"},{"id":"MIN","name":"MIN","value":"2"},{"id":"MAX","name":"MAX","value":"3"},{"id":"RANGE","name":"RANGE","value":"4"},{"id":"COUNT","name":"COUNT","value":"5"},{"id":"FIRST","name":"FIRST","value":"6"},{"id":"LAST","name":"LAST","value":"7"},{"id":"STD_P","name":"STD_P","value":"8"},{"id":"STD_S","name":"STD_S","value":"9"},{"id":"VAR_P","name":"VAR_P","value":"10"},{"id":"VAR_S","name":"VAR_S","value":"11"}],"namespace":{"html_id":"redis/Redis/TimeSeries","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries"},"instance_methods":[{"html_id":"avg?-instance-method","name":"avg?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":393,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L393"},"def":{"name":"avg?","visibility":"Public","body":"self == AVG"}},{"html_id":"count?-instance-method","name":"count?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":398,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L398"},"def":{"name":"count?","visibility":"Public","body":"self == COUNT"}},{"html_id":"first?-instance-method","name":"first?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":399,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L399"},"def":{"name":"first?","visibility":"Public","body":"self == FIRST"}},{"html_id":"last?-instance-method","name":"last?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":400,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L400"},"def":{"name":"last?","visibility":"Public","body":"self == LAST"}},{"html_id":"max?-instance-method","name":"max?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":396,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L396"},"def":{"name":"max?","visibility":"Public","body":"self == MAX"}},{"html_id":"min?-instance-method","name":"min?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":395,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L395"},"def":{"name":"min?","visibility":"Public","body":"self == MIN"}},{"html_id":"range?-instance-method","name":"range?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":397,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L397"},"def":{"name":"range?","visibility":"Public","body":"self == RANGE"}},{"html_id":"std_p?-instance-method","name":"std_p?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":401,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L401"},"def":{"name":"std_p?","visibility":"Public","body":"self == STD_P"}},{"html_id":"std_s?-instance-method","name":"std_s?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":402,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L402"},"def":{"name":"std_s?","visibility":"Public","body":"self == STD_S"}},{"html_id":"sum?-instance-method","name":"sum?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":394,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L394"},"def":{"name":"sum?","visibility":"Public","body":"self == SUM"}},{"html_id":"var_p?-instance-method","name":"var_p?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":403,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L403"},"def":{"name":"var_p?","visibility":"Public","body":"self == VAR_P"}},{"html_id":"var_s?-instance-method","name":"var_s?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":404,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L404"},"def":{"name":"var_s?","visibility":"Public","body":"self == VAR_S"}}]},{"html_id":"redis/Redis/TimeSeries/Alignment","path":"Redis/TimeSeries/Alignment.html","kind":"enum","full_name":"Redis::TimeSeries::Alignment","name":"Alignment","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":176,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L176"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"Start","name":"Start","value":"0"},{"id":"End","name":"End","value":"1"}],"namespace":{"html_id":"redis/Redis/TimeSeries","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries"},"instance_methods":[{"html_id":"end?-instance-method","name":"end?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":178,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L178"},"def":{"name":"end?","visibility":"Public","body":"self == End"}},{"html_id":"start?-instance-method","name":"start?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":177,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L177"},"def":{"name":"start?","visibility":"Public","body":"self == Start"}}]},{"html_id":"redis/Redis/TimeSeries/BucketTimestamp","path":"Redis/TimeSeries/BucketTimestamp.html","kind":"enum","full_name":"Redis::TimeSeries::BucketTimestamp","name":"BucketTimestamp","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":407,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L407"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"HIGH","name":"HIGH","value":"0"},{"id":"MID","name":"MID","value":"1"},{"id":"LOW","name":"LOW","value":"2"}],"namespace":{"html_id":"redis/Redis/TimeSeries","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries"},"instance_methods":[{"html_id":"high?-instance-method","name":"high?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":408,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L408"},"def":{"name":"high?","visibility":"Public","body":"self == HIGH"}},{"html_id":"low?-instance-method","name":"low?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":410,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L410"},"def":{"name":"low?","visibility":"Public","body":"self == LOW"}},{"html_id":"mid?-instance-method","name":"mid?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":409,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L409"},"def":{"name":"mid?","visibility":"Public","body":"self == MID"}}]},{"html_id":"redis/Redis/TimeSeries/Datapoint","path":"Redis/TimeSeries/Datapoint.html","kind":"struct","full_name":"Redis::TimeSeries::Datapoint","name":"Datapoint","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":307,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L307"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/TimeSeries","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries"},"constructors":[{"html_id":"new(timestamp:Time,value:Float64)-class-method","name":"new","abstract":false,"args":[{"name":"timestamp","external_name":"timestamp","restriction":"Time"},{"name":"value","external_name":"value","restriction":"Float64"}],"args_string":"(timestamp : Time, value : Float64)","args_html":"(timestamp : Time, value : Float64)","location":{"filename":"src/time_series.cr","line_number":307,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L307"},"def":{"name":"new","args":[{"name":"timestamp","external_name":"timestamp","restriction":"Time"},{"name":"value","external_name":"value","restriction":"Float64"}],"visibility":"Public","body":"_ = allocate\n_.initialize(timestamp, value)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/time_series.cr","line_number":307,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L307"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@timestamp.clone, @value.clone)"}},{"html_id":"copy_with(timestamp_timestamp=@timestamp,value_value=@value)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_timestamp","default_value":"@timestamp","external_name":"timestamp","restriction":""},{"name":"_value","default_value":"@value","external_name":"value","restriction":""}],"args_string":"(timestamp _timestamp = @timestamp, value _value = @value)","args_html":"(timestamp _timestamp = @timestamp, value _value = @value)","location":{"filename":"src/time_series.cr","line_number":307,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L307"},"def":{"name":"copy_with","args":[{"name":"_timestamp","default_value":"@timestamp","external_name":"timestamp","restriction":""},{"name":"_value","default_value":"@value","external_name":"value","restriction":""}],"visibility":"Public","body":"self.class.new(_timestamp, _value)"}},{"html_id":"timestamp:Time-instance-method","name":"timestamp","abstract":false,"def":{"name":"timestamp","return_type":"Time","visibility":"Public","body":"@timestamp"}},{"html_id":"value:Float64-instance-method","name":"value","abstract":false,"def":{"name":"value","return_type":"Float64","visibility":"Public","body":"@value"}}]},{"html_id":"redis/Redis/TimeSeries/Datapoints","path":"Redis/TimeSeries/Datapoints.html","kind":"struct","full_name":"Redis::TimeSeries::Datapoints","name":"Datapoints","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":310,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L310"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"redis/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"}],"namespace":{"html_id":"redis/Redis/TimeSeries","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries"},"constructors":[{"html_id":"new(labels:Labels,datapoints:Array(Datapoint))-class-method","name":"new","abstract":false,"args":[{"name":"labels","external_name":"labels","restriction":"Labels"},{"name":"datapoints","external_name":"datapoints","restriction":"Array(Datapoint)"}],"args_string":"(labels : Labels, datapoints : Array(Datapoint))","args_html":"(labels : Labels, datapoints : Array(Datapoint))","location":{"filename":"src/time_series.cr","line_number":310,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L310"},"def":{"name":"new","args":[{"name":"labels","external_name":"labels","restriction":"Labels"},{"name":"datapoints","external_name":"datapoints","restriction":"Array(Datapoint)"}],"visibility":"Public","body":"_ = allocate\n_.initialize(labels, datapoints)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"<<(datapoint:Datapoint)-instance-method","name":"<<","abstract":false,"args":[{"name":"datapoint","external_name":"datapoint","restriction":"Datapoint"}],"args_string":"(datapoint : Datapoint)","args_html":"(datapoint : Datapoint)","location":{"filename":"src/time_series.cr","line_number":317,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L317"},"def":{"name":"<<","args":[{"name":"datapoint","external_name":"datapoint","restriction":"Datapoint"}],"visibility":"Public","body":"datapoints << datapoint"}},{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/time_series.cr","line_number":310,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L310"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@labels.clone, @datapoints.clone)"}},{"html_id":"copy_with(labels_labels=@labels,datapoints_datapoints=@datapoints)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_labels","default_value":"@labels","external_name":"labels","restriction":""},{"name":"_datapoints","default_value":"@datapoints","external_name":"datapoints","restriction":""}],"args_string":"(labels _labels = @labels, datapoints _datapoints = @datapoints)","args_html":"(labels _labels = @labels, datapoints _datapoints = @datapoints)","location":{"filename":"src/time_series.cr","line_number":310,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L310"},"def":{"name":"copy_with","args":[{"name":"_labels","default_value":"@labels","external_name":"labels","restriction":""},{"name":"_datapoints","default_value":"@datapoints","external_name":"datapoints","restriction":""}],"visibility":"Public","body":"self.class.new(_labels, _datapoints)"}},{"html_id":"datapoints:Array(Datapoint)-instance-method","name":"datapoints","abstract":false,"def":{"name":"datapoints","return_type":"Array(Datapoint)","visibility":"Public","body":"@datapoints"}},{"html_id":"each(&)-instance-method","name":"each","doc":"Must yield this collection's elements to the block.","summary":"

    Must yield this collection's elements to the block.

    ","abstract":false,"location":{"filename":"src/time_series.cr","line_number":312,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L312"},"def":{"name":"each","yields":1,"block_arity":1,"visibility":"Public","body":"datapoints.each do |datapoint|\n yield datapoint\nend"}},{"html_id":"labels:Labels-instance-method","name":"labels","abstract":false,"def":{"name":"labels","return_type":"Labels","visibility":"Public","body":"@labels"}}]},{"html_id":"redis/Redis/TimeSeries/DuplicatePolicy","path":"Redis/TimeSeries/DuplicatePolicy.html","kind":"enum","full_name":"Redis::TimeSeries::DuplicatePolicy","name":"DuplicatePolicy","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":418,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L418"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"BLOCK","name":"BLOCK","value":"0","doc":"An error will occur for any out-of-order sample","summary":"

    An error will occur for any out-of-order sample

    "},{"id":"FIRST","name":"FIRST","value":"1","doc":"Ignore the new value","summary":"

    Ignore the new value

    "},{"id":"LAST","name":"LAST","value":"2","doc":"Override with the latest value","summary":"

    Override with the latest value

    "},{"id":"MIN","name":"MIN","value":"3","doc":"Only override if the new value is lower than the existing value","summary":"

    Only override if the new value is lower than the existing value

    "},{"id":"MAX","name":"MAX","value":"4","doc":"Only override if the new value is higher than the existing value","summary":"

    Only override if the new value is higher than the existing value

    "},{"id":"SUM","name":"SUM","value":"5","doc":"If a previous sample exists, add the new sample to it so that the\nupdated value is equal to `previous + new`. If no previous sample\nexists, set the updated value equal to the new value.","summary":"

    If a previous sample exists, add the new sample to it so that the updated value is equal to previous + new.

    "}],"namespace":{"html_id":"redis/Redis/TimeSeries","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries"},"instance_methods":[{"html_id":"block?-instance-method","name":"block?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":420,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L420"},"def":{"name":"block?","visibility":"Public","body":"self == BLOCK"}},{"html_id":"first?-instance-method","name":"first?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":423,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L423"},"def":{"name":"first?","visibility":"Public","body":"self == FIRST"}},{"html_id":"last?-instance-method","name":"last?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":426,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L426"},"def":{"name":"last?","visibility":"Public","body":"self == LAST"}},{"html_id":"max?-instance-method","name":"max?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":432,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L432"},"def":{"name":"max?","visibility":"Public","body":"self == MAX"}},{"html_id":"min?-instance-method","name":"min?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":429,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L429"},"def":{"name":"min?","visibility":"Public","body":"self == MIN"}},{"html_id":"sum?-instance-method","name":"sum?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":437,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L437"},"def":{"name":"sum?","visibility":"Public","body":"self == SUM"}}]},{"html_id":"redis/Redis/TimeSeries/Encoding","path":"Redis/TimeSeries/Encoding.html","kind":"enum","full_name":"Redis::TimeSeries::Encoding","name":"Encoding","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":413,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L413"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"COMPRESSED","name":"COMPRESSED","value":"0"},{"id":"UNCOMPRESSED","name":"UNCOMPRESSED","value":"1"}],"namespace":{"html_id":"redis/Redis/TimeSeries","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries"},"instance_methods":[{"html_id":"compressed?-instance-method","name":"compressed?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":414,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L414"},"def":{"name":"compressed?","visibility":"Public","body":"self == COMPRESSED"}},{"html_id":"uncompressed?-instance-method","name":"uncompressed?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":415,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L415"},"def":{"name":"uncompressed?","visibility":"Public","body":"self == UNCOMPRESSED"}}]},{"html_id":"redis/Redis/TimeSeries/Labels","path":"Redis/TimeSeries/Labels.html","kind":"alias","full_name":"Redis::TimeSeries::Labels","name":"Labels","abstract":false,"locations":[{"filename":"src/time_series.cr","line_number":306,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L306"}],"repository_name":"redis","program":false,"enum":false,"alias":true,"aliased":"Hash(String, String)","aliased_html":"Hash(String, String)","const":false,"namespace":{"html_id":"redis/Redis/TimeSeries","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries"}},{"html_id":"redis/Redis/TimeSeries/MRangeResponse","path":"Redis/TimeSeries/MRangeResponse.html","kind":"struct","full_name":"Redis::TimeSeries::MRangeResponse","name":"MRangeResponse","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":322,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L322"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"redis/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"}],"namespace":{"html_id":"redis/Redis/TimeSeries","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries"},"constructors":[{"html_id":"new(response)-class-method","name":"new","abstract":false,"args":[{"name":"response","external_name":"response","restriction":""}],"args_string":"(response)","args_html":"(response)","location":{"filename":"src/time_series.cr","line_number":329,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L329"},"def":{"name":"new","args":[{"name":"response","external_name":"response","restriction":""}],"visibility":"Public","body":"_ = allocate\n_.initialize(response)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"[](key:String)-instance-method","name":"[]","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/time_series.cr","line_number":363,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L363"},"def":{"name":"[]","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"@data[key]"}},{"html_id":"[]?(key:String)-instance-method","name":"[]?","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/time_series.cr","line_number":367,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L367"},"def":{"name":"[]?","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"@data[key]?"}},{"html_id":"data:DatapointMap-instance-method","name":"data","abstract":false,"location":{"filename":"src/time_series.cr","line_number":327,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L327"},"def":{"name":"data","return_type":"DatapointMap","visibility":"Public","body":"@data"}},{"html_id":"each(&)-instance-method","name":"each","doc":"Must yield this collection's elements to the block.","summary":"

    Must yield this collection's elements to the block.

    ","abstract":false,"location":{"filename":"src/time_series.cr","line_number":359,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L359"},"def":{"name":"each","yields":1,"block_arity":1,"visibility":"Public","body":"data.each do |i|\n yield i\nend"}}],"types":[{"html_id":"redis/Redis/TimeSeries/MRangeResponse/DatapointMap","path":"Redis/TimeSeries/MRangeResponse/DatapointMap.html","kind":"alias","full_name":"Redis::TimeSeries::MRangeResponse::DatapointMap","name":"DatapointMap","abstract":false,"locations":[{"filename":"src/time_series.cr","line_number":325,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L325"}],"repository_name":"redis","program":false,"enum":false,"alias":true,"aliased":"Hash(String, Redis::TimeSeries::Datapoints)","aliased_html":"Hash(String, Redis::TimeSeries::Datapoints)","const":false,"namespace":{"html_id":"redis/Redis/TimeSeries/MRangeResponse","kind":"struct","full_name":"Redis::TimeSeries::MRangeResponse","name":"MRangeResponse"}}]},{"html_id":"redis/Redis/TimeSeries/Range","path":"Redis/TimeSeries/Range.html","kind":"struct","full_name":"Redis::TimeSeries::Range","name":"Range","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":372,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L372"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/TimeSeries","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries"},"constructors":[{"html_id":"new(raw_data:Array)-class-method","name":"new","abstract":false,"args":[{"name":"raw_data","external_name":"raw_data","restriction":"Array"}],"args_string":"(raw_data : Array)","args_html":"(raw_data : Array)","location":{"filename":"src/time_series.cr","line_number":373,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L373"},"def":{"name":"new","args":[{"name":"raw_data","external_name":"raw_data","restriction":"Array"}],"visibility":"Public","body":"_ = allocate\n_.initialize(raw_data)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}]},{"html_id":"redis/Redis/TimeSeries/RangeOptions","path":"Redis/TimeSeries/RangeOptions.html","kind":"class","full_name":"Redis::TimeSeries::RangeOptions","name":"RangeOptions","abstract":false,"superclass":{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":382,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L382"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/TimeSeries","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries"},"instance_methods":[{"html_id":"aggregation(type:AggregationType,bucket:Time::Span)-instance-method","name":"aggregation","abstract":false,"args":[{"name":"type","external_name":"type","restriction":"AggregationType"},{"name":"bucket","external_name":"bucket","restriction":"Time::Span"}],"args_string":"(type : AggregationType, bucket : Time::Span)","args_html":"(type : AggregationType, bucket : Time::Span)","location":{"filename":"src/time_series.cr","line_number":385,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L385"},"def":{"name":"aggregation","args":[{"name":"type","external_name":"type","restriction":"AggregationType"},{"name":"bucket","external_name":"bucket","restriction":"Time::Span"}],"visibility":"Public","body":"@aggregation = Aggregation.new(type, bucket)"}},{"html_id":"aggregation:Aggregation|Nil-instance-method","name":"aggregation","abstract":false,"location":{"filename":"src/time_series.cr","line_number":383,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L383"},"def":{"name":"aggregation","return_type":"Aggregation | ::Nil","visibility":"Public","body":"@aggregation"}}],"types":[{"html_id":"redis/Redis/TimeSeries/RangeOptions/Aggregation","path":"Redis/TimeSeries/RangeOptions/Aggregation.html","kind":"struct","full_name":"Redis::TimeSeries::RangeOptions::Aggregation","name":"Aggregation","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":389,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L389"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/TimeSeries/RangeOptions","kind":"class","full_name":"Redis::TimeSeries::RangeOptions","name":"RangeOptions"},"constructors":[{"html_id":"new(type:AggregationType,time_bucket:Time::Span)-class-method","name":"new","abstract":false,"args":[{"name":"type","external_name":"type","restriction":"AggregationType"},{"name":"time_bucket","external_name":"time_bucket","restriction":"Time::Span"}],"args_string":"(type : AggregationType, time_bucket : Time::Span)","args_html":"(type : AggregationType, time_bucket : Time::Span)","location":{"filename":"src/time_series.cr","line_number":389,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L389"},"def":{"name":"new","args":[{"name":"type","external_name":"type","restriction":"AggregationType"},{"name":"time_bucket","external_name":"time_bucket","restriction":"Time::Span"}],"visibility":"Public","body":"_ = allocate\n_.initialize(type, time_bucket)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/time_series.cr","line_number":389,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L389"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@type.clone, @time_bucket.clone)"}},{"html_id":"copy_with(type_type=@type,time_bucket_time_bucket=@time_bucket)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_type","default_value":"@type","external_name":"type","restriction":""},{"name":"_time_bucket","default_value":"@time_bucket","external_name":"time_bucket","restriction":""}],"args_string":"(type _type = @type, time_bucket _time_bucket = @time_bucket)","args_html":"(type _type = @type, time_bucket _time_bucket = @time_bucket)","location":{"filename":"src/time_series.cr","line_number":389,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L389"},"def":{"name":"copy_with","args":[{"name":"_type","default_value":"@type","external_name":"type","restriction":""},{"name":"_time_bucket","default_value":"@time_bucket","external_name":"time_bucket","restriction":""}],"visibility":"Public","body":"self.class.new(_type, _time_bucket)"}},{"html_id":"time_bucket:Time::Span-instance-method","name":"time_bucket","abstract":false,"def":{"name":"time_bucket","return_type":"Time::Span","visibility":"Public","body":"@time_bucket"}},{"html_id":"type:AggregationType-instance-method","name":"type","abstract":false,"def":{"name":"type","return_type":"AggregationType","visibility":"Public","body":"@type"}}]}]}]},{"html_id":"redis/Redis/Transaction","path":"Redis/Transaction.html","kind":"class","full_name":"Redis::Transaction","name":"Transaction","abstract":false,"superclass":{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},{"html_id":"redis/Redis/Commands/Stream","kind":"module","full_name":"Redis::Commands::Stream","name":"Stream"},{"html_id":"redis/Redis/Commands/SortedSet","kind":"module","full_name":"Redis::Commands::SortedSet","name":"SortedSet"},{"html_id":"redis/Redis/Commands/Set","kind":"module","full_name":"Redis::Commands::Set","name":"Set"},{"html_id":"redis/Redis/Commands/List","kind":"module","full_name":"Redis::Commands::List","name":"List"},{"html_id":"redis/Redis/Commands/Hash","kind":"module","full_name":"Redis::Commands::Hash","name":"Hash"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/transaction.cr","line_number":5,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/transaction.cr#L5"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"constructors":[{"html_id":"new(connection:Connection)-class-method","name":"new","abstract":false,"args":[{"name":"connection","external_name":"connection","restriction":"Connection"}],"args_string":"(connection : Connection)","args_html":"(connection : Connection)","location":{"filename":"src/transaction.cr","line_number":10,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/transaction.cr#L10"},"def":{"name":"new","args":[{"name":"connection","external_name":"connection","restriction":"Connection"}],"visibility":"Public","body":"_ = allocate\n_.initialize(connection)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"discard:Nil-instance-method","name":"discard","abstract":false,"location":{"filename":"src/transaction.cr","line_number":14,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/transaction.cr#L14"},"def":{"name":"discard","return_type":"Nil","visibility":"Public","body":"@discarded = true\nfinish(\"discard\")\n"}},{"html_id":"discarded?:Bool?-instance-method","name":"discarded?","abstract":false,"location":{"filename":"src/transaction.cr","line_number":8,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/transaction.cr#L8"},"def":{"name":"discarded?","visibility":"Public","body":"@discarded"}},{"html_id":"exec-instance-method","name":"exec","abstract":false,"location":{"filename":"src/transaction.cr","line_number":25,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/transaction.cr#L25"},"def":{"name":"exec","visibility":"Public","body":"(finish(\"exec\")).as(Array)"}},{"html_id":"run(command):Nil-instance-method","name":"run","doc":"Execute the given command and return the result from the server. Commands\nmust be an `Enumerable` and its `size` method must be re-entrant.\n\n```\nrun({\"set\", \"foo\", \"bar\"})\n```","summary":"

    Execute the given command and return the result from the server.

    ","abstract":false,"args":[{"name":"command","external_name":"command","restriction":""}],"args_string":"(command) : Nil","args_html":"(command) : Nil","location":{"filename":"src/transaction.cr","line_number":19,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/transaction.cr#L19"},"def":{"name":"run","args":[{"name":"command","external_name":"command","restriction":""}],"return_type":"Nil","visibility":"Public","body":"if discarded?\n return\nend\n@connection.encode(command)\n@command_count = @command_count + 1\n"}},{"html_id":"start!-instance-method","name":"start!","abstract":false,"location":{"filename":"src/transaction.cr","line_number":29,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/transaction.cr#L29"},"def":{"name":"start!","visibility":"Public","body":"@connection.encode({\"multi\"})"}}]},{"html_id":"redis/Redis/Value","path":"Redis/Value.html","kind":"alias","full_name":"Redis::Value","name":"Value","abstract":false,"locations":[{"filename":"src/value.cr","line_number":6,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/value.cr#L6"}],"repository_name":"redis","program":false,"enum":false,"alias":true,"aliased":"(Array(Redis::Value) | Int64 | Redis::Error | String | Nil)","aliased_html":"Array(Redis::Value) | Int64 | Redis::Error | String | Nil","const":false,"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"doc":"Values consumed and emitted by Redis can be strings, 64-bit integers, `nil`,\nor an array of any of these types.","summary":"

    Values consumed and emitted by Redis can be strings, 64-bit integers, nil, or an array of any of these types.

    "},{"html_id":"redis/Redis/Writer","path":"Redis/Writer.html","kind":"struct","full_name":"Redis::Writer","name":"Writer","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/writer.cr","line_number":2,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/writer.cr#L2"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"CRLF","name":"CRLF","value":"\"\\r\\n\""}],"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"constructors":[{"html_id":"new(io:IO)-class-method","name":"new","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/writer.cr","line_number":7,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/writer.cr#L7"},"def":{"name":"new","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"_ = allocate\n_.initialize(io)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"io:IO-instance-method","name":"io","abstract":false,"location":{"filename":"src/writer.cr","line_number":5,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/writer.cr#L5"},"def":{"name":"io","visibility":"Public","body":"@io"}}]}]}]}} \ No newline at end of file +{"repository_name":"redis","body":"# redis\n\nA pure-Crystal implementation of the Redis protocol\n\n## Installation\n\n1. Add the dependency to your `shard.yml`:\n\n ```yaml\n dependencies:\n redis:\n github: jgaskins/redis\n ```\n\n2. Run `shards`\n\n## Usage\n\n```crystal\nrequire \"redis\"\n\nredis = Redis::Client.new # Defaults to `localhost` port 6379\n\nredis.set \"foo\", \"bar\"\nredis.get \"foo\" # => \"bar\"\n\nredis.incr \"counter\" # => 1\nredis.incr \"counter\" # => 2\nredis.decr \"counter\" # => 1\n\nredis.del \"foo\", \"counter\" # => 2\n```\n\n### Pipelined queries\n\nTo mitigate latency with multiple queries whose inputs and outputs are completely independent of each other, you can \"pipeline\" your queries by sending them all at once before reading them. To do this, you can use the `pipeline` method:\n\n```crystal\nredis.pipeline do |pipe|\n pipe.incr \"foo\"\n pipe.set \"bar\", \"baz\"\n pipe.lpush \"my-list\", \"my value\"\nend\n```\n\nThe return value of `pipeline` will be an array containing the values of each of those calls in the order they were sent. So in this case, it might be `[1, nil, 2]` to match the return values of `incr`, `set`, and `lpush`, respectively.\n\n### Transactions\n\nThe Redis [`MULTI` command](https://redis.io/commands/multi) begins a transaction, so you can use the `multi` method to execute a transaction against the server:\n\n```crystal\nredis.multi do |txn|\n txn.set \"foo\", \"bar\"\n txn.incr \"baz\"\n txn.lpush \"my-list\", \"my value\"\nend\n```\n\nThe transaction is automatically committed with [`EXEC`](https://redis.io/commands/exec) at the end of the block. If an exception occurs within the block, the transaction will be rolled back with [`DISCARD`](https://redis.io/commands/discard) before exiting the block.\n\nYou may also call `txn.discard`, which will effectively disable the transaction (all further methods called on the transaction do nothing), but will not exit the block. You will need to exit the block explicitly with `break` if there are operations within the block that cannot be rolled back, such as sending an email or sending a request to a third-party API.\n\nThe reason for this is that the only way to exit a containing block from an inner method in Crystal is to raise an exception, and this library chooses not to use exceptions for flow control.\n\n### Beyond `localhost`\n\nTo use a Redis server that isn't at `localhost:6379`, pass a `URI` to the client. For example, if you store it in your shell environment:\n\n```crystal\nredis = Redis::Client.new(URI.parse(ENV[\"REDIS_URL\"]))\n\n# ... or ...\n\nredis = Redis::Client.from_env(\"REDIS_URL\")\n```\n\nTo connect via SSL, make sure you use the `rediss://` URL scheme. If your Redis server requires a password or uses a different database slot than `0`, make sure you include them in the URL:\n\n```crystal\nredis = Redis::Client.new(URI.parse(\"rediss://:my_password@example.com/3\"))\n```\n\n### Connection Pool\n\nThe `Redis::Client` maintains a connection pool, so there is no need to run your own within your application. When you execute a command on the `Redis::Client`, it is automatically executed against a connection. When you execute a pipeline or transaction with `multi`, all commands within that block will automatically be routed to the same connection.\n\n**Configuration**\n\nFor this shard, we use the following default setting (outside of the Standard Lib defaults);\n\n```\nmax_idle_pool_size = 25\n```\n\n> You can override this manually using the URI parameters.\n> All other settings follow the DB::Pool defaults.\n\nThe behaviour of the connection pool can be configured from a set of query string parameters in the connection URI.\n\n| Name | Default value |\n| :--- | :--- |\n| initial\\_pool\\_size | 1 |\n| max\\_pool\\_size | 0 \\(unlimited\\) |\n| max\\_idle\\_pool\\_size | 1 |\n| checkout\\_timeout | 5.0 \\(seconds\\) |\n| retry\\_attempts | 1 |\n| retry\\_delay | 1.0 \\(seconds\\) |\n\nSee [Crystal guides](https://crystal-lang.org/reference/1.6/database/connection_pool.html) to learn more.\n\n**Example**\n\n```crystal\npool_params = \"?initial_pool_size=1&max_pool_size=10&checkout_timeout=10&retry_attempts=2&retry_delay=0.5&max_idle_pool_size=50\"\nredis = Redis::Client.new(URI.parse(\"redis://localhost:6379/0#{pool_params}\"))\n```\n\n**Recommendations**\n\nIf you encounter any issues, keep these setting the same;\n\n- `initial_pool_size`\n- `max_pool_size`\n- `max_idle_pool_size`\n\nExample:\n\n```\ninitial_pool_size = 50\nmax_pool_size = 50\nmax_idle_pool_size = 50\n```\n\n### TCP Keep-Alive\n\nThe `Redis::Client` uses a pool of `Redis::Connection` under the hood.\nWithin `Redis::Connection` we create a `TCPSocket`, which can accept keepalive params.\nThe TCP keepalive settings can help you mitigate Redis connection stability issues.\n\n> NOTE: This behaviour is disabled by default. See Configuration below on how to enable it.\n\n**Configuration**\n\nFor this shard, we use the following override setting;\n\n| Name | Default value |\n| :--- | :--- |\n| keepalive | false |\n| keepalive\\_count | 3 |\n| keepalive\\_idle | 60 |\n| keepalive\\_interval | 30 |\n\n> You can override this manually using the URI parameters.\n> The settings above have proven to have good results in production environments. However, every environment is different, so tweaking these settings may be necessary.\n\nSee [Crystal API](https://crystal-lang.org/api/1.6.0/TCPSocket.html) to learn more.\n\n**Example**\n\n```crystal\nparams = \"?keepalive=true&keepalive_count=5&keepalive_idle=10&keepalive_interval=15\"\n\nredis = Redis::Client.new(URI.parse(\"redis://localhost:6379/0#{params}\"))\n# or direct connections\nredis = Redis::Connection.new(URI.parse(\"redis://localhost:6379/0#{params}\"))\n```\n\n**Recommendations**\n\nEnable this setting with the defaults if you are encountering connection issues.\n\nExample:\n\n```crystal\nparams = \"?keepalive=true\"\n\nredis = Redis::Client.new(URI.parse(\"redis://localhost:6379/0#{params}\"))\n# or direct connections\nredis = Redis::Connection.new(URI.parse(\"redis://localhost:6379/0#{params}\"))\n```\n\n## Development\n\nMake sure you have a Redis or KeyDB server running locally on port 6379.\n\nRedis must be installed with a stack server for the full text search (`ft`) and time series modules (`ts`) in order for all specs to run.\n\n### With Docker\n\nYou can use this for your docker-compose file\n\n```yaml\nredis:\n image: redis/redis-stack-server\n ports:\n - \"6379:6379\"\n```\n\n### With Homebrew\n\nInstall the [`redis-stack` from homebrew](https://github.com/redis-stack/homebrew-redis-stack)\n\n\n## Contributing\n\n1. Fork it ()\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n## Contributors\n\n- [Jamie Gaskins](https://github.com/jgaskins) - creator and maintainer\n","program":{"html_id":"redis/toplevel","path":"toplevel.html","kind":"module","full_name":"Top Level Namespace","name":"Top Level Namespace","abstract":false,"locations":[],"repository_name":"redis","program":true,"enum":false,"alias":false,"const":false,"types":[{"html_id":"redis/Redis","path":"Redis.html","kind":"module","full_name":"Redis","name":"Redis","abstract":false,"locations":[{"filename":"src/client.cr","line_number":7,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/client.cr#L7"},{"filename":"src/cluster.cr","line_number":8,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/cluster.cr#L8"},{"filename":"src/commands.cr","line_number":8,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L8"},{"filename":"src/connection.cr","line_number":13,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L13"},{"filename":"src/errors.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/errors.cr#L1"},{"filename":"src/graph.cr","line_number":12,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L12"},{"filename":"src/json.cr","line_number":5,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L5"},{"filename":"src/log.cr","line_number":3,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/log.cr#L3"},{"filename":"src/parser.cr","line_number":4,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/parser.cr#L4"},{"filename":"src/pipeline.cr","line_number":5,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/pipeline.cr#L5"},{"filename":"src/read_only_commands.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/read_only_commands.cr#L1"},{"filename":"src/redis.cr","line_number":9,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/redis.cr#L9"},{"filename":"src/search.cr","line_number":3,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L3"},{"filename":"src/streaming.cr","line_number":3,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L3"},{"filename":"src/time_series.cr","line_number":4,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L4"},{"filename":"src/to_hash.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/to_hash.cr#L1"},{"filename":"src/transaction.cr","line_number":4,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/transaction.cr#L4"},{"filename":"src/value.cr","line_number":3,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/value.cr#L3"},{"filename":"src/version.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/version.cr#L1"},{"filename":"src/writer.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/writer.cr#L1"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ERROR_MAP","name":"ERROR_MAP","value":"Hash(String, Error.class).new(default_value: Error)"},{"id":"Log","name":"Log","value":"::Log.for(self)","doc":"Default Redis log","summary":"

    Default Redis log

    "},{"id":"READ_ONLY_COMMANDS","name":"READ_ONLY_COMMANDS","value":"([\"bf.card\", \"bf.debug\", \"bf.exists\", \"bf.info\", \"bf.mexists\", \"bf.scandump\", \"bitcount\", \"bitfield_ro\", \"bitpos\", \"cf.compact\", \"cf.count\", \"cf.debug\", \"cf.exists\", \"cf.info\", \"cf.mexists\", \"cf.scandump\", \"cms.info\", \"cms.query\", \"dbsize\", \"dump\", \"eval_ro\", \"evalsha_ro\", \"exists\", \"expiretime\", \"fcall_ro\", \"ft._aliasaddifnx\", \"ft._aliasdelifx\", \"ft._list\", \"ft.aggregate\", \"ft.aliasadd\", \"ft.aliasdel\", \"ft.aliasupdate\", \"ft.config\", \"ft.cursor\", \"ft.debug\", \"ft.dictadd\", \"ft.dictdel\", \"ft.dictdump\", \"ft.explain\", \"ft.explaincli\", \"ft.get\", \"ft.info\", \"ft.mget\", \"ft.profile\", \"ft.search\", \"ft.spellcheck\", \"ft.sugget\", \"ft.suglen\", \"ft.syndump\", \"ft.tagvals\", \"geodist\", \"geohash\", \"geopos\", \"georadius_ro\", \"georadiusbymember_ro\", \"geosearch\", \"get\", \"getbit\", \"getrange\", \"hexists\", \"hget\", \"hgetall\", \"hkeys\", \"hlen\", \"hmget\", \"hrandfield\", \"hscan\", \"hstrlen\", \"hvals\", \"json.arrindex\", \"json.arrlen\", \"json.debug\", \"json.get\", \"json.mget\", \"json.objkeys\", \"json.objlen\", \"json.resp\", \"json.strlen\", \"json.type\", \"keys\", \"lcs\", \"lindex\", \"llen\", \"lolwut\", \"lpos\", \"lrange\", \"mget\", \"pexpiretime\", \"pfcount\", \"pttl\", \"randomkey\", \"redisgears_2.clusterset\", \"redisgears_2.clustersetfromshard\", \"redisgears_2.forceshardsconnection\", \"redisgears_2.hello\", \"redisgears_2.infocluster\", \"redisgears_2.innercommunication\", \"redisgears_2.networktest\", \"redisgears_2.refreshcluster\", \"scan\", \"scard\", \"sdiff\", \"sinter\", \"sintercard\", \"sismember\", \"smembers\", \"smismember\", \"sort_ro\", \"srandmember\", \"sscan\", \"strlen\", \"substr\", \"sunion\", \"tdigest.byrank\", \"tdigest.byrevrank\", \"tdigest.cdf\", \"tdigest.info\", \"tdigest.max\", \"tdigest.min\", \"tdigest.quantile\", \"tdigest.rank\", \"tdigest.revrank\", \"tdigest.trimmed_mean\", \"timeseries.clusterset\", \"timeseries.clustersetfromshard\", \"timeseries.forceshardsconnection\", \"timeseries.hello\", \"timeseries.infocluster\", \"timeseries.innercommunication\", \"timeseries.networktest\", \"timeseries.refreshcluster\", \"topk.info\", \"topk.list\", \"topk.query\", \"touch\", \"ts.get\", \"ts.info\", \"ts.mget\", \"ts.mrange\", \"ts.mrevrange\", \"ts.queryindex\", \"ts.range\", \"ts.revrange\", \"ttl\", \"type\", \"xlen\", \"xpending\", \"xrange\", \"xread\", \"xrevrange\", \"zcard\", \"zcount\", \"zdiff\", \"zinter\", \"zintercard\", \"zlexcount\", \"zmscore\", \"zrandmember\", \"zrange\", \"zrangebylex\", \"zrangebyscore\", \"zrank\", \"zrevrange\", \"zrevrangebylex\", \"zrevrangebyscore\", \"zrevrank\", \"zscan\", \"zscore\", \"zunion\"] of ::String).to_set","doc":"Commands in this set are routed to replicas by `Redis::Cluster` and\n`Redis::ReplicationClient`.\n\nYou can add additional commands that this shard does not yet know about\n(for example, one provided by a custom Redis module) by using the `<<` method:\n\n```\nRedis::READ_ONLY_COMMANDS << \"mymodule.mycommand\"\n```","summary":"

    Commands in this set are routed to replicas by Redis::Cluster and Redis::ReplicationClient.

    "},{"id":"VERSION","name":"VERSION","value":"\"0.10.0\""}],"class_methods":[{"html_id":"to_hash(array:Array,value_type:T.class):Hash(String,T)forallT-class-method","name":"to_hash","abstract":false,"args":[{"name":"array","external_name":"array","restriction":"Array"},{"name":"value_type","external_name":"value_type","restriction":"T.class"}],"args_string":"(array : Array, value_type : T.class) : Hash(String, T) forall T","args_html":"(array : Array, value_type : T.class) : Hash(String, T) forall T","location":{"filename":"src/to_hash.cr","line_number":6,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/to_hash.cr#L6"},"def":{"name":"to_hash","args":[{"name":"array","external_name":"array","restriction":"Array"},{"name":"value_type","external_name":"value_type","restriction":"T.class"}],"return_type":"::Hash(String, T)","visibility":"Public","body":"if array.size.even?\nelse\n raise(ArgumentError.new(\"Array must have an even number of arguments to convert to a hash\"))\nend\nhash = ::Hash(String, T).new(initial_capacity: array.size // 2)\n(0...array.size).step(2) do |index|\n hash[array[index].as(String)] = array[index + 1].as(T)\nend\nhash\n"}},{"html_id":"to_hash(array:Array)-class-method","name":"to_hash","abstract":false,"args":[{"name":"array","external_name":"array","restriction":"::Array"}],"args_string":"(array : Array)","args_html":"(array : Array)","location":{"filename":"src/to_hash.cr","line_number":2,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/to_hash.cr#L2"},"def":{"name":"to_hash","args":[{"name":"array","external_name":"array","restriction":"::Array"}],"visibility":"Public","body":"to_hash(array, value_type: Value)"}}],"types":[{"html_id":"redis/Redis/BusyGroup","path":"Redis/BusyGroup.html","kind":"class","full_name":"Redis::BusyGroup","name":"BusyGroup","abstract":false,"superclass":{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},"ancestors":[{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/errors.cr","line_number":17,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/errors.cr#L17"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"}},{"html_id":"redis/Redis/Client","path":"Redis/Client.html","kind":"class","full_name":"Redis::Client","name":"Client","abstract":false,"superclass":{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},{"html_id":"redis/Redis/Commands/Stream","kind":"module","full_name":"Redis::Commands::Stream","name":"Stream"},{"html_id":"redis/Redis/Commands/SortedSet","kind":"module","full_name":"Redis::Commands::SortedSet","name":"SortedSet"},{"html_id":"redis/Redis/Commands/Set","kind":"module","full_name":"Redis::Commands::Set","name":"Set"},{"html_id":"redis/Redis/Commands/List","kind":"module","full_name":"Redis::Commands::List","name":"List"},{"html_id":"redis/Redis/Commands/Hash","kind":"module","full_name":"Redis::Commands::Hash","name":"Hash"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/client.cr","line_number":21,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/client.cr#L21"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"doc":"The Redis client is the expected entrypoint for this shard. By default, it will connect to localhost:6379, but you can also supply a `URI` to connect to an arbitrary Redis server. SSL, password authentication, and DB selection are all supported.\n\n```\n# Connects to localhost:6379\nredis = Redis::Client.new\n\n# Connects to a server at \"redis.example.com\" on port 6000 over a TLS\n# connection, authenticates with the password \"password\", and uses DB 3\nredis = Redis::Client.new(URI.parse(\"rediss://:password@redis.example.com:6000/3\"))\n\n# Connects to a server at the URL in `ENV[\"REDIS_URL\"]`\nredis = Redis::Client.from_env(\"REDIS_URL\")\n```","summary":"

    The Redis client is the expected entrypoint for this shard.

    ","class_methods":[{"html_id":"from_env(env_var)-class-method","name":"from_env","abstract":false,"args":[{"name":"env_var","external_name":"env_var","restriction":""}],"args_string":"(env_var)","args_html":"(env_var)","location":{"filename":"src/client.cr","line_number":26,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/client.cr#L26"},"def":{"name":"from_env","args":[{"name":"env_var","external_name":"env_var","restriction":""}],"visibility":"Public","body":"new(URI.parse(ENV[env_var]))"}}],"constructors":[{"html_id":"new(uri:URI=URI.parse(ENV.fetch(\"REDIS_URL\",\"redis:///\")),log:::Log=Log)-class-method","name":"new","doc":"The client holds a pool of connections that expands and contracts as\nneeded.","summary":"

    The client holds a pool of connections that expands and contracts as needed.

    ","abstract":false,"args":[{"name":"uri","default_value":"URI.parse(ENV.fetch(\"REDIS_URL\", \"redis:///\"))","external_name":"uri","restriction":"URI"},{"name":"log","default_value":"Log","external_name":"log","restriction":"::Log"}],"args_string":"(uri : URI = URI.parse(ENV.fetch(\"REDIS_URL\", \"redis:///\")), log : ::Log = Log)","args_html":"(uri : URI = URI.parse(ENV.fetch("REDIS_URL", "redis:///")), log : ::Log = Log)","location":{"filename":"src/client.cr","line_number":32,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/client.cr#L32"},"def":{"name":"new","args":[{"name":"uri","default_value":"URI.parse(ENV.fetch(\"REDIS_URL\", \"redis:///\"))","external_name":"uri","restriction":"URI"},{"name":"log","default_value":"Log","external_name":"log","restriction":"::Log"}],"visibility":"Public","body":"_ = allocate\n_.initialize(uri, log)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"close-instance-method","name":"close","abstract":false,"location":{"filename":"src/client.cr","line_number":92,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/client.cr#L92"},"def":{"name":"close","visibility":"Public","body":"@pool.close"}},{"html_id":"hscan_each(key:String,*,matchpattern:String|Nil=nil,count:String|Int|Nil=nil,&):Nil-instance-method","name":"hscan_each","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"","external_name":"","restriction":""},{"name":"pattern","default_value":"nil","external_name":"match","restriction":"String | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"}],"args_string":"(key : String, *, match pattern : String | Nil = nil, count : String | Int | Nil = nil, &) : Nil","args_html":"(key : String, *, match pattern : String | Nil = nil, count : String | Int | Nil = nil, &) : Nil","location":{"filename":"src/client.cr","line_number":61,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/client.cr#L61"},"def":{"name":"hscan_each","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"","external_name":"","restriction":""},{"name":"pattern","default_value":"nil","external_name":"match","restriction":"String | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"}],"splat_index":1,"yields":1,"block_arity":1,"return_type":"Nil","visibility":"Public","body":"@pool.checkout(&.hscan_each(key: key, match: pattern, count: count) do |key|\n yield key\nend)"}},{"html_id":"multi(&)-instance-method","name":"multi","abstract":false,"location":{"filename":"src/client.cr","line_number":80,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/client.cr#L80"},"def":{"name":"multi","yields":1,"block_arity":1,"visibility":"Public","body":"@pool.checkout(&.multi do |txn|\n yield txn\nend)"}},{"html_id":"pipeline(&)-instance-method","name":"pipeline","abstract":false,"location":{"filename":"src/client.cr","line_number":76,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/client.cr#L76"},"def":{"name":"pipeline","yields":1,"block_arity":1,"visibility":"Public","body":"@pool.checkout(&.pipeline do |pipe|\n yield pipe\nend)"}},{"html_id":"psubscribe(*channels,&)-instance-method","name":"psubscribe","abstract":false,"args":[{"name":"channels","external_name":"channels","restriction":""}],"args_string":"(*channels, &)","args_html":"(*channels, &)","location":{"filename":"src/client.cr","line_number":88,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/client.cr#L88"},"def":{"name":"psubscribe","args":[{"name":"channels","external_name":"channels","restriction":""}],"splat_index":0,"yields":2,"block_arity":2,"visibility":"Public","body":"@pool.checkout(&.psubscribe(*channels) do |subscription, conn|\n yield subscription, conn\nend)"}},{"html_id":"run(command)-instance-method","name":"run","doc":"All Redis commands invoked on the client check out a connection from the\nconnection pool, invoke the command on that connection, and then check the\nconnection back into the pool.\n\n```\nredis = Redis::Client.new\n```","summary":"

    All Redis commands invoked on the client check out a connection from the connection pool, invoke the command on that connection, and then check the connection back into the pool.

    ","abstract":false,"args":[{"name":"command","external_name":"command","restriction":""}],"args_string":"(command)","args_html":"(command)","location":{"filename":"src/client.cr","line_number":72,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/client.cr#L72"},"def":{"name":"run","args":[{"name":"command","external_name":"command","restriction":""}],"visibility":"Public","body":"@pool.checkout(&.run(command))"}},{"html_id":"scan_each(matchpattern:String|Nil=nil,count:String|Int|Nil=nil,type:String|Nil=nil,&):Nil-instance-method","name":"scan_each","abstract":false,"args":[{"name":"pattern","default_value":"nil","external_name":"match","restriction":"String | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"},{"name":"type","default_value":"nil","external_name":"type","restriction":"String | ::Nil"}],"args_string":"(match pattern : String | Nil = nil, count : String | Int | Nil = nil, type : String | Nil = nil, &) : Nil","args_html":"(match pattern : String | Nil = nil, count : String | Int | Nil = nil, type : String | Nil = nil, &) : Nil","location":{"filename":"src/client.cr","line_number":57,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/client.cr#L57"},"def":{"name":"scan_each","args":[{"name":"pattern","default_value":"nil","external_name":"match","restriction":"String | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"},{"name":"type","default_value":"nil","external_name":"type","restriction":"String | ::Nil"}],"yields":1,"block_arity":1,"return_type":"Nil","visibility":"Public","body":"@pool.checkout(&.scan_each(match: pattern, count: count, type: type) do |key|\n yield key\nend)"}},{"html_id":"subscribe(*channels,&)-instance-method","name":"subscribe","abstract":false,"args":[{"name":"channels","external_name":"channels","restriction":""}],"args_string":"(*channels, &)","args_html":"(*channels, &)","location":{"filename":"src/client.cr","line_number":84,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/client.cr#L84"},"def":{"name":"subscribe","args":[{"name":"channels","external_name":"channels","restriction":""}],"splat_index":0,"yields":2,"block_arity":2,"visibility":"Public","body":"@pool.checkout(&.subscribe(*channels) do |subscription, conn|\n yield subscription, conn\nend)"}}]},{"html_id":"redis/Redis/Cluster","path":"Redis/Cluster.html","kind":"class","full_name":"Redis::Cluster","name":"Cluster","abstract":false,"superclass":{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},{"html_id":"redis/Redis/Commands/Stream","kind":"module","full_name":"Redis::Commands::Stream","name":"Stream"},{"html_id":"redis/Redis/Commands/SortedSet","kind":"module","full_name":"Redis::Commands::SortedSet","name":"SortedSet"},{"html_id":"redis/Redis/Commands/Set","kind":"module","full_name":"Redis::Commands::Set","name":"Set"},{"html_id":"redis/Redis/Commands/List","kind":"module","full_name":"Redis::Commands::List","name":"List"},{"html_id":"redis/Redis/Commands/Hash","kind":"module","full_name":"Redis::Commands::Hash","name":"Hash"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/cluster.cr","line_number":32,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/cluster.cr#L32"},{"filename":"src/errors.cr","line_number":19,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/errors.cr#L19"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"doc":"Use in place of a `Redis::Client` when talking to Redis clusters. This class\nwill discover all nodes in a Redis cluster when given a URI for any of them,\nroute commands to appropriate shards based on the keys they operate on, and\nroute commands which do not change state to shard replicas to spread the\nload across the cluster.\n\nIt's important that, when using commands which operate on multiple keys (for\nexample: `MGET`, `DEL`, `RPOPLPUSH`, etc) that _all_ specified keys reside\non the same shard in the cluster. Usually, this means designing your key\nnames with curly braces around parts of them to ensure they hash to the same\n[key slot](https://redis.io/commands/cluster-keyslot). For example:\n\n```\nredis.del \"{comment}:1\", \"{comment}:2\"\nvalue = redis.rpoplpush \"{queue}:default\", \"{queue}:default:pending\"\n```\n\nIf you want to use a Redis module that provides custom commands, you can\nregister them as read-only with `Redis::Cluster.register_read_only_commands`\nand they will automatically be routed to replicas. See\n[`redis/cluster/json.cr`](https://github.com/jgaskins/redis/blob/3e874563dd524df9af6827f72edecca13a615802/src/cluster/json.cr#L5-L15)\nfor example usage.","summary":"

    Use in place of a Redis::Client when talking to Redis clusters.

    \n

    EXPERIMENTAL Cluster support is still under development. Some APIs may change while details are discovered and highly customized clusters (for example, servers handling individual hash slots or multiple hash-slot ranges) are not yet supported.

    ","class_methods":[{"html_id":"register_read_only_command(command:String)-class-method","name":"register_read_only_command","doc":"Tell the cluster driver that the specified Redis command can be routed to\nread-only replicas.\n\n```\nRedis::Cluster.register_read_only_command \"mymodule.get\"\n```","summary":"

    Tell the cluster driver that the specified Redis command can be routed to read-only replicas.

    ","abstract":false,"args":[{"name":"command","external_name":"command","restriction":"String"}],"args_string":"(command : String)","args_html":"(command : String)","location":{"filename":"src/cluster.cr","line_number":67,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/cluster.cr#L67"},"def":{"name":"register_read_only_command","args":[{"name":"command","external_name":"command","restriction":"String"}],"visibility":"Public","body":"READ_ONLY_COMMANDS << command"}},{"html_id":"register_read_only_commands(commands:Enumerable(String))-class-method","name":"register_read_only_commands","doc":"Tell the cluster driver that all the specified Redis commands can be\nrouted to read-only replicas.\n\n```\nRedis::Cluster.register_read_only_commands %w[\n mymodule.get\n mymodule.mget\n]\n```","summary":"

    Tell the cluster driver that all the specified Redis commands can be routed to read-only replicas.

    ","abstract":false,"args":[{"name":"commands","external_name":"commands","restriction":"Enumerable(String)"}],"args_string":"(commands : Enumerable(String))","args_html":"(commands : Enumerable(String))","location":{"filename":"src/cluster.cr","line_number":57,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/cluster.cr#L57"},"def":{"name":"register_read_only_commands","args":[{"name":"commands","external_name":"commands","restriction":"Enumerable(String)"}],"visibility":"Public","body":"commands.each do |command|\n register_read_only_command(command)\nend"}}],"constructors":[{"html_id":"new(uri:URI=URI.parse(ENV[\"REDIS_CLUSTER_URL\"]?||\"redis:///\"))-class-method","name":"new","doc":"Pass a `URI` (defaulting to the `REDIS_CLUSTER_URL` environment variable)\nto connect to the specified Redis cluster — the URI can point to _any_\nserver in the cluster and `Redis::Cluster` will discover the rest.","summary":"

    Pass a URI (defaulting to the REDIS_CLUSTER_URL environment variable) to connect to the specified Redis cluster — the URI can point to any server in the cluster and Redis::Cluster will discover the rest.

    ","abstract":false,"args":[{"name":"uri","default_value":"URI.parse(ENV[\"REDIS_CLUSTER_URL\"]? || \"redis:///\")","external_name":"uri","restriction":"URI"}],"args_string":"(uri : URI = URI.parse(ENV[\"REDIS_CLUSTER_URL\"]? || \"redis:///\"))","args_html":"(uri : URI = URI.parse(ENV["REDIS_CLUSTER_URL"]? || "redis:///"))","location":{"filename":"src/cluster.cr","line_number":74,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/cluster.cr#L74"},"def":{"name":"new","args":[{"name":"uri","default_value":"URI.parse(ENV[\"REDIS_CLUSTER_URL\"]? || \"redis:///\")","external_name":"uri","restriction":"URI"}],"visibility":"Public","body":"_ = allocate\n_.initialize(uri)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"close-instance-method","name":"close","doc":"Close all connections to this Redis cluster","summary":"

    Close all connections to this Redis cluster

    ","abstract":false,"location":{"filename":"src/cluster.cr","line_number":253,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/cluster.cr#L253"},"def":{"name":"close","visibility":"Public","body":"begin\n @write_pools.each do |__temp_54|\n _, pool = __temp_54\n pool.close\n end\n @read_pools.each do |__temp_55|\n _, pool = __temp_55\n pool.close\n end\nensure\n @closed = true\nend"}},{"html_id":"flushdb-instance-method","name":"flushdb","doc":"Executes `flushdb` on each shard in the cluster.","summary":"

    Executes #flushdb on each shard in the cluster.

    ","abstract":false,"location":{"filename":"src/cluster.cr","line_number":214,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/cluster.cr#L214"},"def":{"name":"flushdb","visibility":"Public","body":"each_master(&.run({\"flushdb\"}))"}},{"html_id":"pipeline(key:String,&)-instance-method","name":"pipeline","doc":"Run a pipeline for the specified key\n\n```\ncluster.pipeline \"{widgets}\" do |pipe|\n widget_ids.each do |id|\n pipe.get \"{widgets}:#{id}\"\n end\nend\n```\n\nWARNING: All keys that this pipeline operates on _MUST_ reside on the same\nshard. It's best to pass a pre-hashed key (one containing `{}`) to this\nmethod. See the example above.","summary":"

    Run a pipeline for the specified key

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String, &)","args_html":"(key : String, &)","location":{"filename":"src/cluster.cr","line_number":204,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/cluster.cr#L204"},"def":{"name":"pipeline","args":[{"name":"key","external_name":"key","restriction":"String"}],"yields":1,"block_arity":1,"visibility":"Public","body":"(write_pool_for(key)).checkout(&.pipeline do |pipe|\n yield pipe\nend)"}},{"html_id":"run(commandfull_command)-instance-method","name":"run","doc":"Execute the given command and return the result from the server. Commands\nmust be an `Enumerable` and its `size` method must be re-entrant.\n\n```\nrun({\"set\", \"foo\", \"bar\"})\n```","summary":"

    Execute the given command and return the result from the server.

    ","abstract":false,"args":[{"name":"full_command","external_name":"command","restriction":""}],"args_string":"(command full_command)","args_html":"(command full_command)","location":{"filename":"src/cluster.cr","line_number":218,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/cluster.cr#L218"},"def":{"name":"run","args":[{"name":"full_command","external_name":"command","restriction":""}],"visibility":"Public","body":"if full_command.empty?\n raise(ArgumentError.new(\"Redis commands must have at least one component\"))\nend\ncommand = full_command[0]\nif key = full_command[1]?\n if command =~ (/[A-Z]/)\n command = command.downcase\n end\n started_at = Time.monotonic\n (if READ_ONLY_COMMANDS.includes?(command)\n read_pool_for(key)\n else\n write_pool_for(key)\n end).checkout do |connection|\n connection.run(full_command)\n end.tap do\n LOG.debug(&.emit(command: full_command.join(' '), duration: (Time.monotonic - started_at).total_seconds))\n end\nelse\n raise(Error.new(\"No key was specified for this command, so the cluster driver cannot route it to an appropriate Redis shard. A cluster-specific method must be added to handle cases like these until a generalized solution is added.\"))\nend\n"}},{"html_id":"scan_each(*args,**kwargs,&):Nil-instance-method","name":"scan_each","doc":"Execute `Commands#scan_each` on each shard, yielding any matching keys.","summary":"

    Execute Commands#scan_each on each shard, yielding any matching keys.

    ","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **kwargs, &) : Nil","args_html":"(*args, **kwargs, &) : Nil","location":{"filename":"src/cluster.cr","line_number":209,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/cluster.cr#L209"},"def":{"name":"scan_each","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"kwargs","external_name":"kwargs","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"return_type":"Nil","visibility":"Public","body":"each_unique_replica(&.scan_each(*args, **kwargs) do |key|\n yield key\nend)"}},{"html_id":"slot_for(key:String)-instance-method","name":"slot_for","doc":"Return the Redis hash slot for the given key. This is useful for seeing\nwhich shard your command will be routed to.","summary":"

    Return the Redis hash slot for the given key.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/cluster.cr","line_number":296,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/cluster.cr#L296"},"def":{"name":"slot_for","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"if (hash_start = key.index('{')) && (hash_end = key.index('}', hash_start + 1))\n key = key[(hash_start + 1)..(hash_end - 1)]\nend\n(CRC16.checksum(key)) % 16384\n"}}],"types":[{"html_id":"redis/Redis/Cluster/Ask","path":"Redis/Cluster/Ask.html","kind":"class","full_name":"Redis::Cluster::Ask","name":"Ask","abstract":false,"superclass":{"html_id":"redis/Redis/Cluster/Error","kind":"class","full_name":"Redis::Cluster::Error","name":"Error"},"ancestors":[{"html_id":"redis/Redis/Cluster/Error","kind":"class","full_name":"Redis::Cluster::Error","name":"Error"},{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/errors.cr","line_number":22,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/errors.cr#L22"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Cluster","kind":"class","full_name":"Redis::Cluster","name":"Cluster"}},{"html_id":"redis/Redis/Cluster/CrossSlot","path":"Redis/Cluster/CrossSlot.html","kind":"class","full_name":"Redis::Cluster::CrossSlot","name":"CrossSlot","abstract":false,"superclass":{"html_id":"redis/Redis/Cluster/Error","kind":"class","full_name":"Redis::Cluster::Error","name":"Error"},"ancestors":[{"html_id":"redis/Redis/Cluster/Error","kind":"class","full_name":"Redis::Cluster::Error","name":"Error"},{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/errors.cr","line_number":23,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/errors.cr#L23"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Cluster","kind":"class","full_name":"Redis::Cluster","name":"Cluster"}},{"html_id":"redis/Redis/Cluster/Error","path":"Redis/Cluster/Error.html","kind":"class","full_name":"Redis::Cluster::Error","name":"Error","abstract":false,"superclass":{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},"ancestors":[{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/errors.cr","line_number":20,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/errors.cr#L20"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"subclasses":[{"html_id":"redis/Redis/Cluster/Ask","kind":"class","full_name":"Redis::Cluster::Ask","name":"Ask"},{"html_id":"redis/Redis/Cluster/CrossSlot","kind":"class","full_name":"Redis::Cluster::CrossSlot","name":"CrossSlot"},{"html_id":"redis/Redis/Cluster/Moved","kind":"class","full_name":"Redis::Cluster::Moved","name":"Moved"}],"namespace":{"html_id":"redis/Redis/Cluster","kind":"class","full_name":"Redis::Cluster","name":"Cluster"}},{"html_id":"redis/Redis/Cluster/Moved","path":"Redis/Cluster/Moved.html","kind":"class","full_name":"Redis::Cluster::Moved","name":"Moved","abstract":false,"superclass":{"html_id":"redis/Redis/Cluster/Error","kind":"class","full_name":"Redis::Cluster::Error","name":"Error"},"ancestors":[{"html_id":"redis/Redis/Cluster/Error","kind":"class","full_name":"Redis::Cluster::Error","name":"Error"},{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/errors.cr","line_number":21,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/errors.cr#L21"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Cluster","kind":"class","full_name":"Redis::Cluster","name":"Cluster"}}]},{"html_id":"redis/Redis/Commands","path":"Redis/Commands.html","kind":"module","full_name":"Redis::Commands","name":"Commands","abstract":false,"ancestors":[{"html_id":"redis/Redis/Commands/Stream","kind":"module","full_name":"Redis::Commands::Stream","name":"Stream"},{"html_id":"redis/Redis/Commands/SortedSet","kind":"module","full_name":"Redis::Commands::SortedSet","name":"SortedSet"},{"html_id":"redis/Redis/Commands/Set","kind":"module","full_name":"Redis::Commands::Set","name":"Set"},{"html_id":"redis/Redis/Commands/List","kind":"module","full_name":"Redis::Commands::List","name":"List"},{"html_id":"redis/Redis/Commands/Hash","kind":"module","full_name":"Redis::Commands::Hash","name":"Hash"}],"locations":[{"filename":"src/commands.cr","line_number":14,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L14"},{"filename":"src/commands/hash.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/hash.cr#L1"},{"filename":"src/graph.cr","line_number":505,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L505"},{"filename":"src/json.cr","line_number":341,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L341"},{"filename":"src/search.cr","line_number":335,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L335"},{"filename":"src/time_series.cr","line_number":441,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L441"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"redis/Redis/Commands/Hash","kind":"module","full_name":"Redis::Commands::Hash","name":"Hash"},{"html_id":"redis/Redis/Commands/List","kind":"module","full_name":"Redis::Commands::List","name":"List"},{"html_id":"redis/Redis/Commands/Set","kind":"module","full_name":"Redis::Commands::Set","name":"Set"},{"html_id":"redis/Redis/Commands/SortedSet","kind":"module","full_name":"Redis::Commands::SortedSet","name":"SortedSet"},{"html_id":"redis/Redis/Commands/Stream","kind":"module","full_name":"Redis::Commands::Stream","name":"Stream"}],"including_types":[{"html_id":"redis/Redis/Client","kind":"class","full_name":"Redis::Client","name":"Client"},{"html_id":"redis/Redis/Cluster","kind":"class","full_name":"Redis::Cluster","name":"Cluster"},{"html_id":"redis/Redis/Connection","kind":"class","full_name":"Redis::Connection","name":"Connection"},{"html_id":"redis/Redis/Pipeline","kind":"class","full_name":"Redis::Pipeline","name":"Pipeline"},{"html_id":"redis/Redis/ReplicationClient","kind":"class","full_name":"Redis::ReplicationClient","name":"ReplicationClient"},{"html_id":"redis/Redis/Transaction","kind":"class","full_name":"Redis::Transaction","name":"Transaction"}],"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"doc":"All Redis commands are defined in this module. Any paradigm that needs to\nuse these commands simply overrides `run`, which takes a single `command`\nobject, which must be an `Enumerable`.\n\nTODO: Add more Redis commands from https://redis.io/commands","summary":"

    All Redis commands are defined in this module.

    ","instance_methods":[{"html_id":"decr(key:String)-instance-method","name":"decr","doc":"Atomically decrement and return the integer value for the specified key,\ncreating it if it does not exist\n\n```\nredis.del \"counter\"\nredis.decr \"counter\" # => -1\n```","summary":"

    Atomically decrement and return the integer value for the specified key, creating it if it does not exist

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands.cr","line_number":104,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L104"},"def":{"name":"decr","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"decr\", key})"}},{"html_id":"decrby(key:String,amount:Int|String)-instance-method","name":"decrby","doc":"Atomically decrement and return the integer value for the specified key by\nthe specified amount, creating it if it does not exist\n\n```\nredis.del \"counter\"\nredis.decrby \"counter\", 2 # => -2\n```","summary":"

    Atomically decrement and return the integer value for the specified key by the specified amount, creating it if it does not exist

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"amount","external_name":"amount","restriction":"Int | String"}],"args_string":"(key : String, amount : Int | String)","args_html":"(key : String, amount : Int | String)","location":{"filename":"src/commands.cr","line_number":126,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L126"},"def":{"name":"decrby","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"amount","external_name":"amount","restriction":"Int | String"}],"visibility":"Public","body":"run({\"decrby\", key, amount.to_s})"}},{"html_id":"del(keys:Enumerable(String))-instance-method","name":"del","doc":"Delete all specified keys and return the number of keys deleted.\n\n```\nredis.set \"foo\", \"12\"\nredis.del [\"foo\", \"bar\"] # => 1\nredis.del [\"foo\", \"bar\"] # => 0\n```","summary":"

    Delete all specified keys and return the number of keys deleted.

    ","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"Enumerable(String)"}],"args_string":"(keys : Enumerable(String))","args_html":"(keys : Enumerable(String))","location":{"filename":"src/commands.cr","line_number":148,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L148"},"def":{"name":"del","args":[{"name":"keys","external_name":"keys","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 1 + keys.size)\ncommand << \"del\"\nkeys.each do |key|\n command << key\nend\nrun(command)\n"}},{"html_id":"del(*keys:String)-instance-method","name":"del","doc":"Delete all specified keys and return the number of keys deleted.\n\n```\nredis.set \"foo\", \"12\"\nredis.del \"foo\", \"bar\" # => 1\nredis.del \"foo\", \"bar\" # => 0\n```","summary":"

    Delete all specified keys and return the number of keys deleted.

    ","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"String"}],"args_string":"(*keys : String)","args_html":"(*keys : String)","location":{"filename":"src/commands.cr","line_number":137,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L137"},"def":{"name":"del","args":[{"name":"keys","external_name":"keys","restriction":"String"}],"splat_index":0,"visibility":"Public","body":"run({\"del\"} + keys)"}},{"html_id":"eval(script:String,keys:Enumerable(String)=EmptyEnumerable.new,args:Enumerable(String)=EmptyEnumerable.new)-instance-method","name":"eval","doc":"Evaluate the given Lua script, either referenced by SHA with `evalsha`\nor directly with `eval`.\n\nNOTE: Use `eval` only for very trivial scripts and `evalsha` for larger\nor frequently executed scripts to amortize parse/compile time as well as\nsend fewer bytes along the wire.\n\nNOTE: Use `eval_ro` and `evalsha_ro` in a clustered environment to\nevaluate the scripts on read-only replicas.\n\n```\nscript = <<-LUA\n return \"this script was \" + ARGV[1]\nLUA\n\nsha = redis.script_load(script)\nredis.eval(script, args: [\"evaluated on the fly\"]\nredis.evalsha(sha, args: [\"precompiled\"])\n```","summary":"

    Evaluate the given Lua script, either referenced by SHA with #evalsha or directly with #eval.

    ","abstract":false,"args":[{"name":"script","external_name":"script","restriction":"String"},{"name":"keys","default_value":"EmptyEnumerable.new","external_name":"keys","restriction":"Enumerable(String)"},{"name":"args","default_value":"EmptyEnumerable.new","external_name":"args","restriction":"Enumerable(String)"}],"args_string":"(script : String, keys : Enumerable(String) = EmptyEnumerable.new, args : Enumerable(String) = EmptyEnumerable.new)","args_html":"(script : String, keys : Enumerable(String) = EmptyEnumerable.new, args : Enumerable(String) = EmptyEnumerable.new)","location":{"filename":"src/commands.cr","line_number":277,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L277"},"def":{"name":"eval","args":[{"name":"script","external_name":"script","restriction":"String"},{"name":"keys","default_value":"EmptyEnumerable.new","external_name":"keys","restriction":"Enumerable(String)"},{"name":"args","default_value":"EmptyEnumerable.new","external_name":"args","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: (3 + keys.size) + args.size)\n((command << \"eval\") << script) << keys.size.to_s\nkeys.each do |key|\n command << key\nend\nargs.each do |arg|\n command << arg\nend\nrun(command)\n"}},{"html_id":"eval_ro(script:String,keys:Enumerable(String)=EmptyEnumerable.new,args:Enumerable(String)=EmptyEnumerable.new)-instance-method","name":"eval_ro","doc":"Evaluate the given Lua script, either referenced by SHA with `evalsha`\nor directly with `eval`.\n\nNOTE: Use `eval` only for very trivial scripts and `evalsha` for larger\nor frequently executed scripts to amortize parse/compile time as well as\nsend fewer bytes along the wire.\n\nNOTE: Use `eval_ro` and `evalsha_ro` in a clustered environment to\nevaluate the scripts on read-only replicas.\n\n```\nscript = <<-LUA\n return \"this script was \" + ARGV[1]\nLUA\n\nsha = redis.script_load(script)\nredis.eval(script, args: [\"evaluated on the fly\"]\nredis.evalsha(sha, args: [\"precompiled\"])\n```","summary":"

    Evaluate the given Lua script, either referenced by SHA with #evalsha or directly with #eval.

    ","abstract":false,"args":[{"name":"script","external_name":"script","restriction":"String"},{"name":"keys","default_value":"EmptyEnumerable.new","external_name":"keys","restriction":"Enumerable(String)"},{"name":"args","default_value":"EmptyEnumerable.new","external_name":"args","restriction":"Enumerable(String)"}],"args_string":"(script : String, keys : Enumerable(String) = EmptyEnumerable.new, args : Enumerable(String) = EmptyEnumerable.new)","args_html":"(script : String, keys : Enumerable(String) = EmptyEnumerable.new, args : Enumerable(String) = EmptyEnumerable.new)","location":{"filename":"src/commands.cr","line_number":278,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L278"},"def":{"name":"eval_ro","args":[{"name":"script","external_name":"script","restriction":"String"},{"name":"keys","default_value":"EmptyEnumerable.new","external_name":"keys","restriction":"Enumerable(String)"},{"name":"args","default_value":"EmptyEnumerable.new","external_name":"args","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: (3 + keys.size) + args.size)\n((command << \"eval_ro\") << script) << keys.size.to_s\nkeys.each do |key|\n command << key\nend\nargs.each do |arg|\n command << arg\nend\nrun(command)\n"}},{"html_id":"evalsha(sha:String,keys:Enumerable(String)=EmptyEnumerable.new,args:Enumerable(String)=EmptyEnumerable.new)-instance-method","name":"evalsha","doc":"Evaluate the given Lua script, either referenced by SHA with `evalsha`\nor directly with `eval`.\n\nNOTE: Use `eval` only for very trivial scripts and `evalsha` for larger\nor frequently executed scripts to amortize parse/compile time as well as\nsend fewer bytes along the wire.\n\nNOTE: Use `eval_ro` and `evalsha_ro` in a clustered environment to\nevaluate the scripts on read-only replicas.\n\n```\nscript = <<-LUA\n return \"this script was \" + ARGV[1]\nLUA\n\nsha = redis.script_load(script)\nredis.eval(script, args: [\"evaluated on the fly\"]\nredis.evalsha(sha, args: [\"precompiled\"])\n```","summary":"

    Evaluate the given Lua script, either referenced by SHA with #evalsha or directly with #eval.

    ","abstract":false,"args":[{"name":"sha","external_name":"sha","restriction":"String"},{"name":"keys","default_value":"EmptyEnumerable.new","external_name":"keys","restriction":"Enumerable(String)"},{"name":"args","default_value":"EmptyEnumerable.new","external_name":"args","restriction":"Enumerable(String)"}],"args_string":"(sha : String, keys : Enumerable(String) = EmptyEnumerable.new, args : Enumerable(String) = EmptyEnumerable.new)","args_html":"(sha : String, keys : Enumerable(String) = EmptyEnumerable.new, args : Enumerable(String) = EmptyEnumerable.new)","location":{"filename":"src/commands.cr","line_number":275,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L275"},"def":{"name":"evalsha","args":[{"name":"sha","external_name":"sha","restriction":"String"},{"name":"keys","default_value":"EmptyEnumerable.new","external_name":"keys","restriction":"Enumerable(String)"},{"name":"args","default_value":"EmptyEnumerable.new","external_name":"args","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: (3 + keys.size) + args.size)\n((command << \"evalsha\") << sha) << keys.size.to_s\nkeys.each do |key|\n command << key\nend\nargs.each do |arg|\n command << arg\nend\nrun(command)\n"}},{"html_id":"evalsha_ro(script:String,keys:Enumerable(String)=EmptyEnumerable.new,args:Enumerable(String)=EmptyEnumerable.new)-instance-method","name":"evalsha_ro","doc":"Evaluate the given Lua script, either referenced by SHA with `evalsha`\nor directly with `eval`.\n\nNOTE: Use `eval` only for very trivial scripts and `evalsha` for larger\nor frequently executed scripts to amortize parse/compile time as well as\nsend fewer bytes along the wire.\n\nNOTE: Use `eval_ro` and `evalsha_ro` in a clustered environment to\nevaluate the scripts on read-only replicas.\n\n```\nscript = <<-LUA\n return \"this script was \" + ARGV[1]\nLUA\n\nsha = redis.script_load(script)\nredis.eval(script, args: [\"evaluated on the fly\"]\nredis.evalsha(sha, args: [\"precompiled\"])\n```","summary":"

    Evaluate the given Lua script, either referenced by SHA with #evalsha or directly with #eval.

    ","abstract":false,"args":[{"name":"script","external_name":"script","restriction":"String"},{"name":"keys","default_value":"EmptyEnumerable.new","external_name":"keys","restriction":"Enumerable(String)"},{"name":"args","default_value":"EmptyEnumerable.new","external_name":"args","restriction":"Enumerable(String)"}],"args_string":"(script : String, keys : Enumerable(String) = EmptyEnumerable.new, args : Enumerable(String) = EmptyEnumerable.new)","args_html":"(script : String, keys : Enumerable(String) = EmptyEnumerable.new, args : Enumerable(String) = EmptyEnumerable.new)","location":{"filename":"src/commands.cr","line_number":276,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L276"},"def":{"name":"evalsha_ro","args":[{"name":"script","external_name":"script","restriction":"String"},{"name":"keys","default_value":"EmptyEnumerable.new","external_name":"keys","restriction":"Enumerable(String)"},{"name":"args","default_value":"EmptyEnumerable.new","external_name":"args","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: (3 + keys.size) + args.size)\n((command << \"evalsha_ro\") << script) << keys.size.to_s\nkeys.each do |key|\n command << key\nend\nargs.each do |arg|\n command << arg\nend\nrun(command)\n"}},{"html_id":"exists(*keys:String)-instance-method","name":"exists","doc":"Return the number of specified keys that exist\n\n```\nredis.exists(\"foo\", \"bar\") # => 0\nredis.set \"foo\", \"exists now\"\nredis.exists(\"foo\", \"bar\") # => 1\nredis.set \"bar\", \"also exists now\"\nredis.exists(\"foo\", \"bar\") # => 2\n```","summary":"

    Return the number of specified keys that exist

    ","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"String"}],"args_string":"(*keys : String)","args_html":"(*keys : String)","location":{"filename":"src/commands.cr","line_number":177,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L177"},"def":{"name":"exists","args":[{"name":"keys","external_name":"keys","restriction":"String"}],"splat_index":0,"visibility":"Public","body":"run({\"exists\"} + keys)"}},{"html_id":"expire(key:String,ttl:Time::Span)-instance-method","name":"expire","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"ttl","external_name":"ttl","restriction":"Time::Span"}],"args_string":"(key : String, ttl : Time::Span)","args_html":"(key : String, ttl : Time::Span)","location":{"filename":"src/commands.cr","line_number":292,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L292"},"def":{"name":"expire","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"ttl","external_name":"ttl","restriction":"Time::Span"}],"visibility":"Public","body":"expire(key, ttl.total_seconds.to_i64)"}},{"html_id":"expire(key:String,ttl:Int)-instance-method","name":"expire","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"ttl","external_name":"ttl","restriction":"Int"}],"args_string":"(key : String, ttl : Int)","args_html":"(key : String, ttl : Int)","location":{"filename":"src/commands.cr","line_number":296,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L296"},"def":{"name":"expire","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"ttl","external_name":"ttl","restriction":"Int"}],"visibility":"Public","body":"run({\"expire\", key, ttl.to_s})"}},{"html_id":"expireat(key:String,at:Time)-instance-method","name":"expireat","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"at","external_name":"at","restriction":"Time"}],"args_string":"(key : String, at : Time)","args_html":"(key : String, at : Time)","location":{"filename":"src/commands.cr","line_number":308,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L308"},"def":{"name":"expireat","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"at","external_name":"at","restriction":"Time"}],"visibility":"Public","body":"run({\"expireat\", key, at.to_unix.to_s})"}},{"html_id":"flushall-instance-method","name":"flushall","doc":"Delete all the keys of all the existing databases,\nnot just the currently selected one.","summary":"

    Delete all the keys of all the existing databases, not just the currently selected one.

    ","abstract":false,"location":{"filename":"src/commands.cr","line_number":353,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L353"},"def":{"name":"flushall","visibility":"Public","body":"run({\"flushall\"})"}},{"html_id":"flushdb-instance-method","name":"flushdb","doc":"Delete all the keys of the currently selected DB","summary":"

    Delete all the keys of the currently selected DB

    ","abstract":false,"location":{"filename":"src/commands.cr","line_number":347,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L347"},"def":{"name":"flushdb","visibility":"Public","body":"run({\"flushdb\"})"}},{"html_id":"ft-instance-method","name":"ft","summary":"

    EXPERIMENTAL RediSearch support is still under development. Some APIs may change while details are discovered.

    ","abstract":false,"location":{"filename":"src/search.cr","line_number":337,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L337"},"def":{"name":"ft","visibility":"Public","body":"FullText.new(self)"}},{"html_id":"get(key:String)-instance-method","name":"get","doc":"Get the value for the specified key\n\n```\nredis.set \"foo\", \"bar\"\nredis.get(\"foo\") # => \"bar\"\n```","summary":"

    Get the value for the specified key

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands.cr","line_number":82,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L82"},"def":{"name":"get","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"get\", key})"}},{"html_id":"graph(key:String)-instance-method","name":"graph","doc":"Instantiate a `Redis::Graph::Client` backed by this `Redis::Client`.","summary":"

    Instantiate a Redis::Graph::Client backed by this Redis::Client.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/graph.cr","line_number":507,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L507"},"def":{"name":"graph","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"Graph::Client.new(self, key)"}},{"html_id":"incr(key:String)-instance-method","name":"incr","doc":"Atomically increment and return the integer value for the specified key,\ncreating it if it does not exist\n\n```\nredis.del \"counter\"\nredis.incr \"counter\" # => 1\n```","summary":"

    Atomically increment and return the integer value for the specified key, creating it if it does not exist

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands.cr","line_number":93,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L93"},"def":{"name":"incr","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"incr\", key})"}},{"html_id":"incrby(key:String,amount:Int|String)-instance-method","name":"incrby","doc":"Atomically increment and return the integer value for the specified key by\nthe specified amount, creating it if it does not exist\n\n```\nredis.del \"counter\"\nredis.incrby \"counter\", 2 # => 2\n```","summary":"

    Atomically increment and return the integer value for the specified key by the specified amount, creating it if it does not exist

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"amount","external_name":"amount","restriction":"Int | String"}],"args_string":"(key : String, amount : Int | String)","args_html":"(key : String, amount : Int | String)","location":{"filename":"src/commands.cr","line_number":115,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L115"},"def":{"name":"incrby","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"amount","external_name":"amount","restriction":"Int | String"}],"visibility":"Public","body":"run({\"incrby\", key, amount.to_s})"}},{"html_id":"info-instance-method","name":"info","abstract":false,"location":{"filename":"src/commands.cr","line_number":357,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L357"},"def":{"name":"info","visibility":"Public","body":"((run({\"info\"})).as(String)).lines.reject do |line|\n line =~ (/^(#|$)/)\nend.map(&.split(':', 2)).to_h"}},{"html_id":"json-instance-method","name":"json","doc":"Return a `Redis::JSON` instance that wraps the current `Redis::Client` or\n`Redis::Cluster`.","summary":"

    Return a Redis::JSON instance that wraps the current Redis::Client or Redis::Cluster.

    \n

    EXPERIMENTAL Support for the RedisJSON module is still under development and subject to change.

    ","abstract":false,"location":{"filename":"src/json.cr","line_number":345,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L345"},"def":{"name":"json","visibility":"Public","body":"JSON.new(self)"}},{"html_id":"keys(pattern=\"*\")-instance-method","name":"keys","doc":"Get the keys whose names follow the specified glob pattern. If a pattern\nis not specified, it will return all keys by default. Be careful when\nusing this command on Redis servers with a lot of traffic and millions\nof keys.\n\n```\nredis.keys # => [\"foo\", \"bar\", \"baz\"]\nredis.keys(\"f*\") # => [\"foo\"]\nredis.keys(\"b*\") # => [\"bar\", \"baz\"]\n```","summary":"

    Get the keys whose names follow the specified glob pattern.

    ","abstract":false,"args":[{"name":"pattern","default_value":"\"*\"","external_name":"pattern","restriction":""}],"args_string":"(pattern = \"*\")","args_html":"(pattern = "*")","location":{"filename":"src/commands.cr","line_number":39,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L39"},"def":{"name":"keys","args":[{"name":"pattern","default_value":"\"*\"","external_name":"pattern","restriction":""}],"visibility":"Public","body":"run({\"keys\", pattern})"}},{"html_id":"mget(keys:Enumerable(String))-instance-method","name":"mget","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"Enumerable(String)"}],"args_string":"(keys : Enumerable(String))","args_html":"(keys : Enumerable(String))","location":{"filename":"src/commands.cr","line_number":328,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L328"},"def":{"name":"mget","args":[{"name":"keys","external_name":"keys","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 1 + keys.size)\ncommand << \"mget\"\nkeys.each do |key|\n command << key\nend\nrun(command)\n"}},{"html_id":"mset(data:Hash(String,String))-instance-method","name":"mset","abstract":false,"args":[{"name":"data","external_name":"data","restriction":"Hash(String, String)"}],"args_string":"(data : Hash(String, String))","args_html":"(data : Hash(String, String))","location":{"filename":"src/commands.cr","line_number":336,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L336"},"def":{"name":"mset","args":[{"name":"data","external_name":"data","restriction":"Hash(String, String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 1 + data.size)\ncommand << \"mset\"\ndata.each do |key, value|\n (command << key) << value\nend\nrun(command)\n"}},{"html_id":"pexpire(key:String,ttl:Time::Span)-instance-method","name":"pexpire","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"ttl","external_name":"ttl","restriction":"Time::Span"}],"args_string":"(key : String, ttl : Time::Span)","args_html":"(key : String, ttl : Time::Span)","location":{"filename":"src/commands.cr","line_number":300,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L300"},"def":{"name":"pexpire","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"ttl","external_name":"ttl","restriction":"Time::Span"}],"visibility":"Public","body":"pexpire(key, ttl.total_milliseconds.to_i64)"}},{"html_id":"pexpire(key:String,ttl:Int)-instance-method","name":"pexpire","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"ttl","external_name":"ttl","restriction":"Int"}],"args_string":"(key : String, ttl : Int)","args_html":"(key : String, ttl : Int)","location":{"filename":"src/commands.cr","line_number":304,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L304"},"def":{"name":"pexpire","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"ttl","external_name":"ttl","restriction":"Int"}],"visibility":"Public","body":"run({\"pexpire\", key, ttl.to_s})"}},{"html_id":"pexpireat(key:String,at:Time)-instance-method","name":"pexpireat","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"at","external_name":"at","restriction":"Time"}],"args_string":"(key : String, at : Time)","args_html":"(key : String, at : Time)","location":{"filename":"src/commands.cr","line_number":312,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L312"},"def":{"name":"pexpireat","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"at","external_name":"at","restriction":"Time"}],"visibility":"Public","body":"run({\"pexpireat\", key, at.to_unix_ms.to_s})"}},{"html_id":"pttl(key:String)-instance-method","name":"pttl","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands.cr","line_number":320,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L320"},"def":{"name":"pttl","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"pttl\", key})"}},{"html_id":"publish(channel:String,message:String)-instance-method","name":"publish","abstract":false,"args":[{"name":"channel","external_name":"channel","restriction":"String"},{"name":"message","external_name":"message","restriction":"String"}],"args_string":"(channel : String, message : String)","args_html":"(channel : String, message : String)","location":{"filename":"src/commands.cr","line_number":191,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L191"},"def":{"name":"publish","args":[{"name":"channel","external_name":"channel","restriction":"String"},{"name":"message","external_name":"message","restriction":"String"}],"visibility":"Public","body":"run({\"publish\", channel, message})"}},{"html_id":"run(command)-instance-method","name":"run","doc":"Execute the given command and return the result from the server. Commands\nmust be an `Enumerable` and its `size` method must be re-entrant.\n\n```\nrun({\"set\", \"foo\", \"bar\"})\n```","summary":"

    Execute the given command and return the result from the server.

    ","abstract":true,"args":[{"name":"command","external_name":"command","restriction":""}],"args_string":"(command)","args_html":"(command)","location":{"filename":"src/commands.cr","line_number":27,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L27"},"def":{"name":"run","args":[{"name":"command","external_name":"command","restriction":""}],"visibility":"Public","body":""}},{"html_id":"scan(cursor:String=\"0\",match:String|Nil=nil,count:String|Int|Nil=nil,type:String|Nil=nil)-instance-method","name":"scan","abstract":false,"args":[{"name":"cursor","default_value":"\"0\"","external_name":"cursor","restriction":"String"},{"name":"match","default_value":"nil","external_name":"match","restriction":"String | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"},{"name":"type","default_value":"nil","external_name":"type","restriction":"String | ::Nil"}],"args_string":"(cursor : String = \"0\", match : String | Nil = nil, count : String | Int | Nil = nil, type : String | Nil = nil)","args_html":"(cursor : String = "0", match : String | Nil = nil, count : String | Int | Nil = nil, type : String | Nil = nil)","location":{"filename":"src/commands.cr","line_number":181,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L181"},"def":{"name":"scan","args":[{"name":"cursor","default_value":"\"0\"","external_name":"cursor","restriction":"String"},{"name":"match","default_value":"nil","external_name":"match","restriction":"String | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"},{"name":"type","default_value":"nil","external_name":"type","restriction":"String | ::Nil"}],"visibility":"Public","body":"command = {\"scan\", cursor}\nif match\n command = command + {\"match\", match}\nend\nif count\n command = command + {\"count\", count.to_s}\nend\nif type\n command = command + {\"type\", type}\nend\nrun(command)\n"}},{"html_id":"script_exists(shas:Enumerable(String))-instance-method","name":"script_exists","doc":"Return an array where each entry is `1` if the corresponding entry in the\nlist of `shas` exists or `0` if it does not.","summary":"

    Return an array where each entry is 1 if the corresponding entry in the list of shas exists or 0 if it does not.

    ","abstract":false,"args":[{"name":"shas","external_name":"shas","restriction":"Enumerable(String)"}],"args_string":"(shas : Enumerable(String))","args_html":"(shas : Enumerable(String))","location":{"filename":"src/commands.cr","line_number":229,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L229"},"def":{"name":"script_exists","args":[{"name":"shas","external_name":"shas","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + keys.size)\n(command << \"script\") << \"exists\"\nshas.each do |sha|\n command << sha\nend\nrun(command)\n"}},{"html_id":"script_exists(*shas:String)-instance-method","name":"script_exists","doc":"Return an array where each entry is `1` if the corresponding entry in the\nlist of `shas` exists or `0` if it does not.","summary":"

    Return an array where each entry is 1 if the corresponding entry in the list of shas exists or 0 if it does not.

    ","abstract":false,"args":[{"name":"shas","external_name":"shas","restriction":"String"}],"args_string":"(*shas : String)","args_html":"(*shas : String)","location":{"filename":"src/commands.cr","line_number":224,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L224"},"def":{"name":"script_exists","args":[{"name":"shas","external_name":"shas","restriction":"String"}],"splat_index":0,"visibility":"Public","body":"script_exists(shas)"}},{"html_id":"script_flush(mode:ScriptFlushMode)-instance-method","name":"script_flush","doc":"Flush the Lua scripts cache, see [the official docs](https://redis.io/commands/script-flush/).\n\n```\nredis.script_flush :async # Flush scripts asynchronously\nredis.script_flush :sync # Flush scripts immediately\n```","summary":"

    Flush the Lua scripts cache, see the official docs.

    ","abstract":false,"args":[{"name":"mode","external_name":"mode","restriction":"ScriptFlushMode"}],"args_string":"(mode : ScriptFlushMode)","args_html":"(mode : ScriptFlushMode)","location":{"filename":"src/commands.cr","line_number":213,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L213"},"def":{"name":"script_flush","args":[{"name":"mode","external_name":"mode","restriction":"ScriptFlushMode"}],"visibility":"Public","body":"run({\"script\", \"flush\", mode.to_s})"}},{"html_id":"script_kill-instance-method","name":"script_kill","doc":"Kill the currently executing `eval` script, assuming no write operation\nwas yet performed by the script.","summary":"

    Kill the currently executing #eval script, assuming no write operation was yet performed by the script.

    ","abstract":false,"location":{"filename":"src/commands.cr","line_number":239,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L239"},"def":{"name":"script_kill","visibility":"Public","body":"run({\"script\", \"kill\"})"}},{"html_id":"script_load(script:String)-instance-method","name":"script_load","doc":"Preload a Lua script, returning the SHA of the script to pass to `evalsha`.\n```\nsha = redis.script_load(<<-LUA)\n return \"Hello \" + ARGV[1]\nLUA\n\nredis.evalsha(sha, args: [\"world\"]) # => \"Hello world\"\n```","summary":"

    Preload a Lua script, returning the SHA of the script to pass to #evalsha.

    ","abstract":false,"args":[{"name":"script","external_name":"script","restriction":"String"}],"args_string":"(script : String)","args_html":"(script : String)","location":{"filename":"src/commands.cr","line_number":203,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L203"},"def":{"name":"script_load","args":[{"name":"script","external_name":"script","restriction":"String"}],"visibility":"Public","body":"run({\"script\", \"load\", script})"}},{"html_id":"set(key:String,value:String,ex:String|Int|Nil=nil,px:String|Int|Nil=nil,nx=false,xx=false,keepttl=false)-instance-method","name":"set","doc":"Set a given key to a given value, optionally specifying time-to-live (TTL).\n\n- `ex`: TTL in seconds (mnemonic: \"ex\" = \"expiration\")\n- `px`: TTL in milliseconds\n- `nx`: Only set this key if it does not exist (mnemonic: \"nx\" = it does \"not exist\")\n- `xx`: only set this key if it does exist (mnemonic: \"xx\" = it \"exists exists\" — look, I don't make the rules)\n- `keepttl`: If there is a TTL already set on the key, retain that TTL instead of overwriting it\n\n```\nredis.set \"foo\", \"bar\", ex: 1\nredis.get(\"foo\") # => \"bar\"\nsleep 1.second\nredis.get(\"foo\") # => nil\n```","summary":"

    Set a given key to a given value, optionally specifying time-to-live (TTL).

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"value","external_name":"value","restriction":"String"},{"name":"ex","default_value":"nil","external_name":"ex","restriction":"String | Int | ::Nil"},{"name":"px","default_value":"nil","external_name":"px","restriction":"String | Int | Nil"},{"name":"nx","default_value":"false","external_name":"nx","restriction":""},{"name":"xx","default_value":"false","external_name":"xx","restriction":""},{"name":"keepttl","default_value":"false","external_name":"keepttl","restriction":""}],"args_string":"(key : String, value : String, ex : String | Int | Nil = nil, px : String | Int | Nil = nil, nx = false, xx = false, keepttl = false)","args_html":"(key : String, value : String, ex : String | Int | Nil = nil, px : String | Int | Nil = nil, nx = false, xx = false, keepttl = false)","location":{"filename":"src/commands.cr","line_number":57,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L57"},"def":{"name":"set","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"value","external_name":"value","restriction":"String"},{"name":"ex","default_value":"nil","external_name":"ex","restriction":"String | Int | ::Nil"},{"name":"px","default_value":"nil","external_name":"px","restriction":"String | Int | Nil"},{"name":"nx","default_value":"false","external_name":"nx","restriction":""},{"name":"xx","default_value":"false","external_name":"xx","restriction":""},{"name":"keepttl","default_value":"false","external_name":"keepttl","restriction":""}],"visibility":"Public","body":"command = {\"set\", key, value}\nif ex\n command = command + {\"ex\", ex.to_s}\nend\nif px\n command = command + {\"px\", px.to_s}\nend\nif nx\n command = command + {\"nx\"}\nend\nif xx\n command = command + {\"xx\"}\nend\nif keepttl\n command = command + {\"keepttl\"}\nend\nrun(command)\n"}},{"html_id":"set(key,value,ex:Time,nx=false,xx=false,keepttl=false)-instance-method","name":"set","abstract":false,"args":[{"name":"key","external_name":"key","restriction":""},{"name":"value","external_name":"value","restriction":""},{"name":"ex","external_name":"ex","restriction":"Time"},{"name":"nx","default_value":"false","external_name":"nx","restriction":""},{"name":"xx","default_value":"false","external_name":"xx","restriction":""},{"name":"keepttl","default_value":"false","external_name":"keepttl","restriction":""}],"args_string":"(key, value, ex : Time, nx = false, xx = false, keepttl = false)","args_html":"(key, value, ex : Time, nx = false, xx = false, keepttl = false)","location":{"filename":"src/commands.cr","line_number":68,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L68"},"def":{"name":"set","args":[{"name":"key","external_name":"key","restriction":""},{"name":"value","external_name":"value","restriction":""},{"name":"ex","external_name":"ex","restriction":"Time"},{"name":"nx","default_value":"false","external_name":"nx","restriction":""},{"name":"xx","default_value":"false","external_name":"xx","restriction":""},{"name":"keepttl","default_value":"false","external_name":"keepttl","restriction":""}],"visibility":"Public","body":"set(key, value, ex: ex - Time.utc, nx: nx, xx: xx, keepttl: keepttl)"}},{"html_id":"set(key,value,ex:Time::Span,nx=false,xx=false,keepttl=false)-instance-method","name":"set","abstract":false,"args":[{"name":"key","external_name":"key","restriction":""},{"name":"value","external_name":"value","restriction":""},{"name":"ex","external_name":"ex","restriction":"Time::Span"},{"name":"nx","default_value":"false","external_name":"nx","restriction":""},{"name":"xx","default_value":"false","external_name":"xx","restriction":""},{"name":"keepttl","default_value":"false","external_name":"keepttl","restriction":""}],"args_string":"(key, value, ex : Time::Span, nx = false, xx = false, keepttl = false)","args_html":"(key, value, ex : Time::Span, nx = false, xx = false, keepttl = false)","location":{"filename":"src/commands.cr","line_number":72,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L72"},"def":{"name":"set","args":[{"name":"key","external_name":"key","restriction":""},{"name":"value","external_name":"value","restriction":""},{"name":"ex","external_name":"ex","restriction":"Time::Span"},{"name":"nx","default_value":"false","external_name":"nx","restriction":""},{"name":"xx","default_value":"false","external_name":"xx","restriction":""},{"name":"keepttl","default_value":"false","external_name":"keepttl","restriction":""}],"visibility":"Public","body":"set(key, value, px: ex.total_milliseconds.to_i64, nx: nx, xx: xx, keepttl: keepttl)"}},{"html_id":"ts-instance-method","name":"ts","doc":"Return a `Redis::TimeSeries` that wraps the current `Redis::Client` or\n`Redis::Cluster`.","summary":"

    Return a Redis::TimeSeries that wraps the current Redis::Client or Redis::Cluster.

    ","abstract":false,"location":{"filename":"src/time_series.cr","line_number":444,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L444"},"def":{"name":"ts","visibility":"Public","body":"TimeSeries.new(self)"}},{"html_id":"ttl(key:String)-instance-method","name":"ttl","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands.cr","line_number":316,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L316"},"def":{"name":"ttl","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"ttl\", key})"}},{"html_id":"type(key:String)-instance-method","name":"type","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands.cr","line_number":324,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L324"},"def":{"name":"type","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"type\", key})"}},{"html_id":"unlink(keys:Enumerable(String))-instance-method","name":"unlink","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"Enumerable(String)"}],"args_string":"(keys : Enumerable(String))","args_html":"(keys : Enumerable(String))","location":{"filename":"src/commands.cr","line_number":160,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L160"},"def":{"name":"unlink","args":[{"name":"keys","external_name":"keys","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 1 + keys.size)\ncommand << \"unlink\"\nkeys.each do |key|\n command << key\nend\nrun(command)\n"}},{"html_id":"unlink(*keys:String)-instance-method","name":"unlink","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"String"}],"args_string":"(*keys : String)","args_html":"(*keys : String)","location":{"filename":"src/commands.cr","line_number":156,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L156"},"def":{"name":"unlink","args":[{"name":"keys","external_name":"keys","restriction":"String"}],"splat_index":0,"visibility":"Public","body":"run({\"unlink\"} + keys)"}},{"html_id":"wait(numreplicasreplica_count:Int|String,timeout:Time::Span)-instance-method","name":"wait","abstract":false,"args":[{"name":"replica_count","external_name":"numreplicas","restriction":"Int | String"},{"name":"timeout","external_name":"timeout","restriction":"Time::Span"}],"args_string":"(numreplicas replica_count : Int | String, timeout : Time::Span)","args_html":"(numreplicas replica_count : Int | String, timeout : Time::Span)","location":{"filename":"src/commands.cr","line_number":366,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L366"},"def":{"name":"wait","args":[{"name":"replica_count","external_name":"numreplicas","restriction":"Int | String"},{"name":"timeout","external_name":"timeout","restriction":"Time::Span"}],"visibility":"Public","body":"wait(replica_count, timeout.total_seconds.ceil.to_i)"}},{"html_id":"wait(numreplicasreplica_count:Int|String,timeout:Int|String)-instance-method","name":"wait","abstract":false,"args":[{"name":"replica_count","external_name":"numreplicas","restriction":"Int | String"},{"name":"timeout","external_name":"timeout","restriction":"Int | String"}],"args_string":"(numreplicas replica_count : Int | String, timeout : Int | String)","args_html":"(numreplicas replica_count : Int | String, timeout : Int | String)","location":{"filename":"src/commands.cr","line_number":370,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L370"},"def":{"name":"wait","args":[{"name":"replica_count","external_name":"numreplicas","restriction":"Int | String"},{"name":"timeout","external_name":"timeout","restriction":"Int | String"}],"visibility":"Public","body":"run({\"wait\", replica_count.to_s, timeout.to_s})"}}],"types":[{"html_id":"redis/Redis/Commands/EmptyEnumerable","path":"Redis/Commands/EmptyEnumerable.html","kind":"struct","full_name":"Redis::Commands::EmptyEnumerable","name":"EmptyEnumerable","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/commands.cr","line_number":281,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L281"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"redis/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"}],"namespace":{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},"doc":"This type exists to avoid allocation of an array on the heap.","summary":"

    This type exists to avoid allocation of an array on the heap.

    ","constructors":[{"html_id":"new-class-method","name":"new","abstract":false,"location":{"filename":"src/commands.cr","line_number":281,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L281"},"def":{"name":"new","visibility":"Public","body":"x = allocate\nif x.responds_to?(:finalize)\n ::GC.add_finalizer(x)\nend\nx\n"}}],"instance_methods":[{"html_id":"each(&block:String->)-instance-method","name":"each","doc":"Must yield this collection's elements to the block.","summary":"

    Must yield this collection's elements to the block.

    ","abstract":false,"location":{"filename":"src/commands.cr","line_number":284,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L284"},"def":{"name":"each","yields":1,"block_arity":1,"block_arg":{"name":"block","external_name":"block","restriction":"(String ->)"},"visibility":"Public","body":""}},{"html_id":"initialize-instance-method","name":"initialize","abstract":false,"location":{"filename":"src/commands.cr","line_number":281,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L281"},"def":{"name":"initialize","visibility":"Public","body":""}},{"html_id":"size-instance-method","name":"size","doc":"Returns the number of elements in the collection.\n\n```\n[1, 2, 3, 4].size # => 4\n```","summary":"

    Returns the number of elements in the collection.

    ","abstract":false,"location":{"filename":"src/commands.cr","line_number":287,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L287"},"def":{"name":"size","visibility":"Public","body":"0"}}]},{"html_id":"redis/Redis/Commands/Hash","path":"Redis/Commands/Hash.html","kind":"module","full_name":"Redis::Commands::Hash","name":"Hash","abstract":false,"locations":[{"filename":"src/commands/hash.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/hash.cr#L1"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"namespace":{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},"instance_methods":[{"html_id":"hdel(key:String,fields:Enumerable(String))-instance-method","name":"hdel","doc":"Delete one or more `fields` from the given `key`, returning the number of\ndeleted fields.\n\n```\nfields = %w[pending nonexistent-field]\nredis.hdel \"my-hash\", fields\n# => 1\n```","summary":"

    Delete one or more fields from the given key, returning the number of deleted fields.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"Enumerable(String)"}],"args_string":"(key : String, fields : Enumerable(String))","args_html":"(key : String, fields : Enumerable(String))","location":{"filename":"src/commands/hash.cr","line_number":23,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/hash.cr#L23"},"def":{"name":"hdel","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + fields.size)\n(command << \"hdel\") << key\nfields.each do |key|\n command << key\nend\nrun(command)\n"}},{"html_id":"hdel(key:String,*fields:String)-instance-method","name":"hdel","doc":"Delete one or more `fields` from the given `key`, returning the number of\ndeleted fields.\n\n```\nredis.hdel \"my-hash\",\n \"pending\",\n \"nonexistent-field\"\n# => 1\n```","summary":"

    Delete one or more fields from the given key, returning the number of deleted fields.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"String"}],"args_string":"(key : String, *fields : String)","args_html":"(key : String, *fields : String)","location":{"filename":"src/commands/hash.cr","line_number":11,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/hash.cr#L11"},"def":{"name":"hdel","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"String"}],"splat_index":1,"visibility":"Public","body":"run({\"hdel\", key} + fields)"}},{"html_id":"hget(key:String,field:String)-instance-method","name":"hget","doc":"Return the value of `field` for `key`, if both exist.\n\n```\nredis.hset \"person:jamie\", email: \"jamie@example.com\"\nredis.hget \"person:jamie\", \"email\" # => \"jamie@example.com\"\nredis.hget \"person:jamie\", \"password\" # => nil\n```","summary":"

    Return the value of field for key, if both exist.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"field","external_name":"field","restriction":"String"}],"args_string":"(key : String, field : String)","args_html":"(key : String, field : String)","location":{"filename":"src/commands/hash.cr","line_number":38,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/hash.cr#L38"},"def":{"name":"hget","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"field","external_name":"field","restriction":"String"}],"visibility":"Public","body":"run({\"hget\", key, field})"}},{"html_id":"hgetall(key:String)-instance-method","name":"hgetall","doc":"Return the entire hash stored at `key` as an `Array`\n\n```\nredis.hset \"person:jamie\", email: \"jamie@example.com\", name: \"Jamie\"\nredis.hgetall \"person:jamie\"\n# => [\"email\", \"jamie@example.com\", \"name\", \"Jamie\"]\n```","summary":"

    Return the entire hash stored at key as an Array

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands/hash.cr","line_number":49,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/hash.cr#L49"},"def":{"name":"hgetall","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"hgetall\", key})"}},{"html_id":"hincrby(key:String,field:String,increment:Int|String)-instance-method","name":"hincrby","doc":"Increment the numeric value for `field` in the hash stored in `key` by\n`increment`, returning the new value.\n\n```\nid = 1234\nredis.hincrby \"posts:#{id}\", \"likes\", 1 # => 1\nredis.hincrby \"posts:#{id}\", \"likes\", 1 # => 2\n```","summary":"

    Increment the numeric value for field in the hash stored in key by increment, returning the new value.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"field","external_name":"field","restriction":"String"},{"name":"increment","external_name":"increment","restriction":"Int | String"}],"args_string":"(key : String, field : String, increment : Int | String)","args_html":"(key : String, field : String, increment : Int | String)","location":{"filename":"src/commands/hash.cr","line_number":169,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/hash.cr#L169"},"def":{"name":"hincrby","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"field","external_name":"field","restriction":"String"},{"name":"increment","external_name":"increment","restriction":"Int | String"}],"visibility":"Public","body":"run({\"hincrby\", key, field, increment.to_s})"}},{"html_id":"hmget(key:String,fields:Enumerable(String))-instance-method","name":"hmget","doc":"Return the values for `fields` in `key` as an `Array`\n\n```\nredis.hset \"person:jamie\", email: \"jamie@example.com\", name: \"Jamie\"\nredis.hmget \"person:jamie\", %w[email name] # => [\"jamie@example.com\", \"Jamie\"]\nredis.hmget \"person:jamie\", %w[nonexistent fake-field] # => [nil, nil]\n```","summary":"

    Return the values for fields in key as an Array

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"Enumerable(String)"}],"args_string":"(key : String, fields : Enumerable(String))","args_html":"(key : String, fields : Enumerable(String))","location":{"filename":"src/commands/hash.cr","line_number":71,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/hash.cr#L71"},"def":{"name":"hmget","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + fields.size)\n(command << \"hmget\") << key\nfields.each do |field|\n command << field\nend\nrun(command)\n"}},{"html_id":"hmget(key:String,*fields:String)-instance-method","name":"hmget","doc":"Return the values for `fields` in `key` as an `Array`\n\n```\nredis.hset \"person:jamie\", email: \"jamie@example.com\", name: \"Jamie\"\nredis.hmget \"person:jamie\", \"email\", \"name\" # => [\"jamie@example.com\", \"Jamie\"]\nredis.hmget \"person:jamie\", \"nonexistent\", \"fake-field\" # => [nil, nil]\n```","summary":"

    Return the values for fields in key as an Array

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"String"}],"args_string":"(key : String, *fields : String)","args_html":"(key : String, *fields : String)","location":{"filename":"src/commands/hash.cr","line_number":60,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/hash.cr#L60"},"def":{"name":"hmget","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"String"}],"splat_index":1,"visibility":"Public","body":"run({\"hmget\", key} + fields)"}},{"html_id":"hmset(key:String,data:::Hash(String,String))-instance-method","name":"hmset","summary":"

    DEPRECATED The Redis HMSET command is deprecated. Use HSET instead. This method will be removed in v1.0.0 of this shard. See https://redis.io/commands/hmset/

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"data","external_name":"data","restriction":"::Hash(String, String)"}],"args_string":"(key : String, data : ::Hash(String, String))","args_html":"(key : String, data : ::Hash(String, String))","location":{"filename":"src/commands/hash.cr","line_number":201,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/hash.cr#L201"},"def":{"name":"hmset","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"data","external_name":"data","restriction":"::Hash(String, String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + data.size)\n(command << \"hmset\") << key\ndata.each do |key, value|\n (command << key) << value\nend\nrun(command)\n"}},{"html_id":"hscan(key:String,cursor:String,*,matchpattern:String|Nil=nil,count:String|Int|Nil=nil)-instance-method","name":"hscan","doc":"Execute the `HSCAN` command to return a subset of keys in the hash stored at\n`key`, allowing you to iterate through the keys in the hash without blocking\nthe Redis server for too long at a time.\n\nNOTE: You probably want to use `Redis::Client#hscan_each` instead of using\nthis method directly.\n\n```\ncursor = \"\"\nuntil cursor == \"0\"\n response = redis.hscan(key, cursor)\n cursor, fields = response.as(Array)\n cursor = cursor.as(String)\n fields.as(Array).each do |field|\n # Do something with that hash field...\n end\nend\n```","summary":"

    Execute the HSCAN command to return a subset of keys in the hash stored at key, allowing you to iterate through the keys in the hash without blocking the Redis server for too long at a time.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"cursor","external_name":"cursor","restriction":"String"},{"name":"","external_name":"","restriction":""},{"name":"pattern","default_value":"nil","external_name":"match","restriction":"String | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"}],"args_string":"(key : String, cursor : String, *, match pattern : String | Nil = nil, count : String | Int | Nil = nil)","args_html":"(key : String, cursor : String, *, match pattern : String | Nil = nil, count : String | Int | Nil = nil)","location":{"filename":"src/commands/hash.cr","line_number":191,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/hash.cr#L191"},"def":{"name":"hscan","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"cursor","external_name":"cursor","restriction":"String"},{"name":"","external_name":"","restriction":""},{"name":"pattern","default_value":"nil","external_name":"match","restriction":"String | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"}],"splat_index":2,"visibility":"Public","body":"command = Array(String).new(initial_capacity: 7)\n((command << \"hscan\") << key) << cursor.to_s\nif pattern\n (command << \"match\") << pattern\nend\nif count\n (command << \"count\") << count.to_s\nend\nrun(command)\n"}},{"html_id":"hset(key:String,fields:Enumerable(String))-instance-method","name":"hset","doc":"Set the values for `fields` in the hash stored in `key`, returning the\nnumber of fields created (not updated)\n\nNOTE: `fields` _MUST_ contain an even number of elements\n\n```\nredis.hset \"person:jamie\", %w[email jamie@example.com name Jamie] # => 2\nredis.hset \"person:jamie\", %w[email jamie@example.dev admin true] # => 1\nredis.hset \"person:jamie\", %w[admin false] # => 0\n```","summary":"

    Set the values for fields in the hash stored in key, returning the number of fields created (not updated)

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"Enumerable(String)"}],"args_string":"(key : String, fields : Enumerable(String))","args_html":"(key : String, fields : Enumerable(String))","location":{"filename":"src/commands/hash.cr","line_number":120,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/hash.cr#L120"},"def":{"name":"hset","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + fields.size)\n(command << \"hset\") << key\nfields.each do |field|\n command << field\nend\nrun(command)\n"}},{"html_id":"hset(key:String,fields:::Hash(String,String))-instance-method","name":"hset","doc":"Set the values for `fields` in the hash stored in `key`, returning the\nnumber of fields created (not updated)\n\n```\nredis.hset \"person:jamie\", {\"email\" => \"jamie@example.com\", \"name\" => \"Jamie\"} # => 2\nredis.hset \"person:jamie\", {\"email\" => \"jamie@example.dev\", \"admin\" => \"true\"} # => 1\nredis.hset \"person:jamie\", {\"admin\" => \"false\"} # => 0\n```","summary":"

    Set the values for fields in the hash stored in key, returning the number of fields created (not updated)

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"::Hash(String, String)"}],"args_string":"(key : String, fields : ::Hash(String, String))","args_html":"(key : String, fields : ::Hash(String, String))","location":{"filename":"src/commands/hash.cr","line_number":137,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/hash.cr#L137"},"def":{"name":"hset","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"::Hash(String, String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + (2 * fields.size))\n(command << \"hset\") << key\nfields.each do |key, value|\n (command << key) << value\nend\nrun(command)\n"}},{"html_id":"hset(key:String,*fields:String)-instance-method","name":"hset","doc":"Set the values for `fields` in the hash stored in `key`, returning the\nnumber of fields created (not updated).\n\nNOTE: You _MUST_ pass an even number of arguments to `fields`\n\n```\nredis.hset \"person:jamie\", \"email\", \"jamie@example.com\", \"name\", \"Jamie\" # => 2\nredis.hset \"person:jamie\", \"email\", \"jamie@example.dev\", \"admin\", \"true\" # => 1\nredis.hset \"person:jamie\", \"admin\", \"false\" # => 0\n```","summary":"

    Set the values for fields in the hash stored in key, returning the number of fields created (not updated).

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"String"}],"args_string":"(key : String, *fields : String)","args_html":"(key : String, *fields : String)","location":{"filename":"src/commands/hash.cr","line_number":106,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/hash.cr#L106"},"def":{"name":"hset","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"String"}],"splat_index":1,"visibility":"Public","body":"run({\"hset\", key} + fields)"}},{"html_id":"hset(key:String,**fields:String)-instance-method","name":"hset","doc":"Set the values for `fields` in the hash stored in `key`, returning the\nnumber of fields created (not updated)\n\n```\nredis.hset \"person:jamie\", email: \"jamie@example.com\", name: \"Jamie\" # => 2\nredis.hset \"person:jamie\", email: \"jamie@example.dev\", admin: \"true\" # => 1\nredis.hset \"person:jamie\", admin: \"false\" # => 0\n```","summary":"

    Set the values for fields in the hash stored in key, returning the number of fields created (not updated)

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String, **fields : String)","args_html":"(key : String, **fields : String)","location":{"filename":"src/commands/hash.cr","line_number":87,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/hash.cr#L87"},"def":{"name":"hset","args":[{"name":"key","external_name":"key","restriction":"String"}],"double_splat":{"name":"fields","external_name":"fields","restriction":"String"},"visibility":"Public","body":"hash = ::Hash(String, String).new(initial_capacity: fields.size)\nfields.each do |key, value|\n hash[key.to_s] = value\nend\nhset(key, hash)\n"}},{"html_id":"hsetnx(key:String,field:String,value:String)-instance-method","name":"hsetnx","doc":"Set `field` in the hash stored in `key` to `value` if and only if it does not exist. Returns `1` if the field was set, `0` if it was not.\n\n```\nid = 1234\n\nredis.hsetnx \"job:#{id}\", \"locked_at\", Time.utc.to_rfc3339 # => 1\n# Returned 1, lock succeeds\n\nredis.hsetnx \"job:#{id}\", \"locked_at\", Time.utc.to_rfc3339 # => 0\n# Returned 0, lock did not succeed, so the job is already being processed\n```","summary":"

    Set field in the hash stored in key to value if and only if it does not exist.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"field","external_name":"field","restriction":"String"},{"name":"value","external_name":"value","restriction":"String"}],"args_string":"(key : String, field : String, value : String)","args_html":"(key : String, field : String, value : String)","location":{"filename":"src/commands/hash.cr","line_number":157,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/hash.cr#L157"},"def":{"name":"hsetnx","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"field","external_name":"field","restriction":"String"},{"name":"value","external_name":"value","restriction":"String"}],"visibility":"Public","body":"run({\"hsetnx\", key, field, value})"}}]},{"html_id":"redis/Redis/Commands/List","path":"Redis/Commands/List.html","kind":"module","full_name":"Redis::Commands::List","name":"List","abstract":false,"locations":[{"filename":"src/commands/list.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L1"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"namespace":{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},"instance_methods":[{"html_id":"blpop(keys:Enumerable(String),timeout:Time::Span)-instance-method","name":"blpop","doc":"Remove and return an element from the end of the given list. If the list\nis empty or the key does not exist, this method waits the specified amount\nof time for an element to be added to it by another connection. If the\nelement *is* added by another connection within that amount of time, this\nmethod will return it immediately. If it *is not*, then this method returns\n`nil`.\n\n```\nkeys = %w[foo bar]\nredis.rpush \"foo\", \"first\"\nspawn do\n sleep 100.milliseconds\n redis.rpush \"foo\", \"second\"\nend\nredis.blpop keys, 1.second # => \"first\"\nredis.blpop keys, 1.second # => \"second\" (after 100 milliseconds)\nredis.blpop keys, 1.second # => nil (after 1 second)\n```","summary":"

    Remove and return an element from the end of the given list.

    ","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"Enumerable(String)"},{"name":"timeout","external_name":"timeout","restriction":"Time::Span"}],"args_string":"(keys : Enumerable(String), timeout : Time::Span)","args_html":"(keys : Enumerable(String), timeout : Time::Span)","location":{"filename":"src/commands/list.cr","line_number":128,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L128"},"def":{"name":"blpop","args":[{"name":"keys","external_name":"keys","restriction":"Enumerable(String)"},{"name":"timeout","external_name":"timeout","restriction":"Time::Span"}],"visibility":"Public","body":"command = Array(String).new(2 + keys.size)\ncommand << \"blpop\"\ncommand.concat(keys)\ncommand << timeout.total_seconds.to_i.to_s\nrun(command)\n"}},{"html_id":"blpop(*keys:String,timeout:Time::Span)-instance-method","name":"blpop","doc":"Remove and return an element from the end of the given list. If the list\nis empty or the key does not exist, this method waits the specified amount\nof time for an element to be added to it by another connection. If the\nelement *is* added by another connection within that amount of time, this\nmethod will return it immediately. If it *is not*, then this method returns\n`nil`.\n\n```\nredis.rpush \"foo\", \"first\"\nspawn do\n sleep 100.milliseconds\n redis.rpush \"foo\", \"second\"\nend\nredis.blpop \"foo\", 1.second # => \"first\"\nredis.blpop \"foo\", 1.second # => \"second\" (after 100 milliseconds)\nredis.blpop \"foo\", 1.second # => nil (after 1 second)\n```","summary":"

    Remove and return an element from the end of the given list.

    ","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"Time::Span"}],"args_string":"(*keys : String, timeout : Time::Span)","args_html":"(*keys : String, timeout : Time::Span)","location":{"filename":"src/commands/list.cr","line_number":154,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L154"},"def":{"name":"blpop","args":[{"name":"keys","external_name":"keys","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"Time::Span"}],"splat_index":0,"visibility":"Public","body":"blpop(*keys, timeout: timeout.total_seconds.to_i.to_s)"}},{"html_id":"blpop(*keys:String,timeout:Int|Float)-instance-method","name":"blpop","doc":"Remove and return an element from the end of the given list. If the list\nis empty or the key does not exist, this method waits the specified number\nof seconds for an element to be added to it by another connection. If the\nelement *is* added by another connection within that number of seconds,\nthis method will return it immediately. If it *is not*, then this method\nreturns `nil`.\n\n```\nredis.lpush \"foo\", \"first\"\nspawn do\n sleep 100.milliseconds\n redis.lpush \"foo\", \"second\"\nend\nredis.blpop \"foo\", 1 # => \"first\"\nredis.blpop \"foo\", 1 # => \"second\" (after 100 milliseconds)\nredis.blpop \"foo\", 1 # => nil (after 1 second)\n```","summary":"

    Remove and return an element from the end of the given list.

    ","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"Int | Float"}],"args_string":"(*keys : String, timeout : Int | Float)","args_html":"(*keys : String, timeout : Int | Float)","location":{"filename":"src/commands/list.cr","line_number":175,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L175"},"def":{"name":"blpop","args":[{"name":"keys","external_name":"keys","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"Int | Float"}],"splat_index":0,"visibility":"Public","body":"if timeout == timeout.to_i\n timeout = timeout.to_i\nend\nblpop(*keys, timeout: timeout.to_s)\n"}},{"html_id":"blpop(*keys:String,timeout:String)-instance-method","name":"blpop","doc":"Remove and return an element from the end of the given list. If the list\nis empty or the key does not exist, this method waits the specified number\nof seconds for an element to be added to it by another connection. If the\nelement *is* added by another connection within that number of seconds,\nthis method will return it immediately. If it *is not*, then this method\nreturns `nil`.\n\n```\nredis.lpush \"foo\", \"first\"\nspawn do\n sleep 100.milliseconds\n redis.lpush \"foo\", \"second\"\nend\nredis.blpop \"foo\", \"1\" # => \"first\"\nredis.blpop \"foo\", \"1\" # => \"second\" (after 100 milliseconds)\nredis.blpop \"foo\", \"1\" # => nil (after 1 second)\n```","summary":"

    Remove and return an element from the end of the given list.

    ","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"String"}],"args_string":"(*keys : String, timeout : String)","args_html":"(*keys : String, timeout : String)","location":{"filename":"src/commands/list.cr","line_number":197,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L197"},"def":{"name":"blpop","args":[{"name":"keys","external_name":"keys","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"String"}],"splat_index":0,"visibility":"Public","body":"run(({\"blpop\"} + keys) + {timeout})"}},{"html_id":"brpop(keys:Enumerable(String),timeout:Int)-instance-method","name":"brpop","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"Enumerable(String)"},{"name":"timeout","external_name":"timeout","restriction":"Int"}],"args_string":"(keys : Enumerable(String), timeout : Int)","args_html":"(keys : Enumerable(String), timeout : Int)","location":{"filename":"src/commands/list.cr","line_number":316,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L316"},"def":{"name":"brpop","args":[{"name":"keys","external_name":"keys","restriction":"Enumerable(String)"},{"name":"timeout","external_name":"timeout","restriction":"Int"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + keys.size)\ncommand << \"brpop\"\nkeys.each do |key|\n command << key\nend\ncommand << timeout.to_s\nrun(command)\n"}},{"html_id":"brpop(*keys:String,timeout:Time::Span)-instance-method","name":"brpop","doc":"Remove and return an element from the end of the given list. If the list\nis empty or the key does not exist, this method waits the specified amount\nof time for an element to be added to it by another connection. If the\nelement *is* added by another connection within that amount of time, this\nmethod will return it immediately. If it *is not*, then this method returns\n`nil`.\n\n```\nredis.lpush \"foo\", \"first\"\nspawn do\n sleep 100.milliseconds\n redis.lpush \"foo\", \"second\"\nend\nredis.brpop \"foo\", 1.second # => \"first\"\nredis.brpop \"foo\", 1.second # => \"second\" (after 100 milliseconds)\nredis.brpop \"foo\", 1.second # => nil (after 1 second)\n```","summary":"

    Remove and return an element from the end of the given list.

    ","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"Time::Span"}],"args_string":"(*keys : String, timeout : Time::Span)","args_html":"(*keys : String, timeout : Time::Span)","location":{"filename":"src/commands/list.cr","line_number":218,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L218"},"def":{"name":"brpop","args":[{"name":"keys","external_name":"keys","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"Time::Span"}],"splat_index":0,"visibility":"Public","body":"brpop(*keys, timeout: timeout.total_seconds)"}},{"html_id":"brpop(*keys:String,timeout:Number)-instance-method","name":"brpop","doc":"Remove and return an element from the end of the given list. If the list\nis empty or the key does not exist, this method waits the specified number\nof seconds for an element to be added to it by another connection. If the\nelement *is* added by another connection within that number of seconds,\nthis method will return it immediately. If it *is not*, then this method\nreturns `nil`.\n\n```\nredis.lpush \"foo\", \"first\"\nspawn do\n sleep 100.milliseconds\n redis.lpush \"foo\", \"second\"\nend\nredis.brpop \"foo\", 1 # => \"first\"\nredis.brpop \"foo\", 1 # => \"second\" (after 100 milliseconds)\nredis.brpop \"foo\", 1 # => nil (after 1 second)\n```","summary":"

    Remove and return an element from the end of the given list.

    ","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"Number"}],"args_string":"(*keys : String, timeout : Number)","args_html":"(*keys : String, timeout : Number)","location":{"filename":"src/commands/list.cr","line_number":239,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L239"},"def":{"name":"brpop","args":[{"name":"keys","external_name":"keys","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"Number"}],"splat_index":0,"visibility":"Public","body":"if timeout == timeout.to_i\n timeout = timeout.to_i\nend\nbrpop(*keys, timeout: timeout.to_s)\n"}},{"html_id":"brpop(*keys:String,timeout:String)-instance-method","name":"brpop","doc":"Remove and return an element from the end of the given list. If the list\nis empty or the key does not exist, this method waits the specified number\nof seconds for an element to be added to it by another connection. If the\nelement *is* added by another connection within that number of seconds,\nthis method will return it immediately. If it *is not*, then this method\nreturns `nil`.\n\n```\nredis.lpush \"foo\", \"first\"\nspawn do\n sleep 100.milliseconds\n redis.lpush \"foo\", \"second\"\nend\nredis.brpop \"foo\", \"1\" # => \"first\"\nredis.brpop \"foo\", \"1\" # => \"second\" (after 100 milliseconds)\nredis.brpop \"foo\", \"1\" # => nil (after 1 second)\n```","summary":"

    Remove and return an element from the end of the given list.

    ","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"String"}],"args_string":"(*keys : String, timeout : String)","args_html":"(*keys : String, timeout : String)","location":{"filename":"src/commands/list.cr","line_number":261,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L261"},"def":{"name":"brpop","args":[{"name":"keys","external_name":"keys","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"String"}],"splat_index":0,"visibility":"Public","body":"run(({\"brpop\"} + keys) + {timeout})"}},{"html_id":"brpoplpush(source:String,destination:String,timeout:Time::Span)-instance-method","name":"brpoplpush","abstract":false,"args":[{"name":"source","external_name":"source","restriction":"String"},{"name":"destination","external_name":"destination","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"Time::Span"}],"args_string":"(source : String, destination : String, timeout : Time::Span)","args_html":"(source : String, destination : String, timeout : Time::Span)","location":{"filename":"src/commands/list.cr","line_number":328,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L328"},"def":{"name":"brpoplpush","args":[{"name":"source","external_name":"source","restriction":"String"},{"name":"destination","external_name":"destination","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"Time::Span"}],"visibility":"Public","body":"brpoplpush(source, destination, timeout.total_seconds.to_i)"}},{"html_id":"brpoplpush(source:String,destination:String,timeout:Int|String)-instance-method","name":"brpoplpush","abstract":false,"args":[{"name":"source","external_name":"source","restriction":"String"},{"name":"destination","external_name":"destination","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"Int | String"}],"args_string":"(source : String, destination : String, timeout : Int | String)","args_html":"(source : String, destination : String, timeout : Int | String)","location":{"filename":"src/commands/list.cr","line_number":332,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L332"},"def":{"name":"brpoplpush","args":[{"name":"source","external_name":"source","restriction":"String"},{"name":"destination","external_name":"destination","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"Int | String"}],"visibility":"Public","body":"run({\"brpoplpush\", source, destination, timeout.to_s})"}},{"html_id":"llen(key:String)-instance-method","name":"llen","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands/list.cr","line_number":265,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L265"},"def":{"name":"llen","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"llen\", key})"}},{"html_id":"lmove(fromsource:String,todestination:String,from_sidesource_side:Side,to_sidedestination_side:Side)-instance-method","name":"lmove","doc":"Atomically remove an item from the end of a list and insert it at the\nbeginning of another. Returns that list item. If the first list is empty,\nnothing happens and this method returns `nil`.\n\n```\nredis.del \"foo\"\nredis.lpush \"foo\", \"hello\", \"world\"\nredis.lmove \"foo\", \"bar\" # => \"hello\"\nredis.lmove \"foo\", \"bar\" # => \"world\"\nredis.lmove \"foo\", \"bar\" # => nil\n```","summary":"

    Atomically remove an item from the end of a list and insert it at the beginning of another.

    ","abstract":false,"args":[{"name":"source","external_name":"from","restriction":"String"},{"name":"destination","external_name":"to","restriction":"String"},{"name":"source_side","external_name":"from_side","restriction":"Side"},{"name":"destination_side","external_name":"to_side","restriction":"Side"}],"args_string":"(from source : String, to destination : String, from_side source_side : Side, to_side destination_side : Side)","args_html":"(from source : String, to destination : String, from_side source_side : Side, to_side destination_side : Side)","location":{"filename":"src/commands/list.cr","line_number":53,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L53"},"def":{"name":"lmove","args":[{"name":"source","external_name":"from","restriction":"String"},{"name":"destination","external_name":"to","restriction":"String"},{"name":"source_side","external_name":"from_side","restriction":"Side"},{"name":"destination_side","external_name":"to_side","restriction":"Side"}],"visibility":"Public","body":"run({\"lmove\", source, destination, source_side.to_s, destination_side.to_s})"}},{"html_id":"lpop(key:String,count:String|Nil=nil)-instance-method","name":"lpop","doc":"Remove an item from the beginning of a list, returning the item or `nil`\nif the list was empty.\n\n```\nredis.del \"my-list\" # Delete so we know it's empty\nredis.lpush \"my-list\", \"foo\"\nredis.lpop \"my-list\" # => \"foo\"\nredis.lpop \"my-list\" # => nil\n```","summary":"

    Remove an item from the beginning of a list, returning the item or nil if the list was empty.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | ::Nil"}],"args_string":"(key : String, count : String | Nil = nil)","args_html":"(key : String, count : String | Nil = nil)","location":{"filename":"src/commands/list.cr","line_number":31,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L31"},"def":{"name":"lpop","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | ::Nil"}],"visibility":"Public","body":"command = {\"lpop\", key}\nif count\n command = command + {count}\nend\nrun(command)\n"}},{"html_id":"lpush(key:String,values:Enumerable(String))-instance-method","name":"lpush","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"Enumerable(String)"}],"args_string":"(key : String, values : Enumerable(String))","args_html":"(key : String, values : Enumerable(String))","location":{"filename":"src/commands/list.cr","line_number":14,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L14"},"def":{"name":"lpush","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + values.size)\n(command << \"lpush\") << key\nvalues.each do |value|\n command << value\nend\nrun(command)\n"}},{"html_id":"lpush(key,*values:String)-instance-method","name":"lpush","doc":"Insert an item at the beginning of a list, returning the number of items\nin the list after the insert.\n\n```\nredis.del \"my-list\" # Delete so we know it's empty\nredis.lpush \"my-list\", \"foo\", \"bar\" # => 2\nredis.lpush \"my-list\", \"foo\", \"bar\" # => 4\n```","summary":"

    Insert an item at the beginning of a list, returning the number of items in the list after the insert.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":""},{"name":"values","external_name":"values","restriction":"String"}],"args_string":"(key, *values : String)","args_html":"(key, *values : String)","location":{"filename":"src/commands/list.cr","line_number":10,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L10"},"def":{"name":"lpush","args":[{"name":"key","external_name":"key","restriction":""},{"name":"values","external_name":"values","restriction":"String"}],"splat_index":1,"visibility":"Public","body":"run({\"lpush\", key} + values)"}},{"html_id":"lrange(key:String,start:String|Int,finish:String|Int)-instance-method","name":"lrange","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"start","external_name":"start","restriction":"String | Int"},{"name":"finish","external_name":"finish","restriction":"String | Int"}],"args_string":"(key : String, start : String | Int, finish : String | Int)","args_html":"(key : String, start : String | Int, finish : String | Int)","location":{"filename":"src/commands/list.cr","line_number":38,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L38"},"def":{"name":"lrange","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"start","external_name":"start","restriction":"String | Int"},{"name":"finish","external_name":"finish","restriction":"String | Int"}],"visibility":"Public","body":"run({\"lrange\", key, start.to_s, finish.to_s})"}},{"html_id":"lrem(key:String,count:Int,value:String)-instance-method","name":"lrem","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"count","external_name":"count","restriction":"Int"},{"name":"value","external_name":"value","restriction":"String"}],"args_string":"(key : String, count : Int, value : String)","args_html":"(key : String, count : Int, value : String)","location":{"filename":"src/commands/list.cr","line_number":269,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L269"},"def":{"name":"lrem","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"count","external_name":"count","restriction":"Int"},{"name":"value","external_name":"value","restriction":"String"}],"visibility":"Public","body":"run({\"lrem\", key, count.to_s, value})"}},{"html_id":"ltrim(key:String,start:String|Int,stop:String|Int)-instance-method","name":"ltrim","doc":"Trim the list contained in `key` so that it contains only the values at the\nindices in the given range.\n\n```\nredis.rpush \"ids\", %w[0 1 2 3 4 5 6 7 8 9]\nredis.ltrim \"ids\", 1, 2\n```","summary":"

    Trim the list contained in key so that it contains only the values at the indices in the given range.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"start","external_name":"start","restriction":"String | Int"},{"name":"stop","external_name":"stop","restriction":"String | Int"}],"args_string":"(key : String, start : String | Int, stop : String | Int)","args_html":"(key : String, start : String | Int, stop : String | Int)","location":{"filename":"src/commands/list.cr","line_number":312,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L312"},"def":{"name":"ltrim","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"start","external_name":"start","restriction":"String | Int"},{"name":"stop","external_name":"stop","restriction":"String | Int"}],"visibility":"Public","body":"run({\"ltrim\", key, start.to_s, stop.to_s})"}},{"html_id":"ltrim(key:String,range:Range(String,String))-instance-method","name":"ltrim","doc":"Trim the list contained in `key` so that it contains only the values at the\nindices in the given range.\n\n```\nredis.rpush \"ids\", %w[0 1 2 3 4 5 6 7 8 9]\nstart, stop = \"1,2\".split(',')\nredis.ltrim \"ids\", start..stop\n```","summary":"

    Trim the list contained in key so that it contains only the values at the indices in the given range.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"range","external_name":"range","restriction":"Range(String, String)"}],"args_string":"(key : String, range : Range(String, String))","args_html":"(key : String, range : Range(String, String))","location":{"filename":"src/commands/list.cr","line_number":281,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L281"},"def":{"name":"ltrim","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"range","external_name":"range","restriction":"Range(String, String)"}],"visibility":"Public","body":"if range.excludes_end?\n ltrim(key, range.begin.to_i, range.end.to_i)\nelse\n ltrim(key, range.begin, range.end)\nend"}},{"html_id":"ltrim(key:String,range:Range(Int32,Int32))-instance-method","name":"ltrim","doc":"Trim the list contained in `key` so that it contains only the values at the\nindices in the given range.\n\n```\nredis.rpush \"ids\", %w[0 1 2 3 4 5 6 7 8 9]\nredis.ltrim \"ids\", 1..2\n```","summary":"

    Trim the list contained in key so that it contains only the values at the indices in the given range.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"range","external_name":"range","restriction":"Range(Int32, Int32)"}],"args_string":"(key : String, range : Range(Int32, Int32))","args_html":"(key : String, range : Range(Int32, Int32))","location":{"filename":"src/commands/list.cr","line_number":296,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L296"},"def":{"name":"ltrim","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"range","external_name":"range","restriction":"Range(Int32, Int32)"}],"visibility":"Public","body":"range_end = range.end\nif range.excludes_end?\n range_end = range_end - 1\nend\nltrim(key, range.begin, range_end)\n"}},{"html_id":"rpop(key:String)-instance-method","name":"rpop","doc":"Remove and return an element from the end of the given list. If the list\nis empty or the key does not exist, this method returns `nil`\n\n```\nredis.lpush \"foo\", \"hello\"\nredis.rpop \"foo\" # => \"hello\"\nredis.rpop \"foo\" # => nil\n```","summary":"

    Remove and return an element from the end of the given list.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands/list.cr","line_number":86,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L86"},"def":{"name":"rpop","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"rpop\", key})"}},{"html_id":"rpoplpush(source:String,destination:String)-instance-method","name":"rpoplpush","doc":"Atomically remove an item from the end of a list and insert it at the\nbeginning of another. Returns that list item. If the first list is empty,\nnothing happens and this method returns `nil`.\n\n```\nredis.del \"foo\"\nredis.lpush \"foo\", \"hello\", \"world\"\nredis.rpoplpush \"foo\", \"bar\" # => \"hello\"\nredis.rpoplpush \"foo\", \"bar\" # => \"world\"\nredis.rpoplpush \"foo\", \"bar\" # => nil\n```","summary":"

    Atomically remove an item from the end of a list and insert it at the beginning of another.

    \n

    DEPRECATED Use the #lmove method instead. See the Redis docs for more inforamtion.

    ","abstract":false,"args":[{"name":"source","external_name":"source","restriction":"String"},{"name":"destination","external_name":"destination","restriction":"String"}],"args_string":"(source : String, destination : String)","args_html":"(source : String, destination : String)","location":{"filename":"src/commands/list.cr","line_number":74,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L74"},"def":{"name":"rpoplpush","args":[{"name":"source","external_name":"source","restriction":"String"},{"name":"destination","external_name":"destination","restriction":"String"}],"visibility":"Public","body":"run({\"rpoplpush\", source, destination})"}},{"html_id":"rpush(key:String,values:Enumerable(String))-instance-method","name":"rpush","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"Enumerable(String)"}],"args_string":"(key : String, values : Enumerable(String))","args_html":"(key : String, values : Enumerable(String))","location":{"filename":"src/commands/list.cr","line_number":102,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L102"},"def":{"name":"rpush","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + values.size)\n(command << \"rpush\") << key\nvalues.each do |value|\n command << value\nend\nrun(command)\n"}},{"html_id":"rpush(key,*values:String)-instance-method","name":"rpush","doc":"Insert an item at the end of a list, returning the number of items\nin the list after the insert.\n\n```\nredis.del \"my-list\" # Delete so we know it's empty\nredis.rpush \"my-list\", \"foo\", \"bar\" # => 2\nredis.rpush \"my-list\", \"foo\", \"bar\" # => 4\n```","summary":"

    Insert an item at the end of a list, returning the number of items in the list after the insert.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":""},{"name":"values","external_name":"values","restriction":"String"}],"args_string":"(key, *values : String)","args_html":"(key, *values : String)","location":{"filename":"src/commands/list.cr","line_number":98,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L98"},"def":{"name":"rpush","args":[{"name":"key","external_name":"key","restriction":""},{"name":"values","external_name":"values","restriction":"String"}],"splat_index":1,"visibility":"Public","body":"run({\"rpush\", key} + values)"}}],"types":[{"html_id":"redis/Redis/Commands/List/Side","path":"Redis/Commands/List/Side.html","kind":"enum","full_name":"Redis::Commands::List::Side","name":"Side","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/commands/list.cr","line_number":57,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L57"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"LEFT","name":"LEFT","value":"0"},{"id":"RIGHT","name":"RIGHT","value":"1"}],"namespace":{"html_id":"redis/Redis/Commands/List","kind":"module","full_name":"Redis::Commands::List","name":"List"},"instance_methods":[{"html_id":"left?-instance-method","name":"left?","abstract":false,"location":{"filename":"src/commands/list.cr","line_number":58,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L58"},"def":{"name":"left?","visibility":"Public","body":"self == LEFT"}},{"html_id":"right?-instance-method","name":"right?","abstract":false,"location":{"filename":"src/commands/list.cr","line_number":59,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L59"},"def":{"name":"right?","visibility":"Public","body":"self == RIGHT"}}]}]},{"html_id":"redis/Redis/Commands/ScriptFlushMode","path":"Redis/Commands/ScriptFlushMode.html","kind":"enum","full_name":"Redis::Commands::ScriptFlushMode","name":"ScriptFlushMode","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/commands.cr","line_number":217,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L217"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"ASYNC","name":"ASYNC","value":"0"},{"id":"SYNC","name":"SYNC","value":"1"}],"namespace":{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},"instance_methods":[{"html_id":"async?-instance-method","name":"async?","abstract":false,"location":{"filename":"src/commands.cr","line_number":218,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L218"},"def":{"name":"async?","visibility":"Public","body":"self == ASYNC"}},{"html_id":"sync?-instance-method","name":"sync?","abstract":false,"location":{"filename":"src/commands.cr","line_number":219,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L219"},"def":{"name":"sync?","visibility":"Public","body":"self == SYNC"}}]},{"html_id":"redis/Redis/Commands/Set","path":"Redis/Commands/Set.html","kind":"module","full_name":"Redis::Commands::Set","name":"Set","abstract":false,"locations":[{"filename":"src/commands/set.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/set.cr#L1"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"namespace":{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},"instance_methods":[{"html_id":"sadd(key:String,*values:String)-instance-method","name":"sadd","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"String"}],"args_string":"(key : String, *values : String)","args_html":"(key : String, *values : String)","location":{"filename":"src/commands/set.cr","line_number":2,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/set.cr#L2"},"def":{"name":"sadd","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"String"}],"splat_index":1,"visibility":"Public","body":"run({\"sadd\", key} + values)"}},{"html_id":"scard(key:String)-instance-method","name":"scard","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands/set.cr","line_number":36,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/set.cr#L36"},"def":{"name":"scard","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"scard\", key})"}},{"html_id":"sdiff(first:String,second:String)-instance-method","name":"sdiff","abstract":false,"args":[{"name":"first","external_name":"first","restriction":"String"},{"name":"second","external_name":"second","restriction":"String"}],"args_string":"(first : String, second : String)","args_html":"(first : String, second : String)","location":{"filename":"src/commands/set.cr","line_number":28,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/set.cr#L28"},"def":{"name":"sdiff","args":[{"name":"first","external_name":"first","restriction":"String"},{"name":"second","external_name":"second","restriction":"String"}],"visibility":"Public","body":"run({\"sdiff\", first, second})"}},{"html_id":"sinter(first:String,*others:String)-instance-method","name":"sinter","abstract":false,"args":[{"name":"first","external_name":"first","restriction":"String"},{"name":"others","external_name":"others","restriction":"String"}],"args_string":"(first : String, *others : String)","args_html":"(first : String, *others : String)","location":{"filename":"src/commands/set.cr","line_number":32,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/set.cr#L32"},"def":{"name":"sinter","args":[{"name":"first","external_name":"first","restriction":"String"},{"name":"others","external_name":"others","restriction":"String"}],"splat_index":1,"visibility":"Public","body":"run({\"sinter\", first} + others)"}},{"html_id":"sismember(key:String,value:String)-instance-method","name":"sismember","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"value","external_name":"value","restriction":"String"}],"args_string":"(key : String, value : String)","args_html":"(key : String, value : String)","location":{"filename":"src/commands/set.cr","line_number":6,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/set.cr#L6"},"def":{"name":"sismember","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"value","external_name":"value","restriction":"String"}],"visibility":"Public","body":"run({\"sismember\", key, value})"}},{"html_id":"smembers(key:String)-instance-method","name":"smembers","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands/set.cr","line_number":10,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/set.cr#L10"},"def":{"name":"smembers","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"smembers\", key})"}},{"html_id":"srem(key:String,members:Enumerable(String))-instance-method","name":"srem","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"members","external_name":"members","restriction":"Enumerable(String)"}],"args_string":"(key : String, members : Enumerable(String))","args_html":"(key : String, members : Enumerable(String))","location":{"filename":"src/commands/set.cr","line_number":18,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/set.cr#L18"},"def":{"name":"srem","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"members","external_name":"members","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + members.size)\n(command << \"srem\") << key\nmembers.each do |member|\n command << member\nend\nrun(command)\n"}},{"html_id":"srem(key:String,*values:String)-instance-method","name":"srem","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"String"}],"args_string":"(key : String, *values : String)","args_html":"(key : String, *values : String)","location":{"filename":"src/commands/set.cr","line_number":14,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/set.cr#L14"},"def":{"name":"srem","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"String"}],"splat_index":1,"visibility":"Public","body":"run({\"srem\", key} + values)"}}]},{"html_id":"redis/Redis/Commands/SortedSet","path":"Redis/Commands/SortedSet.html","kind":"module","full_name":"Redis::Commands::SortedSet","name":"SortedSet","abstract":false,"locations":[{"filename":"src/commands/sorted_set.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/sorted_set.cr#L1"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"namespace":{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},"instance_methods":[{"html_id":"zadd(key:String,score:String|Int64,value:String)-instance-method","name":"zadd","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"score","external_name":"score","restriction":"String | Int64"},{"name":"value","external_name":"value","restriction":"String"}],"args_string":"(key : String, score : String | Int64, value : String)","args_html":"(key : String, score : String | Int64, value : String)","location":{"filename":"src/commands/sorted_set.cr","line_number":42,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/sorted_set.cr#L42"},"def":{"name":"zadd","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"score","external_name":"score","restriction":"String | Int64"},{"name":"value","external_name":"value","restriction":"String"}],"visibility":"Public","body":"run({\"zadd\", key, score.to_s, value})"}},{"html_id":"zadd(key:String,values:Enumerable(String))-instance-method","name":"zadd","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"Enumerable(String)"}],"args_string":"(key : String, values : Enumerable(String))","args_html":"(key : String, values : Enumerable(String))","location":{"filename":"src/commands/sorted_set.cr","line_number":46,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/sorted_set.cr#L46"},"def":{"name":"zadd","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + values.size)\n(command << \"zadd\") << key\nvalues.each do |value|\n command << value\nend\nrun(command)\n"}},{"html_id":"zcard(key:String)-instance-method","name":"zcard","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands/sorted_set.cr","line_number":2,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/sorted_set.cr#L2"},"def":{"name":"zcard","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"zcard\", key})"}},{"html_id":"zcount(key:String,min:String,max:String)-instance-method","name":"zcount","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"min","external_name":"min","restriction":"String"},{"name":"max","external_name":"max","restriction":"String"}],"args_string":"(key : String, min : String, max : String)","args_html":"(key : String, min : String, max : String)","location":{"filename":"src/commands/sorted_set.cr","line_number":70,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/sorted_set.cr#L70"},"def":{"name":"zcount","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"min","external_name":"min","restriction":"String"},{"name":"max","external_name":"max","restriction":"String"}],"visibility":"Public","body":"run({\"zcount\", key, min, max})"}},{"html_id":"zrange(key:String,starting:String|Int64,ending:String|Int64,with_scores:Bool=false)-instance-method","name":"zrange","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"starting","external_name":"starting","restriction":"String | Int64"},{"name":"ending","external_name":"ending","restriction":"String | Int64"},{"name":"with_scores","default_value":"false","external_name":"with_scores","restriction":"Bool"}],"args_string":"(key : String, starting : String | Int64, ending : String | Int64, with_scores : Bool = false)","args_html":"(key : String, starting : String | Int64, ending : String | Int64, with_scores : Bool = false)","location":{"filename":"src/commands/sorted_set.cr","line_number":15,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/sorted_set.cr#L15"},"def":{"name":"zrange","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"starting","external_name":"starting","restriction":"String | Int64"},{"name":"ending","external_name":"ending","restriction":"String | Int64"},{"name":"with_scores","default_value":"false","external_name":"with_scores","restriction":"Bool"}],"visibility":"Public","body":"command = {\"zrange\", key, starting.to_s, ending.to_s}\nif with_scores\n command = command + {\"withscores\"}\nend\nrun(command)\n"}},{"html_id":"zrangebyscore(key:String,low:String|Int64,high:String|Int64,limit:Enumerable(String)|Nil=nil)-instance-method","name":"zrangebyscore","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"low","external_name":"low","restriction":"String | Int64"},{"name":"high","external_name":"high","restriction":"String | Int64"},{"name":"limit","default_value":"nil","external_name":"limit","restriction":"Enumerable(String) | ::Nil"}],"args_string":"(key : String, low : String | Int64, high : String | Int64, limit : Enumerable(String) | Nil = nil)","args_html":"(key : String, low : String | Int64, high : String | Int64, limit : Enumerable(String) | Nil = nil)","location":{"filename":"src/commands/sorted_set.cr","line_number":24,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/sorted_set.cr#L24"},"def":{"name":"zrangebyscore","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"low","external_name":"low","restriction":"String | Int64"},{"name":"high","external_name":"high","restriction":"String | Int64"},{"name":"limit","default_value":"nil","external_name":"limit","restriction":"Enumerable(String) | ::Nil"}],"visibility":"Public","body":"command = {\"zrangebyscore\", key, low.to_s, high.to_s}\nif limit\n command = command + {\"limit\", limit[0], limit[1]}\nend\nrun(command)\n"}},{"html_id":"zrem(key:String,value:String)-instance-method","name":"zrem","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"value","external_name":"value","restriction":"String"}],"args_string":"(key : String, value : String)","args_html":"(key : String, value : String)","location":{"filename":"src/commands/sorted_set.cr","line_number":54,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/sorted_set.cr#L54"},"def":{"name":"zrem","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"value","external_name":"value","restriction":"String"}],"visibility":"Public","body":"run({\"zrem\", key, value})"}},{"html_id":"zrem(key:String,values:Enumerable(String))-instance-method","name":"zrem","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"Enumerable(String)"}],"args_string":"(key : String, values : Enumerable(String))","args_html":"(key : String, values : Enumerable(String))","location":{"filename":"src/commands/sorted_set.cr","line_number":62,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/sorted_set.cr#L62"},"def":{"name":"zrem","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + values.size)\n(command << \"zrem\") << key\nvalues.each do |value|\n command << (value.as(String))\nend\nrun(command)\n"}},{"html_id":"zrem(key:String,*values:String)-instance-method","name":"zrem","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"String"}],"args_string":"(key : String, *values : String)","args_html":"(key : String, *values : String)","location":{"filename":"src/commands/sorted_set.cr","line_number":58,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/sorted_set.cr#L58"},"def":{"name":"zrem","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"String"}],"splat_index":1,"visibility":"Public","body":"run({\"zrem\", key} + values)"}},{"html_id":"zremrangebyrank(key:String,low:Int64,high:Int64)-instance-method","name":"zremrangebyrank","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"low","external_name":"low","restriction":"Int64"},{"name":"high","external_name":"high","restriction":"Int64"}],"args_string":"(key : String, low : Int64, high : Int64)","args_html":"(key : String, low : Int64, high : Int64)","location":{"filename":"src/commands/sorted_set.cr","line_number":38,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/sorted_set.cr#L38"},"def":{"name":"zremrangebyrank","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"low","external_name":"low","restriction":"Int64"},{"name":"high","external_name":"high","restriction":"Int64"}],"visibility":"Public","body":"run({\"zremrangebyrank\", key, low.to_s, high.to_s})"}},{"html_id":"zremrangebyscore(key:String,low:String|Int64,high:String|Int64)-instance-method","name":"zremrangebyscore","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"low","external_name":"low","restriction":"String | Int64"},{"name":"high","external_name":"high","restriction":"String | Int64"}],"args_string":"(key : String, low : String | Int64, high : String | Int64)","args_html":"(key : String, low : String | Int64, high : String | Int64)","location":{"filename":"src/commands/sorted_set.cr","line_number":34,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/sorted_set.cr#L34"},"def":{"name":"zremrangebyscore","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"low","external_name":"low","restriction":"String | Int64"},{"name":"high","external_name":"high","restriction":"String | Int64"}],"visibility":"Public","body":"run({\"zremrangebyscore\", key, low.to_s, high.to_s})"}},{"html_id":"zrevrange(key:String,starting:String|Int64,ending:String|Int64,with_scores:Bool=false)-instance-method","name":"zrevrange","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"starting","external_name":"starting","restriction":"String | Int64"},{"name":"ending","external_name":"ending","restriction":"String | Int64"},{"name":"with_scores","default_value":"false","external_name":"with_scores","restriction":"Bool"}],"args_string":"(key : String, starting : String | Int64, ending : String | Int64, with_scores : Bool = false)","args_html":"(key : String, starting : String | Int64, ending : String | Int64, with_scores : Bool = false)","location":{"filename":"src/commands/sorted_set.cr","line_number":6,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/sorted_set.cr#L6"},"def":{"name":"zrevrange","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"starting","external_name":"starting","restriction":"String | Int64"},{"name":"ending","external_name":"ending","restriction":"String | Int64"},{"name":"with_scores","default_value":"false","external_name":"with_scores","restriction":"Bool"}],"visibility":"Public","body":"command = {\"zrevrange\", key, starting.to_s, ending.to_s}\nif with_scores\n command = command + {\"withscores\"}\nend\nrun(command)\n"}},{"html_id":"zscore(key:String,value:String)-instance-method","name":"zscore","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"value","external_name":"value","restriction":"String"}],"args_string":"(key : String, value : String)","args_html":"(key : String, value : String)","location":{"filename":"src/commands/sorted_set.cr","line_number":74,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/sorted_set.cr#L74"},"def":{"name":"zscore","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"value","external_name":"value","restriction":"String"}],"visibility":"Public","body":"run({\"zscore\", key, value})"}}]},{"html_id":"redis/Redis/Commands/Stream","path":"Redis/Commands/Stream.html","kind":"module","full_name":"Redis::Commands::Stream","name":"Stream","abstract":false,"locations":[{"filename":"src/commands/stream.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L1"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"namespace":{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},"instance_methods":[{"html_id":"xack(key:String,group:String,id:String)-instance-method","name":"xack","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"group","external_name":"group","restriction":"String"},{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(key : String, group : String, id : String)","args_html":"(key : String, group : String, id : String)","location":{"filename":"src/commands/stream.cr","line_number":249,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L249"},"def":{"name":"xack","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"group","external_name":"group","restriction":"String"},{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"run({\"xack\", key, group, id})"}},{"html_id":"xack(key:String,group:String,ids:Enumerable(String))-instance-method","name":"xack","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"group","external_name":"group","restriction":"String"},{"name":"ids","external_name":"ids","restriction":"Enumerable(String)"}],"args_string":"(key : String, group : String, ids : Enumerable(String))","args_html":"(key : String, group : String, ids : Enumerable(String))","location":{"filename":"src/commands/stream.cr","line_number":253,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L253"},"def":{"name":"xack","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"group","external_name":"group","restriction":"String"},{"name":"ids","external_name":"ids","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: ids.size + 3)\n((command << \"xack\") << key) << group\nids.each do |id|\n command << id\nend\nrun(command)\n"}},{"html_id":"xadd(key:String,id:String,maxlen,data:::Hash(String,String))-instance-method","name":"xadd","doc":"Append an entry with the specified data to the stream with the given `key`\nand gives it the specified `id`. If the id is `\"*\"`, Redis will assign it\nan id of the form `\"#{Time.utc.to_unix_ms}-#{autoincrementing_index}\"`.\nIf `maxlen` is provided, Redis will trim the stream to the specified\nlength. If `maxlen` is of the form `~ 1000`, Redis will trim it to\n*approximately* that length, removing entries when it can do so\nefficiently. This method returns the `id` that Redis stores.\n\n```\nredis.xadd \"my-stream\", \"*\", {\"name\" => \"foo\", \"id\" => UUID.random.to_s}\n```","summary":"

    Append an entry with the specified data to the stream with the given key and gives it the specified id.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"id","external_name":"id","restriction":"String"},{"name":"maxlen","external_name":"maxlen","restriction":""},{"name":"data","external_name":"data","restriction":"::Hash(String, String)"}],"args_string":"(key : String, id : String, maxlen, data : ::Hash(String, String))","args_html":"(key : String, id : String, maxlen, data : ::Hash(String, String))","location":{"filename":"src/commands/stream.cr","line_number":59,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L59"},"def":{"name":"xadd","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"id","external_name":"id","restriction":"String"},{"name":"maxlen","external_name":"maxlen","restriction":""},{"name":"data","external_name":"data","restriction":"::Hash(String, String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: (data.size * 2) + 3)\n(command << \"xadd\") << key\nif maxlen\n (command << \"maxlen\") << maxlen\nend\ncommand << id\ndata.each do |key, value|\n (command << key) << value\nend\nrun(command)\n"}},{"html_id":"xadd(key:String,id:String,data:::Hash(String,String))-instance-method","name":"xadd","doc":"Append an entry with the specified data to the stream with the given `key`\nand gives it the specified `id`. If the id is `\"*\"`, Redis will assign it\nan id of the form `\"#{Time.utc.to_unix_ms}-#{autoincrementing_index}\"`.\nIf `maxlen` is provided, Redis will trim the stream to the specified\nlength. If `maxlen` is of the form `~ 1000`, Redis will trim it to\n*approximately* that length, removing entries when it can do so\nefficiently. This method returns the `id` that Redis stores.\n\n```\nredis.xadd \"my-stream\", \"*\", {\"name\" => \"foo\", \"id\" => UUID.random.to_s}\n```","summary":"

    Append an entry with the specified data to the stream with the given key and gives it the specified id.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"id","external_name":"id","restriction":"String"},{"name":"data","external_name":"data","restriction":"::Hash(String, String)"}],"args_string":"(key : String, id : String, data : ::Hash(String, String))","args_html":"(key : String, id : String, data : ::Hash(String, String))","location":{"filename":"src/commands/stream.cr","line_number":44,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L44"},"def":{"name":"xadd","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"id","external_name":"id","restriction":"String"},{"name":"data","external_name":"data","restriction":"::Hash(String, String)"}],"visibility":"Public","body":"xadd(key, id, maxlen: nil, data: data)"}},{"html_id":"xadd(key:String,id:String,maxlen=nil,**data)-instance-method","name":"xadd","doc":"Append an entry with the specified data to the stream with the given `key`\nand gives it the specified `id`. If the id is `\"*\"`, Redis will assign it\nan id of the form `\"#{Time.utc.to_unix_ms}-#{autoincrementing_index}\"`.\nIf `maxlen` is provided, Redis will trim the stream to the specified\nlength. If `maxlen` is of the form `~ 1000`, Redis will trim it to\n*approximately* that length, removing entries when it can do so\nefficiently. This method returns the `id` that Redis stores.\n\n```\nredis.xadd \"my-stream\", \"*\", name: \"foo\", id: UUID.random.to_s\n```","summary":"

    Append an entry with the specified data to the stream with the given key and gives it the specified id.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"id","external_name":"id","restriction":"String"},{"name":"maxlen","default_value":"nil","external_name":"maxlen","restriction":""}],"args_string":"(key : String, id : String, maxlen = nil, **data)","args_html":"(key : String, id : String, maxlen = nil, **data)","location":{"filename":"src/commands/stream.cr","line_number":13,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L13"},"def":{"name":"xadd","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"id","external_name":"id","restriction":"String"},{"name":"maxlen","default_value":"nil","external_name":"maxlen","restriction":""}],"double_splat":{"name":"data","external_name":"data","restriction":""},"visibility":"Public","body":"command = Array(String).new(initial_capacity: (data.size * 2) + 6)\n(command << \"xadd\") << key\nif maxlen\n command << \"maxlen\"\n case maxlen\n when Tuple\n maxlen.each do |entry|\n command << entry\n end\n when String\n command << maxlen\n end\nend\ncommand << id\ndata.each do |key, value|\n (command << key.to_s) << value\nend\nrun(command)\n"}},{"html_id":"xautoclaim(key:String,group:String,consumer:String,min_idle_time:Time::Span,start:String,count:Int|String|Nil=nil)-instance-method","name":"xautoclaim","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"group","external_name":"group","restriction":"String"},{"name":"consumer","external_name":"consumer","restriction":"String"},{"name":"min_idle_time","external_name":"min_idle_time","restriction":"Time::Span"},{"name":"start","external_name":"start","restriction":"String"},{"name":"count","default_value":"nil","external_name":"count","restriction":"Int | String | Nil"}],"args_string":"(key : String, group : String, consumer : String, min_idle_time : Time::Span, start : String, count : Int | String | Nil = nil)","args_html":"(key : String, group : String, consumer : String, min_idle_time : Time::Span, start : String, count : Int | String | Nil = nil)","location":{"filename":"src/commands/stream.cr","line_number":261,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L261"},"def":{"name":"xautoclaim","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"group","external_name":"group","restriction":"String"},{"name":"consumer","external_name":"consumer","restriction":"String"},{"name":"min_idle_time","external_name":"min_idle_time","restriction":"Time::Span"},{"name":"start","external_name":"start","restriction":"String"},{"name":"count","default_value":"nil","external_name":"count","restriction":"Int | String | Nil"}],"visibility":"Public","body":"min_idle_time = min_idle_time.total_milliseconds.to_i.to_s\ncommand = {\"xautoclaim\", key, group, consumer, min_idle_time, start}\nif count\n command = command + {\"count\", count.to_s}\nend\nrun(command)\n"}},{"html_id":"xdel(key:String,ids:Enumerable(String))-instance-method","name":"xdel","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"ids","external_name":"ids","restriction":"Enumerable(String)"}],"args_string":"(key : String, ids : Enumerable(String))","args_html":"(key : String, ids : Enumerable(String))","location":{"filename":"src/commands/stream.cr","line_number":75,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L75"},"def":{"name":"xdel","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"ids","external_name":"ids","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + ids.size)\n(command << \"xdel\") << key\nids.each do |id|\n command << id\nend\nrun(command)\n"}},{"html_id":"xdel(key:String,*ids:String)-instance-method","name":"xdel","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"ids","external_name":"ids","restriction":"String"}],"args_string":"(key : String, *ids : String)","args_html":"(key : String, *ids : String)","location":{"filename":"src/commands/stream.cr","line_number":71,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L71"},"def":{"name":"xdel","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"ids","external_name":"ids","restriction":"String"}],"splat_index":1,"visibility":"Public","body":"xdel(key, ids)"}},{"html_id":"xgroup(command:String,key:String,groupname:String)-instance-method","name":"xgroup","doc":"Run a Redis XGROUP subcommand for a given stream. See the [XGROUP command in the Redis documentation](https://redis.io/commands/xgroup) for more information.\n\n```\nredis.xgroup \"DESTROY\", \"my-stream\", \"my-group\"\n```","summary":"

    Run a Redis XGROUP subcommand for a given stream.

    ","abstract":false,"args":[{"name":"command","external_name":"command","restriction":"String"},{"name":"key","external_name":"key","restriction":"String"},{"name":"groupname","external_name":"groupname","restriction":"String"}],"args_string":"(command : String, key : String, groupname : String)","args_html":"(command : String, key : String, groupname : String)","location":{"filename":"src/commands/stream.cr","line_number":135,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L135"},"def":{"name":"xgroup","args":[{"name":"command","external_name":"command","restriction":"String"},{"name":"key","external_name":"key","restriction":"String"},{"name":"groupname","external_name":"groupname","restriction":"String"}],"visibility":"Public","body":"run({\"xgroup\", command, key, groupname})"}},{"html_id":"xgroup(command:XGroup,key:String,groupname:String,*,id:String|Nil=nil,mkstream=false,consumer_name:String|Nil=nil)-instance-method","name":"xgroup","doc":"Run a Redis XGROUP subcommand for a given stream. See the [XGROUP command in the Redis documentation](https://redis.io/commands/xgroup) for more information.\n\n```\nredis.xgroup :create, \"my-stream\", \"my-group\", mkstream: true\n```","summary":"

    Run a Redis XGROUP subcommand for a given stream.

    ","abstract":false,"args":[{"name":"command","external_name":"command","restriction":"XGroup"},{"name":"key","external_name":"key","restriction":"String"},{"name":"groupname","external_name":"groupname","restriction":"String"},{"name":"","external_name":"","restriction":""},{"name":"id","default_value":"nil","external_name":"id","restriction":"String | ::Nil"},{"name":"mkstream","default_value":"false","external_name":"mkstream","restriction":""},{"name":"consumer_name","default_value":"nil","external_name":"consumer_name","restriction":"String | ::Nil"}],"args_string":"(command : XGroup, key : String, groupname : String, *, id : String | Nil = nil, mkstream = false, consumer_name : String | Nil = nil)","args_html":"(command : XGroup, key : String, groupname : String, *, id : String | Nil = nil, mkstream = false, consumer_name : String | Nil = nil)","location":{"filename":"src/commands/stream.cr","line_number":113,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L113"},"def":{"name":"xgroup","args":[{"name":"command","external_name":"command","restriction":"XGroup"},{"name":"key","external_name":"key","restriction":"String"},{"name":"groupname","external_name":"groupname","restriction":"String"},{"name":"","external_name":"","restriction":""},{"name":"id","default_value":"nil","external_name":"id","restriction":"String | ::Nil"},{"name":"mkstream","default_value":"false","external_name":"mkstream","restriction":""},{"name":"consumer_name","default_value":"nil","external_name":"consumer_name","restriction":"String | ::Nil"}],"splat_index":3,"visibility":"Public","body":"cmd = Array(String).new(initial_capacity: 7)\n(((cmd << \"xgroup\") << command.to_s) << key) << groupname\nif id\n cmd << id\nend\nif mkstream\n cmd << \"mkstream\"\nend\nif consumer_name\n cmd << consumer_name\nend\nrun(cmd)\n"}},{"html_id":"xgroup(command:String,key:String,groupname:String,*args:String)-instance-method","name":"xgroup","doc":"Run a Redis XGROUP subcommand for a given stream. See the [XGROUP command in the Redis documentation](https://redis.io/commands/xgroup) for more information.\n\n```\nredis.xgroup \"CREATE\", \"my-stream\", \"my-group\", \"0\"\n```","summary":"

    Run a Redis XGROUP subcommand for a given stream.

    ","abstract":false,"args":[{"name":"command","external_name":"command","restriction":"String"},{"name":"key","external_name":"key","restriction":"String"},{"name":"groupname","external_name":"groupname","restriction":"String"},{"name":"args","external_name":"args","restriction":"String"}],"args_string":"(command : String, key : String, groupname : String, *args : String)","args_html":"(command : String, key : String, groupname : String, *args : String)","location":{"filename":"src/commands/stream.cr","line_number":144,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L144"},"def":{"name":"xgroup","args":[{"name":"command","external_name":"command","restriction":"String"},{"name":"key","external_name":"key","restriction":"String"},{"name":"groupname","external_name":"groupname","restriction":"String"},{"name":"args","external_name":"args","restriction":"String"}],"splat_index":3,"visibility":"Public","body":"run({\"xgroup\", command, key, groupname} + args)"}},{"html_id":"xgroup_create(key:String,groupname:String,*,id:String=\"$\",mkstream=false)-instance-method","name":"xgroup_create","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"groupname","external_name":"groupname","restriction":"String"},{"name":"","external_name":"","restriction":""},{"name":"id","default_value":"\"$\"","external_name":"id","restriction":"String"},{"name":"mkstream","default_value":"false","external_name":"mkstream","restriction":""}],"args_string":"(key : String, groupname : String, *, id : String = \"$\", mkstream = false)","args_html":"(key : String, groupname : String, *, id : String = "$", mkstream = false)","location":{"filename":"src/commands/stream.cr","line_number":99,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L99"},"def":{"name":"xgroup_create","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"groupname","external_name":"groupname","restriction":"String"},{"name":"","external_name":"","restriction":""},{"name":"id","default_value":"\"$\"","external_name":"id","restriction":"String"},{"name":"mkstream","default_value":"false","external_name":"mkstream","restriction":""}],"splat_index":2,"visibility":"Public","body":"xgroup(XGroup::CREATE, key, groupname, id: id, mkstream: mkstream)"}},{"html_id":"xgroup_create_consumer(key:String,groupname:String,consumer_name:String)-instance-method","name":"xgroup_create_consumer","doc":"XGROUP CREATECONSUMER key groupname consumername","summary":"

    XGROUP CREATECONSUMER key groupname consumername

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"groupname","external_name":"groupname","restriction":"String"},{"name":"consumer_name","external_name":"consumer_name","restriction":"String"}],"args_string":"(key : String, groupname : String, consumer_name : String)","args_html":"(key : String, groupname : String, consumer_name : String)","location":{"filename":"src/commands/stream.cr","line_number":104,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L104"},"def":{"name":"xgroup_create_consumer","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"groupname","external_name":"groupname","restriction":"String"},{"name":"consumer_name","external_name":"consumer_name","restriction":"String"}],"visibility":"Public","body":"xgroup(XGroup::CREATECONSUMER, key, groupname, consumer_name: consumer_name)"}},{"html_id":"xlen(key:String)-instance-method","name":"xlen","doc":"Return the number of entries in the given stream","summary":"

    Return the number of entries in the given stream

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands/stream.cr","line_number":84,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L84"},"def":{"name":"xlen","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"xlen\", key})"}},{"html_id":"xpending(key:String,group:String,start:String,endfinish:String,count:String|Int,idle:String|Time::Span|Nil=nil)-instance-method","name":"xpending","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"group","external_name":"group","restriction":"String"},{"name":"start","external_name":"start","restriction":"String"},{"name":"finish","external_name":"end","restriction":"String"},{"name":"count","external_name":"count","restriction":"String | Int"},{"name":"idle","default_value":"nil","external_name":"idle","restriction":"String | Time::Span | Nil"}],"args_string":"(key : String, group : String, start : String, end finish : String, count : String | Int, idle : String | Time::Span | Nil = nil)","args_html":"(key : String, group : String, start : String, end finish : String, count : String | Int, idle : String | Time::Span | Nil = nil)","location":{"filename":"src/commands/stream.cr","line_number":229,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L229"},"def":{"name":"xpending","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"group","external_name":"group","restriction":"String"},{"name":"start","external_name":"start","restriction":"String"},{"name":"finish","external_name":"end","restriction":"String"},{"name":"count","external_name":"count","restriction":"String | Int"},{"name":"idle","default_value":"nil","external_name":"idle","restriction":"String | Time::Span | Nil"}],"visibility":"Public","body":"command = {\"xpending\", key, group}\ncase idle\nwhen String\n command = command + {\"idle\", idle}\nwhen Time::Span\n command = command + {\"idle\", idle.total_milliseconds.to_i.to_s}\nend\ncommand = command + {start, finish, count.to_s}\nrun(command)\n"}},{"html_id":"xpending(key:String,group:String)-instance-method","name":"xpending","doc":"XPENDING key group [[IDLE min-idle-time] start end count [consumer]]","summary":"

    XPENDING key group [[IDLE min-idle-time] start end count [consumer]]

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"group","external_name":"group","restriction":"String"}],"args_string":"(key : String, group : String)","args_html":"(key : String, group : String)","location":{"filename":"src/commands/stream.cr","line_number":225,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L225"},"def":{"name":"xpending","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"group","external_name":"group","restriction":"String"}],"visibility":"Public","body":"run({\"xpending\", key, group})"}},{"html_id":"xrange(key:String,startmin:String,endmax:String,count:String|Int|Nil=nil)-instance-method","name":"xrange","doc":"Return the entries in the given stream between the `start` and `end` ids.\nIf `count` is provided, Redis will return only that number of entries.","summary":"

    Return the entries in the given stream between the start and end ids.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"min","external_name":"start","restriction":"String"},{"name":"max","external_name":"end","restriction":"String"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"}],"args_string":"(key : String, start min : String, end max : String, count : String | Int | Nil = nil)","args_html":"(key : String, start min : String, end max : String, count : String | Int | Nil = nil)","location":{"filename":"src/commands/stream.cr","line_number":90,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L90"},"def":{"name":"xrange","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"min","external_name":"start","restriction":"String"},{"name":"max","external_name":"end","restriction":"String"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"}],"visibility":"Public","body":"command = {\"xrange\", key, min, max}\nif count\n command = command + {\"count\", count.to_s}\nend\nrun(command)\n"}},{"html_id":"xreadgroup(group:String,consumer:String,count:String|Int|Nil=nil,block:Time::Span|String|Int|Nil=nil,no_ack=false,streams:::Hash(String,String)={}ofString=>String)-instance-method","name":"xreadgroup","doc":"Execute an `XREADGROUP` command on the Redis server.\n\nThis is returned in its raw form from Redis, but you can pass it to a\n`Redis::Streaming::XReadGroupResponse` to make it easier to work with.","summary":"

    Execute an XREADGROUP command on the Redis server.

    ","abstract":false,"args":[{"name":"group","external_name":"group","restriction":"String"},{"name":"consumer","external_name":"consumer","restriction":"String"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"},{"name":"block","default_value":"nil","external_name":"block","restriction":"Time::Span | String | Int | Nil"},{"name":"no_ack","default_value":"false","external_name":"no_ack","restriction":""},{"name":"streams","default_value":"{} of String => String","external_name":"streams","restriction":"::Hash(String, String)"}],"args_string":"(group : String, consumer : String, count : String | Int | Nil = nil, block : Time::Span | String | Int | Nil = nil, no_ack = false, streams : ::Hash(String, String) = {} of String => String)","args_html":"(group : String, consumer : String, count : String | Int | Nil = nil, block : Time::Span | String | Int | Nil = nil, no_ack = false, streams : ::Hash(String, String) = {} of String => String)","location":{"filename":"src/commands/stream.cr","line_number":152,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L152"},"def":{"name":"xreadgroup","args":[{"name":"group","external_name":"group","restriction":"String"},{"name":"consumer","external_name":"consumer","restriction":"String"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"},{"name":"block","default_value":"nil","external_name":"block","restriction":"Time::Span | String | Int | Nil"},{"name":"no_ack","default_value":"false","external_name":"no_ack","restriction":""},{"name":"streams","default_value":"{} of String => String","external_name":"streams","restriction":"::Hash(String, String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 9 + (streams.size * 2))\n(((command << \"xreadgroup\") << \"group\") << group) << consumer\nif count\n (command << \"count\") << count.to_s\nend\ncase block\nin Time::Span\n (command << \"block\") << block.total_milliseconds.to_i.to_s\nin String\n (command << \"block\") << block\nin Int\n (command << \"block\") << block.to_s\nin Nil\nend\nif no_ack\n command << \"noack\"\nend\ncommand << \"streams\"\nstreams.each_key do |key|\n command << key\nend\nstreams.each_value do |value|\n command << value\nend\nrun(command)\n"}},{"html_id":"xreadgroup(group:String,consumer:String,count:String|Int|Nil=nil,block:Time::Span|String|Int|Nil=nil,no_ack=false,streams:NamedTuple=NamedTuple.new)-instance-method","name":"xreadgroup","doc":"Execute an `XREADGROUP` command on the Redis server. If `block` is not nil, the server will block for up to that much time (if you pass a number, it will be interpreted as milliseconds) until any new messages enter the stream.\n\nThis is returned in its raw form from Redis, but you can pass it to a\n`Redis::Streaming::XReadGroupResponse` to make it easier to work with.\n\n```\n# Long-poll for up to 10 messages from the stream with key `my_stream`,\n# blocking for up to 2 seconds if there are no messages waiting.\nresponse = redis.xreadgroup \"group\", \"consumer\",\n streams: {my_stream: \">\"},\n count: 10,\n block: 2.seconds\nresponse = Redis::Streaming::XReadGroupResponse.new(response)\n```","summary":"

    Execute an XREADGROUP command on the Redis server.

    ","abstract":false,"args":[{"name":"group","external_name":"group","restriction":"String"},{"name":"consumer","external_name":"consumer","restriction":"String"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"},{"name":"block","default_value":"nil","external_name":"block","restriction":"Time::Span | String | Int | Nil"},{"name":"no_ack","default_value":"false","external_name":"no_ack","restriction":""},{"name":"streams","default_value":"NamedTuple.new","external_name":"streams","restriction":"NamedTuple"}],"args_string":"(group : String, consumer : String, count : String | Int | Nil = nil, block : Time::Span | String | Int | Nil = nil, no_ack = false, streams : NamedTuple = NamedTuple.new)","args_html":"(group : String, consumer : String, count : String | Int | Nil = nil, block : Time::Span | String | Int | Nil = nil, no_ack = false, streams : NamedTuple = NamedTuple.new)","location":{"filename":"src/commands/stream.cr","line_number":195,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L195"},"def":{"name":"xreadgroup","args":[{"name":"group","external_name":"group","restriction":"String"},{"name":"consumer","external_name":"consumer","restriction":"String"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"},{"name":"block","default_value":"nil","external_name":"block","restriction":"Time::Span | String | Int | Nil"},{"name":"no_ack","default_value":"false","external_name":"no_ack","restriction":""},{"name":"streams","default_value":"NamedTuple.new","external_name":"streams","restriction":"NamedTuple"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 9 + (streams.size * 2))\n(((command << \"xreadgroup\") << \"group\") << group) << consumer\nif count\n (command << \"count\") << count.to_s\nend\ncase block\nin Time::Span\n (command << \"block\") << block.total_milliseconds.to_i.to_s\nin String\n (command << \"block\") << block\nin Int\n (command << \"block\") << block.to_s\nin Nil\nend\nif no_ack\n command << \"noack\"\nend\ncommand << \"streams\"\nstreams.each_key do |key|\n command << key.to_s\nend\nstreams.each_value do |value|\n command << value\nend\nrun(command)\n"}}],"types":[{"html_id":"redis/Redis/Commands/Stream/XGroup","path":"Redis/Commands/Stream/XGroup.html","kind":"enum","full_name":"Redis::Commands::Stream::XGroup","name":"XGroup","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/commands/stream.cr","line_number":123,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L123"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"CREATE","name":"CREATE","value":"0"},{"id":"DESTROY","name":"DESTROY","value":"1"},{"id":"CREATECONSUMER","name":"CREATECONSUMER","value":"2"},{"id":"DELCONSUMER","name":"DELCONSUMER","value":"3"}],"namespace":{"html_id":"redis/Redis/Commands/Stream","kind":"module","full_name":"Redis::Commands::Stream","name":"Stream"},"instance_methods":[{"html_id":"create?-instance-method","name":"create?","abstract":false,"location":{"filename":"src/commands/stream.cr","line_number":124,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L124"},"def":{"name":"create?","visibility":"Public","body":"self == CREATE"}},{"html_id":"createconsumer?-instance-method","name":"createconsumer?","abstract":false,"location":{"filename":"src/commands/stream.cr","line_number":126,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L126"},"def":{"name":"createconsumer?","visibility":"Public","body":"self == CREATECONSUMER"}},{"html_id":"delconsumer?-instance-method","name":"delconsumer?","abstract":false,"location":{"filename":"src/commands/stream.cr","line_number":127,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L127"},"def":{"name":"delconsumer?","visibility":"Public","body":"self == DELCONSUMER"}},{"html_id":"destroy?-instance-method","name":"destroy?","abstract":false,"location":{"filename":"src/commands/stream.cr","line_number":125,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L125"},"def":{"name":"destroy?","visibility":"Public","body":"self == DESTROY"}}]}]}]},{"html_id":"redis/Redis/Connection","path":"Redis/Connection.html","kind":"class","full_name":"Redis::Connection","name":"Connection","abstract":false,"superclass":{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},{"html_id":"redis/Redis/Commands/Stream","kind":"module","full_name":"Redis::Commands::Stream","name":"Stream"},{"html_id":"redis/Redis/Commands/SortedSet","kind":"module","full_name":"Redis::Commands::SortedSet","name":"SortedSet"},{"html_id":"redis/Redis/Commands/Set","kind":"module","full_name":"Redis::Commands::Set","name":"Set"},{"html_id":"redis/Redis/Commands/List","kind":"module","full_name":"Redis::Commands::List","name":"List"},{"html_id":"redis/Redis/Commands/Hash","kind":"module","full_name":"Redis::Commands::Hash","name":"Hash"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/connection.cr","line_number":15,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L15"},{"filename":"src/graph.cr","line_number":512,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L512"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"doc":"The connection wraps the TCP connection to the Redis server.","summary":"

    The connection wraps the TCP connection to the Redis server.

    ","constructors":[{"html_id":"new(uri:URI=URI.parse(\"redis:///\"),log:::Log=Log)-class-method","name":"new","doc":"We receive all connection information in the URI.\n\nSSL connections require specifying the `rediss://` scheme.\nPassword authentication uses the URI password.\nDB selection uses the URI path.","summary":"

    We receive all connection information in the URI.

    ","abstract":false,"args":[{"name":"uri","default_value":"URI.parse(\"redis:///\")","external_name":"uri","restriction":"URI"},{"name":"log","default_value":"Log","external_name":"log","restriction":"::Log"}],"args_string":"(uri : URI = URI.parse(\"redis:///\"), log : ::Log = Log)","args_html":"(uri : URI = URI.parse("redis:///"), log : ::Log = Log)","location":{"filename":"src/connection.cr","line_number":25,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L25"},"def":{"name":"new","args":[{"name":"uri","default_value":"URI.parse(\"redis:///\")","external_name":"uri","restriction":"URI"},{"name":"log","default_value":"Log","external_name":"log","restriction":"::Log"}],"visibility":"Public","body":"_ = allocate\n_.initialize(uri, log)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"close-instance-method","name":"close","doc":"Close the connection to the server.","summary":"

    Close the connection to the server.

    ","abstract":false,"location":{"filename":"src/connection.cr","line_number":402,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L402"},"def":{"name":"close","visibility":"Public","body":"@socket.close"}},{"html_id":"encode(command)-instance-method","name":"encode","doc":"Send the given command over the wire without waiting for a reply. This is\nuseful for query pipelining or sending commands that have no return value.\n\nWARNING: Be careful with this because you can get the client out of sync\nwith the server. You should almost never have to use this, but it can be\nuseful if a command like this has not been implemented yet.","summary":"

    Send the given command over the wire without waiting for a reply.

    ","abstract":false,"args":[{"name":"command","external_name":"command","restriction":""}],"args_string":"(command)","args_html":"(command)","location":{"filename":"src/connection.cr","line_number":449,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L449"},"def":{"name":"encode","args":[{"name":"command","external_name":"command","restriction":""}],"visibility":"Public","body":"@writer.encode(command)"}},{"html_id":"flush-instance-method","name":"flush","doc":"Flush the connection buffer and make sure we've sent everything to the\nserver.","summary":"

    Flush the connection buffer and make sure we've sent everything to the server.

    ","abstract":false,"location":{"filename":"src/connection.cr","line_number":413,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L413"},"def":{"name":"flush","visibility":"Public","body":"@socket.flush"}},{"html_id":"hscan_each(key:String,matchpattern:String|Nil=nil,count:String|Int|Nil=nil,&):Nil-instance-method","name":"hscan_each","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"pattern","default_value":"nil","external_name":"match","restriction":"String | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"}],"args_string":"(key : String, match pattern : String | Nil = nil, count : String | Int | Nil = nil, &) : Nil","args_html":"(key : String, match pattern : String | Nil = nil, count : String | Int | Nil = nil, &) : Nil","location":{"filename":"src/connection.cr","line_number":388,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L388"},"def":{"name":"hscan_each","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"pattern","default_value":"nil","external_name":"match","restriction":"String | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"}],"yields":1,"block_arity":1,"return_type":"Nil","visibility":"Public","body":"cursor = \"\"\nwhile !(cursor == \"0\")\n response = hscan(key, cursor, match: pattern, count: count)\n cursor, results = response.as(Array)\n cursor = cursor.as(String)\n (results.as(Array)).each do |key|\n yield key.as(String)\n end\nend\n"}},{"html_id":"multi(retries=5,&)-instance-method","name":"multi","doc":"Execute a transaction within the server. The transaction is automatically\ncommitted at the end of the block or can be rolled back with\n`Transaction#discard`. Transactions are also rolled back if an exception\nis raised.\n\n```\nredis.multi do |redis|\n redis.set \"foo\", \"bar\"\n redis.incr \"counter\"\n raise \"Oops!\"\nend\n\nredis.get \"foo\" # => nil\nredis.get \"counter\" # => nil\n```","summary":"

    Execute a transaction within the server.

    ","abstract":false,"args":[{"name":"retries","default_value":"5","external_name":"retries","restriction":""}],"args_string":"(retries = 5, &)","args_html":"(retries = 5, &)","location":{"filename":"src/connection.cr","line_number":113,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L113"},"def":{"name":"multi","args":[{"name":"retries","default_value":"5","external_name":"retries","restriction":""}],"yields":1,"block_arity":1,"visibility":"Public","body":"loop do\n begin\n txn = Transaction.new(self)\n begin\n txn.start!\n yield txn\n if txn.discarded?\n return [] of Value\n else\n return txn.exec.as(Array)\n end\n rescue ex\n txn.discard\n raise(ex)\n end\n rescue ex : IO::Error\n if retries > 0\n retries = retries - 1\n initialize(@uri)\n else\n raise(ex)\n end\n end\nend"}},{"html_id":"pipeline(&)-instance-method","name":"pipeline","doc":"Execute a pipeline of commands. A pipeline sends all commands to the\nserver before reading any of the results.\n\n```\nredis.pipeline do |redis|\n redis.set \"foo\", \"bar\"\n redis.incr \"counter\"\nend\n```","summary":"

    Execute a pipeline of commands.

    ","abstract":false,"location":{"filename":"src/connection.cr","line_number":79,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L79"},"def":{"name":"pipeline","yields":1,"block_arity":1,"visibility":"Public","body":"pipeline = Pipeline.new(self)\nerror = nil\nbegin\n yield pipeline\nrescue ex\n error = ex\nend\nflush\nresult = pipeline.commit\nif error\n raise(error)\nelse\n result\nend\n"}},{"html_id":"psubscribe(*channels:String,&block:Subscription,self->)-instance-method","name":"psubscribe","doc":"Subscribe to the given pubsub channels. The block yields a subscription\nobject and the connection. You can setup `on_message`, `on_subscribe`,\nand `on_unsubscribe` on the subscription.\n\n```\nredis.subscribe \"channel1\", \"channel2\" do |subscription, connection|\n subscription.on_message do |channel, message|\n if message == \"unsubscribe\"\n connection.unsubscribe channel\n end\n\n # ...\n end\n\n # Respond to new subscribers\n subscription.on_subscribe do |channel, sub_count|\n connection.set \"sub_count:#{channel}\", sub_count.to_s\n end\n\n # Respond to losing subscribers\n subscription.on_unsubscribe do |channel, sub_count|\n connection.set \"sub_count:#{channel}\", sub_count.to_s\n end\nend\n```\n\nFor more information, see the documentation for:\n- [`SUBSCRIBE`](https://redis.io/commands/subscribe/)\n- [`PSUBSCRIBE`](https://redis.io/commands/psubscribe/)","summary":"

    Subscribe to the given pubsub channels.

    ","abstract":false,"args":[{"name":"channels","external_name":"channels","restriction":"String"}],"args_string":"(*channels : String, &block : Subscription, self -> )","args_html":"(*channels : String, &block : Subscription, self -> )","location":{"filename":"src/connection.cr","line_number":139,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L139"},"def":{"name":"psubscribe","args":[{"name":"channels","external_name":"channels","restriction":"String"}],"splat_index":0,"yields":2,"block_arity":2,"block_arg":{"name":"block","external_name":"block","restriction":"(Subscription, self ->)"},"visibility":"Public","body":"subscription = Subscription.new(self)\n@writer.encode({\"psubscribe\"} + channels)\nflush\nyield subscription, self\nsubscription.call\n"}},{"html_id":"punsubscribe(*channels:String)-instance-method","name":"punsubscribe","abstract":false,"args":[{"name":"channels","external_name":"channels","restriction":"String"}],"args_string":"(*channels : String)","args_html":"(*channels : String)","location":{"filename":"src/connection.cr","line_number":200,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L200"},"def":{"name":"punsubscribe","args":[{"name":"channels","external_name":"channels","restriction":"String"}],"splat_index":0,"visibility":"Public","body":"@writer.encode({\"punsubscribe\"} + channels)\nflush\n"}},{"html_id":"read-instance-method","name":"read","doc":"Read the next value from the server","summary":"

    Read the next value from the server

    ","abstract":false,"location":{"filename":"src/connection.cr","line_number":418,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L418"},"def":{"name":"read","visibility":"Public","body":"case value = @parser.read\nwhen Error\n raise(value)\nelse\n value\nend"}},{"html_id":"read?-instance-method","name":"read?","doc":"Read the next value from the server, returning `nil` if the connection is\nclosed.","summary":"

    Read the next value from the server, returning nil if the connection is closed.

    ","abstract":false,"location":{"filename":"src/connection.cr","line_number":429,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L429"},"def":{"name":"read?","visibility":"Public","body":"case value = @parser.read?\nwhen Error\n raise(value)\nelse\n value\nend"}},{"html_id":"readonly!:Nil-instance-method","name":"readonly!","doc":"Put this connection in a readonly state. This is typically used when\ntalking to replicas, and used automatically by `Cluster` for cluster\nreplicas.","summary":"

    Put this connection in a readonly state.

    ","abstract":false,"location":{"filename":"src/connection.cr","line_number":208,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L208"},"def":{"name":"readonly!","return_type":"Nil","visibility":"Public","body":"run({\"readonly\"})"}},{"html_id":"run(command,retries=5):Value-instance-method","name":"run","doc":"Execute the given command and return the result from the server. Commands must be an `Enumerable`.\n\n```\nrun({\"set\", \"foo\", \"bar\"})\n```","summary":"

    Execute the given command and return the result from the server.

    ","abstract":false,"args":[{"name":"command","external_name":"command","restriction":""},{"name":"retries","default_value":"5","external_name":"retries","restriction":""}],"args_string":"(command, retries = 5) : Value","args_html":"(command, retries = 5) : Value","location":{"filename":"src/connection.cr","line_number":349,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L349"},"def":{"name":"run","args":[{"name":"command","external_name":"command","restriction":""},{"name":"retries","default_value":"5","external_name":"retries","restriction":""}],"return_type":"Value","visibility":"Public","body":"start = Time.monotonic\nloop do\n begin\n @writer.encode(command)\n flush\n result = read\n @log.debug(&.emit(\"redis\", command: command[0...2].join(' '), duration_ms: (Time.monotonic - start).total_milliseconds))\n return result\n rescue ex : IO::Error\n if retries > 0\n retries = retries - 1\n initialize(@uri)\n else\n raise(ex)\n end\n end\nend\n"}},{"html_id":"scan_each(matchpattern:String|Nil=nil,count:String|Int|Nil=nil,type:String|Nil=nil,&):Nil-instance-method","name":"scan_each","doc":"Iterate over keys that match the given pattern or all keys if no pattern\nis supplied, yielding each key to the block. This is a much more efficient\nway to iterate over keys than `keys.each` — it avoids loading every key in\nmemory at the same time and also doesn't block the Redis server while it\ngenerates the array of all those keys.","summary":"

    Iterate over keys that match the given pattern or all keys if no pattern is supplied, yielding each key to the block.

    ","abstract":false,"args":[{"name":"pattern","default_value":"nil","external_name":"match","restriction":"String | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"},{"name":"type","default_value":"nil","external_name":"type","restriction":"String | ::Nil"}],"args_string":"(match pattern : String | Nil = nil, count : String | Int | Nil = nil, type : String | Nil = nil, &) : Nil","args_html":"(match pattern : String | Nil = nil, count : String | Int | Nil = nil, type : String | Nil = nil, &) : Nil","location":{"filename":"src/connection.cr","line_number":373,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L373"},"def":{"name":"scan_each","args":[{"name":"pattern","default_value":"nil","external_name":"match","restriction":"String | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"},{"name":"type","default_value":"nil","external_name":"type","restriction":"String | ::Nil"}],"yields":1,"block_arity":1,"return_type":"Nil","visibility":"Public","body":"has_scanned = false\ncursor = \"0\"\nwhile !(has_scanned && (cursor == \"0\"))\n has_scanned = true\n response = scan(cursor, match: pattern, count: count, type: type)\n cursor, results = response.as(Array)\n cursor = cursor.as(String)\n (results.as(Array)).each do |key|\n yield key.as(String)\n end\nend\n"}},{"html_id":"subscribe(*channels:String,&block:Subscription,self->)-instance-method","name":"subscribe","doc":"Subscribe to the given pubsub channels. The block yields a subscription\nobject and the connection. You can setup `on_message`, `on_subscribe`,\nand `on_unsubscribe` on the subscription.\n\n```\nredis.subscribe \"channel1\", \"channel2\" do |subscription, connection|\n subscription.on_message do |channel, message|\n if message == \"unsubscribe\"\n connection.unsubscribe channel\n end\n\n # ...\n end\n\n # Respond to new subscribers\n subscription.on_subscribe do |channel, sub_count|\n connection.set \"sub_count:#{channel}\", sub_count.to_s\n end\n\n # Respond to losing subscribers\n subscription.on_unsubscribe do |channel, sub_count|\n connection.set \"sub_count:#{channel}\", sub_count.to_s\n end\nend\n```\n\nFor more information, see the documentation for:\n- [`SUBSCRIBE`](https://redis.io/commands/subscribe/)\n- [`PSUBSCRIBE`](https://redis.io/commands/psubscribe/)","summary":"

    Subscribe to the given pubsub channels.

    ","abstract":false,"args":[{"name":"channels","external_name":"channels","restriction":"String"}],"args_string":"(*channels : String, &block : Subscription, self -> )","args_html":"(*channels : String, &block : Subscription, self -> )","location":{"filename":"src/connection.cr","line_number":139,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L139"},"def":{"name":"subscribe","args":[{"name":"channels","external_name":"channels","restriction":"String"}],"splat_index":0,"yields":2,"block_arity":2,"block_arg":{"name":"block","external_name":"block","restriction":"(Subscription, self ->)"},"visibility":"Public","body":"subscription = Subscription.new(self)\n@writer.encode({\"subscribe\"} + channels)\nflush\nyield subscription, self\nsubscription.call\n"}},{"html_id":"subscribe(*channels:String)-instance-method","name":"subscribe","doc":"Subscribe to the given channels without having to pass a block, which\nwould block execution. This is useful to run inside of other subscription\nblocks to add new subscriptions.","summary":"

    Subscribe to the given channels without having to pass a block, which would block execution.

    ","abstract":false,"args":[{"name":"channels","external_name":"channels","restriction":"String"}],"args_string":"(*channels : String)","args_html":"(*channels : String)","location":{"filename":"src/connection.cr","line_number":183,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L183"},"def":{"name":"subscribe","args":[{"name":"channels","external_name":"channels","restriction":"String"}],"splat_index":0,"visibility":"Public","body":"@writer.encode({\"subscribe\"} + channels)\nflush\n"}},{"html_id":"unsubscribe-instance-method","name":"unsubscribe","doc":"Unsubscribe this connection from all subscriptions.","summary":"

    Unsubscribe this connection from all subscriptions.

    ","abstract":false,"location":{"filename":"src/connection.cr","line_number":189,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L189"},"def":{"name":"unsubscribe","visibility":"Public","body":"@writer.encode({\"unsubscribe\"})\nflush\n"}},{"html_id":"unsubscribe(*channels:String)-instance-method","name":"unsubscribe","doc":"Unsubscribe this connection the given channels.","summary":"

    Unsubscribe this connection the given channels.

    ","abstract":false,"args":[{"name":"channels","external_name":"channels","restriction":"String"}],"args_string":"(*channels : String)","args_html":"(*channels : String)","location":{"filename":"src/connection.cr","line_number":195,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L195"},"def":{"name":"unsubscribe","args":[{"name":"channels","external_name":"channels","restriction":"String"}],"splat_index":0,"visibility":"Public","body":"@writer.encode({\"unsubscribe\"} + channels)\nflush\n"}},{"html_id":"url-instance-method","name":"url","doc":"The URI","summary":"

    The URI

    ","abstract":false,"location":{"filename":"src/connection.cr","line_number":439,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L439"},"def":{"name":"url","visibility":"Public","body":"@uri.to_s"}}],"macros":[{"html_id":"set_return_types!-macro","name":"set_return_types!","abstract":false,"location":{"filename":"src/connection.cr","line_number":230,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L230"},"def":{"name":"set_return_types!","visibility":"Public","body":" \n# When new commands are added to the Commands mixin, add an entry here to\n\n \n# make sure the return type is set when run directly on the connection.\n\n ::Redis::Connection.override_return_types(\n{\n keys: Array,\n del: Int64,\n unlink: Int64,\n ttl: Int64,\n pttl: Int64,\n script_load: String,\n\n \n# String commands\n\n append: Int64,\n decr: Int64,\n decrby: Int64,\n get: String?,\n getdel: String?,\n getex: String?,\n getrange: String,\n getset: String?,\n incr: Int64,\n incrby: Int64,\n incrbyfloat: String,\n mget: Array,\n mset: String,\n msetnx: Int64,\n psetex: String,\n set: String?,\n setex: String,\n setnx: Int64,\n setrange: Int64,\n strlen: Int64,\n substr: String,\n\n \n# List commands\n\n blmove: String?,\n blmpop: Array(Value)?,\n blpop: Array(Value)?,\n brpop: Array(Value)?,\n brpoplpush: String?,\n lindex: String?,\n linsert: Int64?,\n llen: Int64,\n lmove: String?,\n lmpop: Array(Value)?,\n lpop: String | Array(Value) | Nil,\n lpos: Int64 | Array(Value) | Nil,\n lpush: Int64,\n lpushx: Int64,\n lrange: Array,\n lrem: Int64,\n lset: String,\n ltrim: String,\n rpop: String?,\n rpoplpush: String?,\n rpush: Int64,\n rpushx: Int64,\n\n \n# Hash commands\n\n hdel: Int64,\n hexists: Int64,\n hget: String?,\n hgetall: Array,\n hincrby: Int64,\n hincrbyfloat: String,\n hkeys: Array,\n hlen: Int64,\n hmget: Array,\n hmset: String,\n hrandfield: String | Array(Value),\n hscan: Array,\n hset: Int64,\n hsetnx: Int64,\n hstrlen: Int64,\n hvals: Array,\n\n \n# Sets\n\n sadd: Int64,\n scard: Int64,\n sdiff: Array,\n sdiffstore: Int64,\n sinter: Array,\n sintercard: Int64,\n sinterstore: Int64,\n sismember: Int64,\n smembers: Array,\n smismember: Array,\n smove: Int64,\n spop: String | Array(Value) | Nil,\n srandmember: String | Array(Value) | Nil,\n srem: Int64,\n sscan: Array,\n sunion: Array,\n sunionstore: Int64,\n\n \n# Streams\n\n xack: Int64,\n xadd: String?,\n xautoclaim: Array,\n xclaim: Array,\n xdel: Int64,\n xgroup: String | Int64,\n xinfo: Array,\n xlen: Int64,\n xpending: Array,\n xrange: Array,\n xreadgroup: Array(Value)?,\n xrevrange: Array,\n xtrim: Int64,\n })\n \n"}}]},{"html_id":"redis/Redis/Error","path":"Redis/Error.html","kind":"class","full_name":"Redis::Error","name":"Error","abstract":false,"superclass":{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},"ancestors":[{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/errors.cr","line_number":4,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/errors.cr#L4"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"subclasses":[{"html_id":"redis/Redis/BusyGroup","kind":"class","full_name":"Redis::BusyGroup","name":"BusyGroup"},{"html_id":"redis/Redis/Cluster/Error","kind":"class","full_name":"Redis::Cluster::Error","name":"Error"},{"html_id":"redis/Redis/Graph/Error","kind":"class","full_name":"Redis::Graph::Error","name":"Error"},{"html_id":"redis/Redis/Graph/Indices/IndexAlreadyExists","kind":"class","full_name":"Redis::Graph::Indices::IndexAlreadyExists","name":"IndexAlreadyExists"},{"html_id":"redis/Redis/Graph/Serializable/Node/PropertyMissing","kind":"class","full_name":"Redis::Graph::Serializable::Node::PropertyMissing","name":"PropertyMissing"},{"html_id":"redis/Redis/NoGroup","kind":"class","full_name":"Redis::NoGroup","name":"NoGroup"},{"html_id":"redis/Redis/Subscription/InvalidMessage","kind":"class","full_name":"Redis::Subscription::InvalidMessage","name":"InvalidMessage"}],"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"instance_methods":[{"html_id":"==(other:self)-instance-method","name":"==","doc":"Returns `true` if this reference is the same as *other*. Invokes `same?`.","summary":"

    Returns true if this reference is the same as other.

    ","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"self"}],"args_string":"(other : self)","args_html":"(other : self)","def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"self"}],"visibility":"Public","body":"if same?(other)\n return true\nend\ntrue\n"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"

    See Object#hash(hasher)

    ","abstract":false,"args":[{"name":"hasher","external_name":"hasher","restriction":""}],"args_string":"(hasher)","args_html":"(hasher)","def":{"name":"hash","args":[{"name":"hasher","external_name":"hasher","restriction":""}],"visibility":"Public","body":"hasher"}}],"macros":[{"html_id":"define(type,code=(name.gsub(/\\A.*::/,\"\")).upcase)-macro","name":"define","abstract":false,"args":[{"name":"type","external_name":"type","restriction":""},{"name":"code","default_value":"(name.gsub(/\\A.*::/, \"\")).upcase","external_name":"code","restriction":""}],"args_string":"(type, code = (name.gsub(/\\A.*::/, \"\")).upcase)","args_html":"(type, code = (name.gsub(/\\A.*::/, "")).upcase)","location":{"filename":"src/errors.cr","line_number":5,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/errors.cr#L5"},"def":{"name":"define","args":[{"name":"type","external_name":"type","restriction":""},{"name":"code","default_value":"(name.gsub(/\\A.*::/, \"\")).upcase","external_name":"code","restriction":""}],"visibility":"Public","body":" class \n{{ type }}\n < \n{{ @type }}\n\n \n{% if code != nil %}\n ERROR_MAP[{{ code }}] = self\n {% end %}\n\n \nend\n \n"}}]},{"html_id":"redis/Redis/FullText","path":"Redis/FullText.html","kind":"struct","full_name":"Redis::FullText(Runnable)","name":"FullText","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/search.cr","line_number":23,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L23"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"doc":"`Redis::FullText` wraps a `Redis::Client` or `Redis::Cluster` to execute\ncommands against a fulltext search index located on a given server.\n\n```\nredis = Redis::Client.new\nredis.ft.create <<-INDEX\n people-index ON HASH\n PREFIX 1 person:\n SCHEMA\n name TEXT NOSTEM SORTABLE\n email TEXT NOSTEM SORTABLE\n location GEO\nINDEX\n```\n\nIf your Redis server is running in Cluster mode, you can\n`require \"redis/cluster/search\"` to send read-only `FullText` commands to\nshard replicas.","summary":"

    Redis::FullText wraps a Redis::Client or Redis::Cluster to execute commands against a fulltext search index located on a given server.

    \n

    EXPERIMENTAL RediSearch support is still under development. Some APIs may change while details are discovered.

    ","instance_methods":[{"html_id":"create(string:String)-instance-method","name":"create","doc":"Create a search index using the syntax specified in the [RediSearch\n`FT.CREATE` docs](https://oss.redis.com/redisearch/Commands/#ftcreate).\n\n```\nredis = Redis::Client.new\nredis.ft.create <<-INDEX\n people-index ON HASH\n PREFIX 1 person:\n SCHEMA\n name TEXT NOSTEM SORTABLE\n email TEXT NOSTEM SORTABLE\n location GEO\nINDEX\n```\n\nNOTE: This method returns immediately, before the index is complete. You can run searches against an incomplete index, but you will also have incomplete results. To find how far along the index is, you can use the `info` method.\nTODO: Add a method that generates the string passed into this overload.","summary":"

    Create a search index using the syntax specified in the RediSearch FT.CREATE docs.

    ","abstract":false,"args":[{"name":"string","external_name":"string","restriction":"String"}],"args_string":"(string : String)","args_html":"(string : String)","location":{"filename":"src/search.cr","line_number":75,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L75"},"def":{"name":"create","args":[{"name":"string","external_name":"string","restriction":"String"}],"visibility":"Public","body":"command = [] of String\nstart = 0\nin_quotes = false\nstart.upto(string.size - 1) do |index|\n if string[index] == '\"'\n if in_quotes\n part = string[start...index].strip\n if part.empty?\n else\n command << part\n end\n in_quotes = false\n else\n in_quotes = true\n end\n start = index + 1\n else\n if (string[index].whitespace? && (!string[index - 1].whitespace?)) && (!in_quotes)\n part = part = string[start...index].strip\n if part.empty?\n else\n command << part\n end\n start = index + 1\n end\n end\nend\ncommand << string[start..-1]\n@redis.run([\"ft.create\"] + command)\n"}},{"html_id":"drop(index:String,keepdocs=false)-instance-method","name":"drop","doc":"Drop the specified `index`.","summary":"

    Drop the specified index.

    ","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"String"},{"name":"keepdocs","default_value":"false","external_name":"keepdocs","restriction":""}],"args_string":"(index : String, keepdocs = false)","args_html":"(index : String, keepdocs = false)","location":{"filename":"src/search.cr","line_number":308,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L308"},"def":{"name":"drop","args":[{"name":"index","external_name":"index","restriction":"String"},{"name":"keepdocs","default_value":"false","external_name":"keepdocs","restriction":""}],"visibility":"Public","body":"dropindex(index, keepdocs)"}},{"html_id":"dropindex(key:String,keepdocs=false)-instance-method","name":"dropindex","doc":"Drop the specified `index`.","summary":"

    Drop the specified index.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"keepdocs","default_value":"false","external_name":"keepdocs","restriction":""}],"args_string":"(key : String, keepdocs = false)","args_html":"(key : String, keepdocs = false)","location":{"filename":"src/search.cr","line_number":313,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L313"},"def":{"name":"dropindex","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"keepdocs","default_value":"false","external_name":"keepdocs","restriction":""}],"visibility":"Public","body":"command = [\"ft.dropindex\", key]\nif keepdocs\n command << \"keepdocs\"\nend\n@redis.run(command)\n"}},{"html_id":"info(index:String)-instance-method","name":"info","doc":"Get information about the search index contained in `index`. For more\ndetails, see [the `FT.INFO` documentation](https://oss.redis.com/redisearch/Commands/#ftinfo).","summary":"

    Get information about the search index contained in index.

    ","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"String"}],"args_string":"(index : String)","args_html":"(index : String)","location":{"filename":"src/search.cr","line_number":104,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L104"},"def":{"name":"info","args":[{"name":"index","external_name":"index","restriction":"String"}],"visibility":"Public","body":"@redis.run({\"ft.info\", index})"}},{"html_id":"profile(index:String,query:String)-instance-method","name":"profile","doc":"Profile the given search. For further details, see [the `FT.PROFILE`\ndocumentation](https://oss.redis.com/redisearch/Commands/#ftprofile).","summary":"

    Profile the given search.

    ","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"String"},{"name":"query","external_name":"query","restriction":"String"}],"args_string":"(index : String, query : String)","args_html":"(index : String, query : String)","location":{"filename":"src/search.cr","line_number":303,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L303"},"def":{"name":"profile","args":[{"name":"index","external_name":"index","restriction":"String"},{"name":"query","external_name":"query","restriction":"String"}],"visibility":"Public","body":"@redis.run({\"ft.profile\", index, \"search\", \"query\", query})"}},{"html_id":"search(index:String,query:String,nocontent=false,verbatim=false,nostopwords=false,withscores=false,withpayloads=false,withsortkeys=false,filter:Array(Filter)|Nil=nil,geofilter:GeoFilter|Nil=nil,inkeys:Array(String)|Nil=nil,infields:Array(String)|Nil=nil,returnreturn_value:Array(String)|Nil=nil,summarize:Summarize|Nil=nil,highlight:Highlight|Nil=nil,slop:Int|Nil=nil,timeout:Time::Span|Nil=nil,inorder:Bool|Nil=nil,language:String|Nil=nil,expander:String|Nil=nil,scorer:String|Nil=nil,explainscore:Bool|Nil=nil,payload:String|Bytes|Nil=nil,sortby:SortBy|Nil=nil,limit:Tuple(Int,Int)|Nil=nil,params:NamedTuple|Hash(String,String)|Nil=nil,dialect:Int|Nil=nil)-instance-method","name":"search","doc":"Run the specified `query` against `index`. Customize the search with various other arguments. For details about what each one does and the return value, see [the `FT.SEARCH`\ndocumentation](https://oss.redis.com/redisearch/Commands/#ftsearch).\n\n```\nresult = redis.ft.search \"people-index\", \"@name:Jamie\",\n return: %w[name email],\n sortby: Redis::FullText::SortBy.new(\"name\", :asc)\n```","summary":"

    Run the specified query against index.

    ","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"String"},{"name":"query","external_name":"query","restriction":"String"},{"name":"nocontent","default_value":"false","external_name":"nocontent","restriction":""},{"name":"verbatim","default_value":"false","external_name":"verbatim","restriction":""},{"name":"nostopwords","default_value":"false","external_name":"nostopwords","restriction":""},{"name":"withscores","default_value":"false","external_name":"withscores","restriction":""},{"name":"withpayloads","default_value":"false","external_name":"withpayloads","restriction":""},{"name":"withsortkeys","default_value":"false","external_name":"withsortkeys","restriction":""},{"name":"filter","default_value":"nil","external_name":"filter","restriction":"Array(Filter) | ::Nil"},{"name":"geofilter","default_value":"nil","external_name":"geofilter","restriction":"GeoFilter | ::Nil"},{"name":"inkeys","default_value":"nil","external_name":"inkeys","restriction":"Array(String) | ::Nil"},{"name":"infields","default_value":"nil","external_name":"infields","restriction":"Array(String) | ::Nil"},{"name":"return_value","default_value":"nil","external_name":"return","restriction":"Array(String) | ::Nil"},{"name":"summarize","default_value":"nil","external_name":"summarize","restriction":"Summarize | ::Nil"},{"name":"highlight","default_value":"nil","external_name":"highlight","restriction":"Highlight | ::Nil"},{"name":"slop","default_value":"nil","external_name":"slop","restriction":"Int | ::Nil"},{"name":"timeout","default_value":"nil","external_name":"timeout","restriction":"Time::Span | ::Nil"},{"name":"inorder","default_value":"nil","external_name":"inorder","restriction":"Bool | ::Nil"},{"name":"language","default_value":"nil","external_name":"language","restriction":"String | ::Nil"},{"name":"expander","default_value":"nil","external_name":"expander","restriction":"String | ::Nil"},{"name":"scorer","default_value":"nil","external_name":"scorer","restriction":"String | ::Nil"},{"name":"explainscore","default_value":"nil","external_name":"explainscore","restriction":"Bool | ::Nil"},{"name":"payload","default_value":"nil","external_name":"payload","restriction":"String | Bytes | Nil"},{"name":"sortby","default_value":"nil","external_name":"sortby","restriction":"SortBy | ::Nil"},{"name":"limit","default_value":"nil","external_name":"limit","restriction":"::Tuple(Int, Int) | ::Nil"},{"name":"params","default_value":"nil","external_name":"params","restriction":"NamedTuple | Hash(String, String) | Nil"},{"name":"dialect","default_value":"nil","external_name":"dialect","restriction":"Int | ::Nil"}],"args_string":"(index : String, query : String, nocontent = false, verbatim = false, nostopwords = false, withscores = false, withpayloads = false, withsortkeys = false, filter : Array(Filter) | Nil = nil, geofilter : GeoFilter | Nil = nil, inkeys : Array(String) | Nil = nil, infields : Array(String) | Nil = nil, return return_value : Array(String) | Nil = nil, summarize : Summarize | Nil = nil, highlight : Highlight | Nil = nil, slop : Int | Nil = nil, timeout : Time::Span | Nil = nil, inorder : Bool | Nil = nil, language : String | Nil = nil, expander : String | Nil = nil, scorer : String | Nil = nil, explainscore : Bool | Nil = nil, payload : String | Bytes | Nil = nil, sortby : SortBy | Nil = nil, limit : Tuple(Int, Int) | Nil = nil, params : NamedTuple | Hash(String, String) | Nil = nil, dialect : Int | Nil = nil)","args_html":"(index : String, query : String, nocontent = false, verbatim = false, nostopwords = false, withscores = false, withpayloads = false, withsortkeys = false, filter : Array(Filter) | Nil = nil, geofilter : GeoFilter | Nil = nil, inkeys : Array(String) | Nil = nil, infields : Array(String) | Nil = nil, return return_value : Array(String) | Nil = nil, summarize : Summarize | Nil = nil, highlight : Highlight | Nil = nil, slop : Int | Nil = nil, timeout : Time::Span | Nil = nil, inorder : Bool | Nil = nil, language : String | Nil = nil, expander : String | Nil = nil, scorer : String | Nil = nil, explainscore : Bool | Nil = nil, payload : String | Bytes | Nil = nil, sortby : SortBy | Nil = nil, limit : Tuple(Int, Int) | Nil = nil, params : NamedTuple | Hash(String, String) | Nil = nil, dialect : Int | Nil = nil)","location":{"filename":"src/search.cr","line_number":120,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L120"},"def":{"name":"search","args":[{"name":"index","external_name":"index","restriction":"String"},{"name":"query","external_name":"query","restriction":"String"},{"name":"nocontent","default_value":"false","external_name":"nocontent","restriction":""},{"name":"verbatim","default_value":"false","external_name":"verbatim","restriction":""},{"name":"nostopwords","default_value":"false","external_name":"nostopwords","restriction":""},{"name":"withscores","default_value":"false","external_name":"withscores","restriction":""},{"name":"withpayloads","default_value":"false","external_name":"withpayloads","restriction":""},{"name":"withsortkeys","default_value":"false","external_name":"withsortkeys","restriction":""},{"name":"filter","default_value":"nil","external_name":"filter","restriction":"Array(Filter) | ::Nil"},{"name":"geofilter","default_value":"nil","external_name":"geofilter","restriction":"GeoFilter | ::Nil"},{"name":"inkeys","default_value":"nil","external_name":"inkeys","restriction":"Array(String) | ::Nil"},{"name":"infields","default_value":"nil","external_name":"infields","restriction":"Array(String) | ::Nil"},{"name":"return_value","default_value":"nil","external_name":"return","restriction":"Array(String) | ::Nil"},{"name":"summarize","default_value":"nil","external_name":"summarize","restriction":"Summarize | ::Nil"},{"name":"highlight","default_value":"nil","external_name":"highlight","restriction":"Highlight | ::Nil"},{"name":"slop","default_value":"nil","external_name":"slop","restriction":"Int | ::Nil"},{"name":"timeout","default_value":"nil","external_name":"timeout","restriction":"Time::Span | ::Nil"},{"name":"inorder","default_value":"nil","external_name":"inorder","restriction":"Bool | ::Nil"},{"name":"language","default_value":"nil","external_name":"language","restriction":"String | ::Nil"},{"name":"expander","default_value":"nil","external_name":"expander","restriction":"String | ::Nil"},{"name":"scorer","default_value":"nil","external_name":"scorer","restriction":"String | ::Nil"},{"name":"explainscore","default_value":"nil","external_name":"explainscore","restriction":"Bool | ::Nil"},{"name":"payload","default_value":"nil","external_name":"payload","restriction":"String | Bytes | Nil"},{"name":"sortby","default_value":"nil","external_name":"sortby","restriction":"SortBy | ::Nil"},{"name":"limit","default_value":"nil","external_name":"limit","restriction":"::Tuple(Int, Int) | ::Nil"},{"name":"params","default_value":"nil","external_name":"params","restriction":"NamedTuple | Hash(String, String) | Nil"},{"name":"dialect","default_value":"nil","external_name":"dialect","restriction":"Int | ::Nil"}],"visibility":"Public","body":"command = Array(String).new((((((((((((((((((((((((((((((((1 + 1) + 1) + 1) + 1) + 1) + 1) + 4) + 6) + (inkeys.try(&.size) || 0)) + 1) + (infields.try(&.size) || 0)) + 1) + (return_value.try(&.size) || 0)) + 1) + (summarize.try(&.fields).try(&.size) || 0)) + 8) + (highlight.try(&.fields).try(&.size) || 0)) + 6) + 2) + 2) + 1) + 2) + 2) + 2) + 1) + 2) + 3) + 3) + 1) + (params.try do |params|\n params.size * 2\nend || 0)) + 2) + 0)\n((command << \"ft.search\") << index) << query\nif nocontent\n command << \"nocontent\"\nend\nif verbatim\n command << \"verbatim\"\nend\nif nostopwords\n command << \"nostopwords\"\nend\nif withscores\n command << \"withscores\"\nend\nif withpayloads\n command << \"withpayloads\"\nend\nif withsortkeys\n command << \"withsortkeys\"\nend\nif filter\n filter.each do |f|\n (((command << \"filter\") << f.field) << f.min) << f.max\n end\nend\nif geofilter\n (((((command << \"geofilter\") << geofilter.field) << geofilter.longitude.to_s) << geofilter.latitude.to_s) << geofilter.radius.to_s) << geofilter.unit.to_s.downcase\nend\nif inkeys\n command << \"inkeys\"\n command.concat(inkeys)\nend\nif infields\n command << \"infields\"\n command.concat(infields)\nend\nif return_value\n (command << \"return\") << return_value.size.to_s\n command.concat(return_value)\nend\nif summarize\n command << \"summarize\"\n if fields = summarize.fields\n (command << \"fields\") << fields.size.to_s\n command.concat(fields)\n end\n if frags = summarize.frags\n (command << \"frags\") << frags.to_s\n end\n if len = summarize.len\n (command << \"len\") << len.to_s\n end\n if separator = summarize.separator\n (command << \"separator\") << separator\n end\nend\nif highlight\n command << \"highlight\"\n if fields = highlight.fields\n field_names = fields\n (command << \"fields\") << fields.size.to_s\n if field_names\n command.concat(field_names)\n end\n end\n if tags = highlight.tags\n command << \"tags\"\n command.concat(tags)\n end\nend\nif slop\n (command << \"slop\") << slop.to_s\nend\nif inorder\n command << \"inorder\"\nend\nif language\n (command << \"language\") << language\nend\nif expander\n (command << \"expander\") << expander\nend\nif scorer\n (command << \"scorer\") << scorer\nend\nif explainscore\n command << \"explainscore\"\nend\ncase payload\nwhen String\n command << payload\nwhen Bytes\n command << (String.new(payload))\nend\nif sortby\n ((command << \"sortby\") << sortby.attribute) << sortby.direction.to_s\nend\nif limit\n command << \"limit\"\n command.concat(limit.map(&.to_s).to_a)\nend\nif params\n (command << \"params\") << (params.size * 2).to_s\n case params\n in NamedTuple\n params.each do |key, value|\n (command << key.to_s) << value.to_s\n end\n in Hash\n params.each do |__temp_69|\n key, value = __temp_69\n (command << key) << value\n end\n in Nil\n end\n dialect || (dialect = 2)\nend\nif dialect\n (command << \"dialect\") << dialect.to_s\nend\n(@redis.run(command)).as(Array)\n"}},{"html_id":"tagvals(index:String,field:String)-instance-method","name":"tagvals","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"String"},{"name":"field","external_name":"field","restriction":"String"}],"args_string":"(index : String, field : String)","args_html":"(index : String, field : String)","location":{"filename":"src/search.cr","line_number":108,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L108"},"def":{"name":"tagvals","args":[{"name":"index","external_name":"index","restriction":"String"},{"name":"field","external_name":"field","restriction":"String"}],"visibility":"Public","body":"@redis.run({\"ft.tagvals\", index, field})"}}],"types":[{"html_id":"redis/Redis/FullText/Filter","path":"Redis/FullText/Filter.html","kind":"struct","full_name":"Redis::FullText::Filter","name":"Filter","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/search.cr","line_number":320,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L320"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/FullText","kind":"struct","full_name":"Redis::FullText(Runnable)","name":"FullText"},"constructors":[{"html_id":"new(field:String,min:String,max:String)-class-method","name":"new","abstract":false,"args":[{"name":"field","external_name":"field","restriction":"String"},{"name":"min","external_name":"min","restriction":"String"},{"name":"max","external_name":"max","restriction":"String"}],"args_string":"(field : String, min : String, max : String)","args_html":"(field : String, min : String, max : String)","location":{"filename":"src/search.cr","line_number":320,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L320"},"def":{"name":"new","args":[{"name":"field","external_name":"field","restriction":"String"},{"name":"min","external_name":"min","restriction":"String"},{"name":"max","external_name":"max","restriction":"String"}],"visibility":"Public","body":"_ = allocate\n_.initialize(field, min, max)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}},{"html_id":"new(field:String,range:Range(B,E))forallB,E-class-method","name":"new","abstract":false,"args":[{"name":"field","external_name":"field","restriction":"String"},{"name":"range","external_name":"range","restriction":"Range(B, E)"}],"args_string":"(field : String, range : Range(B, E)) forall B, E","args_html":"(field : String, range : Range(B, E)) forall B, E","location":{"filename":"src/search.cr","line_number":321,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L321"},"def":{"name":"new","args":[{"name":"field","external_name":"field","restriction":"String"},{"name":"range","external_name":"range","restriction":"Range(B, E)"}],"visibility":"Public","body":"new(field, min: (range.begin || \"-inf\").to_s, max: (range.end || \"+inf\").to_s)"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/search.cr","line_number":320,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L320"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@field.clone, @min.clone, @max.clone)"}},{"html_id":"copy_with(field_field=@field,min_min=@min,max_max=@max)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_field","default_value":"@field","external_name":"field","restriction":""},{"name":"_min","default_value":"@min","external_name":"min","restriction":""},{"name":"_max","default_value":"@max","external_name":"max","restriction":""}],"args_string":"(field _field = @field, min _min = @min, max _max = @max)","args_html":"(field _field = @field, min _min = @min, max _max = @max)","location":{"filename":"src/search.cr","line_number":320,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L320"},"def":{"name":"copy_with","args":[{"name":"_field","default_value":"@field","external_name":"field","restriction":""},{"name":"_min","default_value":"@min","external_name":"min","restriction":""},{"name":"_max","default_value":"@max","external_name":"max","restriction":""}],"visibility":"Public","body":"self.class.new(_field, _min, _max)"}},{"html_id":"field:String-instance-method","name":"field","abstract":false,"def":{"name":"field","return_type":"String","visibility":"Public","body":"@field"}},{"html_id":"max:String-instance-method","name":"max","abstract":false,"def":{"name":"max","return_type":"String","visibility":"Public","body":"@max"}},{"html_id":"min:String-instance-method","name":"min","abstract":false,"def":{"name":"min","return_type":"String","visibility":"Public","body":"@min"}}]},{"html_id":"redis/Redis/FullText/GeoFilter","path":"Redis/FullText/GeoFilter.html","kind":"struct","full_name":"Redis::FullText::GeoFilter","name":"GeoFilter","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/search.cr","line_number":327,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L327"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/FullText","kind":"struct","full_name":"Redis::FullText(Runnable)","name":"FullText"},"constructors":[{"html_id":"new(field:String,longitude:Float64,latitude:Float64,radius:Int64|Float64,unit:GeoUnit)-class-method","name":"new","abstract":false,"args":[{"name":"field","external_name":"field","restriction":"String"},{"name":"longitude","external_name":"longitude","restriction":"Float64"},{"name":"latitude","external_name":"latitude","restriction":"Float64"},{"name":"radius","external_name":"radius","restriction":"Int64 | Float64"},{"name":"unit","external_name":"unit","restriction":"GeoUnit"}],"args_string":"(field : String, longitude : Float64, latitude : Float64, radius : Int64 | Float64, unit : GeoUnit)","args_html":"(field : String, longitude : Float64, latitude : Float64, radius : Int64 | Float64, unit : GeoUnit)","location":{"filename":"src/search.cr","line_number":327,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L327"},"def":{"name":"new","args":[{"name":"field","external_name":"field","restriction":"String"},{"name":"longitude","external_name":"longitude","restriction":"Float64"},{"name":"latitude","external_name":"latitude","restriction":"Float64"},{"name":"radius","external_name":"radius","restriction":"Int64 | Float64"},{"name":"unit","external_name":"unit","restriction":"GeoUnit"}],"visibility":"Public","body":"_ = allocate\n_.initialize(field, longitude, latitude, radius, unit)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/search.cr","line_number":327,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L327"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@field.clone, @longitude.clone, @latitude.clone, @radius.clone, @unit.clone)"}},{"html_id":"copy_with(field_field=@field,longitude_longitude=@longitude,latitude_latitude=@latitude,radius_radius=@radius,unit_unit=@unit)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_field","default_value":"@field","external_name":"field","restriction":""},{"name":"_longitude","default_value":"@longitude","external_name":"longitude","restriction":""},{"name":"_latitude","default_value":"@latitude","external_name":"latitude","restriction":""},{"name":"_radius","default_value":"@radius","external_name":"radius","restriction":""},{"name":"_unit","default_value":"@unit","external_name":"unit","restriction":""}],"args_string":"(field _field = @field, longitude _longitude = @longitude, latitude _latitude = @latitude, radius _radius = @radius, unit _unit = @unit)","args_html":"(field _field = @field, longitude _longitude = @longitude, latitude _latitude = @latitude, radius _radius = @radius, unit _unit = @unit)","location":{"filename":"src/search.cr","line_number":327,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L327"},"def":{"name":"copy_with","args":[{"name":"_field","default_value":"@field","external_name":"field","restriction":""},{"name":"_longitude","default_value":"@longitude","external_name":"longitude","restriction":""},{"name":"_latitude","default_value":"@latitude","external_name":"latitude","restriction":""},{"name":"_radius","default_value":"@radius","external_name":"radius","restriction":""},{"name":"_unit","default_value":"@unit","external_name":"unit","restriction":""}],"visibility":"Public","body":"self.class.new(_field, _longitude, _latitude, _radius, _unit)"}},{"html_id":"field:String-instance-method","name":"field","abstract":false,"def":{"name":"field","return_type":"String","visibility":"Public","body":"@field"}},{"html_id":"latitude:Float64-instance-method","name":"latitude","abstract":false,"def":{"name":"latitude","return_type":"Float64","visibility":"Public","body":"@latitude"}},{"html_id":"longitude:Float64-instance-method","name":"longitude","abstract":false,"def":{"name":"longitude","return_type":"Float64","visibility":"Public","body":"@longitude"}},{"html_id":"radius:Int64|Float64-instance-method","name":"radius","abstract":false,"def":{"name":"radius","return_type":"Int64 | Float64","visibility":"Public","body":"@radius"}},{"html_id":"unit:GeoUnit-instance-method","name":"unit","abstract":false,"def":{"name":"unit","return_type":"GeoUnit","visibility":"Public","body":"@unit"}}]},{"html_id":"redis/Redis/FullText/GeoUnit","path":"Redis/FullText/GeoUnit.html","kind":"enum","full_name":"Redis::FullText::GeoUnit","name":"GeoUnit","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/search.cr","line_number":45,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L45"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"M","name":"M","value":"0"},{"id":"KM","name":"KM","value":"1"},{"id":"MI","name":"MI","value":"2"},{"id":"FT","name":"FT","value":"3"}],"namespace":{"html_id":"redis/Redis/FullText","kind":"struct","full_name":"Redis::FullText(Runnable)","name":"FullText"},"doc":"Pass to the `search` method's `geofilter` argument to filter within the\nspecified range. For example, to search for pizza places within 25 miles\nof the Baltimore Ravens stadium:\n\n```\nredis.ft.search \"places-index\", \"pizza\",\n geofilter: {\"location\", -76.622400, 39.277751, 25, :mi}\n```","summary":"

    Pass to the search method's geofilter argument to filter within the specified range.

    ","instance_methods":[{"html_id":"ft?-instance-method","name":"ft?","abstract":false,"location":{"filename":"src/search.cr","line_number":49,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L49"},"def":{"name":"ft?","visibility":"Public","body":"self == FT"}},{"html_id":"km?-instance-method","name":"km?","abstract":false,"location":{"filename":"src/search.cr","line_number":47,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L47"},"def":{"name":"km?","visibility":"Public","body":"self == KM"}},{"html_id":"m?-instance-method","name":"m?","abstract":false,"location":{"filename":"src/search.cr","line_number":46,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L46"},"def":{"name":"m?","visibility":"Public","body":"self == M"}},{"html_id":"mi?-instance-method","name":"mi?","abstract":false,"location":{"filename":"src/search.cr","line_number":48,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L48"},"def":{"name":"mi?","visibility":"Public","body":"self == MI"}}]},{"html_id":"redis/Redis/FullText/Highlight","path":"Redis/FullText/Highlight.html","kind":"struct","full_name":"Redis::FullText::Highlight","name":"Highlight","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/search.cr","line_number":296,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L296"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/FullText","kind":"struct","full_name":"Redis::FullText(Runnable)","name":"FullText"},"constructors":[{"html_id":"new(fields:Array(String)|Nil=nil,tags:Tuple(String,String)|Nil=nil)-class-method","name":"new","abstract":false,"args":[{"name":"fields","default_value":"nil","external_name":"fields","restriction":"Array(String) | ::Nil"},{"name":"tags","default_value":"nil","external_name":"tags","restriction":"::Tuple(String, String) | ::Nil"}],"args_string":"(fields : Array(String) | Nil = nil, tags : Tuple(String, String) | Nil = nil)","args_html":"(fields : Array(String) | Nil = nil, tags : Tuple(String, String) | Nil = nil)","location":{"filename":"src/search.cr","line_number":296,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L296"},"def":{"name":"new","args":[{"name":"fields","default_value":"nil","external_name":"fields","restriction":"Array(String) | ::Nil"},{"name":"tags","default_value":"nil","external_name":"tags","restriction":"::Tuple(String, String) | ::Nil"}],"visibility":"Public","body":"_ = allocate\n_.initialize(fields, tags)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/search.cr","line_number":296,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L296"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@fields.clone, @tags.clone)"}},{"html_id":"copy_with(fields_fields=@fields,tags_tags=@tags)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_fields","default_value":"@fields","external_name":"fields","restriction":""},{"name":"_tags","default_value":"@tags","external_name":"tags","restriction":""}],"args_string":"(fields _fields = @fields, tags _tags = @tags)","args_html":"(fields _fields = @fields, tags _tags = @tags)","location":{"filename":"src/search.cr","line_number":296,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L296"},"def":{"name":"copy_with","args":[{"name":"_fields","default_value":"@fields","external_name":"fields","restriction":""},{"name":"_tags","default_value":"@tags","external_name":"tags","restriction":""}],"visibility":"Public","body":"self.class.new(_fields, _tags)"}},{"html_id":"fields:Array(String)|Nil-instance-method","name":"fields","abstract":false,"def":{"name":"fields","return_type":"Array(String) | ::Nil","visibility":"Public","body":"@fields"}},{"html_id":"tags:Tuple(String,String)|Nil-instance-method","name":"tags","abstract":false,"def":{"name":"tags","return_type":"::Tuple(String, String) | ::Nil","visibility":"Public","body":"@tags"}}]},{"html_id":"redis/Redis/FullText/SortBy","path":"Redis/FullText/SortBy.html","kind":"struct","full_name":"Redis::FullText::SortBy","name":"SortBy","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/search.cr","line_number":35,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L35"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/FullText","kind":"struct","full_name":"Redis::FullText(Runnable)","name":"FullText"},"doc":"Pass to the `search` method's `sortby` argument to sort the results on the\ngiven attribute.\n\n```\nredis.ft.search \"people-index\", \"@name:Jamie\",\n sortby: Redis::FullText::SortBy.new(\"name\", :asc)\n```","summary":"

    Pass to the search method's sortby argument to sort the results on the given attribute.

    ","constructors":[{"html_id":"new(attribute:String,direction:SortDirection=:asc)-class-method","name":"new","abstract":false,"args":[{"name":"attribute","external_name":"attribute","restriction":"String"},{"name":"direction","default_value":":asc","external_name":"direction","restriction":"SortDirection"}],"args_string":"(attribute : String, direction : SortDirection = :asc)","args_html":"(attribute : String, direction : SortDirection = :asc)","location":{"filename":"src/search.cr","line_number":35,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L35"},"def":{"name":"new","args":[{"name":"attribute","external_name":"attribute","restriction":"String"},{"name":"direction","default_value":":asc","external_name":"direction","restriction":"SortDirection"}],"visibility":"Public","body":"_ = allocate\n_.initialize(attribute, direction)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"attribute:String-instance-method","name":"attribute","abstract":false,"def":{"name":"attribute","return_type":"String","visibility":"Public","body":"@attribute"}},{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/search.cr","line_number":35,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L35"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@attribute.clone, @direction.clone)"}},{"html_id":"copy_with(attribute_attribute=@attribute,direction_direction=@direction)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_attribute","default_value":"@attribute","external_name":"attribute","restriction":""},{"name":"_direction","default_value":"@direction","external_name":"direction","restriction":""}],"args_string":"(attribute _attribute = @attribute, direction _direction = @direction)","args_html":"(attribute _attribute = @attribute, direction _direction = @direction)","location":{"filename":"src/search.cr","line_number":35,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L35"},"def":{"name":"copy_with","args":[{"name":"_attribute","default_value":"@attribute","external_name":"attribute","restriction":""},{"name":"_direction","default_value":"@direction","external_name":"direction","restriction":""}],"visibility":"Public","body":"self.class.new(_attribute, _direction)"}},{"html_id":"direction:SortDirection-instance-method","name":"direction","abstract":false,"def":{"name":"direction","return_type":"SortDirection","visibility":"Public","body":"@direction"}}]},{"html_id":"redis/Redis/FullText/SortDirection","path":"Redis/FullText/SortDirection.html","kind":"enum","full_name":"Redis::FullText::SortDirection","name":"SortDirection","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/search.cr","line_number":53,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L53"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"ASC","name":"ASC","value":"0"},{"id":"DESC","name":"DESC","value":"1"}],"namespace":{"html_id":"redis/Redis/FullText","kind":"struct","full_name":"Redis::FullText(Runnable)","name":"FullText"},"doc":"Pass to a `SortBy` constructor to specify a fulltext search sort direction.","summary":"

    Pass to a SortBy constructor to specify a fulltext search sort direction.

    ","instance_methods":[{"html_id":"asc?-instance-method","name":"asc?","abstract":false,"location":{"filename":"src/search.cr","line_number":54,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L54"},"def":{"name":"asc?","visibility":"Public","body":"self == ASC"}},{"html_id":"desc?-instance-method","name":"desc?","abstract":false,"location":{"filename":"src/search.cr","line_number":55,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L55"},"def":{"name":"desc?","visibility":"Public","body":"self == DESC"}}]},{"html_id":"redis/Redis/FullText/Summarize","path":"Redis/FullText/Summarize.html","kind":"struct","full_name":"Redis::FullText::Summarize","name":"Summarize","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/search.cr","line_number":289,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L289"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/FullText","kind":"struct","full_name":"Redis::FullText(Runnable)","name":"FullText"},"constructors":[{"html_id":"new(fields:Array(String)|Nil=nil,frags:Int32|Nil=nil,len:Int32|Nil=nil,separator:String|Nil=nil)-class-method","name":"new","abstract":false,"args":[{"name":"fields","default_value":"nil","external_name":"fields","restriction":"Array(String) | ::Nil"},{"name":"frags","default_value":"nil","external_name":"frags","restriction":"Int32 | ::Nil"},{"name":"len","default_value":"nil","external_name":"len","restriction":"Int32 | ::Nil"},{"name":"separator","default_value":"nil","external_name":"separator","restriction":"String | ::Nil"}],"args_string":"(fields : Array(String) | Nil = nil, frags : Int32 | Nil = nil, len : Int32 | Nil = nil, separator : String | Nil = nil)","args_html":"(fields : Array(String) | Nil = nil, frags : Int32 | Nil = nil, len : Int32 | Nil = nil, separator : String | Nil = nil)","location":{"filename":"src/search.cr","line_number":289,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L289"},"def":{"name":"new","args":[{"name":"fields","default_value":"nil","external_name":"fields","restriction":"Array(String) | ::Nil"},{"name":"frags","default_value":"nil","external_name":"frags","restriction":"Int32 | ::Nil"},{"name":"len","default_value":"nil","external_name":"len","restriction":"Int32 | ::Nil"},{"name":"separator","default_value":"nil","external_name":"separator","restriction":"String | ::Nil"}],"visibility":"Public","body":"_ = allocate\n_.initialize(fields, frags, len, separator)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/search.cr","line_number":289,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L289"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@fields.clone, @frags.clone, @len.clone, @separator.clone)"}},{"html_id":"copy_with(fields_fields=@fields,frags_frags=@frags,len_len=@len,separator_separator=@separator)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_fields","default_value":"@fields","external_name":"fields","restriction":""},{"name":"_frags","default_value":"@frags","external_name":"frags","restriction":""},{"name":"_len","default_value":"@len","external_name":"len","restriction":""},{"name":"_separator","default_value":"@separator","external_name":"separator","restriction":""}],"args_string":"(fields _fields = @fields, frags _frags = @frags, len _len = @len, separator _separator = @separator)","args_html":"(fields _fields = @fields, frags _frags = @frags, len _len = @len, separator _separator = @separator)","location":{"filename":"src/search.cr","line_number":289,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L289"},"def":{"name":"copy_with","args":[{"name":"_fields","default_value":"@fields","external_name":"fields","restriction":""},{"name":"_frags","default_value":"@frags","external_name":"frags","restriction":""},{"name":"_len","default_value":"@len","external_name":"len","restriction":""},{"name":"_separator","default_value":"@separator","external_name":"separator","restriction":""}],"visibility":"Public","body":"self.class.new(_fields, _frags, _len, _separator)"}},{"html_id":"fields:Array(String)|Nil-instance-method","name":"fields","abstract":false,"def":{"name":"fields","return_type":"Array(String) | ::Nil","visibility":"Public","body":"@fields"}},{"html_id":"frags:Int32|Nil-instance-method","name":"frags","abstract":false,"def":{"name":"frags","return_type":"Int32 | ::Nil","visibility":"Public","body":"@frags"}},{"html_id":"len:Int32|Nil-instance-method","name":"len","abstract":false,"def":{"name":"len","return_type":"Int32 | ::Nil","visibility":"Public","body":"@len"}},{"html_id":"separator:String|Nil-instance-method","name":"separator","abstract":false,"def":{"name":"separator","return_type":"String | ::Nil","visibility":"Public","body":"@separator"}}]}]},{"html_id":"redis/Redis/Future","path":"Redis/Future.html","kind":"class","full_name":"Redis::Future","name":"Future","abstract":false,"superclass":{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/pipeline.cr","line_number":33,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/pipeline.cr#L33"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"doc":"A `Redis::Future` is what pipelined commands return. They will be resolved\nwith the value of the command that spawned them.","summary":"

    A Redis::Future is what pipelined commands return.

    ","instance_methods":[{"html_id":"resolve(value:Value)-instance-method","name":"resolve","doc":"Resolves a Future with the supplied Redis::Value","summary":"

    Resolves a Future with the supplied Redis::Value

    ","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"Value"}],"args_string":"(value : Value)","args_html":"(value : Value)","location":{"filename":"src/pipeline.cr","line_number":38,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/pipeline.cr#L38"},"def":{"name":"resolve","args":[{"name":"value","external_name":"value","restriction":"Value"}],"visibility":"Public","body":"@resolved = true\n@value = value\n"}},{"html_id":"resolved?:Bool-instance-method","name":"resolved?","abstract":false,"location":{"filename":"src/pipeline.cr","line_number":35,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/pipeline.cr#L35"},"def":{"name":"resolved?","visibility":"Public","body":"@resolved"}},{"html_id":"value-instance-method","name":"value","doc":"Read the value contained in this Future after it is resolved. If this\nmethod is called before the Future is resolved, it will raise a\n`Redis::Future::NotResolved` exception.","summary":"

    Read the value contained in this Future after it is resolved.

    ","abstract":false,"location":{"filename":"src/pipeline.cr","line_number":46,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/pipeline.cr#L46"},"def":{"name":"value","visibility":"Public","body":"if resolved?\n @value\nelse\n raise(NotResolved.new(\"Attempted to get the value of an unresolved Redis::Future\"))\nend"}}],"types":[{"html_id":"redis/Redis/Future/NotResolved","path":"Redis/Future/NotResolved.html","kind":"class","full_name":"Redis::Future::NotResolved","name":"NotResolved","abstract":false,"superclass":{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},"ancestors":[{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/pipeline.cr","line_number":57,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/pipeline.cr#L57"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Future","kind":"class","full_name":"Redis::Future","name":"Future"},"doc":"A `Redis::Future::NotResolved` is raised when attempting to access the\nvalue of a `Future` that has not been resolved yet. For example, calling\n`pipeline.get(\"my-key\").value`.","summary":"

    A Redis::Future::NotResolved is raised when attempting to access the value of a Future that has not been resolved yet.

    "}]},{"html_id":"redis/Redis/Graph","path":"Redis/Graph.html","kind":"module","full_name":"Redis::Graph","name":"Graph","abstract":false,"locations":[{"filename":"src/graph.cr","line_number":57,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L57"},{"filename":"src/graph/cache.cr","line_number":3,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/cache.cr#L3"},{"filename":"src/graph/node.cr","line_number":5,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/node.cr#L5"},{"filename":"src/graph/relationship.cr","line_number":4,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/relationship.cr#L4"},{"filename":"src/graph/serializable.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/serializable.cr#L1"},{"filename":"src/graph/value.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/value.cr#L1"},{"filename":"src/graph/value_type.cr","line_number":6,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/value_type.cr#L6"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"doc":"[RedisGraph](https://redis.io/docs/stack/graph/) is a graph database built\non top of Redis that you query using the [Cypher](https://opencypher.org)\nquery language.\n\nIf your Redis server is running RedisGraph (for example, using [Redis\nStack](https://redis.io/docs/stack/)), you can branch off of your existing\n`Redis::Client` using the `Redis::Client#graph` method:\n\n```\nrequire \"redis/graph\"\n\nstruct Person\n include Redis::Graph::Serializable::Node\n\n getter id : Int64\n getter name : String\nend\n\nredis = Redis::Client.new\n\n# Store the graph data in the Redis key \"my-graph\"\ngraph = redis.graph(key: \"my-graph\")\n\n# Create some data in our graph\ngraph.write_query <<-CYPHER, id: 123, name: \"Jamie\"\n CREATE (person:Person{id: $id, name: $name})\nCYPHER\n\n# The `return` argument specifies the return types of the results in your\n# Cypher query's `RETURN` clause\npp graph.read_query(<<-CYPHER, {id: 123}, return: {Person})\n MATCH (person:Person{id: $id})\n RETURN person\nCYPHER\n# => [{Person(\n# @id=123,\n# @name=\"Jamie\",\n# @node=\n# Redis::Graph::Serializable::Node::Metadata(@id=0, @labels=[\"Person\"]))}]\n```\n\nIn addition to basic Redis property types, `Redis::Graph::Serializable` types\nalso support `Bool`, `UUID`, and `Time`.","summary":"

    RedisGraph is a graph database built on top of Redis that you query using the Cypher query language.

    \n

    EXPERIMENTAL The Redis::Graph API is experimental and may be subject to change.

    ","types":[{"html_id":"redis/Redis/Graph/Cache","path":"Redis/Graph/Cache.html","kind":"class","full_name":"Redis::Graph::Cache","name":"Cache","abstract":false,"superclass":{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph/cache.cr","line_number":4,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/cache.cr#L4"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"},"constructors":[{"html_id":"new(redis:Redis::Commands,key:String)-class-method","name":"new","abstract":false,"args":[{"name":"redis","external_name":"redis","restriction":"::Redis::Commands"},{"name":"key","external_name":"key","restriction":"::String"}],"args_string":"(redis : Redis::Commands, key : String)","args_html":"(redis : Redis::Commands, key : String)","location":{"filename":"src/graph/cache.cr","line_number":11,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/cache.cr#L11"},"def":{"name":"new","args":[{"name":"redis","external_name":"redis","restriction":"::Redis::Commands"},{"name":"key","external_name":"key","restriction":"::String"}],"visibility":"Public","body":"_ = allocate\n_.initialize(redis, key)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clear-instance-method","name":"clear","abstract":false,"location":{"filename":"src/graph/cache.cr","line_number":77,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/cache.cr#L77"},"def":{"name":"clear","visibility":"Public","body":"initialize(@redis, @key)"}},{"html_id":"key:String-instance-method","name":"key","abstract":false,"location":{"filename":"src/graph/cache.cr","line_number":6,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/cache.cr#L6"},"def":{"name":"key","return_type":"String","visibility":"Public","body":"@key"}},{"html_id":"label(label_id:Int64):String-instance-method","name":"label","abstract":false,"args":[{"name":"label_id","external_name":"label_id","restriction":"Int64"}],"args_string":"(label_id : Int64) : String","args_html":"(label_id : Int64) : String","location":{"filename":"src/graph/cache.cr","line_number":17,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/cache.cr#L17"},"def":{"name":"label","args":[{"name":"label_id","external_name":"label_id","restriction":"Int64"}],"return_type":"String","visibility":"Public","body":"@label_mutex.synchronize do\n @labels.fetch(label_id) do\n fetch_new(\"labels\", \"label\", @labels.size) do |row|\n @labels << (((row.as(Array))[0].as(Array))[1].as(String))\n end\n @labels[label_id]\n end\nend"}},{"html_id":"labels-instance-method","name":"labels","abstract":false,"location":{"filename":"src/graph/cache.cr","line_number":29,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/cache.cr#L29"},"def":{"name":"labels","visibility":"Public","body":"@label_mutex.synchronize do\n if @labels.empty?\n fetch_new(\"labels\", \"label\", @labels.size) do |row|\n @labels << (((row.as(Array))[0].as(Array))[1].as(String))\n end\n end\n @labels\nend"}},{"html_id":"properties-instance-method","name":"properties","abstract":false,"location":{"filename":"src/graph/cache.cr","line_number":53,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/cache.cr#L53"},"def":{"name":"properties","visibility":"Public","body":"@property_mutex.synchronize do\n if @properties.empty?\n refresh_properties\n end\n @properties\nend"}},{"html_id":"property(property_id:Int64):String-instance-method","name":"property","abstract":false,"args":[{"name":"property_id","external_name":"property_id","restriction":"Int64"}],"args_string":"(property_id : Int64) : String","args_html":"(property_id : Int64) : String","location":{"filename":"src/graph/cache.cr","line_number":61,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/cache.cr#L61"},"def":{"name":"property","args":[{"name":"property_id","external_name":"property_id","restriction":"Int64"}],"return_type":"String","visibility":"Public","body":"@property_mutex.synchronize do\n @properties.fetch(property_id) do\n refresh_properties\n @properties[property_id]\n end\nend"}},{"html_id":"redis:Commands-instance-method","name":"redis","abstract":false,"location":{"filename":"src/graph/cache.cr","line_number":5,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/cache.cr#L5"},"def":{"name":"redis","return_type":"Commands","visibility":"Public","body":"@redis"}},{"html_id":"refresh_properties:Nil-instance-method","name":"refresh_properties","abstract":false,"location":{"filename":"src/graph/cache.cr","line_number":71,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/cache.cr#L71"},"def":{"name":"refresh_properties","return_type":"Nil","visibility":"Public","body":"fetch_new(\"propertyKeys\", \"propertyKey\", @properties.size) do |row|\n @properties << (((row.as(Array))[0].as(Array))[1].as(String))\nend"}},{"html_id":"relationship_types-instance-method","name":"relationship_types","abstract":false,"location":{"filename":"src/graph/cache.cr","line_number":41,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/cache.cr#L41"},"def":{"name":"relationship_types","visibility":"Public","body":"@relationship_mutex.synchronize do\n if @relationship_types.empty?\n fetch_new(\"relationshipTypes\", \"relationshipType\", @relationship_types.size) do |row|\n @relationship_types << (((row.as(Array))[0].as(Array))[1].as(String))\n end\n end\n @relationship_types\nend"}}]},{"html_id":"redis/Redis/Graph/Client","path":"Redis/Graph/Client.html","kind":"struct","full_name":"Redis::Graph::Client(Runnable)","name":"Client","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph.cr","line_number":61,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L61"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"},"constructors":[{"html_id":"new(redis:Runnable,key:String,cache:Redis::Graph::Cache=Cache.new(redis,key))-class-method","name":"new","abstract":false,"args":[{"name":"redis","external_name":"redis","restriction":"Runnable"},{"name":"key","external_name":"key","restriction":"String"},{"name":"cache","default_value":"Cache.new(redis, key)","external_name":"cache","restriction":"::Redis::Graph::Cache"}],"args_string":"(redis : Runnable, key : String, cache : Redis::Graph::Cache = Cache.new(redis, key))","args_html":"(redis : Runnable, key : String, cache : Redis::Graph::Cache = Cache.new(redis, key))","location":{"filename":"src/graph.cr","line_number":64,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L64"},"def":{"name":"new","args":[{"name":"redis","external_name":"redis","restriction":"Runnable"},{"name":"key","external_name":"key","restriction":"String"},{"name":"cache","default_value":"Cache.new(redis, key)","external_name":"cache","restriction":"::Redis::Graph::Cache"}],"visibility":"Public","body":"_ = Client(Runnable).allocate\n_.initialize(redis, key, cache)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"cache:Cache-instance-method","name":"cache","abstract":false,"location":{"filename":"src/graph.cr","line_number":62,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L62"},"def":{"name":"cache","return_type":"Cache","visibility":"Public","body":"@cache"}},{"html_id":"constraints-instance-method","name":"constraints","abstract":false,"location":{"filename":"src/graph.cr","line_number":217,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L217"},"def":{"name":"constraints","visibility":"Public","body":"Constraints.new(self, @redis, @key, cache)"}},{"html_id":"delete!-instance-method","name":"delete!","abstract":false,"location":{"filename":"src/graph.cr","line_number":221,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L221"},"def":{"name":"delete!","visibility":"Public","body":"@redis.run({\"GRAPH.DELETE\", @key})"}},{"html_id":"execute(query:String)-instance-method","name":"execute","abstract":false,"args":[{"name":"query","external_name":"query","restriction":"String"}],"args_string":"(query : String)","args_html":"(query : String)","location":{"filename":"src/graph.cr","line_number":249,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L249"},"def":{"name":"execute","args":[{"name":"query","external_name":"query","restriction":"String"}],"visibility":"Public","body":"begin\n (@redis.run({\"GRAPH.QUERY\", @key, query, \"--compact\"})).as(Array)\nrescue ex : Redis::Error\n if (message = ex.message) && (match = message.match(/unique constraint violation on (node|edge) of type (\\w+)/))\n raise(ConstraintViolation.new(\"property set on #{match[1]} with type #{match[2]} violates a constraint\", cause: ex))\n else\n raise(ex)\n end\nend"}},{"html_id":"explain(cypher:String,params)-instance-method","name":"explain","abstract":false,"args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"params","external_name":"params","restriction":""}],"args_string":"(cypher : String, params)","args_html":"(cypher : String, params)","location":{"filename":"src/graph.cr","line_number":205,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L205"},"def":{"name":"explain","args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"params","external_name":"params","restriction":""}],"visibility":"Public","body":"explain(build_query(cypher, params))"}},{"html_id":"explain(cypher:String)-instance-method","name":"explain","abstract":false,"args":[{"name":"cypher","external_name":"cypher","restriction":"String"}],"args_string":"(cypher : String)","args_html":"(cypher : String)","location":{"filename":"src/graph.cr","line_number":209,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L209"},"def":{"name":"explain","args":[{"name":"cypher","external_name":"cypher","restriction":"String"}],"visibility":"Public","body":"(@redis.run({\"GRAPH.EXPLAIN\", @key, cypher, \"--compact\"})).as(Array)"}},{"html_id":"indices-instance-method","name":"indices","abstract":false,"location":{"filename":"src/graph.cr","line_number":213,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L213"},"def":{"name":"indices","visibility":"Public","body":"Indices.new(self)"}},{"html_id":"multi(&)-instance-method","name":"multi","doc":"Execute a transaction within the given graph\n\n```\ngraph.multi do |txn|\n txn.write_query <<-CYPHER, team_id: 123\n MATCH (\n CYPHER\nend\n```","summary":"

    Execute a transaction within the given graph

    \n

    EXPERIMENTAL This method may be difficult to use, since it relies primarily on Redis::Client#multi, which is not graph-aware. It is currently intended primarily to roll back previous writes if others do not succeed when a single query is not feasible. This may be iterated on in the future.

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":235,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L235"},"def":{"name":"multi","yields":1,"block_arity":1,"visibility":"Public","body":"@redis.multi do |txn|\n yield Client.new(txn.@connection, @key)\nend"}},{"html_id":"read_query(cypher:String,params:NamedTuple|Hash,returntypes:Tuple(*T))forallT-instance-method","name":"read_query","doc":"Query the graph with the given Cypher query, passing in the given\nparams, and returning the given types corresponding to the values in\nyour Cypher `RETURN` clause.\n\n```\ngraph.read_query <<-CYPHER, {team_id: 123}, return: {Person}\n MATCH (team:Team{id: $team_id})\n MATCH (person)-[:MEMBER_OF]->(team)\n RETURN person\nCYPHER\n```","summary":"

    Query the graph with the given Cypher query, passing in the given params, and returning the given types corresponding to the values in your Cypher RETURN clause.

    ","abstract":false,"args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"params","external_name":"params","restriction":"NamedTuple | Hash"},{"name":"types","external_name":"return","restriction":"Tuple(*T)"}],"args_string":"(cypher : String, params : NamedTuple | Hash, return types : Tuple(*T)) forall T","args_html":"(cypher : String, params : NamedTuple | Hash, return types : Tuple(*T)) forall T","location":{"filename":"src/graph.cr","line_number":189,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L189"},"def":{"name":"read_query","args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"params","external_name":"params","restriction":"NamedTuple | Hash"},{"name":"types","external_name":"return","restriction":"Tuple(*T)"}],"visibility":"Public","body":"{% if true %}\n ResultSet({ {{ (T.type_vars.map(&.instance).join(\", \")).id }} }).new(\n run(cypher, params),\n cache: cache,\n )\n {% end %}"}},{"html_id":"read_query(cypher:String,params:NamedTuple|Hash,returntype:T.class)forallT-instance-method","name":"read_query","abstract":false,"args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"params","external_name":"params","restriction":"NamedTuple | Hash"},{"name":"type","external_name":"return","restriction":"T.class"}],"args_string":"(cypher : String, params : NamedTuple | Hash, return type : T.class) forall T","args_html":"(cypher : String, params : NamedTuple | Hash, return type : T.class) forall T","location":{"filename":"src/graph.cr","line_number":198,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L198"},"def":{"name":"read_query","args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"params","external_name":"params","restriction":"NamedTuple | Hash"},{"name":"type","external_name":"return","restriction":"T.class"}],"visibility":"Public","body":"ResultSet(T).new(run(cypher, params), cache: cache)"}},{"html_id":"read_query(cypher:String,returntypes:T)forallT-instance-method","name":"read_query","abstract":false,"args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"types","external_name":"return","restriction":"T"}],"args_string":"(cypher : String, return types : T) forall T","args_html":"(cypher : String, return types : T) forall T","location":{"filename":"src/graph.cr","line_number":174,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L174"},"def":{"name":"read_query","args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"types","external_name":"return","restriction":"T"}],"visibility":"Public","body":"read_query(cypher, params: NamedTuple.new, return: types)"}},{"html_id":"read_query(cypher:String)-instance-method","name":"read_query","doc":"Query the graph with the given Cypher query.\n\n```\ngraph.read_query <<-CYPHER\n MATCH (person:Person)\n RETURN person\nCYPHER\n```","summary":"

    Query the graph with the given Cypher query.

    ","abstract":false,"args":[{"name":"cypher","external_name":"cypher","restriction":"String"}],"args_string":"(cypher : String)","args_html":"(cypher : String)","location":{"filename":"src/graph.cr","line_number":153,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L153"},"def":{"name":"read_query","args":[{"name":"cypher","external_name":"cypher","restriction":"String"}],"visibility":"Public","body":"ResultSet(List).new(run(cypher), cache: cache)"}},{"html_id":"read_query(cypher:String,**params)-instance-method","name":"read_query","doc":"Query the graph with the given Cypher query, passing in the given\nparams.\n\n```\ngraph.read_query <<-CYPHER, team_id: 123\n MATCH (team:Team{id: $team_id})\n MATCH (person)-[membership:MEMBER_OF]->(team)\n RETURN person, membership, team\nCYPHER\n```","summary":"

    Query the graph with the given Cypher query, passing in the given params.

    ","abstract":false,"args":[{"name":"cypher","external_name":"cypher","restriction":"String"}],"args_string":"(cypher : String, **params)","args_html":"(cypher : String, **params)","location":{"filename":"src/graph.cr","line_number":170,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L170"},"def":{"name":"read_query","args":[{"name":"cypher","external_name":"cypher","restriction":"String"}],"double_splat":{"name":"params","external_name":"params","restriction":""},"visibility":"Public","body":"read_query(cypher, params: params, return: List)"}},{"html_id":"run(cypher:String,params)-instance-method","name":"run","abstract":false,"args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"params","external_name":"params","restriction":""}],"args_string":"(cypher : String, params)","args_html":"(cypher : String, params)","location":{"filename":"src/graph.cr","line_number":245,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L245"},"def":{"name":"run","args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"params","external_name":"params","restriction":""}],"visibility":"Public","body":"execute(build_query(cypher, params))"}},{"html_id":"run(cypher:String)-instance-method","name":"run","abstract":false,"args":[{"name":"cypher","external_name":"cypher","restriction":"String"}],"args_string":"(cypher : String)","args_html":"(cypher : String)","location":{"filename":"src/graph.cr","line_number":241,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L241"},"def":{"name":"run","args":[{"name":"cypher","external_name":"cypher","restriction":"String"}],"visibility":"Public","body":"execute(cypher)"}},{"html_id":"write_query(cypher:String,params:NamedTuple|Hash,returntypes:Tuple(*T))forallT-instance-method","name":"write_query","doc":"Write data to the graph using the given cypher query, passing in the\ngiven params and returning the given types for the values in your\nquery's `RETURN` clause.\n\n```\ngraph.write_query <<-CYPHER, {id: 123, now: Time.utc.to_unix_ms}, return: {Person}\n MATCH (person:Person{id: $id})\n SET person.confirmed_at = $now\n RETURN person\nCYPHER\n```","summary":"

    Write data to the graph using the given cypher query, passing in the given params and returning the given types for the values in your query's RETURN clause.

    ","abstract":false,"args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"params","external_name":"params","restriction":"NamedTuple | Hash"},{"name":"types","external_name":"return","restriction":"Tuple(*T)"}],"args_string":"(cypher : String, params : NamedTuple | Hash, return types : Tuple(*T)) forall T","args_html":"(cypher : String, params : NamedTuple | Hash, return types : Tuple(*T)) forall T","location":{"filename":"src/graph.cr","line_number":129,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L129"},"def":{"name":"write_query","args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"params","external_name":"params","restriction":"NamedTuple | Hash"},{"name":"types","external_name":"return","restriction":"Tuple(*T)"}],"visibility":"Public","body":"{% if true %}\n ResultSet({ {{ (T.type_vars.map(&.instance).join(\", \")).id }} }).new(\n run(cypher, params),\n cache: cache\n )\n {% end %}"}},{"html_id":"write_query(cypher:String,params:NamedTuple|Hash,returntype:T.class)forallT-instance-method","name":"write_query","abstract":false,"args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"params","external_name":"params","restriction":"NamedTuple | Hash"},{"name":"type","external_name":"return","restriction":"T.class"}],"args_string":"(cypher : String, params : NamedTuple | Hash, return type : T.class) forall T","args_html":"(cypher : String, params : NamedTuple | Hash, return type : T.class) forall T","location":{"filename":"src/graph.cr","line_number":138,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L138"},"def":{"name":"write_query","args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"params","external_name":"params","restriction":"NamedTuple | Hash"},{"name":"type","external_name":"return","restriction":"T.class"}],"visibility":"Public","body":"ResultSet(T).new(run(cypher, params), cache: cache)"}},{"html_id":"write_query(cypher:String,returntypes:Tuple(*T))forallT-instance-method","name":"write_query","doc":"Write data to the graph using the given cypher query, passing in the\ngiven params and returning the given types for the values in your\nquery's `RETURN` clause.\n\n```\ngraph.write_query <<-CYPHER, {id: 123, now: Time.utc.to_unix_ms}, return: {Person}\n MATCH (person:Person{id: $id})\n SET person.confirmed_at = $now\n RETURN person\nCYPHER\n```","summary":"

    Write data to the graph using the given cypher query, passing in the given params and returning the given types for the values in your query's RETURN clause.

    ","abstract":false,"args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"types","external_name":"return","restriction":"Tuple(*T)"}],"args_string":"(cypher : String, return types : Tuple(*T)) forall T","args_html":"(cypher : String, return types : Tuple(*T)) forall T","location":{"filename":"src/graph.cr","line_number":102,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L102"},"def":{"name":"write_query","args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"types","external_name":"return","restriction":"Tuple(*T)"}],"visibility":"Public","body":"{% if true %}\n ResultSet({ {{ (T.type_vars.map(&.instance).join(\", \")).id }} }).new(\n run(cypher),\n cache: cache\n )\n {% end %}"}},{"html_id":"write_query(cypher:String,returntypes:T.class)forallT-instance-method","name":"write_query","abstract":false,"args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"types","external_name":"return","restriction":"T.class"}],"args_string":"(cypher : String, return types : T.class) forall T","args_html":"(cypher : String, return types : T.class) forall T","location":{"filename":"src/graph.cr","line_number":111,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L111"},"def":{"name":"write_query","args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"types","external_name":"return","restriction":"T.class"}],"visibility":"Public","body":"ResultSet(T).new(run(cypher), cache: cache)"}},{"html_id":"write_query(cypher:String)-instance-method","name":"write_query","doc":"Write data to this graph using the given Cypher query.\n\n```\ngraph.write_query \"MATCH (u:User{active: true}) SET u:ActiveUser, u.active = null\"\n```","summary":"

    Write data to this graph using the given Cypher query.

    ","abstract":false,"args":[{"name":"cypher","external_name":"cypher","restriction":"String"}],"args_string":"(cypher : String)","args_html":"(cypher : String)","location":{"filename":"src/graph.cr","line_number":72,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L72"},"def":{"name":"write_query","args":[{"name":"cypher","external_name":"cypher","restriction":"String"}],"visibility":"Public","body":"ResultSet(List).new(run(cypher), cache: cache)"}},{"html_id":"write_query(cypher:String,**params)-instance-method","name":"write_query","doc":"Write data to this graph using the given Cypher query.\n\n```\ngraph.write_query \"MATCH (u:User{active: $active}) SET u:ActiveUser, u.active = null\", active: active\n```","summary":"

    Write data to this graph using the given Cypher query.

    ","abstract":false,"args":[{"name":"cypher","external_name":"cypher","restriction":"String"}],"args_string":"(cypher : String, **params)","args_html":"(cypher : String, **params)","location":{"filename":"src/graph.cr","line_number":84,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L84"},"def":{"name":"write_query","args":[{"name":"cypher","external_name":"cypher","restriction":"String"}],"double_splat":{"name":"params","external_name":"params","restriction":""},"visibility":"Public","body":"ResultSet(List).new(run(cypher, params), cache: cache)"}}]},{"html_id":"redis/Redis/Graph/Constraints","path":"Redis/Graph/Constraints.html","kind":"struct","full_name":"Redis::Graph::Constraints(T)","name":"Constraints","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph/constraints.cr","line_number":3,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/constraints.cr#L3"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"},"constructors":[{"html_id":"new(graph:Graph::Client(T),redis:T,key:String,cache:Cache)-class-method","name":"new","abstract":false,"args":[{"name":"graph","external_name":"graph","restriction":"Graph::Client(T)"},{"name":"redis","external_name":"redis","restriction":"T"},{"name":"key","external_name":"key","restriction":"String"},{"name":"cache","external_name":"cache","restriction":"Cache"}],"args_string":"(graph : Graph::Client(T), redis : T, key : String, cache : Cache)","args_html":"(graph : Graph::Client(T), redis : T, key : String, cache : Cache)","location":{"filename":"src/graph/constraints.cr","line_number":3,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/constraints.cr#L3"},"def":{"name":"new","args":[{"name":"graph","external_name":"graph","restriction":"Graph::Client(T)"},{"name":"redis","external_name":"redis","restriction":"T"},{"name":"key","external_name":"key","restriction":"String"},{"name":"cache","external_name":"cache","restriction":"Cache"}],"visibility":"Public","body":"_ = Constraints(T).allocate\n_.initialize(graph, redis, key, cache)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"cache:Cache-instance-method","name":"cache","abstract":false,"def":{"name":"cache","return_type":"Cache","visibility":"Public","body":"@cache"}},{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/graph/constraints.cr","line_number":3,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/constraints.cr#L3"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@graph.clone, @redis.clone, @key.clone, @cache.clone)"}},{"html_id":"copy_with(graph_graph=@graph,redis_redis=@redis,key_key=@key,cache_cache=@cache)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_graph","default_value":"@graph","external_name":"graph","restriction":""},{"name":"_redis","default_value":"@redis","external_name":"redis","restriction":""},{"name":"_key","default_value":"@key","external_name":"key","restriction":""},{"name":"_cache","default_value":"@cache","external_name":"cache","restriction":""}],"args_string":"(graph _graph = @graph, redis _redis = @redis, key _key = @key, cache _cache = @cache)","args_html":"(graph _graph = @graph, redis _redis = @redis, key _key = @key, cache _cache = @cache)","location":{"filename":"src/graph/constraints.cr","line_number":3,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/constraints.cr#L3"},"def":{"name":"copy_with","args":[{"name":"_graph","default_value":"@graph","external_name":"graph","restriction":""},{"name":"_redis","default_value":"@redis","external_name":"redis","restriction":""},{"name":"_key","default_value":"@key","external_name":"key","restriction":""},{"name":"_cache","default_value":"@cache","external_name":"cache","restriction":""}],"visibility":"Public","body":"self.class.new(_graph, _redis, _key, _cache)"}},{"html_id":"create(label_or_relationship_type,constraint_type:Type,entity_type:EntityType,property:String)-instance-method","name":"create","abstract":false,"args":[{"name":"label_or_relationship_type","external_name":"label_or_relationship_type","restriction":""},{"name":"constraint_type","external_name":"constraint_type","restriction":"Type"},{"name":"entity_type","external_name":"entity_type","restriction":"EntityType"},{"name":"property","external_name":"property","restriction":"String"}],"args_string":"(label_or_relationship_type, constraint_type : Type, entity_type : EntityType, property : String)","args_html":"(label_or_relationship_type, constraint_type : Type, entity_type : EntityType, property : String)","location":{"filename":"src/graph/constraints.cr","line_number":4,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/constraints.cr#L4"},"def":{"name":"create","args":[{"name":"label_or_relationship_type","external_name":"label_or_relationship_type","restriction":""},{"name":"constraint_type","external_name":"constraint_type","restriction":"Type"},{"name":"entity_type","external_name":"entity_type","restriction":"EntityType"},{"name":"property","external_name":"property","restriction":"String"}],"visibility":"Public","body":"create(label_or_relationship_type, constraint_type, entity_type, [property])"}},{"html_id":"create(label_or_relationship_type,constraint_type:Type,entity_type:EntityType,properties:Array(String))-instance-method","name":"create","abstract":false,"args":[{"name":"label_or_relationship_type","external_name":"label_or_relationship_type","restriction":""},{"name":"constraint_type","external_name":"constraint_type","restriction":"Type"},{"name":"entity_type","external_name":"entity_type","restriction":"EntityType"},{"name":"properties","external_name":"properties","restriction":"Array(String)"}],"args_string":"(label_or_relationship_type, constraint_type : Type, entity_type : EntityType, properties : Array(String))","args_html":"(label_or_relationship_type, constraint_type : Type, entity_type : EntityType, properties : Array(String))","location":{"filename":"src/graph/constraints.cr","line_number":8,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/constraints.cr#L8"},"def":{"name":"create","args":[{"name":"label_or_relationship_type","external_name":"label_or_relationship_type","restriction":""},{"name":"constraint_type","external_name":"constraint_type","restriction":"Type"},{"name":"entity_type","external_name":"entity_type","restriction":"EntityType"},{"name":"properties","external_name":"properties","restriction":"Array(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 8 + properties.size)\n((command << \"graph.constraint\") << \"create\") << @key\n((command << constraint_type.to_s) << entity_type.to_s) << label_or_relationship_type\n(command << \"properties\") << properties.size.to_s\ncommand.concat(properties)\nresult = redis.run(command)\n"}},{"html_id":"graph:Graph::Client(T)-instance-method","name":"graph","abstract":false,"def":{"name":"graph","return_type":"Graph::Client(T)","visibility":"Public","body":"@graph"}},{"html_id":"key:String-instance-method","name":"key","abstract":false,"def":{"name":"key","return_type":"String","visibility":"Public","body":"@key"}},{"html_id":"list-instance-method","name":"list","abstract":false,"location":{"filename":"src/graph/constraints.cr","line_number":18,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/constraints.cr#L18"},"def":{"name":"list","visibility":"Public","body":"list_results(graph.write_query(\"CALL db.constraints() YIELD type, label, properties, entitytype, status\\nRETURN type, label, properties, entitytype, status\", return: {String, String, Array(String), String, String}))"}},{"html_id":"list(*,nodelabel:String)-instance-method","name":"list","abstract":false,"args":[{"name":"","external_name":"","restriction":""},{"name":"label","external_name":"node","restriction":"String"}],"args_string":"(*, node label : String)","args_html":"(*, node label : String)","location":{"filename":"src/graph/constraints.cr","line_number":25,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/constraints.cr#L25"},"def":{"name":"list","args":[{"name":"","external_name":"","restriction":""},{"name":"label","external_name":"node","restriction":"String"}],"splat_index":0,"visibility":"Public","body":"list_results(graph.write_query(\"CALL db.constraints() YIELD type, label, properties, entitytype, status\\nWHERE label = $label\\nAND entitytype = 'NODE'\\nRETURN type, label, properties, entitytype, status\", {label: label}, return: {String, String, Array(String), String, String}))"}},{"html_id":"list(*,relationshiptype:String)-instance-method","name":"list","abstract":false,"args":[{"name":"","external_name":"","restriction":""},{"name":"type","external_name":"relationship","restriction":"String"}],"args_string":"(*, relationship type : String)","args_html":"(*, relationship type : String)","location":{"filename":"src/graph/constraints.cr","line_number":34,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/constraints.cr#L34"},"def":{"name":"list","args":[{"name":"","external_name":"","restriction":""},{"name":"type","external_name":"relationship","restriction":"String"}],"splat_index":0,"visibility":"Public","body":"list_results(graph.write_query(\"CALL db.constraints() YIELD type, label, properties, entitytype, status\\nWHERE label = $label\\nAND entitytype = 'NODE'\\nRETURN type, label, properties, entitytype, status\", {label: label}, return: {String, String, Array(String), String, String}))"}},{"html_id":"redis:T-instance-method","name":"redis","abstract":false,"def":{"name":"redis","return_type":"T","visibility":"Public","body":"@redis"}}],"types":[{"html_id":"redis/Redis/Graph/Constraints/Constraint","path":"Redis/Graph/Constraints/Constraint.html","kind":"struct","full_name":"Redis::Graph::Constraints::Constraint","name":"Constraint","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph/constraints.cr","line_number":77,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/constraints.cr#L77"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph/Constraints","kind":"struct","full_name":"Redis::Graph::Constraints(T)","name":"Constraints"},"constructors":[{"html_id":"new(type:Type,label:String,properties:Array(String),entity_type:EntityType,status:Status)-class-method","name":"new","abstract":false,"args":[{"name":"type","external_name":"type","restriction":"Type"},{"name":"label","external_name":"label","restriction":"String"},{"name":"properties","external_name":"properties","restriction":"Array(String)"},{"name":"entity_type","external_name":"entity_type","restriction":"EntityType"},{"name":"status","external_name":"status","restriction":"Status"}],"args_string":"(type : Type, label : String, properties : Array(String), entity_type : EntityType, status : Status)","args_html":"(type : Type, label : String, properties : Array(String), entity_type : EntityType, status : Status)","location":{"filename":"src/graph/constraints.cr","line_number":77,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/constraints.cr#L77"},"def":{"name":"new","args":[{"name":"type","external_name":"type","restriction":"Type"},{"name":"label","external_name":"label","restriction":"String"},{"name":"properties","external_name":"properties","restriction":"Array(String)"},{"name":"entity_type","external_name":"entity_type","restriction":"EntityType"},{"name":"status","external_name":"status","restriction":"Status"}],"visibility":"Public","body":"_ = allocate\n_.initialize(type, label, properties, entity_type, status)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/graph/constraints.cr","line_number":77,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/constraints.cr#L77"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@type.clone, @label.clone, @properties.clone, @entity_type.clone, @status.clone)"}},{"html_id":"copy_with(type_type=@type,label_label=@label,properties_properties=@properties,entity_type_entity_type=@entity_type,status_status=@status)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_type","default_value":"@type","external_name":"type","restriction":""},{"name":"_label","default_value":"@label","external_name":"label","restriction":""},{"name":"_properties","default_value":"@properties","external_name":"properties","restriction":""},{"name":"_entity_type","default_value":"@entity_type","external_name":"entity_type","restriction":""},{"name":"_status","default_value":"@status","external_name":"status","restriction":""}],"args_string":"(type _type = @type, label _label = @label, properties _properties = @properties, entity_type _entity_type = @entity_type, status _status = @status)","args_html":"(type _type = @type, label _label = @label, properties _properties = @properties, entity_type _entity_type = @entity_type, status _status = @status)","location":{"filename":"src/graph/constraints.cr","line_number":77,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/constraints.cr#L77"},"def":{"name":"copy_with","args":[{"name":"_type","default_value":"@type","external_name":"type","restriction":""},{"name":"_label","default_value":"@label","external_name":"label","restriction":""},{"name":"_properties","default_value":"@properties","external_name":"properties","restriction":""},{"name":"_entity_type","default_value":"@entity_type","external_name":"entity_type","restriction":""},{"name":"_status","default_value":"@status","external_name":"status","restriction":""}],"visibility":"Public","body":"self.class.new(_type, _label, _properties, _entity_type, _status)"}},{"html_id":"entity_type:EntityType-instance-method","name":"entity_type","abstract":false,"def":{"name":"entity_type","return_type":"EntityType","visibility":"Public","body":"@entity_type"}},{"html_id":"label:String-instance-method","name":"label","abstract":false,"def":{"name":"label","return_type":"String","visibility":"Public","body":"@label"}},{"html_id":"properties:Array(String)-instance-method","name":"properties","abstract":false,"def":{"name":"properties","return_type":"Array(String)","visibility":"Public","body":"@properties"}},{"html_id":"status:Status-instance-method","name":"status","abstract":false,"def":{"name":"status","return_type":"Status","visibility":"Public","body":"@status"}},{"html_id":"type:Type-instance-method","name":"type","abstract":false,"def":{"name":"type","return_type":"Type","visibility":"Public","body":"@type"}}]},{"html_id":"redis/Redis/Graph/Constraints/EntityType","path":"Redis/Graph/Constraints/EntityType.html","kind":"enum","full_name":"Redis::Graph::Constraints::EntityType","name":"EntityType","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph/constraints.cr","line_number":66,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/constraints.cr#L66"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"NODE","name":"NODE","value":"0"},{"id":"RELATIONSHIP","name":"RELATIONSHIP","value":"1"}],"namespace":{"html_id":"redis/Redis/Graph/Constraints","kind":"struct","full_name":"Redis::Graph::Constraints(T)","name":"Constraints"},"instance_methods":[{"html_id":"node?-instance-method","name":"node?","abstract":false,"location":{"filename":"src/graph/constraints.cr","line_number":67,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/constraints.cr#L67"},"def":{"name":"node?","visibility":"Public","body":"self == NODE"}},{"html_id":"relationship?-instance-method","name":"relationship?","abstract":false,"location":{"filename":"src/graph/constraints.cr","line_number":68,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/constraints.cr#L68"},"def":{"name":"relationship?","visibility":"Public","body":"self == RELATIONSHIP"}}]},{"html_id":"redis/Redis/Graph/Constraints/Status","path":"Redis/Graph/Constraints/Status.html","kind":"enum","full_name":"Redis::Graph::Constraints::Status","name":"Status","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph/constraints.cr","line_number":71,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/constraints.cr#L71"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"UNDER_CONSTRUCTION","name":"UNDER_CONSTRUCTION","value":"0"},{"id":"OPERATIONAL","name":"OPERATIONAL","value":"1"},{"id":"FAILED","name":"FAILED","value":"2"}],"namespace":{"html_id":"redis/Redis/Graph/Constraints","kind":"struct","full_name":"Redis::Graph::Constraints(T)","name":"Constraints"},"instance_methods":[{"html_id":"failed?-instance-method","name":"failed?","abstract":false,"location":{"filename":"src/graph/constraints.cr","line_number":74,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/constraints.cr#L74"},"def":{"name":"failed?","visibility":"Public","body":"self == FAILED"}},{"html_id":"operational?-instance-method","name":"operational?","abstract":false,"location":{"filename":"src/graph/constraints.cr","line_number":73,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/constraints.cr#L73"},"def":{"name":"operational?","visibility":"Public","body":"self == OPERATIONAL"}},{"html_id":"under_construction?-instance-method","name":"under_construction?","abstract":false,"location":{"filename":"src/graph/constraints.cr","line_number":72,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/constraints.cr#L72"},"def":{"name":"under_construction?","visibility":"Public","body":"self == UNDER_CONSTRUCTION"}}]},{"html_id":"redis/Redis/Graph/Constraints/Type","path":"Redis/Graph/Constraints/Type.html","kind":"enum","full_name":"Redis::Graph::Constraints::Type","name":"Type","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph/constraints.cr","line_number":59,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/constraints.cr#L59"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"UNIQUE","name":"UNIQUE","value":"0"},{"id":"MANDATORY","name":"MANDATORY","value":"1"}],"namespace":{"html_id":"redis/Redis/Graph/Constraints","kind":"struct","full_name":"Redis::Graph::Constraints(T)","name":"Constraints"},"instance_methods":[{"html_id":"mandatory?-instance-method","name":"mandatory?","abstract":false,"location":{"filename":"src/graph/constraints.cr","line_number":63,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/constraints.cr#L63"},"def":{"name":"mandatory?","visibility":"Public","body":"self == MANDATORY"}},{"html_id":"unique?-instance-method","name":"unique?","abstract":false,"location":{"filename":"src/graph/constraints.cr","line_number":62,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/constraints.cr#L62"},"def":{"name":"unique?","visibility":"Public","body":"self == UNIQUE"}}]}]},{"html_id":"redis/Redis/Graph/ConstraintViolation","path":"Redis/Graph/ConstraintViolation.html","kind":"class","full_name":"Redis::Graph::ConstraintViolation","name":"ConstraintViolation","abstract":false,"superclass":{"html_id":"redis/Redis/Graph/Error","kind":"class","full_name":"Redis::Graph::Error","name":"Error"},"ancestors":[{"html_id":"redis/Redis/Graph/Error","kind":"class","full_name":"Redis::Graph::Error","name":"Error"},{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph.cr","line_number":501,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L501"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"}},{"html_id":"redis/Redis/Graph/Error","path":"Redis/Graph/Error.html","kind":"class","full_name":"Redis::Graph::Error","name":"Error","abstract":false,"superclass":{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},"ancestors":[{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph.cr","line_number":58,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L58"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"subclasses":[{"html_id":"redis/Redis/Graph/ConstraintViolation","kind":"class","full_name":"Redis::Graph::ConstraintViolation","name":"ConstraintViolation"},{"html_id":"redis/Redis/Graph/UnexpectedValue","kind":"class","full_name":"Redis::Graph::UnexpectedValue","name":"UnexpectedValue"}],"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"}},{"html_id":"redis/Redis/Graph/Field","path":"Redis/Graph/Field.html","kind":"annotation","full_name":"Redis::Graph::Field","name":"Field","abstract":false,"locations":[{"filename":"src/graph/serializable.cr","line_number":2,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/serializable.cr#L2"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"}},{"html_id":"redis/Redis/Graph/Indices","path":"Redis/Graph/Indices.html","kind":"struct","full_name":"Redis::Graph::Indices(T)","name":"Indices","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph/indices.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/indices.cr#L1"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"},"constructors":[{"html_id":"new(graph:Graph::Client(T))-class-method","name":"new","abstract":false,"args":[{"name":"graph","external_name":"graph","restriction":"Graph::Client(T)"}],"args_string":"(graph : Graph::Client(T))","args_html":"(graph : Graph::Client(T))","location":{"filename":"src/graph/indices.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/indices.cr#L1"},"def":{"name":"new","args":[{"name":"graph","external_name":"graph","restriction":"Graph::Client(T)"}],"visibility":"Public","body":"_ = Indices(T).allocate\n_.initialize(graph)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/graph/indices.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/indices.cr#L1"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@graph.clone)"}},{"html_id":"copy_with(graph_graph=@graph)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_graph","default_value":"@graph","external_name":"graph","restriction":""}],"args_string":"(graph _graph = @graph)","args_html":"(graph _graph = @graph)","location":{"filename":"src/graph/indices.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/indices.cr#L1"},"def":{"name":"copy_with","args":[{"name":"_graph","default_value":"@graph","external_name":"graph","restriction":""}],"visibility":"Public","body":"self.class.new(_graph)"}},{"html_id":"create(label:String,property:String)-instance-method","name":"create","abstract":false,"args":[{"name":"label","external_name":"label","restriction":"String"},{"name":"property","external_name":"property","restriction":"String"}],"args_string":"(label : String, property : String)","args_html":"(label : String, property : String)","location":{"filename":"src/graph/indices.cr","line_number":2,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/indices.cr#L2"},"def":{"name":"create","args":[{"name":"label","external_name":"label","restriction":"String"},{"name":"property","external_name":"property","restriction":"String"}],"visibility":"Public","body":"create(label, {property})"}},{"html_id":"create(label:String,properties:Enumerable(String))-instance-method","name":"create","abstract":false,"args":[{"name":"label","external_name":"label","restriction":"String"},{"name":"properties","external_name":"properties","restriction":"Enumerable(String)"}],"args_string":"(label : String, properties : Enumerable(String))","args_html":"(label : String, properties : Enumerable(String))","location":{"filename":"src/graph/indices.cr","line_number":6,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/indices.cr#L6"},"def":{"name":"create","args":[{"name":"label","external_name":"label","restriction":"String"},{"name":"properties","external_name":"properties","restriction":"Enumerable(String)"}],"visibility":"Public","body":"cypher = String.build do |str|\n ((str << \"CREATE INDEX FOR (n:\") << label) << \") ON (\"\n properties.each_with_index(1) do |property, index|\n (str << \"n.\") << property\n if index < properties.size\n str << \", \"\n end\n end\n str << ')'\nend\nbegin\n graph.write_query(cypher)\nrescue ex : Redis::Error\n if (msg = ex.message) && (match = msg.match(/Attribute '(.*)' is already indexed/))\n raise(IndexAlreadyExists.new(\"Index on #{label.inspect} already indexes #{match[1].inspect}\"))\n else\n raise(ex)\n end\nend\n"}},{"html_id":"graph:Graph::Client(T)-instance-method","name":"graph","abstract":false,"def":{"name":"graph","return_type":"Graph::Client(T)","visibility":"Public","body":"@graph"}}],"types":[{"html_id":"redis/Redis/Graph/Indices/IndexAlreadyExists","path":"Redis/Graph/Indices/IndexAlreadyExists.html","kind":"class","full_name":"Redis::Graph::Indices::IndexAlreadyExists","name":"IndexAlreadyExists","abstract":false,"superclass":{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},"ancestors":[{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph/indices.cr","line_number":30,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/indices.cr#L30"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph/Indices","kind":"struct","full_name":"Redis::Graph::Indices(T)","name":"Indices"}}]},{"html_id":"redis/Redis/Graph/List","path":"Redis/Graph/List.html","kind":"alias","full_name":"Redis::Graph::List","name":"List","abstract":false,"locations":[{"filename":"src/graph/value.cr","line_number":11,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/value.cr#L11"}],"repository_name":"redis","program":false,"enum":false,"alias":true,"aliased":"Array(Redis::Graph::Value)","aliased_html":"Array(Redis::Graph::Value)","const":false,"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"}},{"html_id":"redis/Redis/Graph/Map","path":"Redis/Graph/Map.html","kind":"alias","full_name":"Redis::Graph::Map","name":"Map","abstract":false,"locations":[{"filename":"src/graph/value.cr","line_number":12,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/value.cr#L12"}],"repository_name":"redis","program":false,"enum":false,"alias":true,"aliased":"Hash(String, Redis::Graph::Value)","aliased_html":"Hash(String, Redis::Graph::Value)","const":false,"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"}},{"html_id":"redis/Redis/Graph/Node","path":"Redis/Graph/Node.html","kind":"struct","full_name":"Redis::Graph::Node","name":"Node","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph/node.cr","line_number":19,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/node.cr#L19"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"},"doc":"Represents a node in the graph.\n\n```\nresult = graph.read_query(<<-CYPHER)\n MATCH (u:User)\n RETURN u\nCYPHER\n\nresult.each do |(user)|\n user = user.as(Redis::Graph::Node)\n # ...\nend\n```","summary":"

    Represents a node in the graph.

    ","class_methods":[{"html_id":"from_redis_graph_value(type:ValueType,value,cache:Cache)-class-method","name":"from_redis_graph_value","abstract":false,"args":[{"name":"type","external_name":"type","restriction":"ValueType"},{"name":"value","external_name":"value","restriction":""},{"name":"cache","external_name":"cache","restriction":"Cache"}],"args_string":"(type : ValueType, value, cache : Cache)","args_html":"(type : ValueType, value, cache : Cache)","location":{"filename":"src/graph/node.cr","line_number":24,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/node.cr#L24"},"def":{"name":"from_redis_graph_value","args":[{"name":"type","external_name":"type","restriction":"ValueType"},{"name":"value","external_name":"value","restriction":""},{"name":"cache","external_name":"cache","restriction":"Cache"}],"visibility":"Public","body":"if type.node?\nelse\n raise(ArgumentError.new(\"Expected Node, got: #{value.inspect}\"))\nend\nfrom(value.as(Array), cache)\n"}},{"html_id":"matches_redis_graph_type?(type:Redis::Graph::ValueType):Bool-class-method","name":"matches_redis_graph_type?","abstract":false,"args":[{"name":"type","external_name":"type","restriction":"Redis::Graph::ValueType"}],"args_string":"(type : Redis::Graph::ValueType) : Bool","args_html":"(type : Redis::Graph::ValueType) : Bool","location":{"filename":"src/graph.cr","line_number":642,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L642"},"def":{"name":"matches_redis_graph_type?","args":[{"name":"type","external_name":"type","restriction":"Redis::Graph::ValueType"}],"return_type":"Bool","visibility":"Public","body":"type.node?"}}],"instance_methods":[{"html_id":"id:Int64-instance-method","name":"id","abstract":false,"location":{"filename":"src/graph/node.cr","line_number":20,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/node.cr#L20"},"def":{"name":"id","return_type":"Int64","visibility":"Public","body":"@id"}},{"html_id":"labels:Array(String)-instance-method","name":"labels","abstract":false,"location":{"filename":"src/graph/node.cr","line_number":21,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/node.cr#L21"},"def":{"name":"labels","return_type":"Array(String)","visibility":"Public","body":"@labels"}},{"html_id":"properties:Hash(String,Value)-instance-method","name":"properties","abstract":false,"location":{"filename":"src/graph/node.cr","line_number":22,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/node.cr#L22"},"def":{"name":"properties","return_type":"Hash(String, Value)","visibility":"Public","body":"@properties"}}]},{"html_id":"redis/Redis/Graph/Relationship","path":"Redis/Graph/Relationship.html","kind":"struct","full_name":"Redis::Graph::Relationship","name":"Relationship","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph/relationship.cr","line_number":18,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/relationship.cr#L18"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"},"doc":"Represents a relationship in your graph\n\n```\nresult = graph.read_query(<<-CYPHER)\n MATCH (:User)-[membership:MEMBER_OF]->(:Team)\n RETURN membership\nCYPHER\n\nresult.each do |(membership)|\n membership = membership.as(Redis::Graph::Relationship)\n # ...\nend\n```","summary":"

    Represents a relationship in your graph

    ","class_methods":[{"html_id":"matches_redis_graph_type?(type:Redis::Graph::ValueType):Bool-class-method","name":"matches_redis_graph_type?","abstract":false,"args":[{"name":"type","external_name":"type","restriction":"Redis::Graph::ValueType"}],"args_string":"(type : Redis::Graph::ValueType) : Bool","args_html":"(type : Redis::Graph::ValueType) : Bool","location":{"filename":"src/graph.cr","line_number":646,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L646"},"def":{"name":"matches_redis_graph_type?","args":[{"name":"type","external_name":"type","restriction":"Redis::Graph::ValueType"}],"return_type":"Bool","visibility":"Public","body":"type.edge?"}}],"constructors":[{"html_id":"new(id:Int64,type:String,src_node:Int64,dest_node:Int64,properties:Hash(String,Redis::Graph::Value))-class-method","name":"new","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"::Int64"},{"name":"type","external_name":"type","restriction":"::String"},{"name":"src_node","external_name":"src_node","restriction":"::Int64"},{"name":"dest_node","external_name":"dest_node","restriction":"::Int64"},{"name":"properties","external_name":"properties","restriction":"::Hash(::String, ::Redis::Graph::Value)"}],"args_string":"(id : Int64, type : String, src_node : Int64, dest_node : Int64, properties : Hash(String, Redis::Graph::Value))","args_html":"(id : Int64, type : String, src_node : Int64, dest_node : Int64, properties : Hash(String, Redis::Graph::Value))","location":{"filename":"src/graph/relationship.cr","line_number":84,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/relationship.cr#L84"},"def":{"name":"new","args":[{"name":"id","external_name":"id","restriction":"::Int64"},{"name":"type","external_name":"type","restriction":"::String"},{"name":"src_node","external_name":"src_node","restriction":"::Int64"},{"name":"dest_node","external_name":"dest_node","restriction":"::Int64"},{"name":"properties","external_name":"properties","restriction":"::Hash(::String, ::Redis::Graph::Value)"}],"visibility":"Public","body":"_ = allocate\n_.initialize(id, type, src_node, dest_node, properties)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"dest_node:Int64-instance-method","name":"dest_node","doc":"The node that this relationship points to, for example with\n`(person)-[membership]->(team)`, it will be the node id of `team`.\n\nWARNING: This will not match an `id` *property* of the destination node.","summary":"

    The node that this relationship points to, for example with (person)-[membership]->(team), it will be the node id of team.

    ","abstract":false,"location":{"filename":"src/graph/relationship.cr","line_number":41,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/relationship.cr#L41"},"def":{"name":"dest_node","return_type":"Int64","visibility":"Public","body":"@dest_node"}},{"html_id":"id:Int64-instance-method","name":"id","doc":"The identifier of the relationship.\n\nNOTE: If this relationship has an `id` property, this is *not* that.\nWARNING: Do not try to query against this. RedisGraph provides no\nguarantees that this relationship will be at the same offset it was at\nthe last time you queried it.","summary":"

    The identifier of the relationship.

    ","abstract":false,"location":{"filename":"src/graph/relationship.cr","line_number":25,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/relationship.cr#L25"},"def":{"name":"id","return_type":"Int64","visibility":"Public","body":"@id"}},{"html_id":"properties:Hash(String,Value)-instance-method","name":"properties","doc":"The hash of properties for this relationship.\n\n```\nresult = graph.write_query <<-CYPHER, now: Time.utc.to_unix_ms\n CREATE (person)-[membership{since: $now}]->(team)\n RETURN membership\nCYPHER\nresult.first.properties # => {\"since\" => 2022-05-15T05:48:23 UTC}\n```","summary":"

    The hash of properties for this relationship.

    ","abstract":false,"location":{"filename":"src/graph/relationship.cr","line_number":52,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/relationship.cr#L52"},"def":{"name":"properties","return_type":"Hash(String, Value)","visibility":"Public","body":"@properties"}},{"html_id":"src_node:Int64-instance-method","name":"src_node","doc":"The node that this relationship originates from, for example with\n`(person)-[membership]->(team)`, it will be the node id of `person`.\n\nWARNING: This will not match an `id` *property* of the source node.","summary":"

    The node that this relationship originates from, for example with (person)-[membership]->(team), it will be the node id of person.

    ","abstract":false,"location":{"filename":"src/graph/relationship.cr","line_number":35,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/relationship.cr#L35"},"def":{"name":"src_node","return_type":"Int64","visibility":"Public","body":"@src_node"}},{"html_id":"type:String-instance-method","name":"type","doc":"The type of relationship, for example with `[:MEMBER_OF]`, the `type`\nwill be `\"MEMBER_OF\"`.","summary":"

    The type of relationship, for example with [:MEMBER_OF], the #type will be "MEMBER_OF".

    ","abstract":false,"location":{"filename":"src/graph/relationship.cr","line_number":29,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/relationship.cr#L29"},"def":{"name":"type","return_type":"String","visibility":"Public","body":"@type"}}]},{"html_id":"redis/Redis/Graph/ResultSet","path":"Redis/Graph/ResultSet.html","kind":"struct","full_name":"Redis::Graph::ResultSet(T)","name":"ResultSet","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph.cr","line_number":308,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L308"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"redis/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"}],"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"},"constructors":[{"html_id":"new(*,fields:Array(String),rows:Array(T),cached_execution:Bool,duration:Time::Span,labels_added:Int64,labels_removed:Int64,nodes_created:Int64,nodes_deleted:Int64,relationships_created:Int64,relationships_deleted:Int64,properties_set:Int64,properties_removed:Int64,indices_created:Int64,indices_deleted:Int64)-class-method","name":"new","abstract":false,"args":[{"name":"","external_name":"","restriction":""},{"name":"fields","external_name":"fields","restriction":"::Array(::String)"},{"name":"rows","external_name":"rows","restriction":"::Array(T)"},{"name":"cached_execution","external_name":"cached_execution","restriction":"::Bool"},{"name":"duration","external_name":"duration","restriction":"::Time::Span"},{"name":"labels_added","external_name":"labels_added","restriction":"::Int64"},{"name":"labels_removed","external_name":"labels_removed","restriction":"::Int64"},{"name":"nodes_created","external_name":"nodes_created","restriction":"::Int64"},{"name":"nodes_deleted","external_name":"nodes_deleted","restriction":"::Int64"},{"name":"relationships_created","external_name":"relationships_created","restriction":"::Int64"},{"name":"relationships_deleted","external_name":"relationships_deleted","restriction":"::Int64"},{"name":"properties_set","external_name":"properties_set","restriction":"::Int64"},{"name":"properties_removed","external_name":"properties_removed","restriction":"::Int64"},{"name":"indices_created","external_name":"indices_created","restriction":"::Int64"},{"name":"indices_deleted","external_name":"indices_deleted","restriction":"::Int64"}],"args_string":"(*, fields : Array(String), rows : Array(T), cached_execution : Bool, duration : Time::Span, labels_added : Int64, labels_removed : Int64, nodes_created : Int64, nodes_deleted : Int64, relationships_created : Int64, relationships_deleted : Int64, properties_set : Int64, properties_removed : Int64, indices_created : Int64, indices_deleted : Int64)","args_html":"(*, fields : Array(String), rows : Array(T), cached_execution : Bool, duration : Time::Span, labels_added : Int64, labels_removed : Int64, nodes_created : Int64, nodes_deleted : Int64, relationships_created : Int64, relationships_deleted : Int64, properties_set : Int64, properties_removed : Int64, indices_created : Int64, indices_deleted : Int64)","location":{"filename":"src/graph.cr","line_number":433,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L433"},"def":{"name":"new","args":[{"name":"","external_name":"","restriction":""},{"name":"fields","external_name":"fields","restriction":"::Array(::String)"},{"name":"rows","external_name":"rows","restriction":"::Array(T)"},{"name":"cached_execution","external_name":"cached_execution","restriction":"::Bool"},{"name":"duration","external_name":"duration","restriction":"::Time::Span"},{"name":"labels_added","external_name":"labels_added","restriction":"::Int64"},{"name":"labels_removed","external_name":"labels_removed","restriction":"::Int64"},{"name":"nodes_created","external_name":"nodes_created","restriction":"::Int64"},{"name":"nodes_deleted","external_name":"nodes_deleted","restriction":"::Int64"},{"name":"relationships_created","external_name":"relationships_created","restriction":"::Int64"},{"name":"relationships_deleted","external_name":"relationships_deleted","restriction":"::Int64"},{"name":"properties_set","external_name":"properties_set","restriction":"::Int64"},{"name":"properties_removed","external_name":"properties_removed","restriction":"::Int64"},{"name":"indices_created","external_name":"indices_created","restriction":"::Int64"},{"name":"indices_deleted","external_name":"indices_deleted","restriction":"::Int64"}],"splat_index":0,"visibility":"Public","body":"_ = ResultSet(T).allocate\n_.initialize(fields: fields, rows: rows, cached_execution: cached_execution, duration: duration, labels_added: labels_added, labels_removed: labels_removed, nodes_created: nodes_created, nodes_deleted: nodes_deleted, relationships_created: relationships_created, relationships_deleted: relationships_deleted, properties_set: properties_set, properties_removed: properties_removed, indices_created: indices_created, indices_deleted: indices_deleted)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"cached_execution?:Bool-instance-method","name":"cached_execution?","doc":"Indicates whether the query was cached by RedisGraph","summary":"

    Indicates whether the query was cached by RedisGraph

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":316,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L316"},"def":{"name":"cached_execution?","return_type":"Bool","visibility":"Public","body":"@cached_execution"}},{"html_id":"duration:Time::Span-instance-method","name":"duration","doc":"How long it took RedisGraph to execute the query on the server side.","summary":"

    How long it took RedisGraph to execute the query on the server side.

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":318,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L318"},"def":{"name":"duration","return_type":"Time::Span","visibility":"Public","body":"@duration"}},{"html_id":"each(&)-instance-method","name":"each","doc":"Must yield this collection's elements to the block.","summary":"

    Must yield this collection's elements to the block.

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":467,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L467"},"def":{"name":"each","yields":1,"block_arity":1,"visibility":"Public","body":"@rows.each do |row|\n yield row\nend"}},{"html_id":"each_row(&)-instance-method","name":"each_row","doc":"Iterate over each of the results, yielding a tuple containing instances\nof the types in `T`.","summary":"

    Iterate over each of the results, yielding a tuple containing instances of the types in T.

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":454,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L454"},"def":{"name":"each_row","yields":1,"block_arity":1,"visibility":"Public","body":"field_map = Hash(String, Int32).new(initial_capacity: @fields.size)\n@fields.each_with_index do |field, index|\n field_map[field] = index\nend\n@rows.each do |row|\n yield Row.new(data: row, field_map: field_map)\nend\n"}},{"html_id":"fields:Array(String)-instance-method","name":"fields","doc":"The names of the fields in a query's `RETURN` clause","summary":"

    The names of the fields in a query's RETURN clause

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":312,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L312"},"def":{"name":"fields","return_type":"Array(String)","visibility":"Public","body":"@fields"}},{"html_id":"indices_created:Int64-instance-method","name":"indices_created","abstract":false,"location":{"filename":"src/graph.cr","line_number":335,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L335"},"def":{"name":"indices_created","return_type":"Int64","visibility":"Public","body":"@indices_created"}},{"html_id":"indices_deleted:Int64-instance-method","name":"indices_deleted","abstract":false,"location":{"filename":"src/graph.cr","line_number":336,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L336"},"def":{"name":"indices_deleted","return_type":"Int64","visibility":"Public","body":"@indices_deleted"}},{"html_id":"labels_added:Int64-instance-method","name":"labels_added","doc":"How many labels were added in this query","summary":"

    How many labels were added in this query

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":320,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L320"},"def":{"name":"labels_added","return_type":"Int64","visibility":"Public","body":"@labels_added"}},{"html_id":"labels_removed:Int64-instance-method","name":"labels_removed","doc":"How many labels were removed in this query","summary":"

    How many labels were removed in this query

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":322,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L322"},"def":{"name":"labels_removed","return_type":"Int64","visibility":"Public","body":"@labels_removed"}},{"html_id":"nodes_created:Int64-instance-method","name":"nodes_created","doc":"How many nodes were created in this query","summary":"

    How many nodes were created in this query

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":324,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L324"},"def":{"name":"nodes_created","return_type":"Int64","visibility":"Public","body":"@nodes_created"}},{"html_id":"nodes_deleted:Int64-instance-method","name":"nodes_deleted","doc":"How many nodes were deleted in this query","summary":"

    How many nodes were deleted in this query

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":326,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L326"},"def":{"name":"nodes_deleted","return_type":"Int64","visibility":"Public","body":"@nodes_deleted"}},{"html_id":"properties_removed:Int64-instance-method","name":"properties_removed","doc":"How many properties were removed in this query","summary":"

    How many properties were removed in this query

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":334,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L334"},"def":{"name":"properties_removed","return_type":"Int64","visibility":"Public","body":"@properties_removed"}},{"html_id":"properties_set:Int64-instance-method","name":"properties_set","doc":"How many properties were set in this query","summary":"

    How many properties were set in this query

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":332,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L332"},"def":{"name":"properties_set","return_type":"Int64","visibility":"Public","body":"@properties_set"}},{"html_id":"relationships_created:Int64-instance-method","name":"relationships_created","doc":"How many relationships were created in this query","summary":"

    How many relationships were created in this query

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":328,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L328"},"def":{"name":"relationships_created","return_type":"Int64","visibility":"Public","body":"@relationships_created"}},{"html_id":"relationships_deleted:Int64-instance-method","name":"relationships_deleted","doc":"How many relationships were deleted in this query","summary":"

    How many relationships were deleted in this query

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":330,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L330"},"def":{"name":"relationships_deleted","return_type":"Int64","visibility":"Public","body":"@relationships_deleted"}},{"html_id":"rows:Array(T)-instance-method","name":"rows","doc":"The values of the fields in a query's `RETURN` clause","summary":"

    The values of the fields in a query's RETURN clause

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":314,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L314"},"def":{"name":"rows","return_type":"Array(T)","visibility":"Public","body":"@rows"}},{"html_id":"size-instance-method","name":"size","doc":"Returns the number of elements in the collection.\n\n```\n[1, 2, 3, 4].size # => 4\n```","summary":"

    Returns the number of elements in the collection.

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":473,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L473"},"def":{"name":"size","visibility":"Public","body":"@rows.size"}}],"types":[{"html_id":"redis/Redis/Graph/ResultSet/Row","path":"Redis/Graph/ResultSet/Row.html","kind":"struct","full_name":"Redis::Graph::ResultSet::Row(T)","name":"Row","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph.cr","line_number":477,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L477"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph/ResultSet","kind":"struct","full_name":"Redis::Graph::ResultSet(T)","name":"ResultSet"},"constructors":[{"html_id":"new(data:T,field_map:Hash(String,Int32))-class-method","name":"new","abstract":false,"args":[{"name":"data","external_name":"data","restriction":"T"},{"name":"field_map","external_name":"field_map","restriction":"::Hash(::String, ::Int32)"}],"args_string":"(data : T, field_map : Hash(String, Int32))","args_html":"(data : T, field_map : Hash(String, Int32))","location":{"filename":"src/graph.cr","line_number":481,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L481"},"def":{"name":"new","args":[{"name":"data","external_name":"data","restriction":"T"},{"name":"field_map","external_name":"field_map","restriction":"::Hash(::String, ::Int32)"}],"visibility":"Public","body":"_ = Row(T).allocate\n_.initialize(data, field_map)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"[](key:Int)-instance-method","name":"[]","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"Int"}],"args_string":"(key : Int)","args_html":"(key : Int)","location":{"filename":"src/graph.cr","line_number":488,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L488"},"def":{"name":"[]","args":[{"name":"key","external_name":"key","restriction":"Int"}],"visibility":"Public","body":"@data[key]"}},{"html_id":"[](key:String)-instance-method","name":"[]","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/graph.cr","line_number":492,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L492"},"def":{"name":"[]","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"@data[@field_map[key]]"}},{"html_id":"data:T-instance-method","name":"data","abstract":false,"location":{"filename":"src/graph.cr","line_number":479,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L479"},"def":{"name":"data","return_type":"T","visibility":"Public","body":"@data"}},{"html_id":"first-instance-method","name":"first","abstract":false,"location":{"filename":"src/graph.cr","line_number":484,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L484"},"def":{"name":"first","visibility":"Public","body":"self[0]"}}]}]},{"html_id":"redis/Redis/Graph/Serializable","path":"Redis/Graph/Serializable.html","kind":"module","full_name":"Redis::Graph::Serializable","name":"Serializable","abstract":false,"locations":[{"filename":"src/graph/serializable.cr","line_number":52,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/serializable.cr#L52"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"},"doc":"The `Redis::Graph::Serializable::*` mixins tell `Redis::Graph::Client` how\nto deserialize nodes and relationships as your own Crystal object types,\nsimilar to [`DB::Serializable`](http://crystal-lang.github.io/crystal-db/api/0.11.0/DB/Serializable.html).\n\n```\nrequire \"redis/graph\"\n\nstruct Person\n include Redis::Graph::Serializable::Node\n\n getter id : UUID\n getter name : String\n getter created_at : Time\nend\n\nstruct Team\n include Redis::Graph::Serializable::Node\n\n getter name : String\nend\n\nstruct Membership\n include Redis::Graph::Serializable::Relationship\n\n getter since : Time\nend\n\nredis = Redis::Client.new\nredis.del \"my-graph\"\n\n# Store the graph data in the Redis key \"my-graph\"\ngraph = redis.graph(key: \"my-graph\")\n\nid = UUID.random\n\n# Create some data in our graph\npp graph.write_query <<-CYPHER, id: id, name: \"Jamie\", now: Time.utc.to_unix_ms, team_name: \"My Team\"\n CREATE (:Person{id: $id, name: $name, created_at: $now})-[:MEMBER_OF{since: $now}]->(team:Team{name: $team_name})\nCYPHER\n\n# The `return` argument specifies the return types of the results in your\n# Cypher query's `RETURN` clause\npp graph.read_query(<<-CYPHER, {id: id}, return: {Person, Membership, Team})\n MATCH (person:Person{id: $id})-[membership:MEMBER_OF]->(team:Team)\n RETURN person, membership, team\nCYPHER\n```","summary":"

    The Redis::Graph::Serializable::* mixins tell Redis::Graph::Client how to deserialize nodes and relationships as your own Crystal object types, similar to DB::Serializable.

    ","types":[{"html_id":"redis/Redis/Graph/Serializable/Node","path":"Redis/Graph/Serializable/Node.html","kind":"module","full_name":"Redis::Graph::Serializable::Node","name":"Node","abstract":false,"locations":[{"filename":"src/graph/serializable.cr","line_number":56,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/serializable.cr#L56"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph/Serializable","kind":"module","full_name":"Redis::Graph::Serializable","name":"Serializable"},"class_methods":[{"html_id":"from_redis_graph_value(node_type:T.class,value_type:Redis::Graph::ValueType,value,cache):TforallT-class-method","name":"from_redis_graph_value","abstract":false,"args":[{"name":"node_type","external_name":"node_type","restriction":"T.class"},{"name":"value_type","external_name":"value_type","restriction":"Redis::Graph::ValueType"},{"name":"value","external_name":"value","restriction":""},{"name":"cache","external_name":"cache","restriction":""}],"args_string":"(node_type : T.class, value_type : Redis::Graph::ValueType, value, cache) : T forall T","args_html":"(node_type : T.class, value_type : Redis::Graph::ValueType, value, cache) : T forall T","location":{"filename":"src/graph/serializable.cr","line_number":59,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/serializable.cr#L59"},"def":{"name":"from_redis_graph_value","args":[{"name":"node_type","external_name":"node_type","restriction":"T.class"},{"name":"value_type","external_name":"value_type","restriction":"Redis::Graph::ValueType"},{"name":"value","external_name":"value","restriction":""},{"name":"cache","external_name":"cache","restriction":""}],"return_type":"T","visibility":"Public","body":"id, label_ids, properties = value.as(Array)\nid = id.as(Int64)\nlabels = (label_ids.as(Array)).map do |label_id|\n cache.label(label_id.as(Int64))\nend\nmetadata = Metadata.new(id: id, labels: labels)\nT.new(metadata, properties.as(Array), cache)\n"}}],"constructors":[{"html_id":"new(metadata:Redis::Graph::Serializable::Node::Metadata,properties:Array,cache)-class-method","name":"new","abstract":false,"args":[{"name":"metadata","external_name":"metadata","restriction":"::Redis::Graph::Serializable::Node::Metadata"},{"name":"properties","external_name":"properties","restriction":"Array"},{"name":"cache","external_name":"cache","restriction":""}],"args_string":"(metadata : Redis::Graph::Serializable::Node::Metadata, properties : Array, cache)","args_html":"(metadata : Redis::Graph::Serializable::Node::Metadata, properties : Array, cache)","location":{"filename":"src/graph/serializable.cr","line_number":81,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/serializable.cr#L81"},"def":{"name":"new","args":[{"name":"metadata","external_name":"metadata","restriction":"::Redis::Graph::Serializable::Node::Metadata"},{"name":"properties","external_name":"properties","restriction":"Array"},{"name":"cache","external_name":"cache","restriction":""}],"visibility":"Public","body":"_ = allocate\n_.initialize(metadata, properties, cache)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"unknown_redis_graph_node_property(key,value)-instance-method","name":"unknown_redis_graph_node_property","abstract":false,"args":[{"name":"key","external_name":"key","restriction":""},{"name":"value","external_name":"value","restriction":""}],"args_string":"(key, value)","args_html":"(key, value)","location":{"filename":"src/graph/serializable.cr","line_number":121,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/serializable.cr#L121"},"def":{"name":"unknown_redis_graph_node_property","args":[{"name":"key","external_name":"key","restriction":""},{"name":"value","external_name":"value","restriction":""}],"visibility":"Public","body":""}}],"types":[{"html_id":"redis/Redis/Graph/Serializable/Node/Metadata","path":"Redis/Graph/Serializable/Node/Metadata.html","kind":"struct","full_name":"Redis::Graph::Serializable::Node::Metadata","name":"Metadata","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph/serializable.cr","line_number":57,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/serializable.cr#L57"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph/Serializable/Node","kind":"module","full_name":"Redis::Graph::Serializable::Node","name":"Node"},"constructors":[{"html_id":"new(id:Int64,labels:Array(String))-class-method","name":"new","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"Int64"},{"name":"labels","external_name":"labels","restriction":"Array(String)"}],"args_string":"(id : Int64, labels : Array(String))","args_html":"(id : Int64, labels : Array(String))","location":{"filename":"src/graph/serializable.cr","line_number":57,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/serializable.cr#L57"},"def":{"name":"new","args":[{"name":"id","external_name":"id","restriction":"Int64"},{"name":"labels","external_name":"labels","restriction":"Array(String)"}],"visibility":"Public","body":"_ = allocate\n_.initialize(id, labels)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/graph/serializable.cr","line_number":57,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/serializable.cr#L57"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@id.clone, @labels.clone)"}},{"html_id":"copy_with(id_id=@id,labels_labels=@labels)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_id","default_value":"@id","external_name":"id","restriction":""},{"name":"_labels","default_value":"@labels","external_name":"labels","restriction":""}],"args_string":"(id _id = @id, labels _labels = @labels)","args_html":"(id _id = @id, labels _labels = @labels)","location":{"filename":"src/graph/serializable.cr","line_number":57,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/serializable.cr#L57"},"def":{"name":"copy_with","args":[{"name":"_id","default_value":"@id","external_name":"id","restriction":""},{"name":"_labels","default_value":"@labels","external_name":"labels","restriction":""}],"visibility":"Public","body":"self.class.new(_id, _labels)"}},{"html_id":"id:Int64-instance-method","name":"id","abstract":false,"def":{"name":"id","return_type":"Int64","visibility":"Public","body":"@id"}},{"html_id":"labels:Array(String)-instance-method","name":"labels","abstract":false,"def":{"name":"labels","return_type":"Array(String)","visibility":"Public","body":"@labels"}}]},{"html_id":"redis/Redis/Graph/Serializable/Node/PropertyMissing","path":"Redis/Graph/Serializable/Node/PropertyMissing.html","kind":"class","full_name":"Redis::Graph::Serializable::Node::PropertyMissing","name":"PropertyMissing","abstract":false,"superclass":{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},"ancestors":[{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph/serializable.cr","line_number":124,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/serializable.cr#L124"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph/Serializable/Node","kind":"module","full_name":"Redis::Graph::Serializable::Node","name":"Node"}}]},{"html_id":"redis/Redis/Graph/Serializable/Property","path":"Redis/Graph/Serializable/Property.html","kind":"annotation","full_name":"Redis::Graph::Serializable::Property","name":"Property","abstract":false,"locations":[{"filename":"src/graph/serializable.cr","line_number":53,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/serializable.cr#L53"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph/Serializable","kind":"module","full_name":"Redis::Graph::Serializable","name":"Serializable"}}]},{"html_id":"redis/Redis/Graph/UnexpectedValue","path":"Redis/Graph/UnexpectedValue.html","kind":"class","full_name":"Redis::Graph::UnexpectedValue","name":"UnexpectedValue","abstract":false,"superclass":{"html_id":"redis/Redis/Graph/Error","kind":"class","full_name":"Redis::Graph::Error","name":"Error"},"ancestors":[{"html_id":"redis/Redis/Graph/Error","kind":"class","full_name":"Redis::Graph::Error","name":"Error"},{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph.cr","line_number":498,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L498"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"}},{"html_id":"redis/Redis/Graph/Value","path":"Redis/Graph/Value.html","kind":"alias","full_name":"Redis::Graph::Value","name":"Value","abstract":false,"locations":[{"filename":"src/graph/value.cr","line_number":2,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/value.cr#L2"}],"repository_name":"redis","program":false,"enum":false,"alias":true,"aliased":"(Array(Redis::Graph::Value) | Bool | Float64 | Hash(String, Redis::Graph::Value) | Int64 | Redis::Graph::Node | Redis::Graph::Relationship | String | Nil)","aliased_html":"Array(Redis::Graph::Value) | Bool | Float64 | Hash(String, Redis::Graph::Value) | Int64 | Redis::Graph::Node | Redis::Graph::Relationship | String | Nil","const":false,"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"},"class_methods":[{"html_id":"from_redis_graph_value(type:Redis::Graph::ValueType,value,cache):Redis::Graph::Value-class-method","name":"from_redis_graph_value","abstract":false,"args":[{"name":"type","external_name":"type","restriction":"Redis::Graph::ValueType"},{"name":"value","external_name":"value","restriction":""},{"name":"cache","external_name":"cache","restriction":""}],"args_string":"(type : Redis::Graph::ValueType, value, cache) : Redis::Graph::Value","args_html":"(type : Redis::Graph::ValueType, value, cache) : Redis::Graph::Value","location":{"filename":"src/graph.cr","line_number":600,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L600"},"def":{"name":"from_redis_graph_value","args":[{"name":"type","external_name":"type","restriction":"Redis::Graph::ValueType"},{"name":"value","external_name":"value","restriction":""},{"name":"cache","external_name":"cache","restriction":""}],"return_type":"Redis::Graph::Value","visibility":"Public","body":"Union(*T).from_redis_graph_value(type, value, cache)"}}]},{"html_id":"redis/Redis/Graph/ValueType","path":"Redis/Graph/ValueType.html","kind":"enum","full_name":"Redis::Graph::ValueType","name":"ValueType","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph/value_type.cr","line_number":7,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/value_type.cr#L7"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"UNKNOWN","name":"UNKNOWN","value":"0"},{"id":"NULL","name":"NULL","value":"1"},{"id":"STRING","name":"STRING","value":"2"},{"id":"INTEGER","name":"INTEGER","value":"3"},{"id":"BOOLEAN","name":"BOOLEAN","value":"4"},{"id":"DOUBLE","name":"DOUBLE","value":"5"},{"id":"ARRAY","name":"ARRAY","value":"6"},{"id":"EDGE","name":"EDGE","value":"7"},{"id":"NODE","name":"NODE","value":"8"},{"id":"PATH","name":"PATH","value":"9"},{"id":"MAP","name":"MAP","value":"10"},{"id":"POINT","name":"POINT","value":"11"}],"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"},"class_methods":[{"html_id":"value_for(type,value,cache):Value-class-method","name":"value_for","abstract":false,"args":[{"name":"type","external_name":"type","restriction":""},{"name":"value","external_name":"value","restriction":""},{"name":"cache","external_name":"cache","restriction":""}],"args_string":"(type, value, cache) : Value","args_html":"(type, value, cache) : Value","location":{"filename":"src/graph/value_type.cr","line_number":21,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/value_type.cr#L21"},"def":{"name":"value_for","args":[{"name":"type","external_name":"type","restriction":""},{"name":"value","external_name":"value","restriction":""},{"name":"cache","external_name":"cache","restriction":""}],"return_type":"Value","visibility":"Public","body":"type = ValueType.new((type.as(Int64)).to_i)\n(case type\nin .string?\n value.as(String)\nin .integer?\n value.as(Int64)\nin .null?\n nil\nin .boolean?\n value == 1\nin .double?\n (value.as(String)).to_f\nin .edge?\n Relationship.from(value.as(Array), cache)\nin .node?\n Node.from(value.as(Array), cache)\nin .array?\n (value.as(Array)).map do |item|\n t, v = item.as(Array)\n value_for(t, v, cache)\n end\nin .path?\n raise(ArgumentError.new(\"Paths not supported yet\"))\nin .map?\n hash = Map.new(initial_capacity: (value.as(Array)).size // 2)\n (value.as(Array)).each_slice(2, reuse: true) do |__temp_67|\n key, value = __temp_67\n t, v = value.as(Array)\n t = Redis::Graph::ValueType.new((t.as(Int)).to_i)\n parsed_value = Value.from_redis_graph_value(t, v, cache)\n hash[key.as(String)] = parsed_value\n end\n hash\nin .point?\n raise(ArgumentError.new(\"Points not supported yet\"))\nin .unknown?\n raise(ArgumentError.new(\"Unknown value type #{type}. Value: #{value.inspect}\"))\nend).as(Value)\n"}}],"instance_methods":[{"html_id":"array?-instance-method","name":"array?","abstract":false,"location":{"filename":"src/graph/value_type.cr","line_number":14,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/value_type.cr#L14"},"def":{"name":"array?","visibility":"Public","body":"self == ARRAY"}},{"html_id":"boolean?-instance-method","name":"boolean?","abstract":false,"location":{"filename":"src/graph/value_type.cr","line_number":12,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/value_type.cr#L12"},"def":{"name":"boolean?","visibility":"Public","body":"self == BOOLEAN"}},{"html_id":"double?-instance-method","name":"double?","abstract":false,"location":{"filename":"src/graph/value_type.cr","line_number":13,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/value_type.cr#L13"},"def":{"name":"double?","visibility":"Public","body":"self == DOUBLE"}},{"html_id":"edge?-instance-method","name":"edge?","abstract":false,"location":{"filename":"src/graph/value_type.cr","line_number":15,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/value_type.cr#L15"},"def":{"name":"edge?","visibility":"Public","body":"self == EDGE"}},{"html_id":"integer?-instance-method","name":"integer?","abstract":false,"location":{"filename":"src/graph/value_type.cr","line_number":11,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/value_type.cr#L11"},"def":{"name":"integer?","visibility":"Public","body":"self == INTEGER"}},{"html_id":"map?-instance-method","name":"map?","abstract":false,"location":{"filename":"src/graph/value_type.cr","line_number":18,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/value_type.cr#L18"},"def":{"name":"map?","visibility":"Public","body":"self == MAP"}},{"html_id":"node?-instance-method","name":"node?","abstract":false,"location":{"filename":"src/graph/value_type.cr","line_number":16,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/value_type.cr#L16"},"def":{"name":"node?","visibility":"Public","body":"self == NODE"}},{"html_id":"null?-instance-method","name":"null?","abstract":false,"location":{"filename":"src/graph/value_type.cr","line_number":9,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/value_type.cr#L9"},"def":{"name":"null?","visibility":"Public","body":"self == NULL"}},{"html_id":"path?-instance-method","name":"path?","abstract":false,"location":{"filename":"src/graph/value_type.cr","line_number":17,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/value_type.cr#L17"},"def":{"name":"path?","visibility":"Public","body":"self == PATH"}},{"html_id":"point?-instance-method","name":"point?","abstract":false,"location":{"filename":"src/graph/value_type.cr","line_number":19,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/value_type.cr#L19"},"def":{"name":"point?","visibility":"Public","body":"self == POINT"}},{"html_id":"string?-instance-method","name":"string?","abstract":false,"location":{"filename":"src/graph/value_type.cr","line_number":10,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/value_type.cr#L10"},"def":{"name":"string?","visibility":"Public","body":"self == STRING"}},{"html_id":"unknown?-instance-method","name":"unknown?","abstract":false,"location":{"filename":"src/graph/value_type.cr","line_number":8,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/value_type.cr#L8"},"def":{"name":"unknown?","visibility":"Public","body":"self == UNKNOWN"}}]}]},{"html_id":"redis/Redis/JSON","path":"Redis/JSON.html","kind":"struct","full_name":"Redis::JSON(Runnable)","name":"JSON","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/json.cr","line_number":36,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L36"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"doc":"`Redis::JSON` wraps a `Redis::Client` or `Redis::Cluster` to execute\ncommands against keys storing JSON data using the\n[RedisJSON](https://oss.redis.com/redisjson/) plugin for Redis.\n\n```\nrequire \"redis\"\nrequire \"redis/json\"\nrequire \"uuid/json\"\n\nstruct Person\n include JSON::Serializable\n\n getter id : UUID\n getter name : String\n getter email : String\n\n def initialize(@id, @name, @email)\n end\nend\n\nredis = Redis::Client.new\n\nid = UUID.random\n\nredis.json.set \"person:#{id}\", \".\", Person.new(id, \"Jamie\", \"jamie@example.com\")\nredis.json.get(\"person:#{id}\", \".\", as: Person)\n# => Person(@email=\"jamie@example.com\", @id=UUID(081af617-6b50-48d3-b53f-dbc17a1072f5), @name=\"Jamie\")\nredis.json.get(\"person:#{id}\", \".name\", as: String)\n# => \"Jamie\"\n```","summary":"

    Redis::JSON wraps a Redis::Client or Redis::Cluster to execute commands against keys storing JSON data using the RedisJSON plugin for Redis.

    ","constructors":[{"html_id":"new(redis:Runnable)-class-method","name":"new","abstract":false,"args":[{"name":"redis","external_name":"redis","restriction":"Runnable"}],"args_string":"(redis : Runnable)","args_html":"(redis : Runnable)","location":{"filename":"src/json.cr","line_number":37,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L37"},"def":{"name":"new","args":[{"name":"redis","external_name":"redis","restriction":"Runnable"}],"visibility":"Public","body":"_ = JSON(Runnable).allocate\n_.initialize(redis)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"arrappend(key:String,path:String,value)-instance-method","name":"arrappend","doc":"Append `value` as JSON to the array located at the JSONPath in `key`\n\n```\nredis.json.arrappend \"posts:#{id}\", \".tags\", \"redis\"\n```","summary":"

    Append value as JSON to the array located at the JSONPath in key

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"value","external_name":"value","restriction":""}],"args_string":"(key : String, path : String, value)","args_html":"(key : String, path : String, value)","location":{"filename":"src/json.cr","line_number":219,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L219"},"def":{"name":"arrappend","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"value","external_name":"value","restriction":""}],"visibility":"Public","body":"@redis.run({\"json.arrappend\", key, path, value.to_json})"}},{"html_id":"arrappend(key:String,path:String,*,values:Array)-instance-method","name":"arrappend","doc":"Append `values` as JSON to the array located at the JSONPath in `key`\n\n```\nredis.json.arrappend \"posts:#{id}\", \".tags\", %w[redis crystal]\n```","summary":"

    Append values as JSON to the array located at the JSONPath in key

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"","external_name":"","restriction":""},{"name":"values","external_name":"values","restriction":"Array"}],"args_string":"(key : String, path : String, *, values : Array)","args_html":"(key : String, path : String, *, values : Array)","location":{"filename":"src/json.cr","line_number":228,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L228"},"def":{"name":"arrappend","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"","external_name":"","restriction":""},{"name":"values","external_name":"values","restriction":"Array"}],"splat_index":2,"visibility":"Public","body":"command = Array(String).new(initial_capacity: 3 + values.size)\n((command << \"json.arrappend\") << key) << path\nvalues.each do |value|\n command << value.to_json\nend\n@redis.run(command)\n"}},{"html_id":"arrindex(key:String,path:String,value,betweenrange:Range(Int,Int|Nil))-instance-method","name":"arrindex","doc":"Get the index of `value` in the array located at the JSONPath in `key` if\nand only if it falls in the specified `range`\n\n```\nredis.json.arrindex \"posts:#{id}\", \".tags\", \"redis\", between: 1..3\n# => 2\n```","summary":"

    Get the index of value in the array located at the JSONPath in key if and only if it falls in the specified range

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"value","external_name":"value","restriction":""},{"name":"range","external_name":"between","restriction":"Range(Int, Int | ::Nil)"}],"args_string":"(key : String, path : String, value, between range : Range(Int, Int | Nil))","args_html":"(key : String, path : String, value, between range : Range(Int, Int | Nil))","location":{"filename":"src/json.cr","line_number":254,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L254"},"def":{"name":"arrindex","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"value","external_name":"value","restriction":""},{"name":"range","external_name":"between","restriction":"Range(Int, Int | ::Nil)"}],"visibility":"Public","body":"command = {\"json.arrindex\", key, path, value.to_json, range.begin.to_s}\nif last = range.end\n if range.excludes_end?\n command = command + {last.to_s}\n else\n command = command + {(last + 1).to_s}\n end\nend\n@redis.run(command)\n"}},{"html_id":"arrindex(key:String,path:String,value)-instance-method","name":"arrindex","doc":"Get the index of `value` in the array located at the JSONPath in `key`\n\n```\nredis.json.arrindex \"posts:#{id}\", \".tags\", \"redis\" # => 2\n```","summary":"

    Get the index of value in the array located at the JSONPath in key

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"value","external_name":"value","restriction":""}],"args_string":"(key : String, path : String, value)","args_html":"(key : String, path : String, value)","location":{"filename":"src/json.cr","line_number":243,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L243"},"def":{"name":"arrindex","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"value","external_name":"value","restriction":""}],"visibility":"Public","body":"@redis.run({\"json.arrindex\", key, path, value.to_json})"}},{"html_id":"arrinsert(key:String,path:String,index:Int,value)-instance-method","name":"arrinsert","doc":"Insert `value` into the array located at the JSONPath in `key` at `index`\n\n```\nredis.json.arrinsert \"posts:#{id}\", \".tags\", index: 1, value: \"redis\"\n# => 3\n```","summary":"

    Insert value into the array located at the JSONPath in key at index

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"index","external_name":"index","restriction":"Int"},{"name":"value","external_name":"value","restriction":""}],"args_string":"(key : String, path : String, index : Int, value)","args_html":"(key : String, path : String, index : Int, value)","location":{"filename":"src/json.cr","line_number":273,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L273"},"def":{"name":"arrinsert","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"index","external_name":"index","restriction":"Int"},{"name":"value","external_name":"value","restriction":""}],"visibility":"Public","body":"@redis.run({\"json.arrinsert\", key, path, index.to_s, value.to_json})"}},{"html_id":"arrinsert(key:String,path:String,index:Int,*,values:Array)-instance-method","name":"arrinsert","doc":"Insert the elements of `values` into the array located at the JSONPath in\n`key` at `index`\n\n```\nredis.json.arrinsert \"posts:#{id}\", \".tags\", index: 1, values: %w[\n redis\n crystal\n]\n# => 4\n```","summary":"

    Insert the elements of values into the array located at the JSONPath in key at index

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"index","external_name":"index","restriction":"Int"},{"name":"","external_name":"","restriction":""},{"name":"values","external_name":"values","restriction":"Array"}],"args_string":"(key : String, path : String, index : Int, *, values : Array)","args_html":"(key : String, path : String, index : Int, *, values : Array)","location":{"filename":"src/json.cr","line_number":287,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L287"},"def":{"name":"arrinsert","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"index","external_name":"index","restriction":"Int"},{"name":"","external_name":"","restriction":""},{"name":"values","external_name":"values","restriction":"Array"}],"splat_index":3,"visibility":"Public","body":"command = Array(String).new(initial_capacity: 4 + values.size)\n(((command << \"json.arrinsert\") << key) << path) << index.to_s\nvalues.each do |value|\n command << value.to_json\nend\n@redis.run(command)\n"}},{"html_id":"arrlen(key:String,path:String)-instance-method","name":"arrlen","doc":"Get the number of elements in the array located at the JSONPath in `key`\n\n```\nredis.json.arrlen \"posts:#{id}\", \".tags\"\n# => 4\n```","summary":"

    Get the number of elements in the array located at the JSONPath in key

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"}],"args_string":"(key : String, path : String)","args_html":"(key : String, path : String)","location":{"filename":"src/json.cr","line_number":303,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L303"},"def":{"name":"arrlen","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"}],"visibility":"Public","body":"@redis.run({\"json.arrlen\", key, path})"}},{"html_id":"arrpop(key:String,path:String|Nil=nil,*,index:Int=-1)-instance-method","name":"arrpop","doc":"Remove and return the value located at `index` (defaulting to the last\nelement) in the array located at the JSONPath in `key`\n\n```\nredis.json.arrlen \"posts:#{id}\", \".tags\"\n# => 4\n```","summary":"

    Remove and return the value located at index (defaulting to the last element) in the array located at the JSONPath in key

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","default_value":"nil","external_name":"path","restriction":"String | ::Nil"},{"name":"","external_name":"","restriction":""},{"name":"index","default_value":"-1","external_name":"index","restriction":"Int"}],"args_string":"(key : String, path : String | Nil = nil, *, index : Int = -1)","args_html":"(key : String, path : String | Nil = nil, *, index : Int = -1)","location":{"filename":"src/json.cr","line_number":314,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L314"},"def":{"name":"arrpop","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","default_value":"nil","external_name":"path","restriction":"String | ::Nil"},{"name":"","external_name":"","restriction":""},{"name":"index","default_value":"-1","external_name":"index","restriction":"Int"}],"splat_index":2,"visibility":"Public","body":"command = {\"json.arrpop\", key}\nif path\n command = command + {path}\n if index != -1\n command = command + {index.to_s}\n end\nend\n@redis.run(command)\n"}},{"html_id":"arrpop(key:String,path:String,*,index:Int=-1,as:T.class):T|NilforallT-instance-method","name":"arrpop","doc":"Remove and return the value located at `index` (defaulting to the last\nelement) in the array located at the JSONPath in `key`\n\n```\nredis.json.arrlen \"posts:#{id}\", \".tags\"\n# => 4\n```\n\nNOTE: This method cannot be invoked on a pipeline or the transaction\nyielded to a `Redis::Connection#multi` block.","summary":"

    Remove and return the value located at index (defaulting to the last element) in the array located at the JSONPath in key

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"","external_name":"","restriction":""},{"name":"index","default_value":"-1","external_name":"index","restriction":"Int"},{"name":"as","external_name":"as","restriction":"T.class"}],"args_string":"(key : String, path : String, *, index : Int = -1, as : T.class) : T | Nil forall T","args_html":"(key : String, path : String, *, index : Int = -1, as : T.class) : T | Nil forall T","location":{"filename":"src/json.cr","line_number":334,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L334"},"def":{"name":"arrpop","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"","external_name":"","restriction":""},{"name":"index","default_value":"-1","external_name":"index","restriction":"Int"},{"name":"as","external_name":"as","restriction":"T.class"}],"splat_index":2,"return_type":"T | ::Nil","visibility":"Public","body":"if result = arrpop(key, path, index: index)\n T.from_json(result.as(String))\nend"}},{"html_id":"clear(key:String,path:String|Nil=nil)-instance-method","name":"clear","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","default_value":"nil","external_name":"path","restriction":"String | ::Nil"}],"args_string":"(key : String, path : String | Nil = nil)","args_html":"(key : String, path : String | Nil = nil)","location":{"filename":"src/json.cr","line_number":166,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L166"},"def":{"name":"clear","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","default_value":"nil","external_name":"path","restriction":"String | ::Nil"}],"visibility":"Public","body":"command = {\"json.clear\", key}\nif path\n command = command + {path}\nend\n@redis.run(command)\n"}},{"html_id":"del(key:String,path:String|Nil=nil)-instance-method","name":"del","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","default_value":"nil","external_name":"path","restriction":"String | ::Nil"}],"args_string":"(key : String, path : String | Nil = nil)","args_html":"(key : String, path : String | Nil = nil)","location":{"filename":"src/json.cr","line_number":173,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L173"},"def":{"name":"del","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","default_value":"nil","external_name":"path","restriction":"String | ::Nil"}],"visibility":"Public","body":"command = {\"json.del\", key}\nif path\n command = command + {path}\nend\n@redis.run(command)\n"}},{"html_id":"get(key:String,path:String,astype:T.class):T|NilforallT-instance-method","name":"get","doc":"Get the value stored at the given JSONPath inside the given `key`,\ndeserializing the value into the type `T`. You can use this to deserialize\nyour custom `JSON::Serializable` objects.\n\n```\nstruct Order\n include JSON::Serializable\n getter id : UUID\n getter customer_id : UUID\n getter line_items : Array(LineItem)\nend\n\nstruct LineItem\n include JSON::Serializable\n getter product_id : UUID\n getter quantity : Int32\n getter unit_price_cents : Int32\nend\n\n# Get the Order at the root\nredis.json.get(\"order:#{id}\", \".\", as: Order)\n# Get the LineItems at the `.line_items` JSONPath\n# Note the `$` at the beginning to make it an array\nredis.json.get(\"order:#{id}\", \"$.line_items\", as: Array(LineItem))\n# Get only the `product_id` properties of all the `line_items`\nredis.json.get(\"order:#{id}\", \"$.line_items..product_id\", as: Array(UUID))\n```\n\nNOTE: This method _cannot_ be used in a pipeline or `Redis::Connection#multi`\nblock because it operates on the value returned from the Redis server\ninside the method, which isn't possible when using pipelines or `multi`.","summary":"

    Get the value stored at the given JSONPath inside the given key, deserializing the value into the type T.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"type","external_name":"as","restriction":"T.class"}],"args_string":"(key : String, path : String, as type : T.class) : T | Nil forall T","args_html":"(key : String, path : String, as type : T.class) : T | Nil forall T","location":{"filename":"src/json.cr","line_number":138,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L138"},"def":{"name":"get","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"type","external_name":"as","restriction":"T.class"}],"return_type":"T | ::Nil","visibility":"Public","body":"if result = @redis.run({\"json.get\", key, path})\n T.from_json(result.as(String))\nend"}},{"html_id":"get(key:String,path:String)-instance-method","name":"get","doc":"Get the raw JSON string representation at the given `key` nested at the\ngiven JSONPath.\n\n```\nemail = redis.json.get(\"user:#{id}\", \".email\").as(String)\n# => \"me@example.com\"\n```","summary":"

    Get the raw JSON string representation at the given key nested at the given JSONPath.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"}],"args_string":"(key : String, path : String)","args_html":"(key : String, path : String)","location":{"filename":"src/json.cr","line_number":84,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L84"},"def":{"name":"get","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"}],"visibility":"Public","body":"@redis.run({\"json.get\", key, path})"}},{"html_id":"get(key:String,paths:Array(String),astype:T.class=::JSON::Any)forallT-instance-method","name":"get","doc":"Get the values stored at the specifed JSONPaths, deserializing them into\nthe specified type as values in a `Hash`.\n\n```\nif result = redis.json.get(\"posts:#{id}\", %w[title tags], as: String | Array(String))\n result # => {\"title\" => \"JSON with Redis\", tags: [\"redis\", \"json\", \"crystal\"]}\n typeof(result) # => Hash(String, String | Array(String))\nend\n```\n\nNOTE: This method _cannot_ be used in a pipeline or `Redis::Connection#multi`\nblock because it operates on the value returned from the Redis server,\nwhich isn't a thing when using pipelines or `multi`.","summary":"

    Get the values stored at the specifed JSONPaths, deserializing them into the specified type as values in a Hash.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"paths","external_name":"paths","restriction":"Array(String)"},{"name":"type","default_value":"::JSON::Any","external_name":"as","restriction":"T.class"}],"args_string":"(key : String, paths : Array(String), as type : T.class = ::JSON::Any) forall T","args_html":"(key : String, paths : Array(String), as type : T.class = ::JSON::Any) forall T","location":{"filename":"src/json.cr","line_number":101,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L101"},"def":{"name":"get","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"paths","external_name":"paths","restriction":"Array(String)"},{"name":"type","default_value":"::JSON::Any","external_name":"as","restriction":"T.class"}],"visibility":"Public","body":"if result = @redis.run([\"json.get\", key] + paths)\n Hash(String, T).from_json(result.as(String))\nend"}},{"html_id":"get(key:String)-instance-method","name":"get","doc":"Get the raw JSON string at the specified `key`","summary":"

    Get the raw JSON string at the specified key

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/json.cr","line_number":73,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L73"},"def":{"name":"get","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"@redis.run({\"json.get\", key})"}},{"html_id":"mget(keys:Array(String),path:String,astype:T.class):Array(T|Nil)forallT-instance-method","name":"mget","doc":"Get the values for all `keys` at the specified JSONPaths.\n\nNOTE: This method _cannot_ be used in a pipeline or `Redis::Connection#multi`\nblock because it operates on the value returned from the Redis server\ninside the method, which isn't possible when using pipelines or `multi`.\nNOTE: If you are using a cluster, the `keys` _must_ all be on the same\nshard, or you may only get some of them back with this method. When using\n`mget` in a cluster, you'll most likely want to use subhashed keys (with\n`{}` around the same part of the name) to ensure all keys are on the same\nshard.","summary":"

    Get the values for all keys at the specified JSONPaths.

    ","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"Array(String)"},{"name":"path","external_name":"path","restriction":"String"},{"name":"type","external_name":"as","restriction":"T.class"}],"args_string":"(keys : Array(String), path : String, as type : T.class) : Array(T | Nil) forall T","args_html":"(keys : Array(String), path : String, as type : T.class) : Array(T | Nil) forall T","location":{"filename":"src/json.cr","line_number":154,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L154"},"def":{"name":"mget","args":[{"name":"keys","external_name":"keys","restriction":"Array(String)"},{"name":"path","external_name":"path","restriction":"String"},{"name":"type","external_name":"as","restriction":"T.class"}],"return_type":"Array(T | ::Nil)","visibility":"Public","body":"if result = @redis.run(([\"json.mget\"] + keys) + [path])\n (result.as(Array)).map do |value|\n if value\n T.from_json(value.as(String))\n end\n end\nelse\n raise(\"lolwut?\")\nend"}},{"html_id":"numincrby(key:String,path:String,count:String|Int,astype:T.class):TforallT-instance-method","name":"numincrby","doc":"Increment the number at the specified JSONPath\n\n```\nredis.json.numincrby \"product:#{id}\", \".purchase_count\", 1, as: Int64\n# => 2\n```\n\nIf `key` exists and an incrementable number exists at the specified\nJSONPath (including the possibility of incrementing multiple numbers if\nthe JSONPath resolves to multiple numeric values), then this method\nreturns a value of type `T`. If the JSONPath resolves to multiple values\n(for example, it begins with \"$\" or is recursive), you will need to\nspecify that it can be an `Array` of that type.\n\nNOTE: This method cannot be used on deferred command runners like\n`Redis::Pipeline` or `Redis::Transaction`. It eagerly consumes the\nresult from the server, so the result must not be deferred.","summary":"

    Increment the number at the specified JSONPath

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"count","external_name":"count","restriction":"String | Int"},{"name":"type","external_name":"as","restriction":"T.class"}],"args_string":"(key : String, path : String, count : String | Int, as type : T.class) : T forall T","args_html":"(key : String, path : String, count : String | Int, as type : T.class) : T forall T","location":{"filename":"src/json.cr","line_number":206,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L206"},"def":{"name":"numincrby","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"count","external_name":"count","restriction":"String | Int"},{"name":"type","external_name":"as","restriction":"T.class"}],"return_type":"T","visibility":"Public","body":"T.from_json((numincrby(key, path, count)).as(String))"}},{"html_id":"numincrby(key:String,path:String,count:String|Int)-instance-method","name":"numincrby","doc":"Increment the number at the specified JSONPath\n\n```\nredis.json.numincrby \"product:#{id}\", \".purchase_count\", 1\n```","summary":"

    Increment the number at the specified JSONPath

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"count","external_name":"count","restriction":"String | Int"}],"args_string":"(key : String, path : String, count : String | Int)","args_html":"(key : String, path : String, count : String | Int)","location":{"filename":"src/json.cr","line_number":185,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L185"},"def":{"name":"numincrby","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"count","external_name":"count","restriction":"String | Int"}],"visibility":"Public","body":"@redis.run({\"json.numincrby\", key, path, count.to_s})"}},{"html_id":"set(key:String,path:String,value,*,nx=false,xx=false)-instance-method","name":"set","doc":"Set the given key to the given JSON `value`. The `value` will have\n`to_json` called on it automatically. The `nx` and `xx` arguments are\nidentical to `Redis::Commands#set`.\n\nStore a user at the root JSONPath (`.`) of the specified key:\n\n```\nstruct User\n include JSON::Serializable\n\n getter id : UUID\n getter name : String\n getter email : String\nend\n\nredis.json.set \"user:#{user.id}\", \".\", user\n```\n\nUpdate (with `xx` so we ensure the key exists) a user's email by setting\nthe new email value at the `.email` JSONPath:\n\n```\nredis.json.set \"user:#{id}\", \".email\", new_email, xx: true\n```","summary":"

    Set the given key to the given JSON value.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"value","external_name":"value","restriction":""},{"name":"","external_name":"","restriction":""},{"name":"nx","default_value":"false","external_name":"nx","restriction":""},{"name":"xx","default_value":"false","external_name":"xx","restriction":""}],"args_string":"(key : String, path : String, value, *, nx = false, xx = false)","args_html":"(key : String, path : String, value, *, nx = false, xx = false)","location":{"filename":"src/json.cr","line_number":64,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L64"},"def":{"name":"set","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"value","external_name":"value","restriction":""},{"name":"","external_name":"","restriction":""},{"name":"nx","default_value":"false","external_name":"nx","restriction":""},{"name":"xx","default_value":"false","external_name":"xx","restriction":""}],"splat_index":3,"visibility":"Public","body":"command = {\"json.set\", key, path, value.to_json}\nif nx\n command = command + {\"nx\"}\nend\nif xx\n command = command + {\"xx\"}\nend\n@redis.run(command)\n"}},{"html_id":"toggle(key:String,path:String)-instance-method","name":"toggle","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"}],"args_string":"(key : String, path : String)","args_html":"(key : String, path : String)","location":{"filename":"src/json.cr","line_number":210,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L210"},"def":{"name":"toggle","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"}],"visibility":"Public","body":"@redis.run({\"json.toggle\", key, path})"}}]},{"html_id":"redis/Redis/NoGroup","path":"Redis/NoGroup.html","kind":"class","full_name":"Redis::NoGroup","name":"NoGroup","abstract":false,"superclass":{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},"ancestors":[{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/errors.cr","line_number":16,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/errors.cr#L16"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"}},{"html_id":"redis/Redis/Parser","path":"Redis/Parser.html","kind":"struct","full_name":"Redis::Parser","name":"Parser","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/parser.cr","line_number":5,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/parser.cr#L5"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"constructors":[{"html_id":"new(io:IO)-class-method","name":"new","doc":"Initialize a parser to read from the given IO","summary":"

    Initialize a parser to read from the given IO

    ","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/parser.cr","line_number":7,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/parser.cr#L7"},"def":{"name":"new","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"_ = allocate\n_.initialize(io)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"read:Value-instance-method","name":"read","doc":"Read a `Redis::Value` from the parser's `IO`\n\nExample:\n\n```\nio = IO::Memory.new\nio << \"$3\\r\\n\"\nio << \"foo\\r\\n\"\nio.rewind\n\nParser.new(io).read # => \"foo\"\n```","summary":"

    Read a Redis::Value from the parser's IO

    ","abstract":false,"location":{"filename":"src/parser.cr","line_number":22,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/parser.cr#L22"},"def":{"name":"read","return_type":"Value","visibility":"Public","body":"read do\n raise(IO::Error.new(\"Connection closed\"))\nend"}},{"html_id":"read?-instance-method","name":"read?","doc":"Reads a value from the `IO`, returning `nil` on EOF.","summary":"

    Reads a value from the IO, returning nil on EOF.

    ","abstract":false,"location":{"filename":"src/parser.cr","line_number":27,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/parser.cr#L27"},"def":{"name":"read?","visibility":"Public","body":"if @io.closed?\n return\nend\nread do\n nil\nend\n"}}]},{"html_id":"redis/Redis/Pipeline","path":"Redis/Pipeline.html","kind":"class","full_name":"Redis::Pipeline","name":"Pipeline","abstract":false,"superclass":{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},{"html_id":"redis/Redis/Commands/Stream","kind":"module","full_name":"Redis::Commands::Stream","name":"Stream"},{"html_id":"redis/Redis/Commands/SortedSet","kind":"module","full_name":"Redis::Commands::SortedSet","name":"SortedSet"},{"html_id":"redis/Redis/Commands/Set","kind":"module","full_name":"Redis::Commands::Set","name":"Set"},{"html_id":"redis/Redis/Commands/List","kind":"module","full_name":"Redis::Commands::List","name":"List"},{"html_id":"redis/Redis/Commands/Hash","kind":"module","full_name":"Redis::Commands::Hash","name":"Hash"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/pipeline.cr","line_number":6,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/pipeline.cr#L6"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"constructors":[{"html_id":"new(connection:Connection)-class-method","name":"new","doc":"Wraps a connection so that our `run` and `commit` methods can execute against it.","summary":"

    Wraps a connection so that our #run and #commit methods can execute against it.

    ","abstract":false,"args":[{"name":"connection","external_name":"connection","restriction":"Connection"}],"args_string":"(connection : Connection)","args_html":"(connection : Connection)","location":{"filename":"src/pipeline.cr","line_number":12,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/pipeline.cr#L12"},"def":{"name":"new","args":[{"name":"connection","external_name":"connection","restriction":"Connection"}],"visibility":"Public","body":"_ = allocate\n_.initialize(connection)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"commit-instance-method","name":"commit","doc":"Read all of the return values from all of the commands we've sent to Redis\nand resolve all `Redis::Future`s with them in the order they were sent.","summary":"

    Read all of the return values from all of the commands we've sent to Redis and resolve all Redis::Futures with them in the order they were sent.

    ","abstract":false,"location":{"filename":"src/pipeline.cr","line_number":26,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/pipeline.cr#L26"},"def":{"name":"commit","visibility":"Public","body":"@futures.map(&.resolve(@connection.read))"}},{"html_id":"run(command)-instance-method","name":"run","doc":"The `run` method is required by the `Commands` mixin. When you run a Redis\ncommand, it gets pushed to the server via this method.","summary":"

    The #run method is required by the Commands mixin.

    ","abstract":false,"args":[{"name":"command","external_name":"command","restriction":""}],"args_string":"(command)","args_html":"(command)","location":{"filename":"src/pipeline.cr","line_number":17,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/pipeline.cr#L17"},"def":{"name":"run","args":[{"name":"command","external_name":"command","restriction":""}],"visibility":"Public","body":"@connection.encode(command)\nfuture = Future.new\n@futures << future\nfuture\n"}}]},{"html_id":"redis/Redis/ReplicationClient","path":"Redis/ReplicationClient.html","kind":"class","full_name":"Redis::ReplicationClient","name":"ReplicationClient","abstract":false,"superclass":{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},{"html_id":"redis/Redis/Commands/Stream","kind":"module","full_name":"Redis::Commands::Stream","name":"Stream"},{"html_id":"redis/Redis/Commands/SortedSet","kind":"module","full_name":"Redis::Commands::SortedSet","name":"SortedSet"},{"html_id":"redis/Redis/Commands/Set","kind":"module","full_name":"Redis::Commands::Set","name":"Set"},{"html_id":"redis/Redis/Commands/List","kind":"module","full_name":"Redis::Commands::List","name":"List"},{"html_id":"redis/Redis/Commands/Hash","kind":"module","full_name":"Redis::Commands::Hash","name":"Hash"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/replication_client.cr","line_number":51,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L51"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"Log","name":"Log","value":"::Log.for(self)"}],"included_modules":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"doc":"If you're using Redis replication, you can use `ReplicationClient` to send\nread commands to replicas and reduce load on the primary. This can be important\nwhen your Redis primary is CPU-bound.\n\nThe commands that will be routed to replicas are listed in\n`Redis::READ_ONLY_COMMANDS`.\n\nNOTE: Redis replication does not provide consistency guarantees. Every\nmechanism in Redis to improve consistency, such as\n[WAIT](https://redis.io/commands/wait/#consistency-and-wait), is best-effort,\nbut not guaranteed. If you require strong consistency from Redis, stick to\nusing `Redis::Client`. if you require strong consistency but your Redis primary\nis CPU-bound, you may need to either choose between consistency and performance\nor move that workload out of Redis.\n\nThis client is useful for operations where strong consistency isn't typically\nneeded, such as caching, full-text search with `Redis::FullText#search`,\nquerying time-series data with `Redis::TimeSeries#mrange`, checking the current\nstate of larger data structures without blocking the primary, etc.\n\n## Explicitly routing commands to a primary or replica\n\nThis class provides `on_primary` and `on_replica` methods to ensure your\ncommand is routed to the server type you want. This is useful in several\nscenarios:\n\n- you want to ensure you retrieve a value that is consistent with the state of\n the primary server — for example a value that changes frequently and you\n need the canonical state for observability purposes\n- a read-only command is routed to a primary because this client does not yet\n know about it\n - You can add commands to `Redis::READ_ONLY_COMMANDS` in one-off cases\n - Feel free to [open an issue](https://github.com/jgaskins/redis/issues) or\n [pull request](https://github.com/jgaskins/redis/pulls) to add it, as well\n\n## Topology changes\n\nIf the replication topology changes (for example, new replicas are added,\nexisting ones removed, or the primary failed over), `ReplicationClient` will\nautomatically pick up the changes. You can set how often it checks for these\nchanges with the `topology_ttl` argument to the constructor or leave it at its\ndefault of 10 seconds.","summary":"

    If you're using Redis replication, you can use ReplicationClient to send read commands to replicas and reduce load on the primary.

    \n

    EXPERIMENTAL ReplicationClient is currently in alpha testing. There may be rough edges.

    ","constructors":[{"html_id":"new(entrypoint:URI,topology_ttl:Time::Span=10.seconds)-class-method","name":"new","doc":"Have the `ReplicationClient` discover the master and replicas on its own\nwhen given the URI of a single entrypoint. The cluster topology will be\nrefreshed with a max staleness of `topology_ttl`.\n\n```\nredis = Redis::ReplicationClient.new(\n```","summary":"

    Have the ReplicationClient discover the master and replicas on its own when given the URI of a single entrypoint.

    ","abstract":false,"args":[{"name":"entrypoint","external_name":"entrypoint","restriction":"URI"},{"name":"topology_ttl","default_value":"10.seconds","external_name":"topology_ttl","restriction":"Time::Span"}],"args_string":"(entrypoint : URI, topology_ttl : Time::Span = 10.seconds)","args_html":"(entrypoint : URI, topology_ttl : Time::Span = 10.seconds)","location":{"filename":"src/replication_client.cr","line_number":73,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L73"},"def":{"name":"new","args":[{"name":"entrypoint","external_name":"entrypoint","restriction":"URI"},{"name":"topology_ttl","default_value":"10.seconds","external_name":"topology_ttl","restriction":"Time::Span"}],"visibility":"Public","body":"_ = allocate\n_.initialize(entrypoint, topology_ttl)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}},{"html_id":"new(master_uri:URI,replica_uris:Array(URI),topology_ttl:Time::Span=10.seconds)-class-method","name":"new","doc":"Initialize the client with known master and replica URIs, keeping the\ntoplogy up to date with at most `topology_ttl` staleness. If you don't wish\nto keep the replication topology up to date, you can simply set\n`topology_ttl` to `0.seconds`.","summary":"

    Initialize the client with known master and replica URIs, keeping the toplogy up to date with at most #topology_ttl staleness.

    ","abstract":false,"args":[{"name":"master_uri","external_name":"master_uri","restriction":"::URI"},{"name":"replica_uris","external_name":"replica_uris","restriction":"::Array(::URI)"},{"name":"topology_ttl","default_value":"10.seconds","external_name":"topology_ttl","restriction":"::Time::Span"}],"args_string":"(master_uri : URI, replica_uris : Array(URI), topology_ttl : Time::Span = 10.seconds)","args_html":"(master_uri : URI, replica_uris : Array(URI), topology_ttl : Time::Span = 10.seconds)","location":{"filename":"src/replication_client.cr","line_number":117,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L117"},"def":{"name":"new","args":[{"name":"master_uri","external_name":"master_uri","restriction":"::URI"},{"name":"replica_uris","external_name":"replica_uris","restriction":"::Array(::URI)"},{"name":"topology_ttl","default_value":"10.seconds","external_name":"topology_ttl","restriction":"::Time::Span"}],"visibility":"Public","body":"_ = allocate\n_.initialize(master_uri, replica_uris, topology_ttl)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}},{"html_id":"new-class-method","name":"new","abstract":false,"location":{"filename":"src/replication_client.cr","line_number":62,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L62"},"def":{"name":"new","visibility":"Public","body":"new(entrypoint: URI.parse(\"redis:///\"))"}}],"instance_methods":[{"html_id":"close-instance-method","name":"close","doc":"Close all connections to both the primary and all replicas.","summary":"

    Close all connections to both the primary and all replicas.

    ","abstract":false,"location":{"filename":"src/replication_client.cr","line_number":153,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L153"},"def":{"name":"close","visibility":"Public","body":"begin\n @master.close\nrescue\n nil\nend\n@replicas.each do |replica|\n begin\n replica.close\n rescue\n nil\n end\nend\n@closed = true\n"}},{"html_id":"closed?:Bool-instance-method","name":"closed?","doc":"Returns `true` if this `ReplicationClient` has been explicitly closed,\n`false` otherwise.","summary":"

    Returns true if this ReplicationClient has been explicitly closed, false otherwise.

    ","abstract":false,"location":{"filename":"src/replication_client.cr","line_number":164,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L164"},"def":{"name":"closed?","visibility":"Public","body":"@closed"}},{"html_id":"on_master(&)-instance-method","name":"on_master","doc":"Alias of `on_primary`.","summary":"

    Alias of #on_primary.

    ","abstract":false,"location":{"filename":"src/replication_client.cr","line_number":405,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L405"},"def":{"name":"on_master","yields":1,"block_arity":1,"visibility":"Public","body":"yield @master"}},{"html_id":"on_primary(&)-instance-method","name":"on_primary","doc":"Route one or more commands to the primary to avoid consistency issues arising\nfrom replication latency.\n\n```\nrequire \"redis/replication_client\"\n\nredis = Redis::ReplicationClient.new\n\nredis.incr \"counter\"\nvalue = redis.on_primary &.get(\"counter\")\n```\n\nThis is useful for pipelining commands or executing transactions:\n\n```\nredis.on_primary &.transaction do |txn|\n txn.incr \"counter:#{queue}\"\n txn.sadd \"queues\", queue\n txn.lpush \"queue:#{queue}\", job_data\nend\n```\n\n… which is shorthand for this and removes the need for nesting blocks:\n\n```\nredis.on_primary do |primary|\n primary.transaction do |txn|\n txn.incr \"counter:#{queue}\"\n txn.sadd \"queues\", queue\n txn.lpush \"queue:#{queue}\", job_data\n end\nend\n```\n\nIf you need to route many commands to the primary without necessarily\npipelining or opening transactions, you can omit the `&.transaction` and\ncall methods directly on the primary's `Redis::Client` in the block:\n\n```\nredis.on_primary do |primary|\n counter = primary.incr \"counter:#{queue}\"\n primary.sadd \"queues\", queue\nend\n```\n\nNOTE: The object yielded to the block is a `Redis::Client`, but if you try\nto use it outside the block you may run into errors because the replication\ntopology could change, in which case this `Redis::Client` might not be the\nprimary anymore.","summary":"

    Route one or more commands to the primary to avoid consistency issues arising from replication latency.

    ","abstract":false,"location":{"filename":"src/replication_client.cr","line_number":400,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L400"},"def":{"name":"on_primary","yields":1,"block_arity":1,"visibility":"Public","body":"on_master do |redis|\n yield redis\nend"}},{"html_id":"on_replica(&)-instance-method","name":"on_replica","doc":"Route one or more commands to replicas. This should rarely be necessary since\nread-only commands (which can only be executed on replicas) are automatically\nrouted to replicas, but if it's a command this shard does not know about (see\n`Redis::READ_ONLY_COMMANDS`) this may be necessary. Alternatively, you can\nshovel additional commands into `Redis::READ_ONLY_COMMANDS` to avoid having to\nperform this explicit routing.","summary":"

    Route one or more commands to replicas.

    ","abstract":false,"location":{"filename":"src/replication_client.cr","line_number":343,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L343"},"def":{"name":"on_replica","yields":1,"block_arity":1,"visibility":"Public","body":"if @replicas.empty?\n yield @master\nelse\n yield @replicas.sample\nend"}},{"html_id":"run(commandfull_command)-instance-method","name":"run","doc":"Execute the given command and return the result from the server. Commands\nmust be an `Enumerable` and its `size` method must be re-entrant.\n\n```\nrun({\"set\", \"foo\", \"bar\"})\n```","summary":"

    Execute the given command and return the result from the server.

    ","abstract":false,"args":[{"name":"full_command","external_name":"command","restriction":""}],"args_string":"(command full_command)","args_html":"(command full_command)","location":{"filename":"src/replication_client.cr","line_number":325,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L325"},"def":{"name":"run","args":[{"name":"full_command","external_name":"command","restriction":""}],"visibility":"Public","body":"if full_command.empty?\n raise(ArgumentError.new(\"Redis commands must have at least one component\"))\nend\nif READ_ONLY_COMMANDS.includes?(full_command[0].downcase)\n on_replica(&.run(full_command))\nelse\n @master.run(full_command)\nend\n"}},{"html_id":"topology_ttl:Time::Span-instance-method","name":"topology_ttl","abstract":false,"location":{"filename":"src/replication_client.cr","line_number":60,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L60"},"def":{"name":"topology_ttl","return_type":"Time::Span","visibility":"Public","body":"@topology_ttl"}}],"types":[{"html_id":"redis/Redis/ReplicationClient/Info","path":"Redis/ReplicationClient/Info.html","kind":"module","full_name":"Redis::ReplicationClient::Info","name":"Info","abstract":false,"locations":[{"filename":"src/replication_client.cr","line_number":170,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L170"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/ReplicationClient","kind":"class","full_name":"Redis::ReplicationClient","name":"ReplicationClient"},"types":[{"html_id":"redis/Redis/ReplicationClient/Info/Replica","path":"Redis/ReplicationClient/Info/Replica.html","kind":"struct","full_name":"Redis::ReplicationClient::Info::Replica","name":"Replica","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/replication_client.cr","line_number":234,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L234"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/ReplicationClient/Info","kind":"module","full_name":"Redis::ReplicationClient::Info","name":"Info"},"constructors":[{"html_id":"new(ip:String,port:Int32,state:Redis::ReplicationClient::Info::Replica::State,lag:Time::Span)-class-method","name":"new","abstract":false,"args":[{"name":"ip","external_name":"ip","restriction":"::String"},{"name":"port","external_name":"port","restriction":"::Int32"},{"name":"state","external_name":"state","restriction":"::Redis::ReplicationClient::Info::Replica::State"},{"name":"lag","external_name":"lag","restriction":"::Time::Span"}],"args_string":"(ip : String, port : Int32, state : Redis::ReplicationClient::Info::Replica::State, lag : Time::Span)","args_html":"(ip : String, port : Int32, state : Redis::ReplicationClient::Info::Replica::State, lag : Time::Span)","location":{"filename":"src/replication_client.cr","line_number":304,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L304"},"def":{"name":"new","args":[{"name":"ip","external_name":"ip","restriction":"::String"},{"name":"port","external_name":"port","restriction":"::Int32"},{"name":"state","external_name":"state","restriction":"::Redis::ReplicationClient::Info::Replica::State"},{"name":"lag","external_name":"lag","restriction":"::Time::Span"}],"visibility":"Public","body":"_ = allocate\n_.initialize(ip, port, state, lag)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}},{"html_id":"new(text:String)-class-method","name":"new","abstract":false,"args":[{"name":"text","external_name":"text","restriction":"String"}],"args_string":"(text : String)","args_html":"(text : String)","location":{"filename":"src/replication_client.cr","line_number":240,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L240"},"def":{"name":"new","args":[{"name":"text","external_name":"text","restriction":"String"}],"visibility":"Public","body":"_ = allocate\n_.initialize(text)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"==(other:self)-instance-method","name":"==","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"self"}],"args_string":"(other : self)","args_html":"(other : self)","location":{"filename":"src/replication_client.cr","line_number":307,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L307"},"def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"self"}],"visibility":"Public","body":"(ip == other.ip) && (port == other.port)"}},{"html_id":"ip:String-instance-method","name":"ip","abstract":false,"location":{"filename":"src/replication_client.cr","line_number":235,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L235"},"def":{"name":"ip","return_type":"String","visibility":"Public","body":"@ip"}},{"html_id":"lag:Time::Span-instance-method","name":"lag","abstract":false,"location":{"filename":"src/replication_client.cr","line_number":238,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L238"},"def":{"name":"lag","return_type":"Time::Span","visibility":"Public","body":"@lag"}},{"html_id":"port:Int32-instance-method","name":"port","abstract":false,"location":{"filename":"src/replication_client.cr","line_number":236,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L236"},"def":{"name":"port","return_type":"Int32","visibility":"Public","body":"@port"}},{"html_id":"state:State-instance-method","name":"state","abstract":false,"location":{"filename":"src/replication_client.cr","line_number":237,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L237"},"def":{"name":"state","return_type":"State","visibility":"Public","body":"@state"}}],"types":[{"html_id":"redis/Redis/ReplicationClient/Info/Replica/State","path":"Redis/ReplicationClient/Info/Replica/State.html","kind":"enum","full_name":"Redis::ReplicationClient::Info::Replica::State","name":"State","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/replication_client.cr","line_number":311,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L311"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"StableSync","name":"StableSync","value":"0"}],"namespace":{"html_id":"redis/Redis/ReplicationClient/Info/Replica","kind":"struct","full_name":"Redis::ReplicationClient::Info::Replica","name":"Replica"},"instance_methods":[{"html_id":"stable_sync?-instance-method","name":"stable_sync?","abstract":false,"location":{"filename":"src/replication_client.cr","line_number":312,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L312"},"def":{"name":"stable_sync?","visibility":"Public","body":"self == StableSync"}}]}]},{"html_id":"redis/Redis/ReplicationClient/Info/Replication","path":"Redis/ReplicationClient/Info/Replication.html","kind":"struct","full_name":"Redis::ReplicationClient::Info::Replication","name":"Replication","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/replication_client.cr","line_number":171,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L171"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/ReplicationClient/Info","kind":"module","full_name":"Redis::ReplicationClient::Info","name":"Info"},"constructors":[{"html_id":"new(text:String)-class-method","name":"new","abstract":false,"args":[{"name":"text","external_name":"text","restriction":"String"}],"args_string":"(text : String)","args_html":"(text : String)","location":{"filename":"src/replication_client.cr","line_number":182,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L182"},"def":{"name":"new","args":[{"name":"text","external_name":"text","restriction":"String"}],"visibility":"Public","body":"_ = allocate\n_.initialize(text)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"connected_replicas:Int32-instance-method","name":"connected_replicas","abstract":false,"location":{"filename":"src/replication_client.cr","line_number":173,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L173"},"def":{"name":"connected_replicas","visibility":"Public","body":"@connected_replicas"}},{"html_id":"master_host:String|Nil-instance-method","name":"master_host","abstract":false,"location":{"filename":"src/replication_client.cr","line_number":176,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L176"},"def":{"name":"master_host","return_type":"String | ::Nil","visibility":"Public","body":"@master_host"}},{"html_id":"master_last_io:Time|Nil-instance-method","name":"master_last_io","abstract":false,"location":{"filename":"src/replication_client.cr","line_number":179,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L179"},"def":{"name":"master_last_io","return_type":"Time | ::Nil","visibility":"Public","body":"@master_last_io"}},{"html_id":"master_link_status:String|Nil-instance-method","name":"master_link_status","abstract":false,"location":{"filename":"src/replication_client.cr","line_number":178,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L178"},"def":{"name":"master_link_status","return_type":"String | ::Nil","visibility":"Public","body":"@master_link_status"}},{"html_id":"master_port:Int32|Nil-instance-method","name":"master_port","abstract":false,"location":{"filename":"src/replication_client.cr","line_number":177,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L177"},"def":{"name":"master_port","return_type":"Int32 | ::Nil","visibility":"Public","body":"@master_port"}},{"html_id":"master_replid:String|Nil-instance-method","name":"master_replid","abstract":false,"location":{"filename":"src/replication_client.cr","line_number":175,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L175"},"def":{"name":"master_replid","return_type":"String | ::Nil","visibility":"Public","body":"@master_replid"}},{"html_id":"master_sync_in_progress?:Bool|Nil-instance-method","name":"master_sync_in_progress?","abstract":false,"location":{"filename":"src/replication_client.cr","line_number":180,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L180"},"def":{"name":"master_sync_in_progress?","return_type":"Bool | ::Nil","visibility":"Public","body":"@master_sync_in_progress"}},{"html_id":"replicas:Array(Info::Replica)-instance-method","name":"replicas","abstract":false,"location":{"filename":"src/replication_client.cr","line_number":174,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L174"},"def":{"name":"replicas","return_type":"Array(Info::Replica)","visibility":"Public","body":"if (value = @replicas).nil?\n @replicas = ([] of Info::Replica)\nelse\n value\nend"}},{"html_id":"role:Role-instance-method","name":"role","abstract":false,"location":{"filename":"src/replication_client.cr","line_number":172,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L172"},"def":{"name":"role","return_type":"Role","visibility":"Public","body":"@role"}}],"types":[{"html_id":"redis/Redis/ReplicationClient/Info/Replication/Role","path":"Redis/ReplicationClient/Info/Replication/Role.html","kind":"enum","full_name":"Redis::ReplicationClient::Info::Replication::Role","name":"Role","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/replication_client.cr","line_number":228,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L228"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"Master","name":"Master","value":"0"},{"id":"Replica","name":"Replica","value":"1"}],"namespace":{"html_id":"redis/Redis/ReplicationClient/Info/Replication","kind":"struct","full_name":"Redis::ReplicationClient::Info::Replication","name":"Replication"},"instance_methods":[{"html_id":"master?-instance-method","name":"master?","abstract":false,"location":{"filename":"src/replication_client.cr","line_number":229,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L229"},"def":{"name":"master?","visibility":"Public","body":"self == Master"}},{"html_id":"replica?-instance-method","name":"replica?","abstract":false,"location":{"filename":"src/replication_client.cr","line_number":230,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L230"},"def":{"name":"replica?","visibility":"Public","body":"self == Replica"}}]}]}]}]},{"html_id":"redis/Redis/Streaming","path":"Redis/Streaming.html","kind":"module","full_name":"Redis::Streaming","name":"Streaming","abstract":false,"locations":[{"filename":"src/streaming.cr","line_number":4,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L4"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"types":[{"html_id":"redis/Redis/Streaming/Message","path":"Redis/Streaming/Message.html","kind":"struct","full_name":"Redis::Streaming::Message","name":"Message","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/streaming.cr","line_number":92,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L92"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Streaming","kind":"module","full_name":"Redis::Streaming","name":"Streaming"},"constructors":[{"html_id":"new(message:Array)-class-method","name":"new","abstract":false,"args":[{"name":"message","external_name":"message","restriction":"Array"}],"args_string":"(message : Array)","args_html":"(message : Array)","location":{"filename":"src/streaming.cr","line_number":95,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L95"},"def":{"name":"new","args":[{"name":"message","external_name":"message","restriction":"Array"}],"visibility":"Public","body":"_ = allocate\n_.initialize(message)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"id:String-instance-method","name":"id","abstract":false,"location":{"filename":"src/streaming.cr","line_number":93,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L93"},"def":{"name":"id","visibility":"Public","body":"@id"}},{"html_id":"values:Hash(String,String)-instance-method","name":"values","abstract":false,"location":{"filename":"src/streaming.cr","line_number":93,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L93"},"def":{"name":"values","visibility":"Public","body":"@values"}}]},{"html_id":"redis/Redis/Streaming/XAutoClaimResponse","path":"Redis/Streaming/XAutoClaimResponse.html","kind":"struct","full_name":"Redis::Streaming::XAutoClaimResponse","name":"XAutoClaimResponse","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/streaming.cr","line_number":77,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L77"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Streaming","kind":"module","full_name":"Redis::Streaming","name":"Streaming"},"constructors":[{"html_id":"new(response:Array)-class-method","name":"new","abstract":false,"args":[{"name":"response","external_name":"response","restriction":"Array"}],"args_string":"(response : Array)","args_html":"(response : Array)","location":{"filename":"src/streaming.cr","line_number":81,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L81"},"def":{"name":"new","args":[{"name":"response","external_name":"response","restriction":"Array"}],"visibility":"Public","body":"_ = allocate\n_.initialize(response)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"id:String-instance-method","name":"id","abstract":false,"location":{"filename":"src/streaming.cr","line_number":78,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L78"},"def":{"name":"id","return_type":"String","visibility":"Public","body":"@id"}},{"html_id":"messages:Array(Message)-instance-method","name":"messages","abstract":false,"location":{"filename":"src/streaming.cr","line_number":79,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L79"},"def":{"name":"messages","return_type":"Array(Message)","visibility":"Public","body":"@messages"}}]},{"html_id":"redis/Redis/Streaming/XPendingBaseResponse","path":"Redis/Streaming/XPendingBaseResponse.html","kind":"struct","full_name":"Redis::Streaming::XPendingBaseResponse","name":"XPendingBaseResponse","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/streaming.cr","line_number":5,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L5"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Streaming","kind":"module","full_name":"Redis::Streaming","name":"Streaming"},"constructors":[{"html_id":"new(response:Array)-class-method","name":"new","abstract":false,"args":[{"name":"response","external_name":"response","restriction":"Array"}],"args_string":"(response : Array)","args_html":"(response : Array)","location":{"filename":"src/streaming.cr","line_number":8,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L8"},"def":{"name":"new","args":[{"name":"response","external_name":"response","restriction":"Array"}],"visibility":"Public","body":"_ = allocate\n_.initialize(response)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"count:Int64-instance-method","name":"count","abstract":false,"location":{"filename":"src/streaming.cr","line_number":6,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L6"},"def":{"name":"count","visibility":"Public","body":"@count"}},{"html_id":"data:Array(Data)-instance-method","name":"data","abstract":false,"location":{"filename":"src/streaming.cr","line_number":6,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L6"},"def":{"name":"data","return_type":"Array(Data)","visibility":"Public","body":"@data"}},{"html_id":"earliest:String-instance-method","name":"earliest","abstract":false,"location":{"filename":"src/streaming.cr","line_number":6,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L6"},"def":{"name":"earliest","visibility":"Public","body":"@earliest"}},{"html_id":"latest:String-instance-method","name":"latest","abstract":false,"location":{"filename":"src/streaming.cr","line_number":6,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L6"},"def":{"name":"latest","visibility":"Public","body":"@latest"}}],"types":[{"html_id":"redis/Redis/Streaming/XPendingBaseResponse/Data","path":"Redis/Streaming/XPendingBaseResponse/Data.html","kind":"struct","full_name":"Redis::Streaming::XPendingBaseResponse::Data","name":"Data","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/streaming.cr","line_number":21,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L21"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Streaming/XPendingBaseResponse","kind":"struct","full_name":"Redis::Streaming::XPendingBaseResponse","name":"XPendingBaseResponse"},"constructors":[{"html_id":"new(consumer:String,pending_count:Int64)-class-method","name":"new","abstract":false,"args":[{"name":"consumer","external_name":"consumer","restriction":"String"},{"name":"pending_count","external_name":"pending_count","restriction":"Int64"}],"args_string":"(consumer : String, pending_count : Int64)","args_html":"(consumer : String, pending_count : Int64)","location":{"filename":"src/streaming.cr","line_number":21,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L21"},"def":{"name":"new","args":[{"name":"consumer","external_name":"consumer","restriction":"String"},{"name":"pending_count","external_name":"pending_count","restriction":"Int64"}],"visibility":"Public","body":"_ = allocate\n_.initialize(consumer, pending_count)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/streaming.cr","line_number":21,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L21"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@consumer.clone, @pending_count.clone)"}},{"html_id":"consumer:String-instance-method","name":"consumer","abstract":false,"def":{"name":"consumer","return_type":"String","visibility":"Public","body":"@consumer"}},{"html_id":"copy_with(consumer_consumer=@consumer,pending_count_pending_count=@pending_count)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_consumer","default_value":"@consumer","external_name":"consumer","restriction":""},{"name":"_pending_count","default_value":"@pending_count","external_name":"pending_count","restriction":""}],"args_string":"(consumer _consumer = @consumer, pending_count _pending_count = @pending_count)","args_html":"(consumer _consumer = @consumer, pending_count _pending_count = @pending_count)","location":{"filename":"src/streaming.cr","line_number":21,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L21"},"def":{"name":"copy_with","args":[{"name":"_consumer","default_value":"@consumer","external_name":"consumer","restriction":""},{"name":"_pending_count","default_value":"@pending_count","external_name":"pending_count","restriction":""}],"visibility":"Public","body":"self.class.new(_consumer, _pending_count)"}},{"html_id":"pending_count:Int64-instance-method","name":"pending_count","abstract":false,"def":{"name":"pending_count","return_type":"Int64","visibility":"Public","body":"@pending_count"}}]}]},{"html_id":"redis/Redis/Streaming/XPendingExtendedResponse","path":"Redis/Streaming/XPendingExtendedResponse.html","kind":"struct","full_name":"Redis::Streaming::XPendingExtendedResponse","name":"XPendingExtendedResponse","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/streaming.cr","line_number":24,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L24"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Streaming","kind":"module","full_name":"Redis::Streaming","name":"Streaming"},"constructors":[{"html_id":"new(data:Array,now:Time=Time.utc)-class-method","name":"new","abstract":false,"args":[{"name":"data","external_name":"data","restriction":"Array"},{"name":"now","default_value":"Time.utc","external_name":"now","restriction":"Time"}],"args_string":"(data : Array, now : Time = Time.utc)","args_html":"(data : Array, now : Time = Time.utc)","location":{"filename":"src/streaming.cr","line_number":27,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L27"},"def":{"name":"new","args":[{"name":"data","external_name":"data","restriction":"Array"},{"name":"now","default_value":"Time.utc","external_name":"now","restriction":"Time"}],"visibility":"Public","body":"_ = allocate\n_.initialize(data, now)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"messages:Array(MessageData)-instance-method","name":"messages","abstract":false,"location":{"filename":"src/streaming.cr","line_number":25,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L25"},"def":{"name":"messages","return_type":"Array(MessageData)","visibility":"Public","body":"@messages"}}],"types":[{"html_id":"redis/Redis/Streaming/XPendingExtendedResponse/MessageData","path":"Redis/Streaming/XPendingExtendedResponse/MessageData.html","kind":"struct","full_name":"Redis::Streaming::XPendingExtendedResponse::MessageData","name":"MessageData","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/streaming.cr","line_number":40,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L40"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Streaming/XPendingExtendedResponse","kind":"struct","full_name":"Redis::Streaming::XPendingExtendedResponse","name":"XPendingExtendedResponse"},"constructors":[{"html_id":"new(id:String,consumer:String,last_delivered_at:Time,delivery_count:Int64)-class-method","name":"new","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"::String"},{"name":"consumer","external_name":"consumer","restriction":"::String"},{"name":"last_delivered_at","external_name":"last_delivered_at","restriction":"::Time"},{"name":"delivery_count","external_name":"delivery_count","restriction":"::Int64"}],"args_string":"(id : String, consumer : String, last_delivered_at : Time, delivery_count : Int64)","args_html":"(id : String, consumer : String, last_delivered_at : Time, delivery_count : Int64)","location":{"filename":"src/streaming.cr","line_number":46,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L46"},"def":{"name":"new","args":[{"name":"id","external_name":"id","restriction":"::String"},{"name":"consumer","external_name":"consumer","restriction":"::String"},{"name":"last_delivered_at","external_name":"last_delivered_at","restriction":"::Time"},{"name":"delivery_count","external_name":"delivery_count","restriction":"::Int64"}],"visibility":"Public","body":"_ = allocate\n_.initialize(id, consumer, last_delivered_at, delivery_count)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"age-instance-method","name":"age","abstract":false,"location":{"filename":"src/streaming.cr","line_number":49,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L49"},"def":{"name":"age","visibility":"Public","body":"Time.utc - last_delivered_at"}},{"html_id":"consumer:String-instance-method","name":"consumer","abstract":false,"location":{"filename":"src/streaming.cr","line_number":42,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L42"},"def":{"name":"consumer","return_type":"String","visibility":"Public","body":"@consumer"}},{"html_id":"delivery_count:Int64-instance-method","name":"delivery_count","abstract":false,"location":{"filename":"src/streaming.cr","line_number":44,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L44"},"def":{"name":"delivery_count","return_type":"Int64","visibility":"Public","body":"@delivery_count"}},{"html_id":"id:String-instance-method","name":"id","abstract":false,"location":{"filename":"src/streaming.cr","line_number":41,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L41"},"def":{"name":"id","return_type":"String","visibility":"Public","body":"@id"}},{"html_id":"last_delivered_at:Time-instance-method","name":"last_delivered_at","abstract":false,"location":{"filename":"src/streaming.cr","line_number":43,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L43"},"def":{"name":"last_delivered_at","return_type":"Time","visibility":"Public","body":"@last_delivered_at"}}]}]},{"html_id":"redis/Redis/Streaming/XReadGroupResponse","path":"Redis/Streaming/XReadGroupResponse.html","kind":"struct","full_name":"Redis::Streaming::XReadGroupResponse","name":"XReadGroupResponse","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/streaming.cr","line_number":55,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L55"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Streaming","kind":"module","full_name":"Redis::Streaming","name":"Streaming"},"constructors":[{"html_id":"new(response:Array(Redis::Value))-class-method","name":"new","abstract":false,"args":[{"name":"response","external_name":"response","restriction":"Array(Redis::Value)"}],"args_string":"(response : Array(Redis::Value))","args_html":"(response : Array(Redis::Value))","location":{"filename":"src/streaming.cr","line_number":58,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L58"},"def":{"name":"new","args":[{"name":"response","external_name":"response","restriction":"Array(Redis::Value)"}],"visibility":"Public","body":"_ = allocate\n_.initialize(response)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"results:Array(Redis::Streaming::XReadGroupResponse::Result)-instance-method","name":"results","abstract":false,"location":{"filename":"src/streaming.cr","line_number":56,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L56"},"def":{"name":"results","visibility":"Public","body":"@results"}}],"types":[{"html_id":"redis/Redis/Streaming/XReadGroupResponse/Result","path":"Redis/Streaming/XReadGroupResponse/Result.html","kind":"struct","full_name":"Redis::Streaming::XReadGroupResponse::Result","name":"Result","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/streaming.cr","line_number":67,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L67"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Streaming/XReadGroupResponse","kind":"struct","full_name":"Redis::Streaming::XReadGroupResponse","name":"XReadGroupResponse"},"constructors":[{"html_id":"new(key:String,messages:Array)-class-method","name":"new","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"messages","external_name":"messages","restriction":"Array"}],"args_string":"(key : String, messages : Array)","args_html":"(key : String, messages : Array)","location":{"filename":"src/streaming.cr","line_number":71,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L71"},"def":{"name":"new","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"messages","external_name":"messages","restriction":"Array"}],"visibility":"Public","body":"_ = allocate\n_.initialize(key, messages)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"key:String-instance-method","name":"key","abstract":false,"location":{"filename":"src/streaming.cr","line_number":69,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L69"},"def":{"name":"key","return_type":"String","visibility":"Public","body":"@key"}},{"html_id":"messages:Array(Message)-instance-method","name":"messages","abstract":false,"location":{"filename":"src/streaming.cr","line_number":68,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L68"},"def":{"name":"messages","return_type":"Array(Message)","visibility":"Public","body":"@messages"}}]}]}]},{"html_id":"redis/Redis/Subscription","path":"Redis/Subscription.html","kind":"class","full_name":"Redis::Subscription","name":"Subscription","abstract":false,"superclass":{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/connection.cr","line_number":484,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L484"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"doc":"The `Subscription` is what is yielded to a `Connection#subscribe` block. It\nis used to setup callbacks when messages come in, the connection is\nsubscribed to other channels or patterns, or unsubscribed from any channels\nor patterns.\n\n```\nredis.subscribe \"channel1\", \"channel2\" do |subscription, connection|\n subscription.on_message do |channel, message|\n if message == \"unsubscribe\"\n connection.unsubscribe channel\n end\n\n # ...\n end\n\n # Respond to new subscribers\n subscription.on_subscribe do |channel, sub_count|\n connection.incr \"sub_count:#{channel}\"\n end\n\n # Respond to losing subscribers\n subscription.on_unsubscribe do |channel, sub_count|\n connection.incr \"sub_count:#{channel}\"\n end\nend\n```\n\nFor more information, see the documentation for:\n- [`SUBSCRIBE`](https://redis.io/commands/subscribe/)\n- [`PSUBSCRIBE`](https://redis.io/commands/psubscribe/)","summary":"

    The Subscription is what is yielded to a Connection#subscribe block.

    ","instance_methods":[{"html_id":"close-instance-method","name":"close","abstract":false,"location":{"filename":"src/connection.cr","line_number":571,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L571"},"def":{"name":"close","visibility":"Public","body":"@channels.each do |channel|\n @connection.unsubscribe(channel)\nend"}},{"html_id":"on_message(&on_message:String,String,String->)-instance-method","name":"on_message","doc":"Define a callback for when a new message is received.\n\n```\nsubscription.on_message do |channel, message|\n pp channel: channel, message: message\nend\n```","summary":"

    Define a callback for when a new message is received.

    ","abstract":false,"location":{"filename":"src/connection.cr","line_number":501,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L501"},"def":{"name":"on_message","yields":3,"block_arity":3,"block_arg":{"name":"on_message","external_name":"on_message","restriction":"(String, String, String ->)"},"visibility":"Public","body":"@on_message = on_message\nself\n"}},{"html_id":"on_subscribe(&on_subscribe:String,Int64->)-instance-method","name":"on_subscribe","doc":"Define a callback to execute when the connection is subscribed to another\nchannel.","summary":"

    Define a callback to execute when the connection is subscribed to another channel.

    ","abstract":false,"location":{"filename":"src/connection.cr","line_number":507,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L507"},"def":{"name":"on_subscribe","yields":2,"block_arity":2,"block_arg":{"name":"on_subscribe","external_name":"on_subscribe","restriction":"(String, Int64 ->)"},"visibility":"Public","body":"@on_subscribe = on_subscribe\nself\n"}},{"html_id":"on_unsubscribe(&on_unsubscribe:String,Int64->)-instance-method","name":"on_unsubscribe","doc":"Define a callback to execute when the connection is unsubscribed from\nanother channel.","summary":"

    Define a callback to execute when the connection is unsubscribed from another channel.

    ","abstract":false,"location":{"filename":"src/connection.cr","line_number":513,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L513"},"def":{"name":"on_unsubscribe","yields":2,"block_arity":2,"block_arg":{"name":"on_unsubscribe","external_name":"on_unsubscribe","restriction":"(String, Int64 ->)"},"visibility":"Public","body":"@on_unsubscribe = on_unsubscribe\nself\n"}}],"types":[{"html_id":"redis/Redis/Subscription/InvalidMessage","path":"Redis/Subscription/InvalidMessage.html","kind":"class","full_name":"Redis::Subscription::InvalidMessage","name":"InvalidMessage","abstract":false,"superclass":{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},"ancestors":[{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/connection.cr","line_number":577,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L577"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Subscription","kind":"class","full_name":"Redis::Subscription","name":"Subscription"}}]},{"html_id":"redis/Redis/TimeSeries","path":"Redis/TimeSeries.html","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":13,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L13"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"doc":"Time-series support for Redis using the\n[RedisTimeSeries module](https://oss.redis.com/redistimeseries/).\n\n```\nrequire \"redis\"\nrequire \"redis/time_series\"\n```","summary":"

    Time-series support for Redis using the RedisTimeSeries module.

    \n

    EXPERIMENTAL Support for the Redis TimeSeries module is subject to change.

    ","instance_methods":[{"html_id":"add(key:String,value:Float64|Int64,retention:Time::Span|Nil=nil,encoding:Encoding|Nil=nil,chunk_size:Int64|Nil=nil,on_duplicateduplicate_policy:DuplicatePolicy|Nil=nil,labels:Hash(String,String|Int32|Int64)|Nil=nil)-instance-method","name":"add","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"value","external_name":"value","restriction":"Float64 | Int64"},{"name":"retention","default_value":"nil","external_name":"retention","restriction":"Time::Span | ::Nil"},{"name":"encoding","default_value":"nil","external_name":"encoding","restriction":"Encoding | ::Nil"},{"name":"chunk_size","default_value":"nil","external_name":"chunk_size","restriction":"Int64 | ::Nil"},{"name":"duplicate_policy","default_value":"nil","external_name":"on_duplicate","restriction":"DuplicatePolicy | ::Nil"},{"name":"labels","default_value":"nil","external_name":"labels","restriction":"Hash(String, String | Int32 | Int64) | ::Nil"}],"args_string":"(key : String, value : Float64 | Int64, retention : Time::Span | Nil = nil, encoding : Encoding | Nil = nil, chunk_size : Int64 | Nil = nil, on_duplicate duplicate_policy : DuplicatePolicy | Nil = nil, labels : Hash(String, String | Int32 | Int64) | Nil = nil)","args_html":"(key : String, value : Float64 | Int64, retention : Time::Span | Nil = nil, encoding : Encoding | Nil = nil, chunk_size : Int64 | Nil = nil, on_duplicate duplicate_policy : DuplicatePolicy | Nil = nil, labels : Hash(String, String | Int32 | Int64) | Nil = nil)","location":{"filename":"src/time_series.cr","line_number":54,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L54"},"def":{"name":"add","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"value","external_name":"value","restriction":"Float64 | Int64"},{"name":"retention","default_value":"nil","external_name":"retention","restriction":"Time::Span | ::Nil"},{"name":"encoding","default_value":"nil","external_name":"encoding","restriction":"Encoding | ::Nil"},{"name":"chunk_size","default_value":"nil","external_name":"chunk_size","restriction":"Int64 | ::Nil"},{"name":"duplicate_policy","default_value":"nil","external_name":"on_duplicate","restriction":"DuplicatePolicy | ::Nil"},{"name":"labels","default_value":"nil","external_name":"labels","restriction":"Hash(String, String | Int32 | Int64) | ::Nil"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 12 + ((labels.try(&.size) || 0) * 2))\n(((command << \"ts.add\") << key) << \"*\") << value.to_s\nif retention\n (command << \"retention\") << retention.total_milliseconds.to_i64.to_s\nend\nif encoding\n (command << \"encoding\") << encoding.to_s\nend\nif chunk_size\n (command << \"chunk_size\") << chunk_size.to_s\nend\nif duplicate_policy\n (command << \"on_duplicate\") << duplicate_policy.to_s\nend\nif labels && labels.any?\n command << \"labels\"\n labels.each do |key, value|\n (command << key) << value.to_s\n end\nend\n@redis.run(command)\n"}},{"html_id":"add(key:String,timestamp:Time,value:Float64|Int64,retention:Time::Span|Nil=nil,encoding:Encoding|Nil=nil,chunk_size:Int64|Nil=nil,on_duplicateduplicate_policy:DuplicatePolicy|Nil=nil,labels:Hash(String,String|Int32|Int64)|Nil=nil)-instance-method","name":"add","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"timestamp","external_name":"timestamp","restriction":"Time"},{"name":"value","external_name":"value","restriction":"Float64 | Int64"},{"name":"retention","default_value":"nil","external_name":"retention","restriction":"Time::Span | ::Nil"},{"name":"encoding","default_value":"nil","external_name":"encoding","restriction":"Encoding | ::Nil"},{"name":"chunk_size","default_value":"nil","external_name":"chunk_size","restriction":"Int64 | ::Nil"},{"name":"duplicate_policy","default_value":"nil","external_name":"on_duplicate","restriction":"DuplicatePolicy | ::Nil"},{"name":"labels","default_value":"nil","external_name":"labels","restriction":"Hash(String, String | Int32 | Int64) | ::Nil"}],"args_string":"(key : String, timestamp : Time, value : Float64 | Int64, retention : Time::Span | Nil = nil, encoding : Encoding | Nil = nil, chunk_size : Int64 | Nil = nil, on_duplicate duplicate_policy : DuplicatePolicy | Nil = nil, labels : Hash(String, String | Int32 | Int64) | Nil = nil)","args_html":"(key : String, timestamp : Time, value : Float64 | Int64, retention : Time::Span | Nil = nil, encoding : Encoding | Nil = nil, chunk_size : Int64 | Nil = nil, on_duplicate duplicate_policy : DuplicatePolicy | Nil = nil, labels : Hash(String, String | Int32 | Int64) | Nil = nil)","location":{"filename":"src/time_series.cr","line_number":91,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L91"},"def":{"name":"add","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"timestamp","external_name":"timestamp","restriction":"Time"},{"name":"value","external_name":"value","restriction":"Float64 | Int64"},{"name":"retention","default_value":"nil","external_name":"retention","restriction":"Time::Span | ::Nil"},{"name":"encoding","default_value":"nil","external_name":"encoding","restriction":"Encoding | ::Nil"},{"name":"chunk_size","default_value":"nil","external_name":"chunk_size","restriction":"Int64 | ::Nil"},{"name":"duplicate_policy","default_value":"nil","external_name":"on_duplicate","restriction":"DuplicatePolicy | ::Nil"},{"name":"labels","default_value":"nil","external_name":"labels","restriction":"Hash(String, String | Int32 | Int64) | ::Nil"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 13 + ((labels.try(&.size) || 0) * 2))\n(((command << \"ts.add\") << key) << timestamp.to_unix_ms.to_s) << value.to_s\nif retention\n (command << \"retention\") << retention.total_milliseconds.to_i64.to_s\nend\nif encoding\n (command << \"encoding\") << encoding.to_s\nend\nif chunk_size\n (command << \"chunk_size\") << chunk_size.to_s\nend\nif duplicate_policy\n (command << \"on_duplicate\") << duplicate_policy.to_s\nend\nif labels && labels.any?\n command << \"labels\"\n labels.each do |key, value|\n (command << key) << value.to_s\n end\nend\n@redis.run(command)\n"}},{"html_id":"aggregation(aggregator:AggregationType,bucket_duration:Time::Span,align:Alignment|Time|Nil=nil,buckettimestamp:BucketTimestamp|Nil=nil,empty:Bool|Nil=nil)-instance-method","name":"aggregation","abstract":false,"args":[{"name":"aggregator","external_name":"aggregator","restriction":"AggregationType"},{"name":"bucket_duration","external_name":"bucket_duration","restriction":"Time::Span"},{"name":"align","default_value":"nil","external_name":"align","restriction":"Alignment | Time | Nil"},{"name":"buckettimestamp","default_value":"nil","external_name":"buckettimestamp","restriction":"BucketTimestamp | ::Nil"},{"name":"empty","default_value":"nil","external_name":"empty","restriction":"Bool | ::Nil"}],"args_string":"(aggregator : AggregationType, bucket_duration : Time::Span, align : Alignment | Time | Nil = nil, buckettimestamp : BucketTimestamp | Nil = nil, empty : Bool | Nil = nil)","args_html":"(aggregator : AggregationType, bucket_duration : Time::Span, align : Alignment | Time | Nil = nil, buckettimestamp : BucketTimestamp | Nil = nil, empty : Bool | Nil = nil)","location":{"filename":"src/time_series.cr","line_number":153,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L153"},"def":{"name":"aggregation","args":[{"name":"aggregator","external_name":"aggregator","restriction":"AggregationType"},{"name":"bucket_duration","external_name":"bucket_duration","restriction":"Time::Span"},{"name":"align","default_value":"nil","external_name":"align","restriction":"Alignment | Time | Nil"},{"name":"buckettimestamp","default_value":"nil","external_name":"buckettimestamp","restriction":"BucketTimestamp | ::Nil"},{"name":"empty","default_value":"nil","external_name":"empty","restriction":"Bool | ::Nil"}],"visibility":"Public","body":"Aggregation.new(aggregator: aggregator, bucket_duration: bucket_duration, alignment: align, buckettimestamp: buckettimestamp, empty: empty)"}},{"html_id":"create(key:String,retention:Time::Span|Nil=nil,encoding:Encoding|Nil=nil,chunk_size:Int64|Nil=nil,duplicate_policy:DuplicatePolicy|Nil=nil,labels:Hash(String,String|Int32|Int64)|Nil=nil)-instance-method","name":"create","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"retention","default_value":"nil","external_name":"retention","restriction":"Time::Span | ::Nil"},{"name":"encoding","default_value":"nil","external_name":"encoding","restriction":"Encoding | ::Nil"},{"name":"chunk_size","default_value":"nil","external_name":"chunk_size","restriction":"Int64 | ::Nil"},{"name":"duplicate_policy","default_value":"nil","external_name":"duplicate_policy","restriction":"DuplicatePolicy | ::Nil"},{"name":"labels","default_value":"nil","external_name":"labels","restriction":"Hash(String, String | Int32 | Int64) | ::Nil"}],"args_string":"(key : String, retention : Time::Span | Nil = nil, encoding : Encoding | Nil = nil, chunk_size : Int64 | Nil = nil, duplicate_policy : DuplicatePolicy | Nil = nil, labels : Hash(String, String | Int32 | Int64) | Nil = nil)","args_html":"(key : String, retention : Time::Span | Nil = nil, encoding : Encoding | Nil = nil, chunk_size : Int64 | Nil = nil, duplicate_policy : DuplicatePolicy | Nil = nil, labels : Hash(String, String | Int32 | Int64) | Nil = nil)","location":{"filename":"src/time_series.cr","line_number":18,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L18"},"def":{"name":"create","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"retention","default_value":"nil","external_name":"retention","restriction":"Time::Span | ::Nil"},{"name":"encoding","default_value":"nil","external_name":"encoding","restriction":"Encoding | ::Nil"},{"name":"chunk_size","default_value":"nil","external_name":"chunk_size","restriction":"Int64 | ::Nil"},{"name":"duplicate_policy","default_value":"nil","external_name":"duplicate_policy","restriction":"DuplicatePolicy | ::Nil"},{"name":"labels","default_value":"nil","external_name":"labels","restriction":"Hash(String, String | Int32 | Int64) | ::Nil"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 11 + ((labels.try(&.size) || 0) * 2))\n(command << \"ts.create\") << key\nif retention\n (command << \"retention\") << retention.total_milliseconds.to_i64.to_s\nend\nif encoding\n (command << \"encoding\") << encoding.to_s\nend\nif chunk_size\n (command << \"chunk_size\") << chunk_size.to_s\nend\nif duplicate_policy\n (command << \"duplicate_policy\") << duplicate_policy.to_s\nend\nif labels && labels.any?\n command << \"labels\"\n labels.each do |key, value|\n (command << key) << value.to_s\n end\nend\n@redis.run(command)\n"}},{"html_id":"get(key:String)-instance-method","name":"get","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/time_series.cr","line_number":126,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L126"},"def":{"name":"get","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"@redis.run({\"ts.get\", key})"}},{"html_id":"info(key:String)-instance-method","name":"info","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/time_series.cr","line_number":145,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L145"},"def":{"name":"info","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"@redis.run({\"ts.info\", key})"}},{"html_id":"mrange(time_range:::Range(Time,Time|Nil),filter:String,filter_by_ts:Enumerable(Time)|Nil=nil,filter_by_value:::Range(Float64,Float64)|Nil=nil,withlabels:Bool|Nil=nil,selected_labels:Enumerable(String)|Nil=nil,count:Int|Nil=nil,aggregation:Aggregation|Nil=nil,groupby:String|Nil=nil,reduce:String|Nil=nil)-instance-method","name":"mrange","abstract":false,"args":[{"name":"time_range","external_name":"time_range","restriction":"::Range(Time, Time | ::Nil)"},{"name":"filter","external_name":"filter","restriction":"String"},{"name":"filter_by_ts","default_value":"nil","external_name":"filter_by_ts","restriction":"Enumerable(Time) | ::Nil"},{"name":"filter_by_value","default_value":"nil","external_name":"filter_by_value","restriction":"::Range(Float64, Float64) | ::Nil"},{"name":"withlabels","default_value":"nil","external_name":"withlabels","restriction":"Bool | ::Nil"},{"name":"selected_labels","default_value":"nil","external_name":"selected_labels","restriction":"Enumerable(String) | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"Int | ::Nil"},{"name":"aggregation","default_value":"nil","external_name":"aggregation","restriction":"Aggregation | ::Nil"},{"name":"groupby","default_value":"nil","external_name":"groupby","restriction":"String | ::Nil"},{"name":"reduce","default_value":"nil","external_name":"reduce","restriction":"String | ::Nil"}],"args_string":"(time_range : ::Range(Time, Time | Nil), filter : String, filter_by_ts : Enumerable(Time) | Nil = nil, filter_by_value : ::Range(Float64, Float64) | Nil = nil, withlabels : Bool | Nil = nil, selected_labels : Enumerable(String) | Nil = nil, count : Int | Nil = nil, aggregation : Aggregation | Nil = nil, groupby : String | Nil = nil, reduce : String | Nil = nil)","args_html":"(time_range : ::Range(Time, Time | Nil), filter : String, filter_by_ts : Enumerable(Time) | Nil = nil, filter_by_value : ::Range(Float64, Float64) | Nil = nil, withlabels : Bool | Nil = nil, selected_labels : Enumerable(String) | Nil = nil, count : Int | Nil = nil, aggregation : Aggregation | Nil = nil, groupby : String | Nil = nil, reduce : String | Nil = nil)","location":{"filename":"src/time_series.cr","line_number":181,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L181"},"def":{"name":"mrange","args":[{"name":"time_range","external_name":"time_range","restriction":"::Range(Time, Time | ::Nil)"},{"name":"filter","external_name":"filter","restriction":"String"},{"name":"filter_by_ts","default_value":"nil","external_name":"filter_by_ts","restriction":"Enumerable(Time) | ::Nil"},{"name":"filter_by_value","default_value":"nil","external_name":"filter_by_value","restriction":"::Range(Float64, Float64) | ::Nil"},{"name":"withlabels","default_value":"nil","external_name":"withlabels","restriction":"Bool | ::Nil"},{"name":"selected_labels","default_value":"nil","external_name":"selected_labels","restriction":"Enumerable(String) | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"Int | ::Nil"},{"name":"aggregation","default_value":"nil","external_name":"aggregation","restriction":"Aggregation | ::Nil"},{"name":"groupby","default_value":"nil","external_name":"groupby","restriction":"String | ::Nil"},{"name":"reduce","default_value":"nil","external_name":"reduce","restriction":"String | ::Nil"}],"visibility":"Public","body":"mrange(time_range: time_range, filter: [filter], filter_by_ts: filter_by_ts, filter_by_value: filter_by_value, withlabels: withlabels, selected_labels: selected_labels, count: count, aggregation: aggregation, groupby: groupby, reduce: reduce)"}},{"html_id":"mrange(time_range:::Range(Time,Time|Nil),filter:Array(String),filter_by_ts:Enumerable(Time)|Nil=nil,filter_by_value:::Range(Float64,Float64)|Nil=nil,withlabels:Bool|Nil=nil,selected_labels:Enumerable(String)|Nil=nil,count:Int|Nil=nil,aggregation:Aggregation|Nil=nil,groupby:String|Nil=nil,reduce:String|Nil=nil)-instance-method","name":"mrange","abstract":false,"args":[{"name":"time_range","external_name":"time_range","restriction":"::Range(Time, Time | ::Nil)"},{"name":"filter","external_name":"filter","restriction":"Array(String)"},{"name":"filter_by_ts","default_value":"nil","external_name":"filter_by_ts","restriction":"Enumerable(Time) | ::Nil"},{"name":"filter_by_value","default_value":"nil","external_name":"filter_by_value","restriction":"::Range(Float64, Float64) | ::Nil"},{"name":"withlabels","default_value":"nil","external_name":"withlabels","restriction":"Bool | ::Nil"},{"name":"selected_labels","default_value":"nil","external_name":"selected_labels","restriction":"Enumerable(String) | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"Int | ::Nil"},{"name":"aggregation","default_value":"nil","external_name":"aggregation","restriction":"Aggregation | ::Nil"},{"name":"groupby","default_value":"nil","external_name":"groupby","restriction":"String | ::Nil"},{"name":"reduce","default_value":"nil","external_name":"reduce","restriction":"String | ::Nil"}],"args_string":"(time_range : ::Range(Time, Time | Nil), filter : Array(String), filter_by_ts : Enumerable(Time) | Nil = nil, filter_by_value : ::Range(Float64, Float64) | Nil = nil, withlabels : Bool | Nil = nil, selected_labels : Enumerable(String) | Nil = nil, count : Int | Nil = nil, aggregation : Aggregation | Nil = nil, groupby : String | Nil = nil, reduce : String | Nil = nil)","args_html":"(time_range : ::Range(Time, Time | Nil), filter : Array(String), filter_by_ts : Enumerable(Time) | Nil = nil, filter_by_value : ::Range(Float64, Float64) | Nil = nil, withlabels : Bool | Nil = nil, selected_labels : Enumerable(String) | Nil = nil, count : Int | Nil = nil, aggregation : Aggregation | Nil = nil, groupby : String | Nil = nil, reduce : String | Nil = nil)","location":{"filename":"src/time_series.cr","line_number":207,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L207"},"def":{"name":"mrange","args":[{"name":"time_range","external_name":"time_range","restriction":"::Range(Time, Time | ::Nil)"},{"name":"filter","external_name":"filter","restriction":"Array(String)"},{"name":"filter_by_ts","default_value":"nil","external_name":"filter_by_ts","restriction":"Enumerable(Time) | ::Nil"},{"name":"filter_by_value","default_value":"nil","external_name":"filter_by_value","restriction":"::Range(Float64, Float64) | ::Nil"},{"name":"withlabels","default_value":"nil","external_name":"withlabels","restriction":"Bool | ::Nil"},{"name":"selected_labels","default_value":"nil","external_name":"selected_labels","restriction":"Enumerable(String) | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"Int | ::Nil"},{"name":"aggregation","default_value":"nil","external_name":"aggregation","restriction":"Aggregation | ::Nil"},{"name":"groupby","default_value":"nil","external_name":"groupby","restriction":"String | ::Nil"},{"name":"reduce","default_value":"nil","external_name":"reduce","restriction":"String | ::Nil"}],"visibility":"Public","body":"from = time_range.begin\nto = time_range.end || (Time::UNIX_EPOCH + Int32::MAX.seconds)\ncommand_size = (((((((((((1 + 2) + 1) + (filter_by_ts.try(&.size) || 0)) + 3) + 1) + 1) + (selected_labels.try(&.size) || 0)) + 2) + 8) + 1) + filter.size) + 4\ncommand = Array(String).new(initial_capacity: command_size)\n((command << \"ts.mrange\") << from.to_unix_ms.to_s) << to.to_unix_ms.to_s\nif filter_by_ts\n command << \"filter_by_ts\"\n filter_by_ts.each do |ts|\n command << ts.to_unix_ms.to_s\n end\nend\nif filter_by_value\n command << \"filter_by_value\"\n command << filter_by_value.begin.to_s\n command << filter_by_value.end.to_s\nend\nif withlabels\n command << \"withlabels\"\nend\nif selected_labels\n command << \"selected_labels\"\n selected_labels.each do |label|\n command << label\n end\nend\nif count\n (command << \"count\") << count.to_s\nend\nif aggregation\n case alignment = aggregation.alignment\n in Alignment\n (command << \"align\") << alignment.to_s.downcase\n in Time\n (command << \"align\") << alignment.to_unix_ms.to_s\n in Nil\n end\n ((command << \"aggregation\") << aggregation.aggregator.to_s) << aggregation.bucket_duration.total_milliseconds.to_i64.to_s\n if bucket_ts = aggregation.buckettimestamp\n (command << \"buckettimestamp\") << bucket_ts.to_s\n end\n if aggregation.empty\n command << \"empty\"\n end\nend\ncommand << \"filter\"\nfilter.each do |filter_expr|\n command << filter_expr\nend\nif groupby && reduce\n (((command << \"groupby\") << groupby) << \"reduce\") << reduce\nend\n@redis.run(command)\n"}},{"html_id":"queryindex(filter:String)-instance-method","name":"queryindex","abstract":false,"args":[{"name":"filter","external_name":"filter","restriction":"String"}],"args_string":"(filter : String)","args_html":"(filter : String)","location":{"filename":"src/time_series.cr","line_number":149,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L149"},"def":{"name":"queryindex","args":[{"name":"filter","external_name":"filter","restriction":"String"}],"visibility":"Public","body":"@redis.run({\"ts.queryindex\", filter})"}},{"html_id":"range(key:String,time_range:::Range(Time,Time),&:RangeOptions->)-instance-method","name":"range","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"time_range","external_name":"time_range","restriction":"::Range(Time, Time)"}],"args_string":"(key : String, time_range : ::Range(Time, Time), & : RangeOptions -> )","args_html":"(key : String, time_range : ::Range(Time, Time), & : RangeOptions -> )","location":{"filename":"src/time_series.cr","line_number":130,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L130"},"def":{"name":"range","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"time_range","external_name":"time_range","restriction":"::Range(Time, Time)"}],"yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(RangeOptions ->)"},"visibility":"Public","body":"command = Array(String).new(initial_capacity: 14)\noptions = RangeOptions.new\n(((command << \"ts.range\") << key) << time_range.begin.to_unix_ms.to_s) << time_range.end.to_unix_ms.to_s\nyield options\nif agg = options.aggregation\n ((command << \"aggregation\") << agg.type.to_s) << agg.time_bucket.total_milliseconds.to_i.to_s\nend\n@redis.run(command)\n"}}],"types":[{"html_id":"redis/Redis/TimeSeries/Aggregation","path":"Redis/TimeSeries/Aggregation.html","kind":"struct","full_name":"Redis::TimeSeries::Aggregation","name":"Aggregation","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":169,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L169"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/TimeSeries","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries"},"constructors":[{"html_id":"new(aggregator:AggregationType,bucket_duration:Time::Span,alignment:Alignment|Time|Nil=nil,buckettimestamp:BucketTimestamp|Nil=nil,empty:Bool|Nil=nil)-class-method","name":"new","abstract":false,"args":[{"name":"aggregator","external_name":"aggregator","restriction":"AggregationType"},{"name":"bucket_duration","external_name":"bucket_duration","restriction":"Time::Span"},{"name":"alignment","default_value":"nil","external_name":"alignment","restriction":"Alignment | Time | Nil"},{"name":"buckettimestamp","default_value":"nil","external_name":"buckettimestamp","restriction":"BucketTimestamp | ::Nil"},{"name":"empty","default_value":"nil","external_name":"empty","restriction":"Bool | ::Nil"}],"args_string":"(aggregator : AggregationType, bucket_duration : Time::Span, alignment : Alignment | Time | Nil = nil, buckettimestamp : BucketTimestamp | Nil = nil, empty : Bool | Nil = nil)","args_html":"(aggregator : AggregationType, bucket_duration : Time::Span, alignment : Alignment | Time | Nil = nil, buckettimestamp : BucketTimestamp | Nil = nil, empty : Bool | Nil = nil)","location":{"filename":"src/time_series.cr","line_number":169,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L169"},"def":{"name":"new","args":[{"name":"aggregator","external_name":"aggregator","restriction":"AggregationType"},{"name":"bucket_duration","external_name":"bucket_duration","restriction":"Time::Span"},{"name":"alignment","default_value":"nil","external_name":"alignment","restriction":"Alignment | Time | Nil"},{"name":"buckettimestamp","default_value":"nil","external_name":"buckettimestamp","restriction":"BucketTimestamp | ::Nil"},{"name":"empty","default_value":"nil","external_name":"empty","restriction":"Bool | ::Nil"}],"visibility":"Public","body":"_ = allocate\n_.initialize(aggregator, bucket_duration, alignment, buckettimestamp, empty)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"aggregator:AggregationType-instance-method","name":"aggregator","abstract":false,"def":{"name":"aggregator","return_type":"AggregationType","visibility":"Public","body":"@aggregator"}},{"html_id":"alignment:Alignment|Time|Nil-instance-method","name":"alignment","abstract":false,"def":{"name":"alignment","return_type":"Alignment | Time | Nil","visibility":"Public","body":"@alignment"}},{"html_id":"bucket_duration:Time::Span-instance-method","name":"bucket_duration","abstract":false,"def":{"name":"bucket_duration","return_type":"Time::Span","visibility":"Public","body":"@bucket_duration"}},{"html_id":"buckettimestamp:BucketTimestamp|Nil-instance-method","name":"buckettimestamp","abstract":false,"def":{"name":"buckettimestamp","return_type":"BucketTimestamp | ::Nil","visibility":"Public","body":"@buckettimestamp"}},{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/time_series.cr","line_number":169,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L169"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@aggregator.clone, @bucket_duration.clone, @alignment.clone, @buckettimestamp.clone, @empty.clone)"}},{"html_id":"copy_with(aggregator_aggregator=@aggregator,bucket_duration_bucket_duration=@bucket_duration,alignment_alignment=@alignment,buckettimestamp_buckettimestamp=@buckettimestamp,empty_empty=@empty)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_aggregator","default_value":"@aggregator","external_name":"aggregator","restriction":""},{"name":"_bucket_duration","default_value":"@bucket_duration","external_name":"bucket_duration","restriction":""},{"name":"_alignment","default_value":"@alignment","external_name":"alignment","restriction":""},{"name":"_buckettimestamp","default_value":"@buckettimestamp","external_name":"buckettimestamp","restriction":""},{"name":"_empty","default_value":"@empty","external_name":"empty","restriction":""}],"args_string":"(aggregator _aggregator = @aggregator, bucket_duration _bucket_duration = @bucket_duration, alignment _alignment = @alignment, buckettimestamp _buckettimestamp = @buckettimestamp, empty _empty = @empty)","args_html":"(aggregator _aggregator = @aggregator, bucket_duration _bucket_duration = @bucket_duration, alignment _alignment = @alignment, buckettimestamp _buckettimestamp = @buckettimestamp, empty _empty = @empty)","location":{"filename":"src/time_series.cr","line_number":169,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L169"},"def":{"name":"copy_with","args":[{"name":"_aggregator","default_value":"@aggregator","external_name":"aggregator","restriction":""},{"name":"_bucket_duration","default_value":"@bucket_duration","external_name":"bucket_duration","restriction":""},{"name":"_alignment","default_value":"@alignment","external_name":"alignment","restriction":""},{"name":"_buckettimestamp","default_value":"@buckettimestamp","external_name":"buckettimestamp","restriction":""},{"name":"_empty","default_value":"@empty","external_name":"empty","restriction":""}],"visibility":"Public","body":"self.class.new(_aggregator, _bucket_duration, _alignment, _buckettimestamp, _empty)"}},{"html_id":"empty:Bool|Nil-instance-method","name":"empty","abstract":false,"def":{"name":"empty","return_type":"Bool | ::Nil","visibility":"Public","body":"@empty"}}]},{"html_id":"redis/Redis/TimeSeries/AggregationType","path":"Redis/TimeSeries/AggregationType.html","kind":"enum","full_name":"Redis::TimeSeries::AggregationType","name":"AggregationType","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":392,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L392"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"AVG","name":"AVG","value":"0"},{"id":"SUM","name":"SUM","value":"1"},{"id":"MIN","name":"MIN","value":"2"},{"id":"MAX","name":"MAX","value":"3"},{"id":"RANGE","name":"RANGE","value":"4"},{"id":"COUNT","name":"COUNT","value":"5"},{"id":"FIRST","name":"FIRST","value":"6"},{"id":"LAST","name":"LAST","value":"7"},{"id":"STD_P","name":"STD_P","value":"8"},{"id":"STD_S","name":"STD_S","value":"9"},{"id":"VAR_P","name":"VAR_P","value":"10"},{"id":"VAR_S","name":"VAR_S","value":"11"}],"namespace":{"html_id":"redis/Redis/TimeSeries","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries"},"instance_methods":[{"html_id":"avg?-instance-method","name":"avg?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":393,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L393"},"def":{"name":"avg?","visibility":"Public","body":"self == AVG"}},{"html_id":"count?-instance-method","name":"count?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":398,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L398"},"def":{"name":"count?","visibility":"Public","body":"self == COUNT"}},{"html_id":"first?-instance-method","name":"first?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":399,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L399"},"def":{"name":"first?","visibility":"Public","body":"self == FIRST"}},{"html_id":"last?-instance-method","name":"last?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":400,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L400"},"def":{"name":"last?","visibility":"Public","body":"self == LAST"}},{"html_id":"max?-instance-method","name":"max?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":396,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L396"},"def":{"name":"max?","visibility":"Public","body":"self == MAX"}},{"html_id":"min?-instance-method","name":"min?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":395,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L395"},"def":{"name":"min?","visibility":"Public","body":"self == MIN"}},{"html_id":"range?-instance-method","name":"range?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":397,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L397"},"def":{"name":"range?","visibility":"Public","body":"self == RANGE"}},{"html_id":"std_p?-instance-method","name":"std_p?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":401,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L401"},"def":{"name":"std_p?","visibility":"Public","body":"self == STD_P"}},{"html_id":"std_s?-instance-method","name":"std_s?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":402,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L402"},"def":{"name":"std_s?","visibility":"Public","body":"self == STD_S"}},{"html_id":"sum?-instance-method","name":"sum?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":394,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L394"},"def":{"name":"sum?","visibility":"Public","body":"self == SUM"}},{"html_id":"var_p?-instance-method","name":"var_p?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":403,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L403"},"def":{"name":"var_p?","visibility":"Public","body":"self == VAR_P"}},{"html_id":"var_s?-instance-method","name":"var_s?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":404,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L404"},"def":{"name":"var_s?","visibility":"Public","body":"self == VAR_S"}}]},{"html_id":"redis/Redis/TimeSeries/Alignment","path":"Redis/TimeSeries/Alignment.html","kind":"enum","full_name":"Redis::TimeSeries::Alignment","name":"Alignment","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":176,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L176"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"Start","name":"Start","value":"0"},{"id":"End","name":"End","value":"1"}],"namespace":{"html_id":"redis/Redis/TimeSeries","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries"},"instance_methods":[{"html_id":"end?-instance-method","name":"end?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":178,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L178"},"def":{"name":"end?","visibility":"Public","body":"self == End"}},{"html_id":"start?-instance-method","name":"start?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":177,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L177"},"def":{"name":"start?","visibility":"Public","body":"self == Start"}}]},{"html_id":"redis/Redis/TimeSeries/BucketTimestamp","path":"Redis/TimeSeries/BucketTimestamp.html","kind":"enum","full_name":"Redis::TimeSeries::BucketTimestamp","name":"BucketTimestamp","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":407,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L407"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"START","name":"START","value":"0"},{"id":"MID","name":"MID","value":"1"},{"id":"END","name":"END","value":"2"}],"namespace":{"html_id":"redis/Redis/TimeSeries","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries"},"instance_methods":[{"html_id":"end?-instance-method","name":"end?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":410,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L410"},"def":{"name":"end?","visibility":"Public","body":"self == END"}},{"html_id":"mid?-instance-method","name":"mid?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":409,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L409"},"def":{"name":"mid?","visibility":"Public","body":"self == MID"}},{"html_id":"start?-instance-method","name":"start?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":408,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L408"},"def":{"name":"start?","visibility":"Public","body":"self == START"}}]},{"html_id":"redis/Redis/TimeSeries/Datapoint","path":"Redis/TimeSeries/Datapoint.html","kind":"struct","full_name":"Redis::TimeSeries::Datapoint","name":"Datapoint","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":307,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L307"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/TimeSeries","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries"},"constructors":[{"html_id":"new(timestamp:Time,value:Float64)-class-method","name":"new","abstract":false,"args":[{"name":"timestamp","external_name":"timestamp","restriction":"Time"},{"name":"value","external_name":"value","restriction":"Float64"}],"args_string":"(timestamp : Time, value : Float64)","args_html":"(timestamp : Time, value : Float64)","location":{"filename":"src/time_series.cr","line_number":307,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L307"},"def":{"name":"new","args":[{"name":"timestamp","external_name":"timestamp","restriction":"Time"},{"name":"value","external_name":"value","restriction":"Float64"}],"visibility":"Public","body":"_ = allocate\n_.initialize(timestamp, value)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/time_series.cr","line_number":307,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L307"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@timestamp.clone, @value.clone)"}},{"html_id":"copy_with(timestamp_timestamp=@timestamp,value_value=@value)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_timestamp","default_value":"@timestamp","external_name":"timestamp","restriction":""},{"name":"_value","default_value":"@value","external_name":"value","restriction":""}],"args_string":"(timestamp _timestamp = @timestamp, value _value = @value)","args_html":"(timestamp _timestamp = @timestamp, value _value = @value)","location":{"filename":"src/time_series.cr","line_number":307,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L307"},"def":{"name":"copy_with","args":[{"name":"_timestamp","default_value":"@timestamp","external_name":"timestamp","restriction":""},{"name":"_value","default_value":"@value","external_name":"value","restriction":""}],"visibility":"Public","body":"self.class.new(_timestamp, _value)"}},{"html_id":"timestamp:Time-instance-method","name":"timestamp","abstract":false,"def":{"name":"timestamp","return_type":"Time","visibility":"Public","body":"@timestamp"}},{"html_id":"value:Float64-instance-method","name":"value","abstract":false,"def":{"name":"value","return_type":"Float64","visibility":"Public","body":"@value"}}]},{"html_id":"redis/Redis/TimeSeries/Datapoints","path":"Redis/TimeSeries/Datapoints.html","kind":"struct","full_name":"Redis::TimeSeries::Datapoints","name":"Datapoints","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":310,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L310"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"redis/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"}],"namespace":{"html_id":"redis/Redis/TimeSeries","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries"},"constructors":[{"html_id":"new(labels:Labels,datapoints:Array(Datapoint))-class-method","name":"new","abstract":false,"args":[{"name":"labels","external_name":"labels","restriction":"Labels"},{"name":"datapoints","external_name":"datapoints","restriction":"Array(Datapoint)"}],"args_string":"(labels : Labels, datapoints : Array(Datapoint))","args_html":"(labels : Labels, datapoints : Array(Datapoint))","location":{"filename":"src/time_series.cr","line_number":310,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L310"},"def":{"name":"new","args":[{"name":"labels","external_name":"labels","restriction":"Labels"},{"name":"datapoints","external_name":"datapoints","restriction":"Array(Datapoint)"}],"visibility":"Public","body":"_ = allocate\n_.initialize(labels, datapoints)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"<<(datapoint:Datapoint)-instance-method","name":"<<","abstract":false,"args":[{"name":"datapoint","external_name":"datapoint","restriction":"Datapoint"}],"args_string":"(datapoint : Datapoint)","args_html":"(datapoint : Datapoint)","location":{"filename":"src/time_series.cr","line_number":317,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L317"},"def":{"name":"<<","args":[{"name":"datapoint","external_name":"datapoint","restriction":"Datapoint"}],"visibility":"Public","body":"datapoints << datapoint"}},{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/time_series.cr","line_number":310,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L310"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@labels.clone, @datapoints.clone)"}},{"html_id":"copy_with(labels_labels=@labels,datapoints_datapoints=@datapoints)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_labels","default_value":"@labels","external_name":"labels","restriction":""},{"name":"_datapoints","default_value":"@datapoints","external_name":"datapoints","restriction":""}],"args_string":"(labels _labels = @labels, datapoints _datapoints = @datapoints)","args_html":"(labels _labels = @labels, datapoints _datapoints = @datapoints)","location":{"filename":"src/time_series.cr","line_number":310,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L310"},"def":{"name":"copy_with","args":[{"name":"_labels","default_value":"@labels","external_name":"labels","restriction":""},{"name":"_datapoints","default_value":"@datapoints","external_name":"datapoints","restriction":""}],"visibility":"Public","body":"self.class.new(_labels, _datapoints)"}},{"html_id":"datapoints:Array(Datapoint)-instance-method","name":"datapoints","abstract":false,"def":{"name":"datapoints","return_type":"Array(Datapoint)","visibility":"Public","body":"@datapoints"}},{"html_id":"each(&)-instance-method","name":"each","doc":"Must yield this collection's elements to the block.","summary":"

    Must yield this collection's elements to the block.

    ","abstract":false,"location":{"filename":"src/time_series.cr","line_number":312,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L312"},"def":{"name":"each","yields":1,"block_arity":1,"visibility":"Public","body":"datapoints.each do |datapoint|\n yield datapoint\nend"}},{"html_id":"labels:Labels-instance-method","name":"labels","abstract":false,"def":{"name":"labels","return_type":"Labels","visibility":"Public","body":"@labels"}}]},{"html_id":"redis/Redis/TimeSeries/DuplicatePolicy","path":"Redis/TimeSeries/DuplicatePolicy.html","kind":"enum","full_name":"Redis::TimeSeries::DuplicatePolicy","name":"DuplicatePolicy","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":418,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L418"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"BLOCK","name":"BLOCK","value":"0","doc":"An error will occur for any out-of-order sample","summary":"

    An error will occur for any out-of-order sample

    "},{"id":"FIRST","name":"FIRST","value":"1","doc":"Ignore the new value","summary":"

    Ignore the new value

    "},{"id":"LAST","name":"LAST","value":"2","doc":"Override with the latest value","summary":"

    Override with the latest value

    "},{"id":"MIN","name":"MIN","value":"3","doc":"Only override if the new value is lower than the existing value","summary":"

    Only override if the new value is lower than the existing value

    "},{"id":"MAX","name":"MAX","value":"4","doc":"Only override if the new value is higher than the existing value","summary":"

    Only override if the new value is higher than the existing value

    "},{"id":"SUM","name":"SUM","value":"5","doc":"If a previous sample exists, add the new sample to it so that the\nupdated value is equal to `previous + new`. If no previous sample\nexists, set the updated value equal to the new value.","summary":"

    If a previous sample exists, add the new sample to it so that the updated value is equal to previous + new.

    "}],"namespace":{"html_id":"redis/Redis/TimeSeries","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries"},"instance_methods":[{"html_id":"block?-instance-method","name":"block?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":420,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L420"},"def":{"name":"block?","visibility":"Public","body":"self == BLOCK"}},{"html_id":"first?-instance-method","name":"first?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":423,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L423"},"def":{"name":"first?","visibility":"Public","body":"self == FIRST"}},{"html_id":"last?-instance-method","name":"last?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":426,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L426"},"def":{"name":"last?","visibility":"Public","body":"self == LAST"}},{"html_id":"max?-instance-method","name":"max?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":432,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L432"},"def":{"name":"max?","visibility":"Public","body":"self == MAX"}},{"html_id":"min?-instance-method","name":"min?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":429,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L429"},"def":{"name":"min?","visibility":"Public","body":"self == MIN"}},{"html_id":"sum?-instance-method","name":"sum?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":437,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L437"},"def":{"name":"sum?","visibility":"Public","body":"self == SUM"}}]},{"html_id":"redis/Redis/TimeSeries/Encoding","path":"Redis/TimeSeries/Encoding.html","kind":"enum","full_name":"Redis::TimeSeries::Encoding","name":"Encoding","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":413,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L413"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"COMPRESSED","name":"COMPRESSED","value":"0"},{"id":"UNCOMPRESSED","name":"UNCOMPRESSED","value":"1"}],"namespace":{"html_id":"redis/Redis/TimeSeries","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries"},"instance_methods":[{"html_id":"compressed?-instance-method","name":"compressed?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":414,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L414"},"def":{"name":"compressed?","visibility":"Public","body":"self == COMPRESSED"}},{"html_id":"uncompressed?-instance-method","name":"uncompressed?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":415,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L415"},"def":{"name":"uncompressed?","visibility":"Public","body":"self == UNCOMPRESSED"}}]},{"html_id":"redis/Redis/TimeSeries/Labels","path":"Redis/TimeSeries/Labels.html","kind":"alias","full_name":"Redis::TimeSeries::Labels","name":"Labels","abstract":false,"locations":[{"filename":"src/time_series.cr","line_number":306,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L306"}],"repository_name":"redis","program":false,"enum":false,"alias":true,"aliased":"Hash(String, String)","aliased_html":"Hash(String, String)","const":false,"namespace":{"html_id":"redis/Redis/TimeSeries","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries"}},{"html_id":"redis/Redis/TimeSeries/MRangeResponse","path":"Redis/TimeSeries/MRangeResponse.html","kind":"struct","full_name":"Redis::TimeSeries::MRangeResponse","name":"MRangeResponse","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":322,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L322"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"redis/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"}],"namespace":{"html_id":"redis/Redis/TimeSeries","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries"},"constructors":[{"html_id":"new(response)-class-method","name":"new","abstract":false,"args":[{"name":"response","external_name":"response","restriction":""}],"args_string":"(response)","args_html":"(response)","location":{"filename":"src/time_series.cr","line_number":329,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L329"},"def":{"name":"new","args":[{"name":"response","external_name":"response","restriction":""}],"visibility":"Public","body":"_ = allocate\n_.initialize(response)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"[](key:String)-instance-method","name":"[]","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/time_series.cr","line_number":363,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L363"},"def":{"name":"[]","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"@data[key]"}},{"html_id":"[]?(key:String)-instance-method","name":"[]?","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/time_series.cr","line_number":367,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L367"},"def":{"name":"[]?","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"@data[key]?"}},{"html_id":"data:DatapointMap-instance-method","name":"data","abstract":false,"location":{"filename":"src/time_series.cr","line_number":327,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L327"},"def":{"name":"data","return_type":"DatapointMap","visibility":"Public","body":"@data"}},{"html_id":"each(&)-instance-method","name":"each","doc":"Must yield this collection's elements to the block.","summary":"

    Must yield this collection's elements to the block.

    ","abstract":false,"location":{"filename":"src/time_series.cr","line_number":359,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L359"},"def":{"name":"each","yields":1,"block_arity":1,"visibility":"Public","body":"data.each do |i|\n yield i\nend"}}],"types":[{"html_id":"redis/Redis/TimeSeries/MRangeResponse/DatapointMap","path":"Redis/TimeSeries/MRangeResponse/DatapointMap.html","kind":"alias","full_name":"Redis::TimeSeries::MRangeResponse::DatapointMap","name":"DatapointMap","abstract":false,"locations":[{"filename":"src/time_series.cr","line_number":325,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L325"}],"repository_name":"redis","program":false,"enum":false,"alias":true,"aliased":"Hash(String, Redis::TimeSeries::Datapoints)","aliased_html":"Hash(String, Redis::TimeSeries::Datapoints)","const":false,"namespace":{"html_id":"redis/Redis/TimeSeries/MRangeResponse","kind":"struct","full_name":"Redis::TimeSeries::MRangeResponse","name":"MRangeResponse"}}]},{"html_id":"redis/Redis/TimeSeries/Range","path":"Redis/TimeSeries/Range.html","kind":"struct","full_name":"Redis::TimeSeries::Range","name":"Range","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":372,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L372"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/TimeSeries","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries"},"constructors":[{"html_id":"new(raw_data:Array)-class-method","name":"new","abstract":false,"args":[{"name":"raw_data","external_name":"raw_data","restriction":"Array"}],"args_string":"(raw_data : Array)","args_html":"(raw_data : Array)","location":{"filename":"src/time_series.cr","line_number":373,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L373"},"def":{"name":"new","args":[{"name":"raw_data","external_name":"raw_data","restriction":"Array"}],"visibility":"Public","body":"_ = allocate\n_.initialize(raw_data)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}]},{"html_id":"redis/Redis/TimeSeries/RangeOptions","path":"Redis/TimeSeries/RangeOptions.html","kind":"class","full_name":"Redis::TimeSeries::RangeOptions","name":"RangeOptions","abstract":false,"superclass":{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":382,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L382"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/TimeSeries","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries"},"instance_methods":[{"html_id":"aggregation(type:AggregationType,bucket:Time::Span)-instance-method","name":"aggregation","abstract":false,"args":[{"name":"type","external_name":"type","restriction":"AggregationType"},{"name":"bucket","external_name":"bucket","restriction":"Time::Span"}],"args_string":"(type : AggregationType, bucket : Time::Span)","args_html":"(type : AggregationType, bucket : Time::Span)","location":{"filename":"src/time_series.cr","line_number":385,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L385"},"def":{"name":"aggregation","args":[{"name":"type","external_name":"type","restriction":"AggregationType"},{"name":"bucket","external_name":"bucket","restriction":"Time::Span"}],"visibility":"Public","body":"@aggregation = Aggregation.new(type, bucket)"}},{"html_id":"aggregation:Aggregation|Nil-instance-method","name":"aggregation","abstract":false,"location":{"filename":"src/time_series.cr","line_number":383,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L383"},"def":{"name":"aggregation","return_type":"Aggregation | ::Nil","visibility":"Public","body":"@aggregation"}}],"types":[{"html_id":"redis/Redis/TimeSeries/RangeOptions/Aggregation","path":"Redis/TimeSeries/RangeOptions/Aggregation.html","kind":"struct","full_name":"Redis::TimeSeries::RangeOptions::Aggregation","name":"Aggregation","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":389,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L389"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/TimeSeries/RangeOptions","kind":"class","full_name":"Redis::TimeSeries::RangeOptions","name":"RangeOptions"},"constructors":[{"html_id":"new(type:AggregationType,time_bucket:Time::Span)-class-method","name":"new","abstract":false,"args":[{"name":"type","external_name":"type","restriction":"AggregationType"},{"name":"time_bucket","external_name":"time_bucket","restriction":"Time::Span"}],"args_string":"(type : AggregationType, time_bucket : Time::Span)","args_html":"(type : AggregationType, time_bucket : Time::Span)","location":{"filename":"src/time_series.cr","line_number":389,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L389"},"def":{"name":"new","args":[{"name":"type","external_name":"type","restriction":"AggregationType"},{"name":"time_bucket","external_name":"time_bucket","restriction":"Time::Span"}],"visibility":"Public","body":"_ = allocate\n_.initialize(type, time_bucket)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/time_series.cr","line_number":389,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L389"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@type.clone, @time_bucket.clone)"}},{"html_id":"copy_with(type_type=@type,time_bucket_time_bucket=@time_bucket)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_type","default_value":"@type","external_name":"type","restriction":""},{"name":"_time_bucket","default_value":"@time_bucket","external_name":"time_bucket","restriction":""}],"args_string":"(type _type = @type, time_bucket _time_bucket = @time_bucket)","args_html":"(type _type = @type, time_bucket _time_bucket = @time_bucket)","location":{"filename":"src/time_series.cr","line_number":389,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L389"},"def":{"name":"copy_with","args":[{"name":"_type","default_value":"@type","external_name":"type","restriction":""},{"name":"_time_bucket","default_value":"@time_bucket","external_name":"time_bucket","restriction":""}],"visibility":"Public","body":"self.class.new(_type, _time_bucket)"}},{"html_id":"time_bucket:Time::Span-instance-method","name":"time_bucket","abstract":false,"def":{"name":"time_bucket","return_type":"Time::Span","visibility":"Public","body":"@time_bucket"}},{"html_id":"type:AggregationType-instance-method","name":"type","abstract":false,"def":{"name":"type","return_type":"AggregationType","visibility":"Public","body":"@type"}}]}]}]},{"html_id":"redis/Redis/Transaction","path":"Redis/Transaction.html","kind":"class","full_name":"Redis::Transaction","name":"Transaction","abstract":false,"superclass":{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},{"html_id":"redis/Redis/Commands/Stream","kind":"module","full_name":"Redis::Commands::Stream","name":"Stream"},{"html_id":"redis/Redis/Commands/SortedSet","kind":"module","full_name":"Redis::Commands::SortedSet","name":"SortedSet"},{"html_id":"redis/Redis/Commands/Set","kind":"module","full_name":"Redis::Commands::Set","name":"Set"},{"html_id":"redis/Redis/Commands/List","kind":"module","full_name":"Redis::Commands::List","name":"List"},{"html_id":"redis/Redis/Commands/Hash","kind":"module","full_name":"Redis::Commands::Hash","name":"Hash"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/transaction.cr","line_number":5,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/transaction.cr#L5"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"constructors":[{"html_id":"new(connection:Connection)-class-method","name":"new","abstract":false,"args":[{"name":"connection","external_name":"connection","restriction":"Connection"}],"args_string":"(connection : Connection)","args_html":"(connection : Connection)","location":{"filename":"src/transaction.cr","line_number":10,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/transaction.cr#L10"},"def":{"name":"new","args":[{"name":"connection","external_name":"connection","restriction":"Connection"}],"visibility":"Public","body":"_ = allocate\n_.initialize(connection)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"discard:Nil-instance-method","name":"discard","abstract":false,"location":{"filename":"src/transaction.cr","line_number":14,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/transaction.cr#L14"},"def":{"name":"discard","return_type":"Nil","visibility":"Public","body":"@discarded = true\nfinish(\"discard\")\n"}},{"html_id":"discarded?:Bool?-instance-method","name":"discarded?","abstract":false,"location":{"filename":"src/transaction.cr","line_number":8,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/transaction.cr#L8"},"def":{"name":"discarded?","visibility":"Public","body":"@discarded"}},{"html_id":"exec-instance-method","name":"exec","abstract":false,"location":{"filename":"src/transaction.cr","line_number":25,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/transaction.cr#L25"},"def":{"name":"exec","visibility":"Public","body":"(finish(\"exec\")).as(Array)"}},{"html_id":"run(command):Nil-instance-method","name":"run","doc":"Execute the given command and return the result from the server. Commands\nmust be an `Enumerable` and its `size` method must be re-entrant.\n\n```\nrun({\"set\", \"foo\", \"bar\"})\n```","summary":"

    Execute the given command and return the result from the server.

    ","abstract":false,"args":[{"name":"command","external_name":"command","restriction":""}],"args_string":"(command) : Nil","args_html":"(command) : Nil","location":{"filename":"src/transaction.cr","line_number":19,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/transaction.cr#L19"},"def":{"name":"run","args":[{"name":"command","external_name":"command","restriction":""}],"return_type":"Nil","visibility":"Public","body":"if discarded?\n return\nend\n@connection.encode(command)\n@command_count = @command_count + 1\n"}},{"html_id":"start!-instance-method","name":"start!","abstract":false,"location":{"filename":"src/transaction.cr","line_number":29,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/transaction.cr#L29"},"def":{"name":"start!","visibility":"Public","body":"@connection.encode({\"multi\"})"}}]},{"html_id":"redis/Redis/Value","path":"Redis/Value.html","kind":"alias","full_name":"Redis::Value","name":"Value","abstract":false,"locations":[{"filename":"src/value.cr","line_number":6,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/value.cr#L6"}],"repository_name":"redis","program":false,"enum":false,"alias":true,"aliased":"(Array(Redis::Value) | Int64 | Redis::Error | String | Nil)","aliased_html":"Array(Redis::Value) | Int64 | Redis::Error | String | Nil","const":false,"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"doc":"Values consumed and emitted by Redis can be strings, 64-bit integers, `nil`,\nor an array of any of these types.","summary":"

    Values consumed and emitted by Redis can be strings, 64-bit integers, nil, or an array of any of these types.

    "},{"html_id":"redis/Redis/Writer","path":"Redis/Writer.html","kind":"struct","full_name":"Redis::Writer","name":"Writer","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/writer.cr","line_number":2,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/writer.cr#L2"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"CRLF","name":"CRLF","value":"\"\\r\\n\""}],"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"constructors":[{"html_id":"new(io:IO)-class-method","name":"new","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/writer.cr","line_number":7,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/writer.cr#L7"},"def":{"name":"new","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"_ = allocate\n_.initialize(io)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"io:IO-instance-method","name":"io","abstract":false,"location":{"filename":"src/writer.cr","line_number":5,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/writer.cr#L5"},"def":{"name":"io","visibility":"Public","body":"@io"}}]}]}]}} \ No newline at end of file diff --git a/docs/js/doc.js b/docs/js/doc.js index 45d38b9..eaedd5c 100644 --- a/docs/js/doc.js +++ b/docs/js/doc.js @@ -1000,7 +1000,7 @@ document.addEventListener('DOMContentLoaded', function() { // TODO: Add OpenSearch description var searchQuery = location.hash.substring(3); history.pushState({searchQuery: searchQuery}, "Search for " + searchQuery, location.href.replace(/#q=.*/, "")); - searchInput.value = searchQuery; + searchInput.value = decodeURIComponent(searchQuery); document.addEventListener('CrystalDocs:loaded', performSearch); } diff --git a/docs/search-index.js b/docs/search-index.js index 4601d0b..45cbbca 100644 --- a/docs/search-index.js +++ b/docs/search-index.js @@ -1 +1 @@ -crystal_doc_search_index_callback({"repository_name":"redis","body":"# redis\n\nA pure-Crystal implementation of the Redis protocol\n\n## Installation\n\n1. Add the dependency to your `shard.yml`:\n\n ```yaml\n dependencies:\n redis:\n github: jgaskins/redis\n ```\n\n2. Run `shards`\n\n## Usage\n\n```crystal\nrequire \"redis\"\n\nredis = Redis::Client.new # Defaults to `localhost` port 6379\n\nredis.set \"foo\", \"bar\"\nredis.get \"foo\" # => \"bar\"\n\nredis.incr \"counter\" # => 1\nredis.incr \"counter\" # => 2\nredis.decr \"counter\" # => 1\n\nredis.del \"foo\", \"counter\" # => 2\n```\n\n### Pipelined queries\n\nTo mitigate latency with multiple queries whose inputs and outputs are completely independent of each other, you can \"pipeline\" your queries by sending them all at once before reading them. To do this, you can use the `pipeline` method:\n\n```crystal\nredis.pipeline do |pipe|\n pipe.incr \"foo\"\n pipe.set \"bar\", \"baz\"\n pipe.lpush \"my-list\", \"my value\"\nend\n```\n\nThe return value of `pipeline` will be an array containing the values of each of those calls in the order they were sent. So in this case, it might be `[1, nil, 2]` to match the return values of `incr`, `set`, and `lpush`, respectively.\n\n### Transactions\n\nThe Redis [`MULTI` command](https://redis.io/commands/multi) begins a transaction, so you can use the `multi` method to execute a transaction against the server:\n\n```crystal\nredis.multi do |txn|\n txn.set \"foo\", \"bar\"\n txn.incr \"baz\"\n txn.lpush \"my-list\", \"my value\"\nend\n```\n\nThe transaction is automatically committed with [`EXEC`](https://redis.io/commands/exec) at the end of the block. If an exception occurs within the block, the transaction will be rolled back with [`DISCARD`](https://redis.io/commands/discard) before exiting the block.\n\nYou may also call `txn.discard`, which will effectively disable the transaction (all further methods called on the transaction do nothing), but will not exit the block. You will need to exit the block explicitly with `break` if there are operations within the block that cannot be rolled back, such as sending an email or sending a request to a third-party API.\n\nThe reason for this is that the only way to exit a containing block from an inner method in Crystal is to raise an exception, and this library chooses not to use exceptions for flow control.\n\n### Beyond `localhost`\n\nTo use a Redis server that isn't at `localhost:6379`, pass a `URI` to the client. For example, if you store it in your shell environment:\n\n```crystal\nredis = Redis::Client.new(URI.parse(ENV[\"REDIS_URL\"]))\n\n# ... or ...\n\nredis = Redis::Client.from_env(\"REDIS_URL\")\n```\n\nTo connect via SSL, make sure you use the `rediss://` URL scheme. If your Redis server requires a password or uses a different database slot than `0`, make sure you include them in the URL:\n\n```crystal\nredis = Redis::Client.new(URI.parse(\"rediss://:my_password@example.com/3\"))\n```\n\n### Connection Pool\n\nThe `Redis::Client` maintains a connection pool, so there is no need to run your own within your application. When you execute a command on the `Redis::Client`, it is automatically executed against a connection. When you execute a pipeline or transaction with `multi`, all commands within that block will automatically be routed to the same connection.\n\n**Configuration**\n\nFor this shard, we use the following default setting (outside of the Standard Lib defaults);\n\n```\nmax_idle_pool_size = 25\n```\n\n> You can override this manually using the URI parameters.\n> All other settings follow the DB::Pool defaults.\n\nThe behaviour of the connection pool can be configured from a set of query string parameters in the connection URI.\n\n| Name | Default value |\n| :--- | :--- |\n| initial\\_pool\\_size | 1 |\n| max\\_pool\\_size | 0 \\(unlimited\\) |\n| max\\_idle\\_pool\\_size | 1 |\n| checkout\\_timeout | 5.0 \\(seconds\\) |\n| retry\\_attempts | 1 |\n| retry\\_delay | 1.0 \\(seconds\\) |\n\nSee [Crystal guides](https://crystal-lang.org/reference/1.6/database/connection_pool.html) to learn more.\n\n**Example**\n\n```crystal\npool_params = \"?initial_pool_size=1&max_pool_size=10&checkout_timeout=10&retry_attempts=2&retry_delay=0.5&max_idle_pool_size=50\"\nredis = Redis::Client.new(URI.parse(\"redis://localhost:6379/0#{pool_params}\"))\n```\n\n**Recommendations**\n\nIf you encounter any issues, keep these setting the same;\n\n- `initial_pool_size`\n- `max_pool_size`\n- `max_idle_pool_size`\n\nExample:\n\n```\ninitial_pool_size = 50\nmax_pool_size = 50\nmax_idle_pool_size = 50\n```\n\n### TCP Keep-Alive\n\nThe `Redis::Client` uses a pool of `Redis::Connection` under the hood.\nWithin `Redis::Connection` we create a `TCPSocket`, which can accept keepalive params.\nThe TCP keepalive settings can help you mitigate Redis connection stability issues.\n\n> NOTE: This behaviour is disabled by default. See Configuration below on how to enable it.\n\n**Configuration**\n\nFor this shard, we use the following override setting;\n\n| Name | Default value |\n| :--- | :--- |\n| keepalive | false |\n| keepalive\\_count | 3 |\n| keepalive\\_idle | 60 |\n| keepalive\\_interval | 30 |\n\n> You can override this manually using the URI parameters.\n> The settings above have proven to have good results in production environments. However, every environment is different, so tweaking these settings may be necessary.\n\nSee [Crystal API](https://crystal-lang.org/api/1.6.0/TCPSocket.html) to learn more.\n\n**Example**\n\n```crystal\nparams = \"?keepalive=true&keepalive_count=5&keepalive_idle=10&keepalive_interval=15\"\n\nredis = Redis::Client.new(URI.parse(\"redis://localhost:6379/0#{params}\"))\n# or direct connections\nredis = Redis::Connection.new(URI.parse(\"redis://localhost:6379/0#{params}\"))\n```\n\n**Recommendations**\n\nEnable this setting with the defaults if you are encountering connection issues.\n\nExample:\n\n```crystal\nparams = \"?keepalive=true\"\n\nredis = Redis::Client.new(URI.parse(\"redis://localhost:6379/0#{params}\"))\n# or direct connections\nredis = Redis::Connection.new(URI.parse(\"redis://localhost:6379/0#{params}\"))\n```\n\n## Development\n\nMake sure you have a Redis or KeyDB server running locally on port 6379.\n\nRedis must be installed with a stack server for the full text search (`ft`) and time series modules (`ts`) in order for all specs to run.\n\n### With Docker\n\nYou can use this for your docker-compose file\n\n```yaml\nredis:\n image: redis/redis-stack-server\n ports:\n - \"6379:6379\"\n```\n\n### With Homebrew\n\nInstall the [`redis-stack` from homebrew](https://github.com/redis-stack/homebrew-redis-stack)\n\n\n## Contributing\n\n1. Fork it ()\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n## Contributors\n\n- [Jamie Gaskins](https://github.com/jgaskins) - creator and maintainer\n","program":{"html_id":"redis/toplevel","path":"toplevel.html","kind":"module","full_name":"Top Level Namespace","name":"Top Level Namespace","abstract":false,"locations":[],"repository_name":"redis","program":true,"enum":false,"alias":false,"const":false,"types":[{"html_id":"redis/Redis","path":"Redis.html","kind":"module","full_name":"Redis","name":"Redis","abstract":false,"locations":[{"filename":"src/client.cr","line_number":5,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/client.cr#L5"},{"filename":"src/cluster.cr","line_number":7,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/cluster.cr#L7"},{"filename":"src/commands.cr","line_number":8,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L8"},{"filename":"src/connection.cr","line_number":12,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L12"},{"filename":"src/errors.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/errors.cr#L1"},{"filename":"src/graph.cr","line_number":7,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L7"},{"filename":"src/json.cr","line_number":5,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L5"},{"filename":"src/parser.cr","line_number":4,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/parser.cr#L4"},{"filename":"src/pipeline.cr","line_number":5,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/pipeline.cr#L5"},{"filename":"src/redis.cr","line_number":7,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/redis.cr#L7"},{"filename":"src/search.cr","line_number":3,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L3"},{"filename":"src/streaming.cr","line_number":3,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L3"},{"filename":"src/time_series.cr","line_number":4,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L4"},{"filename":"src/transaction.cr","line_number":4,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/transaction.cr#L4"},{"filename":"src/value.cr","line_number":3,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/value.cr#L3"},{"filename":"src/writer.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/writer.cr#L1"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ERROR_MAP","name":"ERROR_MAP","value":"Hash(String, Error.class).new(default_value: Error)"},{"id":"VERSION","name":"VERSION","value":"\"0.9.0\""}],"types":[{"html_id":"redis/Redis/BusyGroup","path":"Redis/BusyGroup.html","kind":"class","full_name":"Redis::BusyGroup","name":"BusyGroup","abstract":false,"superclass":{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},"ancestors":[{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/errors.cr","line_number":17,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/errors.cr#L17"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"}},{"html_id":"redis/Redis/Client","path":"Redis/Client.html","kind":"class","full_name":"Redis::Client","name":"Client","abstract":false,"superclass":{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},{"html_id":"redis/Redis/Commands/Stream","kind":"module","full_name":"Redis::Commands::Stream","name":"Stream"},{"html_id":"redis/Redis/Commands/SortedSet","kind":"module","full_name":"Redis::Commands::SortedSet","name":"SortedSet"},{"html_id":"redis/Redis/Commands/Set","kind":"module","full_name":"Redis::Commands::Set","name":"Set"},{"html_id":"redis/Redis/Commands/List","kind":"module","full_name":"Redis::Commands::List","name":"List"},{"html_id":"redis/Redis/Commands/Hash","kind":"module","full_name":"Redis::Commands::Hash","name":"Hash"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/client.cr","line_number":19,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/client.cr#L19"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"doc":"The Redis client is the expected entrypoint for this shard. By default, it will connect to localhost:6379, but you can also supply a `URI` to connect to an arbitrary Redis server. SSL, password authentication, and DB selection are all supported.\n\n```\n# Connects to localhost:6379\nredis = Redis::Client.new\n\n# Connects to a server at \"redis.example.com\" on port 6000 over a TLS\n# connection, authenticates with the password \"password\", and uses DB 3\nredis = Redis::Client.new(URI.parse(\"rediss://:password@redis.example.com:6000/3\"))\n\n# Connects to a server at the URL in `ENV[\"REDIS_URL\"]`\nredis = Redis::Client.from_env(\"REDIS_URL\")\n```","summary":"

    The Redis client is the expected entrypoint for this shard.

    ","class_methods":[{"html_id":"from_env(env_var)-class-method","name":"from_env","abstract":false,"args":[{"name":"env_var","external_name":"env_var","restriction":""}],"args_string":"(env_var)","args_html":"(env_var)","location":{"filename":"src/client.cr","line_number":24,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/client.cr#L24"},"def":{"name":"from_env","args":[{"name":"env_var","external_name":"env_var","restriction":""}],"visibility":"Public","body":"new(URI.parse(ENV[env_var]))"}}],"constructors":[{"html_id":"new(uri:URI=URI.parse(ENV.fetch(\"REDIS_URL\",\"redis:///\")))-class-method","name":"new","doc":"The client holds a pool of connections that expands and contracts as\nneeded.","summary":"

    The client holds a pool of connections that expands and contracts as needed.

    ","abstract":false,"args":[{"name":"uri","default_value":"URI.parse(ENV.fetch(\"REDIS_URL\", \"redis:///\"))","external_name":"uri","restriction":"URI"}],"args_string":"(uri : URI = URI.parse(ENV.fetch(\"REDIS_URL\", \"redis:///\")))","args_html":"(uri : URI = URI.parse(ENV.fetch("REDIS_URL", "redis:///")))","location":{"filename":"src/client.cr","line_number":30,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/client.cr#L30"},"def":{"name":"new","args":[{"name":"uri","default_value":"URI.parse(ENV.fetch(\"REDIS_URL\", \"redis:///\"))","external_name":"uri","restriction":"URI"}],"visibility":"Public","body":"_ = allocate\n_.initialize(uri)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"close-instance-method","name":"close","abstract":false,"location":{"filename":"src/client.cr","line_number":90,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/client.cr#L90"},"def":{"name":"close","visibility":"Public","body":"@pool.close"}},{"html_id":"hscan_each(key:String,*,matchpattern:String|Nil=nil,count:String|Int|Nil=nil,&):Nil-instance-method","name":"hscan_each","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"","external_name":"","restriction":""},{"name":"pattern","default_value":"nil","external_name":"match","restriction":"String | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"}],"args_string":"(key : String, *, match pattern : String | Nil = nil, count : String | Int | Nil = nil, &) : Nil","args_html":"(key : String, *, match pattern : String | Nil = nil, count : String | Int | Nil = nil, &) : Nil","location":{"filename":"src/client.cr","line_number":59,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/client.cr#L59"},"def":{"name":"hscan_each","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"","external_name":"","restriction":""},{"name":"pattern","default_value":"nil","external_name":"match","restriction":"String | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"}],"splat_index":1,"yields":1,"block_arity":1,"return_type":"Nil","visibility":"Public","body":"@pool.checkout(&.hscan_each(key: key, match: pattern, count: count) do |key|\n yield key\nend)"}},{"html_id":"multi(&)-instance-method","name":"multi","abstract":false,"location":{"filename":"src/client.cr","line_number":78,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/client.cr#L78"},"def":{"name":"multi","yields":1,"block_arity":1,"visibility":"Public","body":"@pool.checkout(&.multi do |txn|\n yield txn\nend)"}},{"html_id":"pipeline(&)-instance-method","name":"pipeline","abstract":false,"location":{"filename":"src/client.cr","line_number":74,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/client.cr#L74"},"def":{"name":"pipeline","yields":1,"block_arity":1,"visibility":"Public","body":"@pool.checkout(&.pipeline do |pipe|\n yield pipe\nend)"}},{"html_id":"psubscribe(*channels,&)-instance-method","name":"psubscribe","abstract":false,"args":[{"name":"channels","external_name":"channels","restriction":""}],"args_string":"(*channels, &)","args_html":"(*channels, &)","location":{"filename":"src/client.cr","line_number":86,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/client.cr#L86"},"def":{"name":"psubscribe","args":[{"name":"channels","external_name":"channels","restriction":""}],"splat_index":0,"yields":2,"block_arity":2,"visibility":"Public","body":"@pool.checkout(&.psubscribe(*channels) do |subscription, conn|\n yield subscription, conn\nend)"}},{"html_id":"run(command)-instance-method","name":"run","doc":"All Redis commands invoked on the client check out a connection from the\nconnection pool, invoke the command on that connection, and then check the\nconnection back into the pool.\n\n```\nredis = Redis::Client.new\n```","summary":"

    All Redis commands invoked on the client check out a connection from the connection pool, invoke the command on that connection, and then check the connection back into the pool.

    ","abstract":false,"args":[{"name":"command","external_name":"command","restriction":""}],"args_string":"(command)","args_html":"(command)","location":{"filename":"src/client.cr","line_number":70,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/client.cr#L70"},"def":{"name":"run","args":[{"name":"command","external_name":"command","restriction":""}],"visibility":"Public","body":"@pool.checkout(&.run(command))"}},{"html_id":"scan_each(matchpattern:String|Nil=nil,count:String|Int|Nil=nil,type:String|Nil=nil,&):Nil-instance-method","name":"scan_each","abstract":false,"args":[{"name":"pattern","default_value":"nil","external_name":"match","restriction":"String | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"},{"name":"type","default_value":"nil","external_name":"type","restriction":"String | ::Nil"}],"args_string":"(match pattern : String | Nil = nil, count : String | Int | Nil = nil, type : String | Nil = nil, &) : Nil","args_html":"(match pattern : String | Nil = nil, count : String | Int | Nil = nil, type : String | Nil = nil, &) : Nil","location":{"filename":"src/client.cr","line_number":55,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/client.cr#L55"},"def":{"name":"scan_each","args":[{"name":"pattern","default_value":"nil","external_name":"match","restriction":"String | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"},{"name":"type","default_value":"nil","external_name":"type","restriction":"String | ::Nil"}],"yields":1,"block_arity":1,"return_type":"Nil","visibility":"Public","body":"@pool.checkout(&.scan_each(match: pattern, count: count, type: type) do |key|\n yield key\nend)"}},{"html_id":"subscribe(*channels,&)-instance-method","name":"subscribe","abstract":false,"args":[{"name":"channels","external_name":"channels","restriction":""}],"args_string":"(*channels, &)","args_html":"(*channels, &)","location":{"filename":"src/client.cr","line_number":82,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/client.cr#L82"},"def":{"name":"subscribe","args":[{"name":"channels","external_name":"channels","restriction":""}],"splat_index":0,"yields":2,"block_arity":2,"visibility":"Public","body":"@pool.checkout(&.subscribe(*channels) do |subscription, conn|\n yield subscription, conn\nend)"}}]},{"html_id":"redis/Redis/Cluster","path":"Redis/Cluster.html","kind":"class","full_name":"Redis::Cluster","name":"Cluster","abstract":false,"superclass":{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},{"html_id":"redis/Redis/Commands/Stream","kind":"module","full_name":"Redis::Commands::Stream","name":"Stream"},{"html_id":"redis/Redis/Commands/SortedSet","kind":"module","full_name":"Redis::Commands::SortedSet","name":"SortedSet"},{"html_id":"redis/Redis/Commands/Set","kind":"module","full_name":"Redis::Commands::Set","name":"Set"},{"html_id":"redis/Redis/Commands/List","kind":"module","full_name":"Redis::Commands::List","name":"List"},{"html_id":"redis/Redis/Commands/Hash","kind":"module","full_name":"Redis::Commands::Hash","name":"Hash"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/cluster.cr","line_number":31,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/cluster.cr#L31"},{"filename":"src/errors.cr","line_number":19,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/errors.cr#L19"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"doc":"Use in place of a `Redis::Client` when talking to Redis clusters. This class\nwill discover all nodes in a Redis cluster when given a URI for any of them,\nroute commands to appropriate shards based on the keys they operate on, and\nroute commands which do not change state to shard replicas to spread the\nload across the cluster.\n\nIt's important that, when using commands which operate on multiple keys (for\nexample: `MGET`, `DEL`, `RPOPLPUSH`, etc) that _all_ specified keys reside\non the same shard in the cluster. Usually, this means designing your key\nnames with curly braces around parts of them to ensure they hash to the same\n[key slot](https://redis.io/commands/cluster-keyslot). For example:\n\n```\nredis.del \"{comment}:1\", \"{comment}:2\"\nvalue = redis.rpoplpush \"{queue}:default\", \"{queue}:default:pending\"\n```\n\nIf you want to use a Redis module that provides custom commands, you can\nregister them as read-only with `Redis::Cluster.register_read_only_commands`\nand they will automatically be routed to replicas. See\n[`redis/cluster/json.cr`](https://github.com/jgaskins/redis/blob/3e874563dd524df9af6827f72edecca13a615802/src/cluster/json.cr#L5-L15)\nfor example usage.","summary":"

    Use in place of a Redis::Client when talking to Redis clusters.

    \n

    EXPERIMENTAL Cluster support is still under development. Some APIs may change while details are discovered and highly customized clusters (for example, servers handling individual hash slots or multiple hash-slot ranges) are not yet supported.

    ","class_methods":[{"html_id":"register_read_only_command(command:String)-class-method","name":"register_read_only_command","doc":"Tell the cluster driver that the specified Redis command can be routed to\nread-only replicas.\n\n```\nRedis::Cluster.register_read_only_command \"mymodule.get\"\n```","summary":"

    Tell the cluster driver that the specified Redis command can be routed to read-only replicas.

    ","abstract":false,"args":[{"name":"command","external_name":"command","restriction":"String"}],"args_string":"(command : String)","args_html":"(command : String)","location":{"filename":"src/cluster.cr","line_number":66,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/cluster.cr#L66"},"def":{"name":"register_read_only_command","args":[{"name":"command","external_name":"command","restriction":"String"}],"visibility":"Public","body":"READ_ONLY_COMMANDS << command"}},{"html_id":"register_read_only_commands(commands:Enumerable(String))-class-method","name":"register_read_only_commands","doc":"Tell the cluster driver that all the specified Redis commands can be\nrouted to read-only replicas.\n\n```\nRedis::Cluster.register_read_only_commands %w[\n mymodule.get\n mymodule.mget\n]\n```","summary":"

    Tell the cluster driver that all the specified Redis commands can be routed to read-only replicas.

    ","abstract":false,"args":[{"name":"commands","external_name":"commands","restriction":"Enumerable(String)"}],"args_string":"(commands : Enumerable(String))","args_html":"(commands : Enumerable(String))","location":{"filename":"src/cluster.cr","line_number":56,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/cluster.cr#L56"},"def":{"name":"register_read_only_commands","args":[{"name":"commands","external_name":"commands","restriction":"Enumerable(String)"}],"visibility":"Public","body":"commands.each do |command|\n register_read_only_command(command)\nend"}}],"constructors":[{"html_id":"new(uri:URI=URI.parse(ENV[\"REDIS_CLUSTER_URL\"]?||\"redis:///\"))-class-method","name":"new","doc":"Pass a `URI` (defaulting to the `REDIS_CLUSTER_URL` environment variable)\nto connect to the specified Redis cluster — the URI can point to _any_\nserver in the cluster and `Redis::Cluster` will discover the rest.","summary":"

    Pass a URI (defaulting to the REDIS_CLUSTER_URL environment variable) to connect to the specified Redis cluster — the URI can point to any server in the cluster and Redis::Cluster will discover the rest.

    ","abstract":false,"args":[{"name":"uri","default_value":"URI.parse(ENV[\"REDIS_CLUSTER_URL\"]? || \"redis:///\")","external_name":"uri","restriction":"URI"}],"args_string":"(uri : URI = URI.parse(ENV[\"REDIS_CLUSTER_URL\"]? || \"redis:///\"))","args_html":"(uri : URI = URI.parse(ENV["REDIS_CLUSTER_URL"]? || "redis:///"))","location":{"filename":"src/cluster.cr","line_number":73,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/cluster.cr#L73"},"def":{"name":"new","args":[{"name":"uri","default_value":"URI.parse(ENV[\"REDIS_CLUSTER_URL\"]? || \"redis:///\")","external_name":"uri","restriction":"URI"}],"visibility":"Public","body":"_ = allocate\n_.initialize(uri)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"close-instance-method","name":"close","doc":"Close all connections to this Redis cluster","summary":"

    Close all connections to this Redis cluster

    ","abstract":false,"location":{"filename":"src/cluster.cr","line_number":308,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/cluster.cr#L308"},"def":{"name":"close","visibility":"Public","body":"begin\n @write_pools.each do |__temp_53|\n _, pool = __temp_53\n pool.close\n end\n @read_pools.each do |__temp_54|\n _, pool = __temp_54\n pool.close\n end\nensure\n @closed = true\nend"}},{"html_id":"flushdb-instance-method","name":"flushdb","doc":"Executes `flushdb` on each shard in the cluster.","summary":"

    Executes #flushdb on each shard in the cluster.

    ","abstract":false,"location":{"filename":"src/cluster.cr","line_number":213,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/cluster.cr#L213"},"def":{"name":"flushdb","visibility":"Public","body":"each_master(&.run({\"flushdb\"}))"}},{"html_id":"pipeline(key:String,&)-instance-method","name":"pipeline","doc":"Run a pipeline for the specified key\n\n```\ncluster.pipeline \"{widgets}\" do |pipe|\n widget_ids.each do |id|\n pipe.get \"{widgets}:#{id}\"\n end\nend\n```\n\nWARNING: All keys that this pipeline operates on _MUST_ reside on the same\nshard. It's best to pass a pre-hashed key (one containing `{}`) to this\nmethod. See the example above.","summary":"

    Run a pipeline for the specified key

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String, &)","args_html":"(key : String, &)","location":{"filename":"src/cluster.cr","line_number":203,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/cluster.cr#L203"},"def":{"name":"pipeline","args":[{"name":"key","external_name":"key","restriction":"String"}],"yields":1,"block_arity":1,"visibility":"Public","body":"(write_pool_for(key)).checkout(&.pipeline do |pipe|\n yield pipe\nend)"}},{"html_id":"run(commandfull_command)-instance-method","name":"run","doc":"Execute the given command and return the result from the server. Commands\nmust be an `Enumerable` and its `size` method must be re-entrant.\n\n```\nrun({\"set\", \"foo\", \"bar\"})\n```","summary":"

    Execute the given command and return the result from the server.

    ","abstract":false,"args":[{"name":"full_command","external_name":"command","restriction":""}],"args_string":"(command full_command)","args_html":"(command full_command)","location":{"filename":"src/cluster.cr","line_number":273,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/cluster.cr#L273"},"def":{"name":"run","args":[{"name":"full_command","external_name":"command","restriction":""}],"visibility":"Public","body":"if full_command.empty?\n raise(ArgumentError.new(\"Redis commands must have at least one component\"))\nend\ncommand = full_command[0]\nif key = full_command[1]?\n if command =~ (/[A-Z]/)\n command = command.downcase\n end\n started_at = Time.monotonic\n (if READ_ONLY_COMMANDS.includes?(command)\n read_pool_for(key)\n else\n write_pool_for(key)\n end).checkout do |connection|\n connection.run(full_command)\n end.tap do\n LOG.debug(&.emit(command: full_command.join(' '), duration: (Time.monotonic - started_at).total_seconds))\n end\nelse\n raise(Error.new(\"No key was specified for this command, so the cluster driver cannot route it to an appropriate Redis shard. A cluster-specific method must be added to handle cases like these until a generalized solution is added.\"))\nend\n"}},{"html_id":"scan_each(*args,**kwargs,&):Nil-instance-method","name":"scan_each","doc":"Execute `Commands#scan_each` on each shard, yielding any matching keys.","summary":"

    Execute Commands#scan_each on each shard, yielding any matching keys.

    ","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **kwargs, &) : Nil","args_html":"(*args, **kwargs, &) : Nil","location":{"filename":"src/cluster.cr","line_number":208,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/cluster.cr#L208"},"def":{"name":"scan_each","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"kwargs","external_name":"kwargs","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"return_type":"Nil","visibility":"Public","body":"each_unique_replica(&.scan_each(*args, **kwargs) do |key|\n yield key\nend)"}},{"html_id":"slot_for(key:String)-instance-method","name":"slot_for","doc":"Return the Redis hash slot for the given key. This is useful for seeing\nwhich shard your command will be routed to.","summary":"

    Return the Redis hash slot for the given key.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/cluster.cr","line_number":351,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/cluster.cr#L351"},"def":{"name":"slot_for","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"if (hash_start = key.index('{')) && (hash_end = key.index('}', hash_start + 1))\n key = key[(hash_start + 1)..(hash_end - 1)]\nend\n(CRC16.checksum(key)) % 16384\n"}}],"types":[{"html_id":"redis/Redis/Cluster/Ask","path":"Redis/Cluster/Ask.html","kind":"class","full_name":"Redis::Cluster::Ask","name":"Ask","abstract":false,"superclass":{"html_id":"redis/Redis/Cluster/Error","kind":"class","full_name":"Redis::Cluster::Error","name":"Error"},"ancestors":[{"html_id":"redis/Redis/Cluster/Error","kind":"class","full_name":"Redis::Cluster::Error","name":"Error"},{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/errors.cr","line_number":22,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/errors.cr#L22"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Cluster","kind":"class","full_name":"Redis::Cluster","name":"Cluster"}},{"html_id":"redis/Redis/Cluster/CrossSlot","path":"Redis/Cluster/CrossSlot.html","kind":"class","full_name":"Redis::Cluster::CrossSlot","name":"CrossSlot","abstract":false,"superclass":{"html_id":"redis/Redis/Cluster/Error","kind":"class","full_name":"Redis::Cluster::Error","name":"Error"},"ancestors":[{"html_id":"redis/Redis/Cluster/Error","kind":"class","full_name":"Redis::Cluster::Error","name":"Error"},{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/errors.cr","line_number":23,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/errors.cr#L23"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Cluster","kind":"class","full_name":"Redis::Cluster","name":"Cluster"}},{"html_id":"redis/Redis/Cluster/Error","path":"Redis/Cluster/Error.html","kind":"class","full_name":"Redis::Cluster::Error","name":"Error","abstract":false,"superclass":{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},"ancestors":[{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/errors.cr","line_number":20,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/errors.cr#L20"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"subclasses":[{"html_id":"redis/Redis/Cluster/Ask","kind":"class","full_name":"Redis::Cluster::Ask","name":"Ask"},{"html_id":"redis/Redis/Cluster/CrossSlot","kind":"class","full_name":"Redis::Cluster::CrossSlot","name":"CrossSlot"},{"html_id":"redis/Redis/Cluster/Moved","kind":"class","full_name":"Redis::Cluster::Moved","name":"Moved"}],"namespace":{"html_id":"redis/Redis/Cluster","kind":"class","full_name":"Redis::Cluster","name":"Cluster"}},{"html_id":"redis/Redis/Cluster/Moved","path":"Redis/Cluster/Moved.html","kind":"class","full_name":"Redis::Cluster::Moved","name":"Moved","abstract":false,"superclass":{"html_id":"redis/Redis/Cluster/Error","kind":"class","full_name":"Redis::Cluster::Error","name":"Error"},"ancestors":[{"html_id":"redis/Redis/Cluster/Error","kind":"class","full_name":"Redis::Cluster::Error","name":"Error"},{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/errors.cr","line_number":21,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/errors.cr#L21"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Cluster","kind":"class","full_name":"Redis::Cluster","name":"Cluster"}}]},{"html_id":"redis/Redis/Commands","path":"Redis/Commands.html","kind":"module","full_name":"Redis::Commands","name":"Commands","abstract":false,"ancestors":[{"html_id":"redis/Redis/Commands/Stream","kind":"module","full_name":"Redis::Commands::Stream","name":"Stream"},{"html_id":"redis/Redis/Commands/SortedSet","kind":"module","full_name":"Redis::Commands::SortedSet","name":"SortedSet"},{"html_id":"redis/Redis/Commands/Set","kind":"module","full_name":"Redis::Commands::Set","name":"Set"},{"html_id":"redis/Redis/Commands/List","kind":"module","full_name":"Redis::Commands::List","name":"List"},{"html_id":"redis/Redis/Commands/Hash","kind":"module","full_name":"Redis::Commands::Hash","name":"Hash"}],"locations":[{"filename":"src/commands.cr","line_number":14,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L14"},{"filename":"src/commands/hash.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/hash.cr#L1"},{"filename":"src/graph.cr","line_number":495,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L495"},{"filename":"src/json.cr","line_number":341,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L341"},{"filename":"src/search.cr","line_number":335,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L335"},{"filename":"src/time_series.cr","line_number":441,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L441"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"redis/Redis/Commands/Hash","kind":"module","full_name":"Redis::Commands::Hash","name":"Hash"},{"html_id":"redis/Redis/Commands/List","kind":"module","full_name":"Redis::Commands::List","name":"List"},{"html_id":"redis/Redis/Commands/Set","kind":"module","full_name":"Redis::Commands::Set","name":"Set"},{"html_id":"redis/Redis/Commands/SortedSet","kind":"module","full_name":"Redis::Commands::SortedSet","name":"SortedSet"},{"html_id":"redis/Redis/Commands/Stream","kind":"module","full_name":"Redis::Commands::Stream","name":"Stream"}],"including_types":[{"html_id":"redis/Redis/Client","kind":"class","full_name":"Redis::Client","name":"Client"},{"html_id":"redis/Redis/Cluster","kind":"class","full_name":"Redis::Cluster","name":"Cluster"},{"html_id":"redis/Redis/Connection","kind":"class","full_name":"Redis::Connection","name":"Connection"},{"html_id":"redis/Redis/Pipeline","kind":"class","full_name":"Redis::Pipeline","name":"Pipeline"},{"html_id":"redis/Redis/Transaction","kind":"class","full_name":"Redis::Transaction","name":"Transaction"}],"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"doc":"All Redis commands are defined in this module. Any paradigm that needs to\nuse these commands simply overrides `run`, which takes a single `command`\nobject, which must be an `Enumerable`.\n\nTODO: Add more Redis commands from https://redis.io/commands","summary":"

    All Redis commands are defined in this module.

    ","instance_methods":[{"html_id":"decr(key:String)-instance-method","name":"decr","doc":"Atomically decrement and return the integer value for the specified key,\ncreating it if it does not exist\n\n```\nredis.del \"counter\"\nredis.decr \"counter\" # => -1\n```","summary":"

    Atomically decrement and return the integer value for the specified key, creating it if it does not exist

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands.cr","line_number":104,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L104"},"def":{"name":"decr","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"decr\", key})"}},{"html_id":"decrby(key:String,amount:Int|String)-instance-method","name":"decrby","doc":"Atomically decrement and return the integer value for the specified key by\nthe specified amount, creating it if it does not exist\n\n```\nredis.del \"counter\"\nredis.decrby \"counter\", 2 # => -2\n```","summary":"

    Atomically decrement and return the integer value for the specified key by the specified amount, creating it if it does not exist

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"amount","external_name":"amount","restriction":"Int | String"}],"args_string":"(key : String, amount : Int | String)","args_html":"(key : String, amount : Int | String)","location":{"filename":"src/commands.cr","line_number":126,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L126"},"def":{"name":"decrby","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"amount","external_name":"amount","restriction":"Int | String"}],"visibility":"Public","body":"run({\"decrby\", key, amount.to_s})"}},{"html_id":"del(keys:Enumerable(String))-instance-method","name":"del","doc":"Delete all specified keys and return the number of keys deleted.\n\n```\nredis.set \"foo\", \"12\"\nredis.del [\"foo\", \"bar\"] # => 1\nredis.del [\"foo\", \"bar\"] # => 0\n```","summary":"

    Delete all specified keys and return the number of keys deleted.

    ","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"Enumerable(String)"}],"args_string":"(keys : Enumerable(String))","args_html":"(keys : Enumerable(String))","location":{"filename":"src/commands.cr","line_number":148,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L148"},"def":{"name":"del","args":[{"name":"keys","external_name":"keys","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 1 + keys.size)\ncommand << \"del\"\nkeys.each do |key|\n command << key\nend\nrun(command)\n"}},{"html_id":"del(*keys:String)-instance-method","name":"del","doc":"Delete all specified keys and return the number of keys deleted.\n\n```\nredis.set \"foo\", \"12\"\nredis.del \"foo\", \"bar\" # => 1\nredis.del \"foo\", \"bar\" # => 0\n```","summary":"

    Delete all specified keys and return the number of keys deleted.

    ","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"String"}],"args_string":"(*keys : String)","args_html":"(*keys : String)","location":{"filename":"src/commands.cr","line_number":137,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L137"},"def":{"name":"del","args":[{"name":"keys","external_name":"keys","restriction":"String"}],"splat_index":0,"visibility":"Public","body":"run({\"del\"} + keys)"}},{"html_id":"eval(script:String,keys:Enumerable(String)=EmptyEnumerable.new,args:Enumerable(String)=EmptyEnumerable.new)-instance-method","name":"eval","doc":"Evaluate the given Lua script, either referenced by SHA with `evalsha`\nor directly with `eval`.\n\nNOTE: Use `eval` only for very trivial scripts and `evalsha` for larger\nor frequently executed scripts to amortize parse/compile time as well as\nsend fewer bytes along the wire.\n\nNOTE: Use `eval_ro` and `evalsha_ro` in a clustered environment to\nevaluate the scripts on read-only replicas.\n\n```\nscript = <<-LUA\n return \"this script was \" + ARGV[1]\nLUA\n\nsha = redis.script_load(script)\nredis.eval(script, args: [\"evaluated on the fly\"]\nredis.evalsha(sha, args: [\"precompiled\"])\n```","summary":"

    Evaluate the given Lua script, either referenced by SHA with #evalsha or directly with #eval.

    ","abstract":false,"args":[{"name":"script","external_name":"script","restriction":"String"},{"name":"keys","default_value":"EmptyEnumerable.new","external_name":"keys","restriction":"Enumerable(String)"},{"name":"args","default_value":"EmptyEnumerable.new","external_name":"args","restriction":"Enumerable(String)"}],"args_string":"(script : String, keys : Enumerable(String) = EmptyEnumerable.new, args : Enumerable(String) = EmptyEnumerable.new)","args_html":"(script : String, keys : Enumerable(String) = EmptyEnumerable.new, args : Enumerable(String) = EmptyEnumerable.new)","location":{"filename":"src/commands.cr","line_number":277,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L277"},"def":{"name":"eval","args":[{"name":"script","external_name":"script","restriction":"String"},{"name":"keys","default_value":"EmptyEnumerable.new","external_name":"keys","restriction":"Enumerable(String)"},{"name":"args","default_value":"EmptyEnumerable.new","external_name":"args","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: (3 + keys.size) + args.size)\n((command << \"eval\") << script) << keys.size.to_s\nkeys.each do |key|\n command << key\nend\nargs.each do |arg|\n command << arg\nend\nrun(command)\n"}},{"html_id":"eval_ro(script:String,keys:Enumerable(String)=EmptyEnumerable.new,args:Enumerable(String)=EmptyEnumerable.new)-instance-method","name":"eval_ro","doc":"Evaluate the given Lua script, either referenced by SHA with `evalsha`\nor directly with `eval`.\n\nNOTE: Use `eval` only for very trivial scripts and `evalsha` for larger\nor frequently executed scripts to amortize parse/compile time as well as\nsend fewer bytes along the wire.\n\nNOTE: Use `eval_ro` and `evalsha_ro` in a clustered environment to\nevaluate the scripts on read-only replicas.\n\n```\nscript = <<-LUA\n return \"this script was \" + ARGV[1]\nLUA\n\nsha = redis.script_load(script)\nredis.eval(script, args: [\"evaluated on the fly\"]\nredis.evalsha(sha, args: [\"precompiled\"])\n```","summary":"

    Evaluate the given Lua script, either referenced by SHA with #evalsha or directly with #eval.

    ","abstract":false,"args":[{"name":"script","external_name":"script","restriction":"String"},{"name":"keys","default_value":"EmptyEnumerable.new","external_name":"keys","restriction":"Enumerable(String)"},{"name":"args","default_value":"EmptyEnumerable.new","external_name":"args","restriction":"Enumerable(String)"}],"args_string":"(script : String, keys : Enumerable(String) = EmptyEnumerable.new, args : Enumerable(String) = EmptyEnumerable.new)","args_html":"(script : String, keys : Enumerable(String) = EmptyEnumerable.new, args : Enumerable(String) = EmptyEnumerable.new)","location":{"filename":"src/commands.cr","line_number":278,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L278"},"def":{"name":"eval_ro","args":[{"name":"script","external_name":"script","restriction":"String"},{"name":"keys","default_value":"EmptyEnumerable.new","external_name":"keys","restriction":"Enumerable(String)"},{"name":"args","default_value":"EmptyEnumerable.new","external_name":"args","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: (3 + keys.size) + args.size)\n((command << \"eval_ro\") << script) << keys.size.to_s\nkeys.each do |key|\n command << key\nend\nargs.each do |arg|\n command << arg\nend\nrun(command)\n"}},{"html_id":"evalsha(sha:String,keys:Enumerable(String)=EmptyEnumerable.new,args:Enumerable(String)=EmptyEnumerable.new)-instance-method","name":"evalsha","doc":"Evaluate the given Lua script, either referenced by SHA with `evalsha`\nor directly with `eval`.\n\nNOTE: Use `eval` only for very trivial scripts and `evalsha` for larger\nor frequently executed scripts to amortize parse/compile time as well as\nsend fewer bytes along the wire.\n\nNOTE: Use `eval_ro` and `evalsha_ro` in a clustered environment to\nevaluate the scripts on read-only replicas.\n\n```\nscript = <<-LUA\n return \"this script was \" + ARGV[1]\nLUA\n\nsha = redis.script_load(script)\nredis.eval(script, args: [\"evaluated on the fly\"]\nredis.evalsha(sha, args: [\"precompiled\"])\n```","summary":"

    Evaluate the given Lua script, either referenced by SHA with #evalsha or directly with #eval.

    ","abstract":false,"args":[{"name":"sha","external_name":"sha","restriction":"String"},{"name":"keys","default_value":"EmptyEnumerable.new","external_name":"keys","restriction":"Enumerable(String)"},{"name":"args","default_value":"EmptyEnumerable.new","external_name":"args","restriction":"Enumerable(String)"}],"args_string":"(sha : String, keys : Enumerable(String) = EmptyEnumerable.new, args : Enumerable(String) = EmptyEnumerable.new)","args_html":"(sha : String, keys : Enumerable(String) = EmptyEnumerable.new, args : Enumerable(String) = EmptyEnumerable.new)","location":{"filename":"src/commands.cr","line_number":275,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L275"},"def":{"name":"evalsha","args":[{"name":"sha","external_name":"sha","restriction":"String"},{"name":"keys","default_value":"EmptyEnumerable.new","external_name":"keys","restriction":"Enumerable(String)"},{"name":"args","default_value":"EmptyEnumerable.new","external_name":"args","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: (3 + keys.size) + args.size)\n((command << \"evalsha\") << sha) << keys.size.to_s\nkeys.each do |key|\n command << key\nend\nargs.each do |arg|\n command << arg\nend\nrun(command)\n"}},{"html_id":"evalsha_ro(script:String,keys:Enumerable(String)=EmptyEnumerable.new,args:Enumerable(String)=EmptyEnumerable.new)-instance-method","name":"evalsha_ro","doc":"Evaluate the given Lua script, either referenced by SHA with `evalsha`\nor directly with `eval`.\n\nNOTE: Use `eval` only for very trivial scripts and `evalsha` for larger\nor frequently executed scripts to amortize parse/compile time as well as\nsend fewer bytes along the wire.\n\nNOTE: Use `eval_ro` and `evalsha_ro` in a clustered environment to\nevaluate the scripts on read-only replicas.\n\n```\nscript = <<-LUA\n return \"this script was \" + ARGV[1]\nLUA\n\nsha = redis.script_load(script)\nredis.eval(script, args: [\"evaluated on the fly\"]\nredis.evalsha(sha, args: [\"precompiled\"])\n```","summary":"

    Evaluate the given Lua script, either referenced by SHA with #evalsha or directly with #eval.

    ","abstract":false,"args":[{"name":"script","external_name":"script","restriction":"String"},{"name":"keys","default_value":"EmptyEnumerable.new","external_name":"keys","restriction":"Enumerable(String)"},{"name":"args","default_value":"EmptyEnumerable.new","external_name":"args","restriction":"Enumerable(String)"}],"args_string":"(script : String, keys : Enumerable(String) = EmptyEnumerable.new, args : Enumerable(String) = EmptyEnumerable.new)","args_html":"(script : String, keys : Enumerable(String) = EmptyEnumerable.new, args : Enumerable(String) = EmptyEnumerable.new)","location":{"filename":"src/commands.cr","line_number":276,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L276"},"def":{"name":"evalsha_ro","args":[{"name":"script","external_name":"script","restriction":"String"},{"name":"keys","default_value":"EmptyEnumerable.new","external_name":"keys","restriction":"Enumerable(String)"},{"name":"args","default_value":"EmptyEnumerable.new","external_name":"args","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: (3 + keys.size) + args.size)\n((command << \"evalsha_ro\") << script) << keys.size.to_s\nkeys.each do |key|\n command << key\nend\nargs.each do |arg|\n command << arg\nend\nrun(command)\n"}},{"html_id":"exists(*keys:String)-instance-method","name":"exists","doc":"Return the number of specified keys that exist\n\n```\nredis.exists(\"foo\", \"bar\") # => 0\nredis.set \"foo\", \"exists now\"\nredis.exists(\"foo\", \"bar\") # => 1\nredis.set \"bar\", \"also exists now\"\nredis.exists(\"foo\", \"bar\") # => 2\n```","summary":"

    Return the number of specified keys that exist

    ","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"String"}],"args_string":"(*keys : String)","args_html":"(*keys : String)","location":{"filename":"src/commands.cr","line_number":177,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L177"},"def":{"name":"exists","args":[{"name":"keys","external_name":"keys","restriction":"String"}],"splat_index":0,"visibility":"Public","body":"run({\"exists\"} + keys)"}},{"html_id":"expire(key:String,ttl:Time::Span)-instance-method","name":"expire","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"ttl","external_name":"ttl","restriction":"Time::Span"}],"args_string":"(key : String, ttl : Time::Span)","args_html":"(key : String, ttl : Time::Span)","location":{"filename":"src/commands.cr","line_number":292,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L292"},"def":{"name":"expire","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"ttl","external_name":"ttl","restriction":"Time::Span"}],"visibility":"Public","body":"expire(key, ttl.total_seconds.to_i64)"}},{"html_id":"expire(key:String,ttl:Int)-instance-method","name":"expire","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"ttl","external_name":"ttl","restriction":"Int"}],"args_string":"(key : String, ttl : Int)","args_html":"(key : String, ttl : Int)","location":{"filename":"src/commands.cr","line_number":296,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L296"},"def":{"name":"expire","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"ttl","external_name":"ttl","restriction":"Int"}],"visibility":"Public","body":"run({\"expire\", key, ttl.to_s})"}},{"html_id":"expireat(key:String,at:Time)-instance-method","name":"expireat","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"at","external_name":"at","restriction":"Time"}],"args_string":"(key : String, at : Time)","args_html":"(key : String, at : Time)","location":{"filename":"src/commands.cr","line_number":308,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L308"},"def":{"name":"expireat","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"at","external_name":"at","restriction":"Time"}],"visibility":"Public","body":"run({\"expireat\", key, at.to_unix.to_s})"}},{"html_id":"flushall-instance-method","name":"flushall","doc":"Delete all the keys of all the existing databases,\nnot just the currently selected one.","summary":"

    Delete all the keys of all the existing databases, not just the currently selected one.

    ","abstract":false,"location":{"filename":"src/commands.cr","line_number":353,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L353"},"def":{"name":"flushall","visibility":"Public","body":"run({\"flushall\"})"}},{"html_id":"flushdb-instance-method","name":"flushdb","doc":"Delete all the keys of the currently selected DB","summary":"

    Delete all the keys of the currently selected DB

    ","abstract":false,"location":{"filename":"src/commands.cr","line_number":347,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L347"},"def":{"name":"flushdb","visibility":"Public","body":"run({\"flushdb\"})"}},{"html_id":"ft-instance-method","name":"ft","summary":"

    EXPERIMENTAL RediSearch support is still under development. Some APIs may change while details are discovered.

    ","abstract":false,"location":{"filename":"src/search.cr","line_number":337,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L337"},"def":{"name":"ft","visibility":"Public","body":"FullText.new(self)"}},{"html_id":"get(key:String)-instance-method","name":"get","doc":"Get the value for the specified key\n\n```\nredis.set \"foo\", \"bar\"\nredis.get(\"foo\") # => \"bar\"\n```","summary":"

    Get the value for the specified key

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands.cr","line_number":82,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L82"},"def":{"name":"get","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"get\", key})"}},{"html_id":"graph(key:String)-instance-method","name":"graph","doc":"Instantiate a `Redis::Graph::Client` backed by this `Redis::Client`.","summary":"

    Instantiate a Redis::Graph::Client backed by this Redis::Client.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/graph.cr","line_number":497,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L497"},"def":{"name":"graph","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"Graph::Client.new(self, key)"}},{"html_id":"incr(key:String)-instance-method","name":"incr","doc":"Atomically increment and return the integer value for the specified key,\ncreating it if it does not exist\n\n```\nredis.del \"counter\"\nredis.incr \"counter\" # => 1\n```","summary":"

    Atomically increment and return the integer value for the specified key, creating it if it does not exist

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands.cr","line_number":93,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L93"},"def":{"name":"incr","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"incr\", key})"}},{"html_id":"incrby(key:String,amount:Int|String)-instance-method","name":"incrby","doc":"Atomically increment and return the integer value for the specified key by\nthe specified amount, creating it if it does not exist\n\n```\nredis.del \"counter\"\nredis.incrby \"counter\", 2 # => 2\n```","summary":"

    Atomically increment and return the integer value for the specified key by the specified amount, creating it if it does not exist

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"amount","external_name":"amount","restriction":"Int | String"}],"args_string":"(key : String, amount : Int | String)","args_html":"(key : String, amount : Int | String)","location":{"filename":"src/commands.cr","line_number":115,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L115"},"def":{"name":"incrby","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"amount","external_name":"amount","restriction":"Int | String"}],"visibility":"Public","body":"run({\"incrby\", key, amount.to_s})"}},{"html_id":"info-instance-method","name":"info","abstract":false,"location":{"filename":"src/commands.cr","line_number":357,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L357"},"def":{"name":"info","visibility":"Public","body":"((run({\"info\"})).as(String)).lines.reject do |line|\n line =~ (/^(#|$)/)\nend.map(&.split(':', 2)).to_h"}},{"html_id":"json-instance-method","name":"json","doc":"Return a `Redis::JSON` instance that wraps the current `Redis::Client` or\n`Redis::Cluster`.","summary":"

    Return a Redis::JSON instance that wraps the current Redis::Client or Redis::Cluster.

    \n

    EXPERIMENTAL Support for the RedisJSON module is still under development and subject to change.

    ","abstract":false,"location":{"filename":"src/json.cr","line_number":345,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L345"},"def":{"name":"json","visibility":"Public","body":"JSON.new(self)"}},{"html_id":"keys(pattern=\"*\")-instance-method","name":"keys","doc":"Get the keys whose names follow the specified glob pattern. If a pattern\nis not specified, it will return all keys by default. Be careful when\nusing this command on Redis servers with a lot of traffic and millions\nof keys.\n\n```\nredis.keys # => [\"foo\", \"bar\", \"baz\"]\nredis.keys(\"f*\") # => [\"foo\"]\nredis.keys(\"b*\") # => [\"bar\", \"baz\"]\n```","summary":"

    Get the keys whose names follow the specified glob pattern.

    ","abstract":false,"args":[{"name":"pattern","default_value":"\"*\"","external_name":"pattern","restriction":""}],"args_string":"(pattern = \"*\")","args_html":"(pattern = "*")","location":{"filename":"src/commands.cr","line_number":39,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L39"},"def":{"name":"keys","args":[{"name":"pattern","default_value":"\"*\"","external_name":"pattern","restriction":""}],"visibility":"Public","body":"run({\"keys\", pattern})"}},{"html_id":"mget(keys:Enumerable(String))-instance-method","name":"mget","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"Enumerable(String)"}],"args_string":"(keys : Enumerable(String))","args_html":"(keys : Enumerable(String))","location":{"filename":"src/commands.cr","line_number":328,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L328"},"def":{"name":"mget","args":[{"name":"keys","external_name":"keys","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 1 + keys.size)\ncommand << \"mget\"\nkeys.each do |key|\n command << key\nend\nrun(command)\n"}},{"html_id":"mset(data:Hash(String,String))-instance-method","name":"mset","abstract":false,"args":[{"name":"data","external_name":"data","restriction":"Hash(String, String)"}],"args_string":"(data : Hash(String, String))","args_html":"(data : Hash(String, String))","location":{"filename":"src/commands.cr","line_number":336,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L336"},"def":{"name":"mset","args":[{"name":"data","external_name":"data","restriction":"Hash(String, String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 1 + data.size)\ncommand << \"mset\"\ndata.each do |key, value|\n (command << key) << value\nend\nrun(command)\n"}},{"html_id":"pexpire(key:String,ttl:Time::Span)-instance-method","name":"pexpire","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"ttl","external_name":"ttl","restriction":"Time::Span"}],"args_string":"(key : String, ttl : Time::Span)","args_html":"(key : String, ttl : Time::Span)","location":{"filename":"src/commands.cr","line_number":300,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L300"},"def":{"name":"pexpire","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"ttl","external_name":"ttl","restriction":"Time::Span"}],"visibility":"Public","body":"pexpire(key, ttl.total_milliseconds.to_i64)"}},{"html_id":"pexpire(key:String,ttl:Int)-instance-method","name":"pexpire","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"ttl","external_name":"ttl","restriction":"Int"}],"args_string":"(key : String, ttl : Int)","args_html":"(key : String, ttl : Int)","location":{"filename":"src/commands.cr","line_number":304,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L304"},"def":{"name":"pexpire","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"ttl","external_name":"ttl","restriction":"Int"}],"visibility":"Public","body":"run({\"pexpire\", key, ttl.to_s})"}},{"html_id":"pexpireat(key:String,at:Time)-instance-method","name":"pexpireat","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"at","external_name":"at","restriction":"Time"}],"args_string":"(key : String, at : Time)","args_html":"(key : String, at : Time)","location":{"filename":"src/commands.cr","line_number":312,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L312"},"def":{"name":"pexpireat","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"at","external_name":"at","restriction":"Time"}],"visibility":"Public","body":"run({\"pexpireat\", key, at.to_unix_ms.to_s})"}},{"html_id":"pttl(key:String)-instance-method","name":"pttl","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands.cr","line_number":320,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L320"},"def":{"name":"pttl","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"pttl\", key})"}},{"html_id":"publish(channel:String,message:String)-instance-method","name":"publish","abstract":false,"args":[{"name":"channel","external_name":"channel","restriction":"String"},{"name":"message","external_name":"message","restriction":"String"}],"args_string":"(channel : String, message : String)","args_html":"(channel : String, message : String)","location":{"filename":"src/commands.cr","line_number":191,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L191"},"def":{"name":"publish","args":[{"name":"channel","external_name":"channel","restriction":"String"},{"name":"message","external_name":"message","restriction":"String"}],"visibility":"Public","body":"run({\"publish\", channel, message})"}},{"html_id":"run(command)-instance-method","name":"run","doc":"Execute the given command and return the result from the server. Commands\nmust be an `Enumerable` and its `size` method must be re-entrant.\n\n```\nrun({\"set\", \"foo\", \"bar\"})\n```","summary":"

    Execute the given command and return the result from the server.

    ","abstract":true,"args":[{"name":"command","external_name":"command","restriction":""}],"args_string":"(command)","args_html":"(command)","location":{"filename":"src/commands.cr","line_number":27,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L27"},"def":{"name":"run","args":[{"name":"command","external_name":"command","restriction":""}],"visibility":"Public","body":""}},{"html_id":"scan(cursor:String=\"0\",match:String|Nil=nil,count:String|Int|Nil=nil,type:String|Nil=nil)-instance-method","name":"scan","abstract":false,"args":[{"name":"cursor","default_value":"\"0\"","external_name":"cursor","restriction":"String"},{"name":"match","default_value":"nil","external_name":"match","restriction":"String | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"},{"name":"type","default_value":"nil","external_name":"type","restriction":"String | ::Nil"}],"args_string":"(cursor : String = \"0\", match : String | Nil = nil, count : String | Int | Nil = nil, type : String | Nil = nil)","args_html":"(cursor : String = "0", match : String | Nil = nil, count : String | Int | Nil = nil, type : String | Nil = nil)","location":{"filename":"src/commands.cr","line_number":181,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L181"},"def":{"name":"scan","args":[{"name":"cursor","default_value":"\"0\"","external_name":"cursor","restriction":"String"},{"name":"match","default_value":"nil","external_name":"match","restriction":"String | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"},{"name":"type","default_value":"nil","external_name":"type","restriction":"String | ::Nil"}],"visibility":"Public","body":"command = {\"scan\", cursor}\nif match\n command = command + {\"match\", match}\nend\nif count\n command = command + {\"count\", count.to_s}\nend\nif type\n command = command + {\"type\", type}\nend\nrun(command)\n"}},{"html_id":"script_exists(shas:Enumerable(String))-instance-method","name":"script_exists","doc":"Return an array where each entry is `1` if the corresponding entry in the\nlist of `shas` exists or `0` if it does not.","summary":"

    Return an array where each entry is 1 if the corresponding entry in the list of shas exists or 0 if it does not.

    ","abstract":false,"args":[{"name":"shas","external_name":"shas","restriction":"Enumerable(String)"}],"args_string":"(shas : Enumerable(String))","args_html":"(shas : Enumerable(String))","location":{"filename":"src/commands.cr","line_number":229,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L229"},"def":{"name":"script_exists","args":[{"name":"shas","external_name":"shas","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + keys.size)\n(command << \"script\") << \"exists\"\nshas.each do |sha|\n command << sha\nend\nrun(command)\n"}},{"html_id":"script_exists(*shas:String)-instance-method","name":"script_exists","doc":"Return an array where each entry is `1` if the corresponding entry in the\nlist of `shas` exists or `0` if it does not.","summary":"

    Return an array where each entry is 1 if the corresponding entry in the list of shas exists or 0 if it does not.

    ","abstract":false,"args":[{"name":"shas","external_name":"shas","restriction":"String"}],"args_string":"(*shas : String)","args_html":"(*shas : String)","location":{"filename":"src/commands.cr","line_number":224,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L224"},"def":{"name":"script_exists","args":[{"name":"shas","external_name":"shas","restriction":"String"}],"splat_index":0,"visibility":"Public","body":"script_exists(shas)"}},{"html_id":"script_flush(mode:ScriptFlushMode)-instance-method","name":"script_flush","doc":"Flush the Lua scripts cache, see [the official docs](https://redis.io/commands/script-flush/).\n\n```\nredis.script_flush :async # Flush scripts asynchronously\nredis.script_flush :sync # Flush scripts immediately\n```","summary":"

    Flush the Lua scripts cache, see the official docs.

    ","abstract":false,"args":[{"name":"mode","external_name":"mode","restriction":"ScriptFlushMode"}],"args_string":"(mode : ScriptFlushMode)","args_html":"(mode : ScriptFlushMode)","location":{"filename":"src/commands.cr","line_number":213,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L213"},"def":{"name":"script_flush","args":[{"name":"mode","external_name":"mode","restriction":"ScriptFlushMode"}],"visibility":"Public","body":"run({\"script\", \"flush\", mode.to_s})"}},{"html_id":"script_kill-instance-method","name":"script_kill","doc":"Kill the currently executing `eval` script, assuming no write operation\nwas yet performed by the script.","summary":"

    Kill the currently executing #eval script, assuming no write operation was yet performed by the script.

    ","abstract":false,"location":{"filename":"src/commands.cr","line_number":239,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L239"},"def":{"name":"script_kill","visibility":"Public","body":"run({\"script\", \"kill\"})"}},{"html_id":"script_load(script:String)-instance-method","name":"script_load","doc":"Preload a Lua script, returning the SHA of the script to pass to `evalsha`.\n```\nsha = redis.script_load(<<-LUA)\n return \"Hello \" + ARGV[1]\nLUA\n\nredis.evalsha(sha, args: [\"world\"]) # => \"Hello world\"\n```","summary":"

    Preload a Lua script, returning the SHA of the script to pass to #evalsha.

    ","abstract":false,"args":[{"name":"script","external_name":"script","restriction":"String"}],"args_string":"(script : String)","args_html":"(script : String)","location":{"filename":"src/commands.cr","line_number":203,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L203"},"def":{"name":"script_load","args":[{"name":"script","external_name":"script","restriction":"String"}],"visibility":"Public","body":"run({\"script\", \"load\", script})"}},{"html_id":"set(key:String,value:String,ex:String|Int|Nil=nil,px:String|Int|Nil=nil,nx=false,xx=false,keepttl=false)-instance-method","name":"set","doc":"Set a given key to a given value, optionally specifying time-to-live (TTL).\n\n- `ex`: TTL in seconds (mnemonic: \"ex\" = \"expiration\")\n- `px`: TTL in milliseconds\n- `nx`: Only set this key if it does not exist (mnemonic: \"nx\" = it does \"not exist\")\n- `xx`: only set this key if it does exist (mnemonic: \"xx\" = it \"exists exists\" — look, I don't make the rules)\n- `keepttl`: If there is a TTL already set on the key, retain that TTL instead of overwriting it\n\n```\nredis.set \"foo\", \"bar\", ex: 1\nredis.get(\"foo\") # => \"bar\"\nsleep 1.second\nredis.get(\"foo\") # => nil\n```","summary":"

    Set a given key to a given value, optionally specifying time-to-live (TTL).

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"value","external_name":"value","restriction":"String"},{"name":"ex","default_value":"nil","external_name":"ex","restriction":"String | Int | ::Nil"},{"name":"px","default_value":"nil","external_name":"px","restriction":"String | Int | Nil"},{"name":"nx","default_value":"false","external_name":"nx","restriction":""},{"name":"xx","default_value":"false","external_name":"xx","restriction":""},{"name":"keepttl","default_value":"false","external_name":"keepttl","restriction":""}],"args_string":"(key : String, value : String, ex : String | Int | Nil = nil, px : String | Int | Nil = nil, nx = false, xx = false, keepttl = false)","args_html":"(key : String, value : String, ex : String | Int | Nil = nil, px : String | Int | Nil = nil, nx = false, xx = false, keepttl = false)","location":{"filename":"src/commands.cr","line_number":57,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L57"},"def":{"name":"set","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"value","external_name":"value","restriction":"String"},{"name":"ex","default_value":"nil","external_name":"ex","restriction":"String | Int | ::Nil"},{"name":"px","default_value":"nil","external_name":"px","restriction":"String | Int | Nil"},{"name":"nx","default_value":"false","external_name":"nx","restriction":""},{"name":"xx","default_value":"false","external_name":"xx","restriction":""},{"name":"keepttl","default_value":"false","external_name":"keepttl","restriction":""}],"visibility":"Public","body":"command = {\"set\", key, value}\nif ex\n command = command + {\"ex\", ex.to_s}\nend\nif px\n command = command + {\"px\", px.to_s}\nend\nif nx\n command = command + {\"nx\"}\nend\nif xx\n command = command + {\"xx\"}\nend\nif keepttl\n command = command + {\"keepttl\"}\nend\nrun(command)\n"}},{"html_id":"set(key,value,ex:Time,nx=false,xx=false,keepttl=false)-instance-method","name":"set","abstract":false,"args":[{"name":"key","external_name":"key","restriction":""},{"name":"value","external_name":"value","restriction":""},{"name":"ex","external_name":"ex","restriction":"Time"},{"name":"nx","default_value":"false","external_name":"nx","restriction":""},{"name":"xx","default_value":"false","external_name":"xx","restriction":""},{"name":"keepttl","default_value":"false","external_name":"keepttl","restriction":""}],"args_string":"(key, value, ex : Time, nx = false, xx = false, keepttl = false)","args_html":"(key, value, ex : Time, nx = false, xx = false, keepttl = false)","location":{"filename":"src/commands.cr","line_number":68,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L68"},"def":{"name":"set","args":[{"name":"key","external_name":"key","restriction":""},{"name":"value","external_name":"value","restriction":""},{"name":"ex","external_name":"ex","restriction":"Time"},{"name":"nx","default_value":"false","external_name":"nx","restriction":""},{"name":"xx","default_value":"false","external_name":"xx","restriction":""},{"name":"keepttl","default_value":"false","external_name":"keepttl","restriction":""}],"visibility":"Public","body":"set(key, value, ex: ex - Time.utc, nx: nx, xx: xx, keepttl: keepttl)"}},{"html_id":"set(key,value,ex:Time::Span,nx=false,xx=false,keepttl=false)-instance-method","name":"set","abstract":false,"args":[{"name":"key","external_name":"key","restriction":""},{"name":"value","external_name":"value","restriction":""},{"name":"ex","external_name":"ex","restriction":"Time::Span"},{"name":"nx","default_value":"false","external_name":"nx","restriction":""},{"name":"xx","default_value":"false","external_name":"xx","restriction":""},{"name":"keepttl","default_value":"false","external_name":"keepttl","restriction":""}],"args_string":"(key, value, ex : Time::Span, nx = false, xx = false, keepttl = false)","args_html":"(key, value, ex : Time::Span, nx = false, xx = false, keepttl = false)","location":{"filename":"src/commands.cr","line_number":72,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L72"},"def":{"name":"set","args":[{"name":"key","external_name":"key","restriction":""},{"name":"value","external_name":"value","restriction":""},{"name":"ex","external_name":"ex","restriction":"Time::Span"},{"name":"nx","default_value":"false","external_name":"nx","restriction":""},{"name":"xx","default_value":"false","external_name":"xx","restriction":""},{"name":"keepttl","default_value":"false","external_name":"keepttl","restriction":""}],"visibility":"Public","body":"set(key, value, px: ex.total_milliseconds.to_i64, nx: nx, xx: xx, keepttl: keepttl)"}},{"html_id":"ts-instance-method","name":"ts","doc":"Return a `Redis::TimeSeries` that wraps the current `Redis::Client` or\n`Redis::Cluster`.","summary":"

    Return a Redis::TimeSeries that wraps the current Redis::Client or Redis::Cluster.

    ","abstract":false,"location":{"filename":"src/time_series.cr","line_number":444,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L444"},"def":{"name":"ts","visibility":"Public","body":"TimeSeries.new(self)"}},{"html_id":"ttl(key:String)-instance-method","name":"ttl","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands.cr","line_number":316,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L316"},"def":{"name":"ttl","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"ttl\", key})"}},{"html_id":"type(key:String)-instance-method","name":"type","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands.cr","line_number":324,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L324"},"def":{"name":"type","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"type\", key})"}},{"html_id":"unlink(keys:Enumerable(String))-instance-method","name":"unlink","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"Enumerable(String)"}],"args_string":"(keys : Enumerable(String))","args_html":"(keys : Enumerable(String))","location":{"filename":"src/commands.cr","line_number":160,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L160"},"def":{"name":"unlink","args":[{"name":"keys","external_name":"keys","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 1 + keys.size)\ncommand << \"unlink\"\nkeys.each do |key|\n command << key\nend\nrun(command)\n"}},{"html_id":"unlink(*keys:String)-instance-method","name":"unlink","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"String"}],"args_string":"(*keys : String)","args_html":"(*keys : String)","location":{"filename":"src/commands.cr","line_number":156,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L156"},"def":{"name":"unlink","args":[{"name":"keys","external_name":"keys","restriction":"String"}],"splat_index":0,"visibility":"Public","body":"run({\"unlink\"} + keys)"}}],"types":[{"html_id":"redis/Redis/Commands/EmptyEnumerable","path":"Redis/Commands/EmptyEnumerable.html","kind":"struct","full_name":"Redis::Commands::EmptyEnumerable","name":"EmptyEnumerable","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/commands.cr","line_number":281,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L281"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"redis/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"}],"namespace":{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},"doc":"This type exists to avoid allocation of an array on the heap.","summary":"

    This type exists to avoid allocation of an array on the heap.

    ","constructors":[{"html_id":"new-class-method","name":"new","abstract":false,"location":{"filename":"src/commands.cr","line_number":281,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L281"},"def":{"name":"new","visibility":"Public","body":"x = allocate\nif x.responds_to?(:finalize)\n ::GC.add_finalizer(x)\nend\nx\n"}}],"instance_methods":[{"html_id":"each(&block:String->)-instance-method","name":"each","doc":"Must yield this collection's elements to the block.","summary":"

    Must yield this collection's elements to the block.

    ","abstract":false,"location":{"filename":"src/commands.cr","line_number":284,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L284"},"def":{"name":"each","yields":1,"block_arity":1,"block_arg":{"name":"block","external_name":"block","restriction":"(String ->)"},"visibility":"Public","body":""}},{"html_id":"initialize-instance-method","name":"initialize","abstract":false,"location":{"filename":"src/commands.cr","line_number":281,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L281"},"def":{"name":"initialize","visibility":"Public","body":""}},{"html_id":"size-instance-method","name":"size","doc":"Returns the number of elements in the collection.\n\n```\n[1, 2, 3, 4].size # => 4\n```","summary":"

    Returns the number of elements in the collection.

    ","abstract":false,"location":{"filename":"src/commands.cr","line_number":287,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L287"},"def":{"name":"size","visibility":"Public","body":"0"}}]},{"html_id":"redis/Redis/Commands/Hash","path":"Redis/Commands/Hash.html","kind":"module","full_name":"Redis::Commands::Hash","name":"Hash","abstract":false,"locations":[{"filename":"src/commands/hash.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/hash.cr#L1"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"namespace":{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},"instance_methods":[{"html_id":"hdel(key:String,fields:Enumerable(String))-instance-method","name":"hdel","doc":"Delete one or more `fields` from the given `key`, returning the number of\ndeleted fields.\n\n```\nfields = %w[pending nonexistent-field]\nredis.hdel \"my-hash\", fields\n# => 1\n```","summary":"

    Delete one or more fields from the given key, returning the number of deleted fields.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"Enumerable(String)"}],"args_string":"(key : String, fields : Enumerable(String))","args_html":"(key : String, fields : Enumerable(String))","location":{"filename":"src/commands/hash.cr","line_number":23,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/hash.cr#L23"},"def":{"name":"hdel","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + fields.size)\n(command << \"hdel\") << key\nfields.each do |key|\n command << key\nend\nrun(command)\n"}},{"html_id":"hdel(key:String,*fields:String)-instance-method","name":"hdel","doc":"Delete one or more `fields` from the given `key`, returning the number of\ndeleted fields.\n\n```\nredis.hdel \"my-hash\",\n \"pending\",\n \"nonexistent-field\"\n# => 1\n```","summary":"

    Delete one or more fields from the given key, returning the number of deleted fields.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"String"}],"args_string":"(key : String, *fields : String)","args_html":"(key : String, *fields : String)","location":{"filename":"src/commands/hash.cr","line_number":11,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/hash.cr#L11"},"def":{"name":"hdel","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"String"}],"splat_index":1,"visibility":"Public","body":"run({\"hdel\", key} + fields)"}},{"html_id":"hget(key:String,field:String)-instance-method","name":"hget","doc":"Return the value of `field` for `key`, if both exist.\n\n```\nredis.hset \"person:jamie\", email: \"jamie@example.com\"\nredis.hget \"person:jamie\", \"email\" # => \"jamie@example.com\"\nredis.hget \"person:jamie\", \"password\" # => nil\n```","summary":"

    Return the value of field for key, if both exist.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"field","external_name":"field","restriction":"String"}],"args_string":"(key : String, field : String)","args_html":"(key : String, field : String)","location":{"filename":"src/commands/hash.cr","line_number":38,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/hash.cr#L38"},"def":{"name":"hget","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"field","external_name":"field","restriction":"String"}],"visibility":"Public","body":"run({\"hget\", key, field})"}},{"html_id":"hgetall(key:String)-instance-method","name":"hgetall","doc":"Return the entire hash stored at `key` as an `Array`\n\n```\nredis.hset \"person:jamie\", email: \"jamie@example.com\", name: \"Jamie\"\nredis.hgetall \"person:jamie\"\n# => [\"email\", \"jamie@example.com\", \"name\", \"Jamie\"]\n```","summary":"

    Return the entire hash stored at key as an Array

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands/hash.cr","line_number":49,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/hash.cr#L49"},"def":{"name":"hgetall","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"hgetall\", key})"}},{"html_id":"hincrby(key:String,field:String,increment:Int|String)-instance-method","name":"hincrby","doc":"Increment the numeric value for `field` in the hash stored in `key` by\n`increment`, returning the new value.\n\n```\nid = 1234\nredis.hincrby \"posts:#{id}\", \"likes\", 1 # => 1\nredis.hincrby \"posts:#{id}\", \"likes\", 1 # => 2\n```","summary":"

    Increment the numeric value for field in the hash stored in key by increment, returning the new value.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"field","external_name":"field","restriction":"String"},{"name":"increment","external_name":"increment","restriction":"Int | String"}],"args_string":"(key : String, field : String, increment : Int | String)","args_html":"(key : String, field : String, increment : Int | String)","location":{"filename":"src/commands/hash.cr","line_number":169,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/hash.cr#L169"},"def":{"name":"hincrby","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"field","external_name":"field","restriction":"String"},{"name":"increment","external_name":"increment","restriction":"Int | String"}],"visibility":"Public","body":"run({\"hincrby\", key, field, increment.to_s})"}},{"html_id":"hmget(key:String,fields:Enumerable(String))-instance-method","name":"hmget","doc":"Return the values for `fields` in `key` as an `Array`\n\n```\nredis.hset \"person:jamie\", email: \"jamie@example.com\", name: \"Jamie\"\nredis.hmget \"person:jamie\", %w[email name] # => [\"jamie@example.com\", \"Jamie\"]\nredis.hmget \"person:jamie\", %w[nonexistent fake-field] # => [nil, nil]\n```","summary":"

    Return the values for fields in key as an Array

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"Enumerable(String)"}],"args_string":"(key : String, fields : Enumerable(String))","args_html":"(key : String, fields : Enumerable(String))","location":{"filename":"src/commands/hash.cr","line_number":71,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/hash.cr#L71"},"def":{"name":"hmget","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + fields.size)\n(command << \"hmget\") << key\nfields.each do |field|\n command << field\nend\nrun(command)\n"}},{"html_id":"hmget(key:String,*fields:String)-instance-method","name":"hmget","doc":"Return the values for `fields` in `key` as an `Array`\n\n```\nredis.hset \"person:jamie\", email: \"jamie@example.com\", name: \"Jamie\"\nredis.hmget \"person:jamie\", \"email\", \"name\" # => [\"jamie@example.com\", \"Jamie\"]\nredis.hmget \"person:jamie\", \"nonexistent\", \"fake-field\" # => [nil, nil]\n```","summary":"

    Return the values for fields in key as an Array

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"String"}],"args_string":"(key : String, *fields : String)","args_html":"(key : String, *fields : String)","location":{"filename":"src/commands/hash.cr","line_number":60,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/hash.cr#L60"},"def":{"name":"hmget","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"String"}],"splat_index":1,"visibility":"Public","body":"run({\"hmget\", key} + fields)"}},{"html_id":"hmset(key:String,data:::Hash(String,String))-instance-method","name":"hmset","summary":"

    DEPRECATED The Redis HMSET command is deprecated. Use HSET instead. This method will be removed in v1.0.0 of this shard. See https://redis.io/commands/hmset/

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"data","external_name":"data","restriction":"::Hash(String, String)"}],"args_string":"(key : String, data : ::Hash(String, String))","args_html":"(key : String, data : ::Hash(String, String))","location":{"filename":"src/commands/hash.cr","line_number":201,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/hash.cr#L201"},"def":{"name":"hmset","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"data","external_name":"data","restriction":"::Hash(String, String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + data.size)\n(command << \"hmset\") << key\ndata.each do |key, value|\n (command << key) << value\nend\nrun(command)\n"}},{"html_id":"hscan(key:String,cursor:String,*,matchpattern:String|Nil=nil,count:String|Int|Nil=nil)-instance-method","name":"hscan","doc":"Execute the `HSCAN` command to return a subset of keys in the hash stored at\n`key`, allowing you to iterate through the keys in the hash without blocking\nthe Redis server for too long at a time.\n\nNOTE: You probably want to use `Redis::Client#hscan_each` instead of using\nthis method directly.\n\n```\ncursor = \"\"\nuntil cursor == \"0\"\n response = redis.hscan(key, cursor)\n cursor, fields = response.as(Array)\n cursor = cursor.as(String)\n fields.as(Array).each do |field|\n # Do something with that hash field...\n end\nend\n```","summary":"

    Execute the HSCAN command to return a subset of keys in the hash stored at key, allowing you to iterate through the keys in the hash without blocking the Redis server for too long at a time.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"cursor","external_name":"cursor","restriction":"String"},{"name":"","external_name":"","restriction":""},{"name":"pattern","default_value":"nil","external_name":"match","restriction":"String | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"}],"args_string":"(key : String, cursor : String, *, match pattern : String | Nil = nil, count : String | Int | Nil = nil)","args_html":"(key : String, cursor : String, *, match pattern : String | Nil = nil, count : String | Int | Nil = nil)","location":{"filename":"src/commands/hash.cr","line_number":191,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/hash.cr#L191"},"def":{"name":"hscan","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"cursor","external_name":"cursor","restriction":"String"},{"name":"","external_name":"","restriction":""},{"name":"pattern","default_value":"nil","external_name":"match","restriction":"String | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"}],"splat_index":2,"visibility":"Public","body":"command = Array(String).new(initial_capacity: 7)\n((command << \"hscan\") << key) << cursor.to_s\nif pattern\n (command << \"match\") << pattern\nend\nif count\n (command << \"count\") << count.to_s\nend\nrun(command)\n"}},{"html_id":"hset(key:String,fields:Enumerable(String))-instance-method","name":"hset","doc":"Set the values for `fields` in the hash stored in `key`, returning the\nnumber of fields created (not updated)\n\nNOTE: `fields` _MUST_ contain an even number of elements\n\n```\nredis.hset \"person:jamie\", %w[email jamie@example.com name Jamie] # => 2\nredis.hset \"person:jamie\", %w[email jamie@example.dev admin true] # => 1\nredis.hset \"person:jamie\", %w[admin false] # => 0\n```","summary":"

    Set the values for fields in the hash stored in key, returning the number of fields created (not updated)

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"Enumerable(String)"}],"args_string":"(key : String, fields : Enumerable(String))","args_html":"(key : String, fields : Enumerable(String))","location":{"filename":"src/commands/hash.cr","line_number":120,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/hash.cr#L120"},"def":{"name":"hset","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + fields.size)\n(command << \"hset\") << key\nfields.each do |field|\n command << field\nend\nrun(command)\n"}},{"html_id":"hset(key:String,fields:::Hash(String,String))-instance-method","name":"hset","doc":"Set the values for `fields` in the hash stored in `key`, returning the\nnumber of fields created (not updated)\n\n```\nredis.hset \"person:jamie\", {\"email\" => \"jamie@example.com\", \"name\" => \"Jamie\"} # => 2\nredis.hset \"person:jamie\", {\"email\" => \"jamie@example.dev\", \"admin\" => \"true\"} # => 1\nredis.hset \"person:jamie\", {\"admin\" => \"false\"} # => 0\n```","summary":"

    Set the values for fields in the hash stored in key, returning the number of fields created (not updated)

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"::Hash(String, String)"}],"args_string":"(key : String, fields : ::Hash(String, String))","args_html":"(key : String, fields : ::Hash(String, String))","location":{"filename":"src/commands/hash.cr","line_number":137,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/hash.cr#L137"},"def":{"name":"hset","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"::Hash(String, String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + (2 * fields.size))\n(command << \"hset\") << key\nfields.each do |key, value|\n (command << key) << value\nend\nrun(command)\n"}},{"html_id":"hset(key:String,*fields:String)-instance-method","name":"hset","doc":"Set the values for `fields` in the hash stored in `key`, returning the\nnumber of fields created (not updated).\n\nNOTE: You _MUST_ pass an even number of arguments to `fields`\n\n```\nredis.hset \"person:jamie\", \"email\", \"jamie@example.com\", \"name\", \"Jamie\" # => 2\nredis.hset \"person:jamie\", \"email\", \"jamie@example.dev\", \"admin\", \"true\" # => 1\nredis.hset \"person:jamie\", \"admin\", \"false\" # => 0\n```","summary":"

    Set the values for fields in the hash stored in key, returning the number of fields created (not updated).

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"String"}],"args_string":"(key : String, *fields : String)","args_html":"(key : String, *fields : String)","location":{"filename":"src/commands/hash.cr","line_number":106,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/hash.cr#L106"},"def":{"name":"hset","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"String"}],"splat_index":1,"visibility":"Public","body":"run({\"hset\", key} + fields)"}},{"html_id":"hset(key:String,**fields:String)-instance-method","name":"hset","doc":"Set the values for `fields` in the hash stored in `key`, returning the\nnumber of fields created (not updated)\n\n```\nredis.hset \"person:jamie\", email: \"jamie@example.com\", name: \"Jamie\" # => 2\nredis.hset \"person:jamie\", email: \"jamie@example.dev\", admin: \"true\" # => 1\nredis.hset \"person:jamie\", admin: \"false\" # => 0\n```","summary":"

    Set the values for fields in the hash stored in key, returning the number of fields created (not updated)

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String, **fields : String)","args_html":"(key : String, **fields : String)","location":{"filename":"src/commands/hash.cr","line_number":87,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/hash.cr#L87"},"def":{"name":"hset","args":[{"name":"key","external_name":"key","restriction":"String"}],"double_splat":{"name":"fields","external_name":"fields","restriction":"String"},"visibility":"Public","body":"hash = ::Hash(String, String).new(initial_capacity: fields.size)\nfields.each do |key, value|\n hash[key.to_s] = value\nend\nhset(key, hash)\n"}},{"html_id":"hsetnx(key:String,field:String,value:String)-instance-method","name":"hsetnx","doc":"Set `field` in the hash stored in `key` to `value` if and only if it does not exist. Returns `1` if the field was set, `0` if it was not.\n\n```\nid = 1234\n\nredis.hsetnx \"job:#{id}\", \"locked_at\", Time.utc.to_rfc3339 # => 1\n# Returned 1, lock succeeds\n\nredis.hsetnx \"job:#{id}\", \"locked_at\", Time.utc.to_rfc3339 # => 0\n# Returned 0, lock did not succeed, so the job is already being processed\n```","summary":"

    Set field in the hash stored in key to value if and only if it does not exist.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"field","external_name":"field","restriction":"String"},{"name":"value","external_name":"value","restriction":"String"}],"args_string":"(key : String, field : String, value : String)","args_html":"(key : String, field : String, value : String)","location":{"filename":"src/commands/hash.cr","line_number":157,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/hash.cr#L157"},"def":{"name":"hsetnx","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"field","external_name":"field","restriction":"String"},{"name":"value","external_name":"value","restriction":"String"}],"visibility":"Public","body":"run({\"hsetnx\", key, field, value})"}}]},{"html_id":"redis/Redis/Commands/List","path":"Redis/Commands/List.html","kind":"module","full_name":"Redis::Commands::List","name":"List","abstract":false,"locations":[{"filename":"src/commands/list.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L1"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"namespace":{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},"instance_methods":[{"html_id":"blpop(keys:Enumerable(String),timeout:Time::Span)-instance-method","name":"blpop","doc":"Remove and return an element from the end of the given list. If the list\nis empty or the key does not exist, this method waits the specified amount\nof time for an element to be added to it by another connection. If the\nelement *is* added by another connection within that amount of time, this\nmethod will return it immediately. If it *is not*, then this method returns\n`nil`.\n\n```\nkeys = %w[foo bar]\nredis.rpush \"foo\", \"first\"\nspawn do\n sleep 100.milliseconds\n redis.rpush \"foo\", \"second\"\nend\nredis.blpop keys, 1.second # => \"first\"\nredis.blpop keys, 1.second # => \"second\" (after 100 milliseconds)\nredis.blpop keys, 1.second # => nil (after 1 second)\n```","summary":"

    Remove and return an element from the end of the given list.

    ","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"Enumerable(String)"},{"name":"timeout","external_name":"timeout","restriction":"Time::Span"}],"args_string":"(keys : Enumerable(String), timeout : Time::Span)","args_html":"(keys : Enumerable(String), timeout : Time::Span)","location":{"filename":"src/commands/list.cr","line_number":128,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L128"},"def":{"name":"blpop","args":[{"name":"keys","external_name":"keys","restriction":"Enumerable(String)"},{"name":"timeout","external_name":"timeout","restriction":"Time::Span"}],"visibility":"Public","body":"command = Array(String).new(2 + keys.size)\ncommand << \"blpop\"\ncommand.concat(keys)\ncommand << timeout.total_seconds.to_i.to_s\nrun(command)\n"}},{"html_id":"blpop(*keys:String,timeout:Time::Span)-instance-method","name":"blpop","doc":"Remove and return an element from the end of the given list. If the list\nis empty or the key does not exist, this method waits the specified amount\nof time for an element to be added to it by another connection. If the\nelement *is* added by another connection within that amount of time, this\nmethod will return it immediately. If it *is not*, then this method returns\n`nil`.\n\n```\nredis.rpush \"foo\", \"first\"\nspawn do\n sleep 100.milliseconds\n redis.rpush \"foo\", \"second\"\nend\nredis.blpop \"foo\", 1.second # => \"first\"\nredis.blpop \"foo\", 1.second # => \"second\" (after 100 milliseconds)\nredis.blpop \"foo\", 1.second # => nil (after 1 second)\n```","summary":"

    Remove and return an element from the end of the given list.

    ","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"Time::Span"}],"args_string":"(*keys : String, timeout : Time::Span)","args_html":"(*keys : String, timeout : Time::Span)","location":{"filename":"src/commands/list.cr","line_number":154,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L154"},"def":{"name":"blpop","args":[{"name":"keys","external_name":"keys","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"Time::Span"}],"splat_index":0,"visibility":"Public","body":"blpop(*keys, timeout: timeout.total_seconds.to_i.to_s)"}},{"html_id":"blpop(*keys:String,timeout:Int|Float)-instance-method","name":"blpop","doc":"Remove and return an element from the end of the given list. If the list\nis empty or the key does not exist, this method waits the specified number\nof seconds for an element to be added to it by another connection. If the\nelement *is* added by another connection within that number of seconds,\nthis method will return it immediately. If it *is not*, then this method\nreturns `nil`.\n\n```\nredis.lpush \"foo\", \"first\"\nspawn do\n sleep 100.milliseconds\n redis.lpush \"foo\", \"second\"\nend\nredis.blpop \"foo\", 1 # => \"first\"\nredis.blpop \"foo\", 1 # => \"second\" (after 100 milliseconds)\nredis.blpop \"foo\", 1 # => nil (after 1 second)\n```","summary":"

    Remove and return an element from the end of the given list.

    ","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"Int | Float"}],"args_string":"(*keys : String, timeout : Int | Float)","args_html":"(*keys : String, timeout : Int | Float)","location":{"filename":"src/commands/list.cr","line_number":175,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L175"},"def":{"name":"blpop","args":[{"name":"keys","external_name":"keys","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"Int | Float"}],"splat_index":0,"visibility":"Public","body":"if timeout == timeout.to_i\n timeout = timeout.to_i\nend\nblpop(*keys, timeout: timeout.to_s)\n"}},{"html_id":"blpop(*keys:String,timeout:String)-instance-method","name":"blpop","doc":"Remove and return an element from the end of the given list. If the list\nis empty or the key does not exist, this method waits the specified number\nof seconds for an element to be added to it by another connection. If the\nelement *is* added by another connection within that number of seconds,\nthis method will return it immediately. If it *is not*, then this method\nreturns `nil`.\n\n```\nredis.lpush \"foo\", \"first\"\nspawn do\n sleep 100.milliseconds\n redis.lpush \"foo\", \"second\"\nend\nredis.blpop \"foo\", \"1\" # => \"first\"\nredis.blpop \"foo\", \"1\" # => \"second\" (after 100 milliseconds)\nredis.blpop \"foo\", \"1\" # => nil (after 1 second)\n```","summary":"

    Remove and return an element from the end of the given list.

    ","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"String"}],"args_string":"(*keys : String, timeout : String)","args_html":"(*keys : String, timeout : String)","location":{"filename":"src/commands/list.cr","line_number":197,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L197"},"def":{"name":"blpop","args":[{"name":"keys","external_name":"keys","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"String"}],"splat_index":0,"visibility":"Public","body":"run(({\"blpop\"} + keys) + {timeout})"}},{"html_id":"brpop(keys:Enumerable(String),timeout:Int)-instance-method","name":"brpop","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"Enumerable(String)"},{"name":"timeout","external_name":"timeout","restriction":"Int"}],"args_string":"(keys : Enumerable(String), timeout : Int)","args_html":"(keys : Enumerable(String), timeout : Int)","location":{"filename":"src/commands/list.cr","line_number":316,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L316"},"def":{"name":"brpop","args":[{"name":"keys","external_name":"keys","restriction":"Enumerable(String)"},{"name":"timeout","external_name":"timeout","restriction":"Int"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + keys.size)\ncommand << \"brpop\"\nkeys.each do |key|\n command << key\nend\ncommand << timeout.to_s\nrun(command)\n"}},{"html_id":"brpop(*keys:String,timeout:Time::Span)-instance-method","name":"brpop","doc":"Remove and return an element from the end of the given list. If the list\nis empty or the key does not exist, this method waits the specified amount\nof time for an element to be added to it by another connection. If the\nelement *is* added by another connection within that amount of time, this\nmethod will return it immediately. If it *is not*, then this method returns\n`nil`.\n\n```\nredis.lpush \"foo\", \"first\"\nspawn do\n sleep 100.milliseconds\n redis.lpush \"foo\", \"second\"\nend\nredis.brpop \"foo\", 1.second # => \"first\"\nredis.brpop \"foo\", 1.second # => \"second\" (after 100 milliseconds)\nredis.brpop \"foo\", 1.second # => nil (after 1 second)\n```","summary":"

    Remove and return an element from the end of the given list.

    ","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"Time::Span"}],"args_string":"(*keys : String, timeout : Time::Span)","args_html":"(*keys : String, timeout : Time::Span)","location":{"filename":"src/commands/list.cr","line_number":218,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L218"},"def":{"name":"brpop","args":[{"name":"keys","external_name":"keys","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"Time::Span"}],"splat_index":0,"visibility":"Public","body":"brpop(*keys, timeout: timeout.total_seconds)"}},{"html_id":"brpop(*keys:String,timeout:Number)-instance-method","name":"brpop","doc":"Remove and return an element from the end of the given list. If the list\nis empty or the key does not exist, this method waits the specified number\nof seconds for an element to be added to it by another connection. If the\nelement *is* added by another connection within that number of seconds,\nthis method will return it immediately. If it *is not*, then this method\nreturns `nil`.\n\n```\nredis.lpush \"foo\", \"first\"\nspawn do\n sleep 100.milliseconds\n redis.lpush \"foo\", \"second\"\nend\nredis.brpop \"foo\", 1 # => \"first\"\nredis.brpop \"foo\", 1 # => \"second\" (after 100 milliseconds)\nredis.brpop \"foo\", 1 # => nil (after 1 second)\n```","summary":"

    Remove and return an element from the end of the given list.

    ","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"Number"}],"args_string":"(*keys : String, timeout : Number)","args_html":"(*keys : String, timeout : Number)","location":{"filename":"src/commands/list.cr","line_number":239,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L239"},"def":{"name":"brpop","args":[{"name":"keys","external_name":"keys","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"Number"}],"splat_index":0,"visibility":"Public","body":"if timeout == timeout.to_i\n timeout = timeout.to_i\nend\nbrpop(*keys, timeout: timeout.to_s)\n"}},{"html_id":"brpop(*keys:String,timeout:String)-instance-method","name":"brpop","doc":"Remove and return an element from the end of the given list. If the list\nis empty or the key does not exist, this method waits the specified number\nof seconds for an element to be added to it by another connection. If the\nelement *is* added by another connection within that number of seconds,\nthis method will return it immediately. If it *is not*, then this method\nreturns `nil`.\n\n```\nredis.lpush \"foo\", \"first\"\nspawn do\n sleep 100.milliseconds\n redis.lpush \"foo\", \"second\"\nend\nredis.brpop \"foo\", \"1\" # => \"first\"\nredis.brpop \"foo\", \"1\" # => \"second\" (after 100 milliseconds)\nredis.brpop \"foo\", \"1\" # => nil (after 1 second)\n```","summary":"

    Remove and return an element from the end of the given list.

    ","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"String"}],"args_string":"(*keys : String, timeout : String)","args_html":"(*keys : String, timeout : String)","location":{"filename":"src/commands/list.cr","line_number":261,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L261"},"def":{"name":"brpop","args":[{"name":"keys","external_name":"keys","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"String"}],"splat_index":0,"visibility":"Public","body":"run(({\"brpop\"} + keys) + {timeout})"}},{"html_id":"llen(key:String)-instance-method","name":"llen","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands/list.cr","line_number":265,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L265"},"def":{"name":"llen","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"llen\", key})"}},{"html_id":"lmove(fromsource:String,todestination:String,from_sidesource_side:Side,to_sidedestination_side:Side)-instance-method","name":"lmove","doc":"Atomically remove an item from the end of a list and insert it at the\nbeginning of another. Returns that list item. If the first list is empty,\nnothing happens and this method returns `nil`.\n\n```\nredis.del \"foo\"\nredis.lpush \"foo\", \"hello\", \"world\"\nredis.lmove \"foo\", \"bar\" # => \"hello\"\nredis.lmove \"foo\", \"bar\" # => \"world\"\nredis.lmove \"foo\", \"bar\" # => nil\n```","summary":"

    Atomically remove an item from the end of a list and insert it at the beginning of another.

    ","abstract":false,"args":[{"name":"source","external_name":"from","restriction":"String"},{"name":"destination","external_name":"to","restriction":"String"},{"name":"source_side","external_name":"from_side","restriction":"Side"},{"name":"destination_side","external_name":"to_side","restriction":"Side"}],"args_string":"(from source : String, to destination : String, from_side source_side : Side, to_side destination_side : Side)","args_html":"(from source : String, to destination : String, from_side source_side : Side, to_side destination_side : Side)","location":{"filename":"src/commands/list.cr","line_number":53,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L53"},"def":{"name":"lmove","args":[{"name":"source","external_name":"from","restriction":"String"},{"name":"destination","external_name":"to","restriction":"String"},{"name":"source_side","external_name":"from_side","restriction":"Side"},{"name":"destination_side","external_name":"to_side","restriction":"Side"}],"visibility":"Public","body":"run({\"lmove\", source, destination, source_side.to_s, destination_side.to_s})"}},{"html_id":"lpop(key:String,count:String|Nil=nil)-instance-method","name":"lpop","doc":"Remove an item from the beginning of a list, returning the item or `nil`\nif the list was empty.\n\n```\nredis.del \"my-list\" # Delete so we know it's empty\nredis.lpush \"my-list\", \"foo\"\nredis.lpop \"my-list\" # => \"foo\"\nredis.lpop \"my-list\" # => nil\n```","summary":"

    Remove an item from the beginning of a list, returning the item or nil if the list was empty.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | ::Nil"}],"args_string":"(key : String, count : String | Nil = nil)","args_html":"(key : String, count : String | Nil = nil)","location":{"filename":"src/commands/list.cr","line_number":31,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L31"},"def":{"name":"lpop","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | ::Nil"}],"visibility":"Public","body":"command = {\"lpop\", key}\nif count\n command = command + {count}\nend\nrun(command)\n"}},{"html_id":"lpush(key:String,values:Enumerable(String))-instance-method","name":"lpush","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"Enumerable(String)"}],"args_string":"(key : String, values : Enumerable(String))","args_html":"(key : String, values : Enumerable(String))","location":{"filename":"src/commands/list.cr","line_number":14,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L14"},"def":{"name":"lpush","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + values.size)\n(command << \"lpush\") << key\nvalues.each do |value|\n command << value\nend\nrun(command)\n"}},{"html_id":"lpush(key,*values:String)-instance-method","name":"lpush","doc":"Insert an item at the beginning of a list, returning the number of items\nin the list after the insert.\n\n```\nredis.del \"my-list\" # Delete so we know it's empty\nredis.lpush \"my-list\", \"foo\", \"bar\" # => 2\nredis.lpush \"my-list\", \"foo\", \"bar\" # => 4\n```","summary":"

    Insert an item at the beginning of a list, returning the number of items in the list after the insert.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":""},{"name":"values","external_name":"values","restriction":"String"}],"args_string":"(key, *values : String)","args_html":"(key, *values : String)","location":{"filename":"src/commands/list.cr","line_number":10,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L10"},"def":{"name":"lpush","args":[{"name":"key","external_name":"key","restriction":""},{"name":"values","external_name":"values","restriction":"String"}],"splat_index":1,"visibility":"Public","body":"run({\"lpush\", key} + values)"}},{"html_id":"lrange(key:String,start:String|Int,finish:String|Int)-instance-method","name":"lrange","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"start","external_name":"start","restriction":"String | Int"},{"name":"finish","external_name":"finish","restriction":"String | Int"}],"args_string":"(key : String, start : String | Int, finish : String | Int)","args_html":"(key : String, start : String | Int, finish : String | Int)","location":{"filename":"src/commands/list.cr","line_number":38,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L38"},"def":{"name":"lrange","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"start","external_name":"start","restriction":"String | Int"},{"name":"finish","external_name":"finish","restriction":"String | Int"}],"visibility":"Public","body":"run({\"lrange\", key, start.to_s, finish.to_s})"}},{"html_id":"lrem(key:String,count:Int,value:String)-instance-method","name":"lrem","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"count","external_name":"count","restriction":"Int"},{"name":"value","external_name":"value","restriction":"String"}],"args_string":"(key : String, count : Int, value : String)","args_html":"(key : String, count : Int, value : String)","location":{"filename":"src/commands/list.cr","line_number":269,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L269"},"def":{"name":"lrem","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"count","external_name":"count","restriction":"Int"},{"name":"value","external_name":"value","restriction":"String"}],"visibility":"Public","body":"run({\"lrem\", key, count.to_s, value})"}},{"html_id":"ltrim(key:String,start:String|Int,stop:String|Int)-instance-method","name":"ltrim","doc":"Trim the list contained in `key` so that it contains only the values at the\nindices in the given range.\n\n```\nredis.rpush \"ids\", %w[0 1 2 3 4 5 6 7 8 9]\nredis.ltrim \"ids\", 1, 2\n```","summary":"

    Trim the list contained in key so that it contains only the values at the indices in the given range.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"start","external_name":"start","restriction":"String | Int"},{"name":"stop","external_name":"stop","restriction":"String | Int"}],"args_string":"(key : String, start : String | Int, stop : String | Int)","args_html":"(key : String, start : String | Int, stop : String | Int)","location":{"filename":"src/commands/list.cr","line_number":312,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L312"},"def":{"name":"ltrim","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"start","external_name":"start","restriction":"String | Int"},{"name":"stop","external_name":"stop","restriction":"String | Int"}],"visibility":"Public","body":"run({\"ltrim\", key, start.to_s, stop.to_s})"}},{"html_id":"ltrim(key:String,range:Range(String,String))-instance-method","name":"ltrim","doc":"Trim the list contained in `key` so that it contains only the values at the\nindices in the given range.\n\n```\nredis.rpush \"ids\", %w[0 1 2 3 4 5 6 7 8 9]\nstart, stop = \"1,2\".split(',')\nredis.ltrim \"ids\", start..stop\n```","summary":"

    Trim the list contained in key so that it contains only the values at the indices in the given range.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"range","external_name":"range","restriction":"Range(String, String)"}],"args_string":"(key : String, range : Range(String, String))","args_html":"(key : String, range : Range(String, String))","location":{"filename":"src/commands/list.cr","line_number":281,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L281"},"def":{"name":"ltrim","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"range","external_name":"range","restriction":"Range(String, String)"}],"visibility":"Public","body":"if range.excludes_end?\n ltrim(key, range.begin.to_i, range.end.to_i)\nelse\n ltrim(key, range.begin, range.end)\nend"}},{"html_id":"ltrim(key:String,range:Range(Int32,Int32))-instance-method","name":"ltrim","doc":"Trim the list contained in `key` so that it contains only the values at the\nindices in the given range.\n\n```\nredis.rpush \"ids\", %w[0 1 2 3 4 5 6 7 8 9]\nredis.ltrim \"ids\", 1..2\n```","summary":"

    Trim the list contained in key so that it contains only the values at the indices in the given range.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"range","external_name":"range","restriction":"Range(Int32, Int32)"}],"args_string":"(key : String, range : Range(Int32, Int32))","args_html":"(key : String, range : Range(Int32, Int32))","location":{"filename":"src/commands/list.cr","line_number":296,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L296"},"def":{"name":"ltrim","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"range","external_name":"range","restriction":"Range(Int32, Int32)"}],"visibility":"Public","body":"range_end = range.end\nif range.excludes_end?\n range_end = range_end - 1\nend\nltrim(key, range.begin, range_end)\n"}},{"html_id":"rpop(key:String)-instance-method","name":"rpop","doc":"Remove and return an element from the end of the given list. If the list\nis empty or the key does not exist, this method returns `nil`\n\n```\nredis.lpush \"foo\", \"hello\"\nredis.rpop \"foo\" # => \"hello\"\nredis.rpop \"foo\" # => nil\n```","summary":"

    Remove and return an element from the end of the given list.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands/list.cr","line_number":86,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L86"},"def":{"name":"rpop","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"rpop\", key})"}},{"html_id":"rpoplpush(source:String,destination:String)-instance-method","name":"rpoplpush","doc":"Atomically remove an item from the end of a list and insert it at the\nbeginning of another. Returns that list item. If the first list is empty,\nnothing happens and this method returns `nil`.\n\n```\nredis.del \"foo\"\nredis.lpush \"foo\", \"hello\", \"world\"\nredis.rpoplpush \"foo\", \"bar\" # => \"hello\"\nredis.rpoplpush \"foo\", \"bar\" # => \"world\"\nredis.rpoplpush \"foo\", \"bar\" # => nil\n```","summary":"

    Atomically remove an item from the end of a list and insert it at the beginning of another.

    \n

    DEPRECATED Use the #lmove method instead. See the Redis docs for more inforamtion.

    ","abstract":false,"args":[{"name":"source","external_name":"source","restriction":"String"},{"name":"destination","external_name":"destination","restriction":"String"}],"args_string":"(source : String, destination : String)","args_html":"(source : String, destination : String)","location":{"filename":"src/commands/list.cr","line_number":74,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L74"},"def":{"name":"rpoplpush","args":[{"name":"source","external_name":"source","restriction":"String"},{"name":"destination","external_name":"destination","restriction":"String"}],"visibility":"Public","body":"run({\"rpoplpush\", source, destination})"}},{"html_id":"rpush(key:String,values:Enumerable(String))-instance-method","name":"rpush","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"Enumerable(String)"}],"args_string":"(key : String, values : Enumerable(String))","args_html":"(key : String, values : Enumerable(String))","location":{"filename":"src/commands/list.cr","line_number":102,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L102"},"def":{"name":"rpush","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + values.size)\n(command << \"rpush\") << key\nvalues.each do |value|\n command << value\nend\nrun(command)\n"}},{"html_id":"rpush(key,*values:String)-instance-method","name":"rpush","doc":"Insert an item at the end of a list, returning the number of items\nin the list after the insert.\n\n```\nredis.del \"my-list\" # Delete so we know it's empty\nredis.rpush \"my-list\", \"foo\", \"bar\" # => 2\nredis.rpush \"my-list\", \"foo\", \"bar\" # => 4\n```","summary":"

    Insert an item at the end of a list, returning the number of items in the list after the insert.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":""},{"name":"values","external_name":"values","restriction":"String"}],"args_string":"(key, *values : String)","args_html":"(key, *values : String)","location":{"filename":"src/commands/list.cr","line_number":98,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L98"},"def":{"name":"rpush","args":[{"name":"key","external_name":"key","restriction":""},{"name":"values","external_name":"values","restriction":"String"}],"splat_index":1,"visibility":"Public","body":"run({\"rpush\", key} + values)"}}],"types":[{"html_id":"redis/Redis/Commands/List/Side","path":"Redis/Commands/List/Side.html","kind":"enum","full_name":"Redis::Commands::List::Side","name":"Side","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/commands/list.cr","line_number":57,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L57"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"LEFT","name":"LEFT","value":"0"},{"id":"RIGHT","name":"RIGHT","value":"1"}],"namespace":{"html_id":"redis/Redis/Commands/List","kind":"module","full_name":"Redis::Commands::List","name":"List"},"instance_methods":[{"html_id":"left?-instance-method","name":"left?","abstract":false,"location":{"filename":"src/commands/list.cr","line_number":58,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L58"},"def":{"name":"left?","visibility":"Public","body":"self == LEFT"}},{"html_id":"right?-instance-method","name":"right?","abstract":false,"location":{"filename":"src/commands/list.cr","line_number":59,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/list.cr#L59"},"def":{"name":"right?","visibility":"Public","body":"self == RIGHT"}}]}]},{"html_id":"redis/Redis/Commands/ScriptFlushMode","path":"Redis/Commands/ScriptFlushMode.html","kind":"enum","full_name":"Redis::Commands::ScriptFlushMode","name":"ScriptFlushMode","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/commands.cr","line_number":217,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L217"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"ASYNC","name":"ASYNC","value":"0"},{"id":"SYNC","name":"SYNC","value":"1"}],"namespace":{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},"instance_methods":[{"html_id":"async?-instance-method","name":"async?","abstract":false,"location":{"filename":"src/commands.cr","line_number":218,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L218"},"def":{"name":"async?","visibility":"Public","body":"self == ASYNC"}},{"html_id":"sync?-instance-method","name":"sync?","abstract":false,"location":{"filename":"src/commands.cr","line_number":219,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands.cr#L219"},"def":{"name":"sync?","visibility":"Public","body":"self == SYNC"}}]},{"html_id":"redis/Redis/Commands/Set","path":"Redis/Commands/Set.html","kind":"module","full_name":"Redis::Commands::Set","name":"Set","abstract":false,"locations":[{"filename":"src/commands/set.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/set.cr#L1"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"namespace":{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},"instance_methods":[{"html_id":"sadd(key:String,*values:String)-instance-method","name":"sadd","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"String"}],"args_string":"(key : String, *values : String)","args_html":"(key : String, *values : String)","location":{"filename":"src/commands/set.cr","line_number":2,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/set.cr#L2"},"def":{"name":"sadd","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"String"}],"splat_index":1,"visibility":"Public","body":"run({\"sadd\", key} + values)"}},{"html_id":"scard(key:String)-instance-method","name":"scard","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands/set.cr","line_number":36,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/set.cr#L36"},"def":{"name":"scard","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"scard\", key})"}},{"html_id":"sdiff(first:String,second:String)-instance-method","name":"sdiff","abstract":false,"args":[{"name":"first","external_name":"first","restriction":"String"},{"name":"second","external_name":"second","restriction":"String"}],"args_string":"(first : String, second : String)","args_html":"(first : String, second : String)","location":{"filename":"src/commands/set.cr","line_number":28,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/set.cr#L28"},"def":{"name":"sdiff","args":[{"name":"first","external_name":"first","restriction":"String"},{"name":"second","external_name":"second","restriction":"String"}],"visibility":"Public","body":"run({\"sdiff\", first, second})"}},{"html_id":"sinter(first:String,*others:String)-instance-method","name":"sinter","abstract":false,"args":[{"name":"first","external_name":"first","restriction":"String"},{"name":"others","external_name":"others","restriction":"String"}],"args_string":"(first : String, *others : String)","args_html":"(first : String, *others : String)","location":{"filename":"src/commands/set.cr","line_number":32,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/set.cr#L32"},"def":{"name":"sinter","args":[{"name":"first","external_name":"first","restriction":"String"},{"name":"others","external_name":"others","restriction":"String"}],"splat_index":1,"visibility":"Public","body":"run({\"sinter\", first} + others)"}},{"html_id":"sismember(key:String,value:String)-instance-method","name":"sismember","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"value","external_name":"value","restriction":"String"}],"args_string":"(key : String, value : String)","args_html":"(key : String, value : String)","location":{"filename":"src/commands/set.cr","line_number":6,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/set.cr#L6"},"def":{"name":"sismember","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"value","external_name":"value","restriction":"String"}],"visibility":"Public","body":"run({\"sismember\", key, value})"}},{"html_id":"smembers(key:String)-instance-method","name":"smembers","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands/set.cr","line_number":10,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/set.cr#L10"},"def":{"name":"smembers","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"smembers\", key})"}},{"html_id":"srem(key:String,members:Enumerable(String))-instance-method","name":"srem","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"members","external_name":"members","restriction":"Enumerable(String)"}],"args_string":"(key : String, members : Enumerable(String))","args_html":"(key : String, members : Enumerable(String))","location":{"filename":"src/commands/set.cr","line_number":18,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/set.cr#L18"},"def":{"name":"srem","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"members","external_name":"members","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + members.size)\n(command << \"srem\") << key\nmembers.each do |member|\n command << member\nend\nrun(command)\n"}},{"html_id":"srem(key:String,*values:String)-instance-method","name":"srem","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"String"}],"args_string":"(key : String, *values : String)","args_html":"(key : String, *values : String)","location":{"filename":"src/commands/set.cr","line_number":14,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/set.cr#L14"},"def":{"name":"srem","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"String"}],"splat_index":1,"visibility":"Public","body":"run({\"srem\", key} + values)"}}]},{"html_id":"redis/Redis/Commands/SortedSet","path":"Redis/Commands/SortedSet.html","kind":"module","full_name":"Redis::Commands::SortedSet","name":"SortedSet","abstract":false,"locations":[{"filename":"src/commands/sorted_set.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/sorted_set.cr#L1"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"namespace":{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},"instance_methods":[{"html_id":"zadd(key:String,score:String|Int64,value:String)-instance-method","name":"zadd","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"score","external_name":"score","restriction":"String | Int64"},{"name":"value","external_name":"value","restriction":"String"}],"args_string":"(key : String, score : String | Int64, value : String)","args_html":"(key : String, score : String | Int64, value : String)","location":{"filename":"src/commands/sorted_set.cr","line_number":42,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/sorted_set.cr#L42"},"def":{"name":"zadd","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"score","external_name":"score","restriction":"String | Int64"},{"name":"value","external_name":"value","restriction":"String"}],"visibility":"Public","body":"run({\"zadd\", key, score.to_s, value})"}},{"html_id":"zadd(key:String,values:Enumerable(String))-instance-method","name":"zadd","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"Enumerable(String)"}],"args_string":"(key : String, values : Enumerable(String))","args_html":"(key : String, values : Enumerable(String))","location":{"filename":"src/commands/sorted_set.cr","line_number":46,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/sorted_set.cr#L46"},"def":{"name":"zadd","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + values.size)\n(command << \"zadd\") << key\nvalues.each do |value|\n command << value\nend\nrun(command)\n"}},{"html_id":"zcard(key:String)-instance-method","name":"zcard","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands/sorted_set.cr","line_number":2,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/sorted_set.cr#L2"},"def":{"name":"zcard","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"zcard\", key})"}},{"html_id":"zcount(key:String,min:String,max:String)-instance-method","name":"zcount","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"min","external_name":"min","restriction":"String"},{"name":"max","external_name":"max","restriction":"String"}],"args_string":"(key : String, min : String, max : String)","args_html":"(key : String, min : String, max : String)","location":{"filename":"src/commands/sorted_set.cr","line_number":70,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/sorted_set.cr#L70"},"def":{"name":"zcount","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"min","external_name":"min","restriction":"String"},{"name":"max","external_name":"max","restriction":"String"}],"visibility":"Public","body":"run({\"zcount\", key, min, max})"}},{"html_id":"zrange(key:String,starting:String|Int64,ending:String|Int64,with_scores:Bool=false)-instance-method","name":"zrange","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"starting","external_name":"starting","restriction":"String | Int64"},{"name":"ending","external_name":"ending","restriction":"String | Int64"},{"name":"with_scores","default_value":"false","external_name":"with_scores","restriction":"Bool"}],"args_string":"(key : String, starting : String | Int64, ending : String | Int64, with_scores : Bool = false)","args_html":"(key : String, starting : String | Int64, ending : String | Int64, with_scores : Bool = false)","location":{"filename":"src/commands/sorted_set.cr","line_number":15,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/sorted_set.cr#L15"},"def":{"name":"zrange","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"starting","external_name":"starting","restriction":"String | Int64"},{"name":"ending","external_name":"ending","restriction":"String | Int64"},{"name":"with_scores","default_value":"false","external_name":"with_scores","restriction":"Bool"}],"visibility":"Public","body":"command = {\"zrange\", key, starting.to_s, ending.to_s}\nif with_scores\n command = command + {\"withscores\"}\nend\nrun(command)\n"}},{"html_id":"zrangebyscore(key:String,low:String|Int64,high:String|Int64,limit:Enumerable(String)|Nil=nil)-instance-method","name":"zrangebyscore","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"low","external_name":"low","restriction":"String | Int64"},{"name":"high","external_name":"high","restriction":"String | Int64"},{"name":"limit","default_value":"nil","external_name":"limit","restriction":"Enumerable(String) | ::Nil"}],"args_string":"(key : String, low : String | Int64, high : String | Int64, limit : Enumerable(String) | Nil = nil)","args_html":"(key : String, low : String | Int64, high : String | Int64, limit : Enumerable(String) | Nil = nil)","location":{"filename":"src/commands/sorted_set.cr","line_number":24,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/sorted_set.cr#L24"},"def":{"name":"zrangebyscore","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"low","external_name":"low","restriction":"String | Int64"},{"name":"high","external_name":"high","restriction":"String | Int64"},{"name":"limit","default_value":"nil","external_name":"limit","restriction":"Enumerable(String) | ::Nil"}],"visibility":"Public","body":"command = {\"zrangebyscore\", key, low.to_s, high.to_s}\nif limit\n command = command + {\"limit\", limit[0], limit[1]}\nend\nrun(command)\n"}},{"html_id":"zrem(key:String,value:String)-instance-method","name":"zrem","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"value","external_name":"value","restriction":"String"}],"args_string":"(key : String, value : String)","args_html":"(key : String, value : String)","location":{"filename":"src/commands/sorted_set.cr","line_number":54,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/sorted_set.cr#L54"},"def":{"name":"zrem","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"value","external_name":"value","restriction":"String"}],"visibility":"Public","body":"run({\"zrem\", key, value})"}},{"html_id":"zrem(key:String,values:Enumerable(String))-instance-method","name":"zrem","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"Enumerable(String)"}],"args_string":"(key : String, values : Enumerable(String))","args_html":"(key : String, values : Enumerable(String))","location":{"filename":"src/commands/sorted_set.cr","line_number":62,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/sorted_set.cr#L62"},"def":{"name":"zrem","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + values.size)\n(command << \"zrem\") << key\nvalues.each do |value|\n command << (value.as(String))\nend\nrun(command)\n"}},{"html_id":"zrem(key:String,*values:String)-instance-method","name":"zrem","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"String"}],"args_string":"(key : String, *values : String)","args_html":"(key : String, *values : String)","location":{"filename":"src/commands/sorted_set.cr","line_number":58,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/sorted_set.cr#L58"},"def":{"name":"zrem","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"String"}],"splat_index":1,"visibility":"Public","body":"run({\"zrem\", key} + values)"}},{"html_id":"zremrangebyrank(key:String,low:Int64,high:Int64)-instance-method","name":"zremrangebyrank","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"low","external_name":"low","restriction":"Int64"},{"name":"high","external_name":"high","restriction":"Int64"}],"args_string":"(key : String, low : Int64, high : Int64)","args_html":"(key : String, low : Int64, high : Int64)","location":{"filename":"src/commands/sorted_set.cr","line_number":38,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/sorted_set.cr#L38"},"def":{"name":"zremrangebyrank","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"low","external_name":"low","restriction":"Int64"},{"name":"high","external_name":"high","restriction":"Int64"}],"visibility":"Public","body":"run({\"zremrangebyrank\", key, low.to_s, high.to_s})"}},{"html_id":"zremrangebyscore(key:String,low:String|Int64,high:String|Int64)-instance-method","name":"zremrangebyscore","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"low","external_name":"low","restriction":"String | Int64"},{"name":"high","external_name":"high","restriction":"String | Int64"}],"args_string":"(key : String, low : String | Int64, high : String | Int64)","args_html":"(key : String, low : String | Int64, high : String | Int64)","location":{"filename":"src/commands/sorted_set.cr","line_number":34,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/sorted_set.cr#L34"},"def":{"name":"zremrangebyscore","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"low","external_name":"low","restriction":"String | Int64"},{"name":"high","external_name":"high","restriction":"String | Int64"}],"visibility":"Public","body":"run({\"zremrangebyscore\", key, low.to_s, high.to_s})"}},{"html_id":"zrevrange(key:String,starting:String|Int64,ending:String|Int64,with_scores:Bool=false)-instance-method","name":"zrevrange","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"starting","external_name":"starting","restriction":"String | Int64"},{"name":"ending","external_name":"ending","restriction":"String | Int64"},{"name":"with_scores","default_value":"false","external_name":"with_scores","restriction":"Bool"}],"args_string":"(key : String, starting : String | Int64, ending : String | Int64, with_scores : Bool = false)","args_html":"(key : String, starting : String | Int64, ending : String | Int64, with_scores : Bool = false)","location":{"filename":"src/commands/sorted_set.cr","line_number":6,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/sorted_set.cr#L6"},"def":{"name":"zrevrange","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"starting","external_name":"starting","restriction":"String | Int64"},{"name":"ending","external_name":"ending","restriction":"String | Int64"},{"name":"with_scores","default_value":"false","external_name":"with_scores","restriction":"Bool"}],"visibility":"Public","body":"command = {\"zrevrange\", key, starting.to_s, ending.to_s}\nif with_scores\n command = command + {\"withscores\"}\nend\nrun(command)\n"}},{"html_id":"zscore(key:String,value:String)-instance-method","name":"zscore","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"value","external_name":"value","restriction":"String"}],"args_string":"(key : String, value : String)","args_html":"(key : String, value : String)","location":{"filename":"src/commands/sorted_set.cr","line_number":74,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/sorted_set.cr#L74"},"def":{"name":"zscore","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"value","external_name":"value","restriction":"String"}],"visibility":"Public","body":"run({\"zscore\", key, value})"}}]},{"html_id":"redis/Redis/Commands/Stream","path":"Redis/Commands/Stream.html","kind":"module","full_name":"Redis::Commands::Stream","name":"Stream","abstract":false,"locations":[{"filename":"src/commands/stream.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L1"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"namespace":{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},"instance_methods":[{"html_id":"xack(key:String,group:String,id:String)-instance-method","name":"xack","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"group","external_name":"group","restriction":"String"},{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(key : String, group : String, id : String)","args_html":"(key : String, group : String, id : String)","location":{"filename":"src/commands/stream.cr","line_number":249,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L249"},"def":{"name":"xack","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"group","external_name":"group","restriction":"String"},{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"run({\"xack\", key, group, id})"}},{"html_id":"xack(key:String,group:String,ids:Enumerable(String))-instance-method","name":"xack","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"group","external_name":"group","restriction":"String"},{"name":"ids","external_name":"ids","restriction":"Enumerable(String)"}],"args_string":"(key : String, group : String, ids : Enumerable(String))","args_html":"(key : String, group : String, ids : Enumerable(String))","location":{"filename":"src/commands/stream.cr","line_number":253,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L253"},"def":{"name":"xack","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"group","external_name":"group","restriction":"String"},{"name":"ids","external_name":"ids","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: ids.size + 3)\n((command << \"xack\") << key) << group\nids.each do |id|\n command << id\nend\nrun(command)\n"}},{"html_id":"xadd(key:String,id:String,maxlen,data:Hash(String,String))-instance-method","name":"xadd","doc":"Append an entry with the specified data to the stream with the given `key`\nand gives it the specified `id`. If the id is `\"*\"`, Redis will assign it\nan id of the form `\"#{Time.utc.to_unix_ms}-#{autoincrementing_index}\"`.\nIf `maxlen` is provided, Redis will trim the stream to the specified\nlength. If `maxlen` is of the form `~ 1000`, Redis will trim it to\n*approximately* that length, removing entries when it can do so\nefficiently. This method returns the `id` that Redis stores.\n\n```\nredis.xadd \"my-stream\", \"*\", {\"name\" => \"foo\", \"id\" => UUID.random.to_s}\n```","summary":"

    Append an entry with the specified data to the stream with the given key and gives it the specified id.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"id","external_name":"id","restriction":"String"},{"name":"maxlen","external_name":"maxlen","restriction":""},{"name":"data","external_name":"data","restriction":"Hash(String, String)"}],"args_string":"(key : String, id : String, maxlen, data : Hash(String, String))","args_html":"(key : String, id : String, maxlen, data : Hash(String, String))","location":{"filename":"src/commands/stream.cr","line_number":59,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L59"},"def":{"name":"xadd","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"id","external_name":"id","restriction":"String"},{"name":"maxlen","external_name":"maxlen","restriction":""},{"name":"data","external_name":"data","restriction":"Hash(String, String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: (data.size * 2) + 3)\n(command << \"xadd\") << key\nif maxlen\n (command << \"maxlen\") << maxlen\nend\ncommand << id\ndata.each do |key, value|\n (command << key) << value\nend\nrun(command)\n"}},{"html_id":"xadd(key:String,id:String,data:Hash(String,String))-instance-method","name":"xadd","doc":"Append an entry with the specified data to the stream with the given `key`\nand gives it the specified `id`. If the id is `\"*\"`, Redis will assign it\nan id of the form `\"#{Time.utc.to_unix_ms}-#{autoincrementing_index}\"`.\nIf `maxlen` is provided, Redis will trim the stream to the specified\nlength. If `maxlen` is of the form `~ 1000`, Redis will trim it to\n*approximately* that length, removing entries when it can do so\nefficiently. This method returns the `id` that Redis stores.\n\n```\nredis.xadd \"my-stream\", \"*\", {\"name\" => \"foo\", \"id\" => UUID.random.to_s}\n```","summary":"

    Append an entry with the specified data to the stream with the given key and gives it the specified id.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"id","external_name":"id","restriction":"String"},{"name":"data","external_name":"data","restriction":"Hash(String, String)"}],"args_string":"(key : String, id : String, data : Hash(String, String))","args_html":"(key : String, id : String, data : Hash(String, String))","location":{"filename":"src/commands/stream.cr","line_number":44,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L44"},"def":{"name":"xadd","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"id","external_name":"id","restriction":"String"},{"name":"data","external_name":"data","restriction":"Hash(String, String)"}],"visibility":"Public","body":"xadd(key, id, maxlen: nil, data: data)"}},{"html_id":"xadd(key:String,id:String,maxlen=nil,**data)-instance-method","name":"xadd","doc":"Append an entry with the specified data to the stream with the given `key`\nand gives it the specified `id`. If the id is `\"*\"`, Redis will assign it\nan id of the form `\"#{Time.utc.to_unix_ms}-#{autoincrementing_index}\"`.\nIf `maxlen` is provided, Redis will trim the stream to the specified\nlength. If `maxlen` is of the form `~ 1000`, Redis will trim it to\n*approximately* that length, removing entries when it can do so\nefficiently. This method returns the `id` that Redis stores.\n\n```\nredis.xadd \"my-stream\", \"*\", name: \"foo\", id: UUID.random.to_s\n```","summary":"

    Append an entry with the specified data to the stream with the given key and gives it the specified id.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"id","external_name":"id","restriction":"String"},{"name":"maxlen","default_value":"nil","external_name":"maxlen","restriction":""}],"args_string":"(key : String, id : String, maxlen = nil, **data)","args_html":"(key : String, id : String, maxlen = nil, **data)","location":{"filename":"src/commands/stream.cr","line_number":13,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L13"},"def":{"name":"xadd","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"id","external_name":"id","restriction":"String"},{"name":"maxlen","default_value":"nil","external_name":"maxlen","restriction":""}],"double_splat":{"name":"data","external_name":"data","restriction":""},"visibility":"Public","body":"command = Array(String).new(initial_capacity: (data.size * 2) + 6)\n(command << \"xadd\") << key\nif maxlen\n command << \"maxlen\"\n case maxlen\n when Tuple\n maxlen.each do |entry|\n command << entry\n end\n when String\n command << maxlen\n end\nend\ncommand << id\ndata.each do |key, value|\n (command << key.to_s) << value\nend\nrun(command)\n"}},{"html_id":"xautoclaim(key:String,group:String,consumer:String,min_idle_time:Time::Span,start:String,count:Int|String|Nil=nil)-instance-method","name":"xautoclaim","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"group","external_name":"group","restriction":"String"},{"name":"consumer","external_name":"consumer","restriction":"String"},{"name":"min_idle_time","external_name":"min_idle_time","restriction":"Time::Span"},{"name":"start","external_name":"start","restriction":"String"},{"name":"count","default_value":"nil","external_name":"count","restriction":"Int | String | Nil"}],"args_string":"(key : String, group : String, consumer : String, min_idle_time : Time::Span, start : String, count : Int | String | Nil = nil)","args_html":"(key : String, group : String, consumer : String, min_idle_time : Time::Span, start : String, count : Int | String | Nil = nil)","location":{"filename":"src/commands/stream.cr","line_number":261,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L261"},"def":{"name":"xautoclaim","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"group","external_name":"group","restriction":"String"},{"name":"consumer","external_name":"consumer","restriction":"String"},{"name":"min_idle_time","external_name":"min_idle_time","restriction":"Time::Span"},{"name":"start","external_name":"start","restriction":"String"},{"name":"count","default_value":"nil","external_name":"count","restriction":"Int | String | Nil"}],"visibility":"Public","body":"min_idle_time = min_idle_time.total_milliseconds.to_i.to_s\ncommand = {\"xautoclaim\", key, group, consumer, min_idle_time, start}\nif count\n command = command + {\"count\", count.to_s}\nend\nrun(command)\n"}},{"html_id":"xdel(key:String,ids:Enumerable(String))-instance-method","name":"xdel","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"ids","external_name":"ids","restriction":"Enumerable(String)"}],"args_string":"(key : String, ids : Enumerable(String))","args_html":"(key : String, ids : Enumerable(String))","location":{"filename":"src/commands/stream.cr","line_number":75,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L75"},"def":{"name":"xdel","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"ids","external_name":"ids","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + ids.size)\n(command << \"xdel\") << key\nids.each do |id|\n command << id\nend\nrun(command)\n"}},{"html_id":"xdel(key:String,*ids:String)-instance-method","name":"xdel","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"ids","external_name":"ids","restriction":"String"}],"args_string":"(key : String, *ids : String)","args_html":"(key : String, *ids : String)","location":{"filename":"src/commands/stream.cr","line_number":71,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L71"},"def":{"name":"xdel","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"ids","external_name":"ids","restriction":"String"}],"splat_index":1,"visibility":"Public","body":"xdel(key, ids)"}},{"html_id":"xgroup(command:String,key:String,groupname:String)-instance-method","name":"xgroup","doc":"Run a Redis XGROUP subcommand for a given stream. See the [XGROUP command in the Redis documentation](https://redis.io/commands/xgroup) for more information.\n\n```\nredis.xgroup \"DESTROY\", \"my-stream\", \"my-group\"\n```","summary":"

    Run a Redis XGROUP subcommand for a given stream.

    ","abstract":false,"args":[{"name":"command","external_name":"command","restriction":"String"},{"name":"key","external_name":"key","restriction":"String"},{"name":"groupname","external_name":"groupname","restriction":"String"}],"args_string":"(command : String, key : String, groupname : String)","args_html":"(command : String, key : String, groupname : String)","location":{"filename":"src/commands/stream.cr","line_number":135,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L135"},"def":{"name":"xgroup","args":[{"name":"command","external_name":"command","restriction":"String"},{"name":"key","external_name":"key","restriction":"String"},{"name":"groupname","external_name":"groupname","restriction":"String"}],"visibility":"Public","body":"run({\"xgroup\", command, key, groupname})"}},{"html_id":"xgroup(command:XGroup,key:String,groupname:String,*,id:String|Nil=nil,mkstream=false,consumer_name:String|Nil=nil)-instance-method","name":"xgroup","doc":"Run a Redis XGROUP subcommand for a given stream. See the [XGROUP command in the Redis documentation](https://redis.io/commands/xgroup) for more information.\n\n```\nredis.xgroup :create, \"my-stream\", \"my-group\", mkstream: true\n```","summary":"

    Run a Redis XGROUP subcommand for a given stream.

    ","abstract":false,"args":[{"name":"command","external_name":"command","restriction":"XGroup"},{"name":"key","external_name":"key","restriction":"String"},{"name":"groupname","external_name":"groupname","restriction":"String"},{"name":"","external_name":"","restriction":""},{"name":"id","default_value":"nil","external_name":"id","restriction":"String | ::Nil"},{"name":"mkstream","default_value":"false","external_name":"mkstream","restriction":""},{"name":"consumer_name","default_value":"nil","external_name":"consumer_name","restriction":"String | ::Nil"}],"args_string":"(command : XGroup, key : String, groupname : String, *, id : String | Nil = nil, mkstream = false, consumer_name : String | Nil = nil)","args_html":"(command : XGroup, key : String, groupname : String, *, id : String | Nil = nil, mkstream = false, consumer_name : String | Nil = nil)","location":{"filename":"src/commands/stream.cr","line_number":113,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L113"},"def":{"name":"xgroup","args":[{"name":"command","external_name":"command","restriction":"XGroup"},{"name":"key","external_name":"key","restriction":"String"},{"name":"groupname","external_name":"groupname","restriction":"String"},{"name":"","external_name":"","restriction":""},{"name":"id","default_value":"nil","external_name":"id","restriction":"String | ::Nil"},{"name":"mkstream","default_value":"false","external_name":"mkstream","restriction":""},{"name":"consumer_name","default_value":"nil","external_name":"consumer_name","restriction":"String | ::Nil"}],"splat_index":3,"visibility":"Public","body":"cmd = Array(String).new(initial_capacity: 7)\n(((cmd << \"xgroup\") << command.to_s) << key) << groupname\nif id\n cmd << id\nend\nif mkstream\n cmd << \"mkstream\"\nend\nif consumer_name\n cmd << consumer_name\nend\nrun(cmd)\n"}},{"html_id":"xgroup(command:String,key:String,groupname:String,*args:String)-instance-method","name":"xgroup","doc":"Run a Redis XGROUP subcommand for a given stream. See the [XGROUP command in the Redis documentation](https://redis.io/commands/xgroup) for more information.\n\n```\nredis.xgroup \"CREATE\", \"my-stream\", \"my-group\", \"0\"\n```","summary":"

    Run a Redis XGROUP subcommand for a given stream.

    ","abstract":false,"args":[{"name":"command","external_name":"command","restriction":"String"},{"name":"key","external_name":"key","restriction":"String"},{"name":"groupname","external_name":"groupname","restriction":"String"},{"name":"args","external_name":"args","restriction":"String"}],"args_string":"(command : String, key : String, groupname : String, *args : String)","args_html":"(command : String, key : String, groupname : String, *args : String)","location":{"filename":"src/commands/stream.cr","line_number":144,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L144"},"def":{"name":"xgroup","args":[{"name":"command","external_name":"command","restriction":"String"},{"name":"key","external_name":"key","restriction":"String"},{"name":"groupname","external_name":"groupname","restriction":"String"},{"name":"args","external_name":"args","restriction":"String"}],"splat_index":3,"visibility":"Public","body":"run({\"xgroup\", command, key, groupname} + args)"}},{"html_id":"xgroup_create(key:String,groupname:String,*,id:String=\"$\",mkstream=false)-instance-method","name":"xgroup_create","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"groupname","external_name":"groupname","restriction":"String"},{"name":"","external_name":"","restriction":""},{"name":"id","default_value":"\"$\"","external_name":"id","restriction":"String"},{"name":"mkstream","default_value":"false","external_name":"mkstream","restriction":""}],"args_string":"(key : String, groupname : String, *, id : String = \"$\", mkstream = false)","args_html":"(key : String, groupname : String, *, id : String = "$", mkstream = false)","location":{"filename":"src/commands/stream.cr","line_number":99,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L99"},"def":{"name":"xgroup_create","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"groupname","external_name":"groupname","restriction":"String"},{"name":"","external_name":"","restriction":""},{"name":"id","default_value":"\"$\"","external_name":"id","restriction":"String"},{"name":"mkstream","default_value":"false","external_name":"mkstream","restriction":""}],"splat_index":2,"visibility":"Public","body":"xgroup(XGroup::CREATE, key, groupname, id: id, mkstream: mkstream)"}},{"html_id":"xgroup_create_consumer(key:String,groupname:String,consumer_name:String)-instance-method","name":"xgroup_create_consumer","doc":"XGROUP CREATECONSUMER key groupname consumername","summary":"

    XGROUP CREATECONSUMER key groupname consumername

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"groupname","external_name":"groupname","restriction":"String"},{"name":"consumer_name","external_name":"consumer_name","restriction":"String"}],"args_string":"(key : String, groupname : String, consumer_name : String)","args_html":"(key : String, groupname : String, consumer_name : String)","location":{"filename":"src/commands/stream.cr","line_number":104,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L104"},"def":{"name":"xgroup_create_consumer","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"groupname","external_name":"groupname","restriction":"String"},{"name":"consumer_name","external_name":"consumer_name","restriction":"String"}],"visibility":"Public","body":"xgroup(XGroup::CREATECONSUMER, key, groupname, consumer_name: consumer_name)"}},{"html_id":"xlen(key:String)-instance-method","name":"xlen","doc":"Return the number of entries in the given stream","summary":"

    Return the number of entries in the given stream

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands/stream.cr","line_number":84,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L84"},"def":{"name":"xlen","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"xlen\", key})"}},{"html_id":"xpending(key:String,group:String,start:String,endfinish:String,count:String|Int,idle:String|Time::Span|Nil=nil)-instance-method","name":"xpending","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"group","external_name":"group","restriction":"String"},{"name":"start","external_name":"start","restriction":"String"},{"name":"finish","external_name":"end","restriction":"String"},{"name":"count","external_name":"count","restriction":"String | Int"},{"name":"idle","default_value":"nil","external_name":"idle","restriction":"String | Time::Span | Nil"}],"args_string":"(key : String, group : String, start : String, end finish : String, count : String | Int, idle : String | Time::Span | Nil = nil)","args_html":"(key : String, group : String, start : String, end finish : String, count : String | Int, idle : String | Time::Span | Nil = nil)","location":{"filename":"src/commands/stream.cr","line_number":229,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L229"},"def":{"name":"xpending","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"group","external_name":"group","restriction":"String"},{"name":"start","external_name":"start","restriction":"String"},{"name":"finish","external_name":"end","restriction":"String"},{"name":"count","external_name":"count","restriction":"String | Int"},{"name":"idle","default_value":"nil","external_name":"idle","restriction":"String | Time::Span | Nil"}],"visibility":"Public","body":"command = {\"xpending\", key, group}\ncase idle\nwhen String\n command = command + {\"idle\", idle}\nwhen Time::Span\n command = command + {\"idle\", idle.total_milliseconds.to_i.to_s}\nend\ncommand = command + {start, finish, count.to_s}\nrun(command)\n"}},{"html_id":"xpending(key:String,group:String)-instance-method","name":"xpending","doc":"XPENDING key group [[IDLE min-idle-time] start end count [consumer]]","summary":"

    XPENDING key group [[IDLE min-idle-time] start end count [consumer]]

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"group","external_name":"group","restriction":"String"}],"args_string":"(key : String, group : String)","args_html":"(key : String, group : String)","location":{"filename":"src/commands/stream.cr","line_number":225,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L225"},"def":{"name":"xpending","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"group","external_name":"group","restriction":"String"}],"visibility":"Public","body":"run({\"xpending\", key, group})"}},{"html_id":"xrange(key:String,startmin,endmax,count=nil)-instance-method","name":"xrange","doc":"Return the entries in the given stream between the `start` and `end` ids.\nIf `count` is provided, Redis will return only that number of entries.","summary":"

    Return the entries in the given stream between the start and end ids.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"min","external_name":"start","restriction":""},{"name":"max","external_name":"end","restriction":""},{"name":"count","default_value":"nil","external_name":"count","restriction":""}],"args_string":"(key : String, start min, end max, count = nil)","args_html":"(key : String, start min, end max, count = nil)","location":{"filename":"src/commands/stream.cr","line_number":90,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L90"},"def":{"name":"xrange","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"min","external_name":"start","restriction":""},{"name":"max","external_name":"end","restriction":""},{"name":"count","default_value":"nil","external_name":"count","restriction":""}],"visibility":"Public","body":"command = {\"xrange\", key, min, max}\nif count\n command = command + {\"count\", count}\nend\nrun(command)\n"}},{"html_id":"xreadgroup(group:String,consumer:String,count:String|Int|Nil=nil,block:Time::Span|String|Int|Nil=nil,no_ack=false,streams:::Hash(String,String)={}ofString=>String)-instance-method","name":"xreadgroup","doc":"Execute an `XREADGROUP` command on the Redis server.\n\nThis is returned in its raw form from Redis, but you can pass it to a\n`Redis::Streaming::XReadGroupResponse` to make it easier to work with.","summary":"

    Execute an XREADGROUP command on the Redis server.

    ","abstract":false,"args":[{"name":"group","external_name":"group","restriction":"String"},{"name":"consumer","external_name":"consumer","restriction":"String"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"},{"name":"block","default_value":"nil","external_name":"block","restriction":"Time::Span | String | Int | Nil"},{"name":"no_ack","default_value":"false","external_name":"no_ack","restriction":""},{"name":"streams","default_value":"{} of String => String","external_name":"streams","restriction":"::Hash(String, String)"}],"args_string":"(group : String, consumer : String, count : String | Int | Nil = nil, block : Time::Span | String | Int | Nil = nil, no_ack = false, streams : ::Hash(String, String) = {} of String => String)","args_html":"(group : String, consumer : String, count : String | Int | Nil = nil, block : Time::Span | String | Int | Nil = nil, no_ack = false, streams : ::Hash(String, String) = {} of String => String)","location":{"filename":"src/commands/stream.cr","line_number":152,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L152"},"def":{"name":"xreadgroup","args":[{"name":"group","external_name":"group","restriction":"String"},{"name":"consumer","external_name":"consumer","restriction":"String"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"},{"name":"block","default_value":"nil","external_name":"block","restriction":"Time::Span | String | Int | Nil"},{"name":"no_ack","default_value":"false","external_name":"no_ack","restriction":""},{"name":"streams","default_value":"{} of String => String","external_name":"streams","restriction":"::Hash(String, String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 9 + (streams.size * 2))\n(((command << \"xreadgroup\") << \"group\") << group) << consumer\nif count\n (command << \"count\") << count.to_s\nend\ncase block\nin Time::Span\n (command << \"block\") << block.total_milliseconds.to_i.to_s\nin String\n (command << \"block\") << block\nin Int\n (command << \"block\") << block.to_s\nin Nil\nend\nif no_ack\n command << \"noack\"\nend\ncommand << \"streams\"\nstreams.each_key do |key|\n command << key\nend\nstreams.each_value do |value|\n command << value\nend\nrun(command)\n"}},{"html_id":"xreadgroup(group:String,consumer:String,count:String|Int|Nil=nil,block:Time::Span|String|Int|Nil=nil,no_ack=false,streams:NamedTuple=NamedTuple.new)-instance-method","name":"xreadgroup","doc":"Execute an `XREADGROUP` command on the Redis server. If `block` is not nil, the server will block for up to that much time (if you pass a number, it will be interpreted as milliseconds) until any new messages enter the stream.\n\nThis is returned in its raw form from Redis, but you can pass it to a\n`Redis::Streaming::XReadGroupResponse` to make it easier to work with.\n\n```\n# Long-poll for up to 10 messages from the stream with key `my_stream`,\n# blocking for up to 2 seconds if there are no messages waiting.\nresponse = redis.xreadgroup \"group\", \"consumer\",\n streams: {my_stream: \">\"},\n count: 10,\n block: 2.seconds\nresponse = Redis::Streaming::XReadGroupResponse.new(response)\n```","summary":"

    Execute an XREADGROUP command on the Redis server.

    ","abstract":false,"args":[{"name":"group","external_name":"group","restriction":"String"},{"name":"consumer","external_name":"consumer","restriction":"String"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"},{"name":"block","default_value":"nil","external_name":"block","restriction":"Time::Span | String | Int | Nil"},{"name":"no_ack","default_value":"false","external_name":"no_ack","restriction":""},{"name":"streams","default_value":"NamedTuple.new","external_name":"streams","restriction":"NamedTuple"}],"args_string":"(group : String, consumer : String, count : String | Int | Nil = nil, block : Time::Span | String | Int | Nil = nil, no_ack = false, streams : NamedTuple = NamedTuple.new)","args_html":"(group : String, consumer : String, count : String | Int | Nil = nil, block : Time::Span | String | Int | Nil = nil, no_ack = false, streams : NamedTuple = NamedTuple.new)","location":{"filename":"src/commands/stream.cr","line_number":195,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L195"},"def":{"name":"xreadgroup","args":[{"name":"group","external_name":"group","restriction":"String"},{"name":"consumer","external_name":"consumer","restriction":"String"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"},{"name":"block","default_value":"nil","external_name":"block","restriction":"Time::Span | String | Int | Nil"},{"name":"no_ack","default_value":"false","external_name":"no_ack","restriction":""},{"name":"streams","default_value":"NamedTuple.new","external_name":"streams","restriction":"NamedTuple"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 9 + (streams.size * 2))\n(((command << \"xreadgroup\") << \"group\") << group) << consumer\nif count\n (command << \"count\") << count.to_s\nend\ncase block\nin Time::Span\n (command << \"block\") << block.total_milliseconds.to_i.to_s\nin String\n (command << \"block\") << block\nin Int\n (command << \"block\") << block.to_s\nin Nil\nend\nif no_ack\n command << \"noack\"\nend\ncommand << \"streams\"\nstreams.each_key do |key|\n command << key.to_s\nend\nstreams.each_value do |value|\n command << value\nend\nrun(command)\n"}}],"types":[{"html_id":"redis/Redis/Commands/Stream/XGroup","path":"Redis/Commands/Stream/XGroup.html","kind":"enum","full_name":"Redis::Commands::Stream::XGroup","name":"XGroup","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/commands/stream.cr","line_number":123,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L123"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"CREATE","name":"CREATE","value":"0"},{"id":"DESTROY","name":"DESTROY","value":"1"},{"id":"CREATECONSUMER","name":"CREATECONSUMER","value":"2"},{"id":"DELCONSUMER","name":"DELCONSUMER","value":"3"}],"namespace":{"html_id":"redis/Redis/Commands/Stream","kind":"module","full_name":"Redis::Commands::Stream","name":"Stream"},"instance_methods":[{"html_id":"create?-instance-method","name":"create?","abstract":false,"location":{"filename":"src/commands/stream.cr","line_number":124,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L124"},"def":{"name":"create?","visibility":"Public","body":"self == CREATE"}},{"html_id":"createconsumer?-instance-method","name":"createconsumer?","abstract":false,"location":{"filename":"src/commands/stream.cr","line_number":126,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L126"},"def":{"name":"createconsumer?","visibility":"Public","body":"self == CREATECONSUMER"}},{"html_id":"delconsumer?-instance-method","name":"delconsumer?","abstract":false,"location":{"filename":"src/commands/stream.cr","line_number":127,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L127"},"def":{"name":"delconsumer?","visibility":"Public","body":"self == DELCONSUMER"}},{"html_id":"destroy?-instance-method","name":"destroy?","abstract":false,"location":{"filename":"src/commands/stream.cr","line_number":125,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/commands/stream.cr#L125"},"def":{"name":"destroy?","visibility":"Public","body":"self == DESTROY"}}]}]}]},{"html_id":"redis/Redis/Connection","path":"Redis/Connection.html","kind":"class","full_name":"Redis::Connection","name":"Connection","abstract":false,"superclass":{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},{"html_id":"redis/Redis/Commands/Stream","kind":"module","full_name":"Redis::Commands::Stream","name":"Stream"},{"html_id":"redis/Redis/Commands/SortedSet","kind":"module","full_name":"Redis::Commands::SortedSet","name":"SortedSet"},{"html_id":"redis/Redis/Commands/Set","kind":"module","full_name":"Redis::Commands::Set","name":"Set"},{"html_id":"redis/Redis/Commands/List","kind":"module","full_name":"Redis::Commands::List","name":"List"},{"html_id":"redis/Redis/Commands/Hash","kind":"module","full_name":"Redis::Commands::Hash","name":"Hash"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/connection.cr","line_number":14,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L14"},{"filename":"src/graph.cr","line_number":502,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L502"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"doc":"The connection wraps the TCP connection to the Redis server.","summary":"

    The connection wraps the TCP connection to the Redis server.

    ","constructors":[{"html_id":"new(uri:URI=URI.parse(\"redis:///\"))-class-method","name":"new","doc":"We receive all connection information in the URI.\n\nSSL connections require specifying the `rediss://` scheme.\nPassword authentication uses the URI password.\nDB selection uses the URI path.","summary":"

    We receive all connection information in the URI.

    ","abstract":false,"args":[{"name":"uri","default_value":"URI.parse(\"redis:///\")","external_name":"uri","restriction":"::URI"}],"args_string":"(uri : URI = URI.parse(\"redis:///\"))","args_html":"(uri : URI = URI.parse("redis:///"))","location":{"filename":"src/connection.cr","line_number":27,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L27"},"def":{"name":"new","args":[{"name":"uri","default_value":"URI.parse(\"redis:///\")","external_name":"uri","restriction":"::URI"}],"visibility":"Public","body":"_ = allocate\n_.initialize(uri)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"close-instance-method","name":"close","doc":"Close the connection to the server.","summary":"

    Close the connection to the server.

    ","abstract":false,"location":{"filename":"src/connection.cr","line_number":402,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L402"},"def":{"name":"close","visibility":"Public","body":"@socket.close"}},{"html_id":"encode(command)-instance-method","name":"encode","doc":"Send the given command over the wire without waiting for a reply. This is\nuseful for query pipelining or sending commands that have no return value.\n\nWARNING: Be careful with this because you can get the client out of sync\nwith the server. You should almost never have to use this, but it can be\nuseful if a command like this has not been implemented yet.","summary":"

    Send the given command over the wire without waiting for a reply.

    ","abstract":false,"args":[{"name":"command","external_name":"command","restriction":""}],"args_string":"(command)","args_html":"(command)","location":{"filename":"src/connection.cr","line_number":449,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L449"},"def":{"name":"encode","args":[{"name":"command","external_name":"command","restriction":""}],"visibility":"Public","body":"@writer.encode(command)"}},{"html_id":"flush-instance-method","name":"flush","doc":"Flush the connection buffer and make sure we've sent everything to the\nserver.","summary":"

    Flush the connection buffer and make sure we've sent everything to the server.

    ","abstract":false,"location":{"filename":"src/connection.cr","line_number":413,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L413"},"def":{"name":"flush","visibility":"Public","body":"@socket.flush"}},{"html_id":"hscan_each(key:String,matchpattern:String|Nil=nil,count:String|Int|Nil=nil,&):Nil-instance-method","name":"hscan_each","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"pattern","default_value":"nil","external_name":"match","restriction":"String | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"}],"args_string":"(key : String, match pattern : String | Nil = nil, count : String | Int | Nil = nil, &) : Nil","args_html":"(key : String, match pattern : String | Nil = nil, count : String | Int | Nil = nil, &) : Nil","location":{"filename":"src/connection.cr","line_number":388,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L388"},"def":{"name":"hscan_each","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"pattern","default_value":"nil","external_name":"match","restriction":"String | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"}],"yields":1,"block_arity":1,"return_type":"Nil","visibility":"Public","body":"cursor = \"\"\nwhile !(cursor == \"0\")\n response = hscan(key, cursor, match: pattern, count: count)\n cursor, results = response.as(Array)\n cursor = cursor.as(String)\n (results.as(Array)).each do |key|\n yield key.as(String)\n end\nend\n"}},{"html_id":"multi(retries=5,&)-instance-method","name":"multi","doc":"Execute a transaction within the server. The transaction is automatically\ncommitted at the end of the block or can be rolled back with\n`Transaction#discard`. Transactions are also rolled back if an exception\nis raised.\n\n```\nredis.multi do |redis|\n redis.set \"foo\", \"bar\"\n redis.incr \"counter\"\n raise \"Oops!\"\nend\n\nredis.get \"foo\" # => nil\nredis.get \"counter\" # => nil\n```","summary":"

    Execute a transaction within the server.

    ","abstract":false,"args":[{"name":"retries","default_value":"5","external_name":"retries","restriction":""}],"args_string":"(retries = 5, &)","args_html":"(retries = 5, &)","location":{"filename":"src/connection.cr","line_number":115,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L115"},"def":{"name":"multi","args":[{"name":"retries","default_value":"5","external_name":"retries","restriction":""}],"yields":1,"block_arity":1,"visibility":"Public","body":"loop do\n begin\n txn = Transaction.new(self)\n begin\n txn.start!\n yield txn\n if txn.discarded?\n return [] of Value\n else\n return txn.exec.as(Array)\n end\n rescue ex\n txn.discard\n raise(ex)\n end\n rescue ex : IO::Error\n if retries > 0\n retries = retries - 1\n initialize(@uri)\n else\n raise(ex)\n end\n end\nend"}},{"html_id":"pipeline(&)-instance-method","name":"pipeline","doc":"Execute a pipeline of commands. A pipeline sends all commands to the\nserver before reading any of the results.\n\n```\nredis.pipeline do |redis|\n redis.set \"foo\", \"bar\"\n redis.incr \"counter\"\nend\n```","summary":"

    Execute a pipeline of commands.

    ","abstract":false,"location":{"filename":"src/connection.cr","line_number":81,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L81"},"def":{"name":"pipeline","yields":1,"block_arity":1,"visibility":"Public","body":"pipeline = Pipeline.new(self)\nerror = nil\nbegin\n yield pipeline\nrescue ex\n error = ex\nend\nflush\nresult = pipeline.commit\nif error\n raise(error)\nelse\n result\nend\n"}},{"html_id":"psubscribe(*channels:String,&block:Subscription,self->)-instance-method","name":"psubscribe","doc":"Subscribe to the given pubsub channels. The block yields a subscription\nobject and the connection. You can setup `on_message`, `on_subscribe`,\nand `on_unsubscribe` on the subscription.\n\n```\nredis.subscribe \"channel1\", \"channel2\" do |subscription, connection|\n subscription.on_message do |channel, message|\n if message == \"unsubscribe\"\n connection.unsubscribe channel\n end\n\n # ...\n end\n\n # Respond to new subscribers\n subscription.on_subscribe do |channel, sub_count|\n connection.set \"sub_count:#{channel}\", sub_count.to_s\n end\n\n # Respond to losing subscribers\n subscription.on_unsubscribe do |channel, sub_count|\n connection.set \"sub_count:#{channel}\", sub_count.to_s\n end\nend\n```\n\nFor more information, see the documentation for:\n- [`SUBSCRIBE`](https://redis.io/commands/subscribe/)\n- [`PSUBSCRIBE`](https://redis.io/commands/psubscribe/)","summary":"

    Subscribe to the given pubsub channels.

    ","abstract":false,"args":[{"name":"channels","external_name":"channels","restriction":"String"}],"args_string":"(*channels : String, &block : Subscription, self -> )","args_html":"(*channels : String, &block : Subscription, self -> )","location":{"filename":"src/connection.cr","line_number":141,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L141"},"def":{"name":"psubscribe","args":[{"name":"channels","external_name":"channels","restriction":"String"}],"splat_index":0,"yields":2,"block_arity":2,"block_arg":{"name":"block","external_name":"block","restriction":"(Subscription, self ->)"},"visibility":"Public","body":"subscription = Subscription.new(self)\n@writer.encode({\"psubscribe\"} + channels)\nflush\nyield subscription, self\nsubscription.call\n"}},{"html_id":"punsubscribe(*channels:String)-instance-method","name":"punsubscribe","abstract":false,"args":[{"name":"channels","external_name":"channels","restriction":"String"}],"args_string":"(*channels : String)","args_html":"(*channels : String)","location":{"filename":"src/connection.cr","line_number":202,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L202"},"def":{"name":"punsubscribe","args":[{"name":"channels","external_name":"channels","restriction":"String"}],"splat_index":0,"visibility":"Public","body":"@writer.encode({\"punsubscribe\"} + channels)\nflush\n"}},{"html_id":"read-instance-method","name":"read","doc":"Read the next value from the server","summary":"

    Read the next value from the server

    ","abstract":false,"location":{"filename":"src/connection.cr","line_number":418,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L418"},"def":{"name":"read","visibility":"Public","body":"case value = @parser.read\nwhen Error\n raise(value)\nelse\n value\nend"}},{"html_id":"read?-instance-method","name":"read?","doc":"Read the next value from the server, returning `nil` if the connection is\nclosed.","summary":"

    Read the next value from the server, returning nil if the connection is closed.

    ","abstract":false,"location":{"filename":"src/connection.cr","line_number":429,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L429"},"def":{"name":"read?","visibility":"Public","body":"case value = @parser.read?\nwhen Error\n raise(value)\nelse\n value\nend"}},{"html_id":"readonly!:Nil-instance-method","name":"readonly!","doc":"Put this connection in a readonly state. This is typically used when\ntalking to replicas, and used automatically by `Cluster` for cluster\nreplicas.","summary":"

    Put this connection in a readonly state.

    ","abstract":false,"location":{"filename":"src/connection.cr","line_number":210,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L210"},"def":{"name":"readonly!","return_type":"Nil","visibility":"Public","body":"run({\"readonly\"})"}},{"html_id":"run(command,retries=5):Value-instance-method","name":"run","doc":"Execute the given command and return the result from the server. Commands must be an `Enumerable`.\n\n```\nrun({\"set\", \"foo\", \"bar\"})\n```","summary":"

    Execute the given command and return the result from the server.

    ","abstract":false,"args":[{"name":"command","external_name":"command","restriction":""},{"name":"retries","default_value":"5","external_name":"retries","restriction":""}],"args_string":"(command, retries = 5) : Value","args_html":"(command, retries = 5) : Value","location":{"filename":"src/connection.cr","line_number":351,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L351"},"def":{"name":"run","args":[{"name":"command","external_name":"command","restriction":""},{"name":"retries","default_value":"5","external_name":"retries","restriction":""}],"return_type":"Value","visibility":"Public","body":"start = Time.monotonic\nloop do\n begin\n @writer.encode(command)\n flush\n result = read\n LOG.debug(&.emit(\"redis\", command: command[0...2].join(' '), duration_ms: (Time.monotonic - start).total_milliseconds))\n return result\n rescue ex : IO::Error\n if retries > 0\n retries = retries - 1\n initialize(@uri)\n else\n raise(ex)\n end\n end\nend\n"}},{"html_id":"scan_each(matchpattern:String|Nil=nil,count:String|Int|Nil=nil,type:String|Nil=nil,&):Nil-instance-method","name":"scan_each","doc":"Iterate over keys that match the given pattern or all keys if no pattern\nis supplied, yielding each key to the block. This is a much more efficient\nway to iterate over keys than `keys.each` — it avoids loading every key in\nmemory at the same time and also doesn't block the Redis server while it\ngenerates the array of all those keys.","summary":"

    Iterate over keys that match the given pattern or all keys if no pattern is supplied, yielding each key to the block.

    ","abstract":false,"args":[{"name":"pattern","default_value":"nil","external_name":"match","restriction":"String | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"},{"name":"type","default_value":"nil","external_name":"type","restriction":"String | ::Nil"}],"args_string":"(match pattern : String | Nil = nil, count : String | Int | Nil = nil, type : String | Nil = nil, &) : Nil","args_html":"(match pattern : String | Nil = nil, count : String | Int | Nil = nil, type : String | Nil = nil, &) : Nil","location":{"filename":"src/connection.cr","line_number":375,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L375"},"def":{"name":"scan_each","args":[{"name":"pattern","default_value":"nil","external_name":"match","restriction":"String | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"},{"name":"type","default_value":"nil","external_name":"type","restriction":"String | ::Nil"}],"yields":1,"block_arity":1,"return_type":"Nil","visibility":"Public","body":"cursor = \"\"\nwhile !(cursor == \"0\")\n response = scan(cursor, match: pattern, count: count, type: type)\n cursor, results = response.as(Array)\n cursor = cursor.as(String)\n (results.as(Array)).each do |key|\n yield key.as(String)\n end\nend\n"}},{"html_id":"subscribe(*channels:String,&block:Subscription,self->)-instance-method","name":"subscribe","doc":"Subscribe to the given pubsub channels. The block yields a subscription\nobject and the connection. You can setup `on_message`, `on_subscribe`,\nand `on_unsubscribe` on the subscription.\n\n```\nredis.subscribe \"channel1\", \"channel2\" do |subscription, connection|\n subscription.on_message do |channel, message|\n if message == \"unsubscribe\"\n connection.unsubscribe channel\n end\n\n # ...\n end\n\n # Respond to new subscribers\n subscription.on_subscribe do |channel, sub_count|\n connection.set \"sub_count:#{channel}\", sub_count.to_s\n end\n\n # Respond to losing subscribers\n subscription.on_unsubscribe do |channel, sub_count|\n connection.set \"sub_count:#{channel}\", sub_count.to_s\n end\nend\n```\n\nFor more information, see the documentation for:\n- [`SUBSCRIBE`](https://redis.io/commands/subscribe/)\n- [`PSUBSCRIBE`](https://redis.io/commands/psubscribe/)","summary":"

    Subscribe to the given pubsub channels.

    ","abstract":false,"args":[{"name":"channels","external_name":"channels","restriction":"String"}],"args_string":"(*channels : String, &block : Subscription, self -> )","args_html":"(*channels : String, &block : Subscription, self -> )","location":{"filename":"src/connection.cr","line_number":141,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L141"},"def":{"name":"subscribe","args":[{"name":"channels","external_name":"channels","restriction":"String"}],"splat_index":0,"yields":2,"block_arity":2,"block_arg":{"name":"block","external_name":"block","restriction":"(Subscription, self ->)"},"visibility":"Public","body":"subscription = Subscription.new(self)\n@writer.encode({\"subscribe\"} + channels)\nflush\nyield subscription, self\nsubscription.call\n"}},{"html_id":"subscribe(*channels:String)-instance-method","name":"subscribe","doc":"Subscribe to the given channels without having to pass a block, which\nwould block execution. This is useful to run inside of other subscription\nblocks to add new subscriptions.","summary":"

    Subscribe to the given channels without having to pass a block, which would block execution.

    ","abstract":false,"args":[{"name":"channels","external_name":"channels","restriction":"String"}],"args_string":"(*channels : String)","args_html":"(*channels : String)","location":{"filename":"src/connection.cr","line_number":185,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L185"},"def":{"name":"subscribe","args":[{"name":"channels","external_name":"channels","restriction":"String"}],"splat_index":0,"visibility":"Public","body":"@writer.encode({\"subscribe\"} + channels)\nflush\n"}},{"html_id":"unsubscribe-instance-method","name":"unsubscribe","doc":"Unsubscribe this connection from all subscriptions.","summary":"

    Unsubscribe this connection from all subscriptions.

    ","abstract":false,"location":{"filename":"src/connection.cr","line_number":191,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L191"},"def":{"name":"unsubscribe","visibility":"Public","body":"@writer.encode({\"unsubscribe\"})\nflush\n"}},{"html_id":"unsubscribe(*channels:String)-instance-method","name":"unsubscribe","doc":"Unsubscribe this connection the given channels.","summary":"

    Unsubscribe this connection the given channels.

    ","abstract":false,"args":[{"name":"channels","external_name":"channels","restriction":"String"}],"args_string":"(*channels : String)","args_html":"(*channels : String)","location":{"filename":"src/connection.cr","line_number":197,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L197"},"def":{"name":"unsubscribe","args":[{"name":"channels","external_name":"channels","restriction":"String"}],"splat_index":0,"visibility":"Public","body":"@writer.encode({\"unsubscribe\"} + channels)\nflush\n"}},{"html_id":"url-instance-method","name":"url","doc":"The URI","summary":"

    The URI

    ","abstract":false,"location":{"filename":"src/connection.cr","line_number":439,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L439"},"def":{"name":"url","visibility":"Public","body":"@uri.to_s"}}],"macros":[{"html_id":"set_return_types!-macro","name":"set_return_types!","abstract":false,"location":{"filename":"src/connection.cr","line_number":232,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L232"},"def":{"name":"set_return_types!","visibility":"Public","body":" \n# When new commands are added to the Commands mixin, add an entry here to\n\n \n# make sure the return type is set when run directly on the connection.\n\n ::Redis::Connection.override_return_types(\n{\n keys: Array,\n del: Int64,\n unlink: Int64,\n ttl: Int64,\n pttl: Int64,\n script_load: String,\n\n \n# String commands\n\n append: Int64,\n decr: Int64,\n decrby: Int64,\n get: String?,\n getdel: String?,\n getex: String?,\n getrange: String,\n getset: String?,\n incr: Int64,\n incrby: Int64,\n incrbyfloat: String,\n mget: Array,\n mset: String,\n msetnx: Int64,\n psetex: String,\n set: String?,\n setex: String,\n setnx: Int64,\n setrange: Int64,\n strlen: Int64,\n substr: String,\n\n \n# List commands\n\n blmove: String?,\n blmpop: Array(Value)?,\n blpop: Array(Value)?,\n brpop: Array(Value)?,\n brpoplpush: String?,\n lindex: String?,\n linsert: Int64?,\n llen: Int64,\n lmove: String?,\n lmpop: Array(Value)?,\n lpop: String | Array(Value) | Nil,\n lpos: Int64 | Array(Value) | Nil,\n lpush: Int64,\n lpushx: Int64,\n lrange: Array,\n lrem: Int64,\n lset: String,\n ltrim: String,\n rpop: String?,\n rpoplpush: String?,\n rpush: Int64,\n rpushx: Int64,\n\n \n# Hash commands\n\n hdel: Int64,\n hexists: Int64,\n hget: String?,\n hgetall: Array,\n hincrby: Int64,\n hincrbyfloat: String,\n hkeys: Array,\n hlen: Int64,\n hmget: Array,\n hmset: String,\n hrandfield: String | Array(Value),\n hscan: Array,\n hset: Int64,\n hsetnx: Int64,\n hstrlen: Int64,\n hvals: Array,\n\n \n# Sets\n\n sadd: Int64,\n scard: Int64,\n sdiff: Array,\n sdiffstore: Int64,\n sinter: Array,\n sintercard: Int64,\n sinterstore: Int64,\n sismember: Int64,\n smembers: Array,\n smismember: Array,\n smove: Int64,\n spop: String | Array(Value) | Nil,\n srandmember: String | Array(Value) | Nil,\n srem: Int64,\n sscan: Array,\n sunion: Array,\n sunionstore: Int64,\n\n \n# Streams\n\n xack: Int64,\n xadd: String?,\n xautoclaim: Array,\n xclaim: Array,\n xdel: Int64,\n xgroup: String | Int64,\n xinfo: Array,\n xlen: Int64,\n xpending: Array,\n xrange: Array,\n xreadgroup: Array(Value)?,\n xrevrange: Array,\n xtrim: Int64,\n })\n \n"}}]},{"html_id":"redis/Redis/Error","path":"Redis/Error.html","kind":"class","full_name":"Redis::Error","name":"Error","abstract":false,"superclass":{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},"ancestors":[{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/errors.cr","line_number":4,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/errors.cr#L4"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"subclasses":[{"html_id":"redis/Redis/BusyGroup","kind":"class","full_name":"Redis::BusyGroup","name":"BusyGroup"},{"html_id":"redis/Redis/Cluster/Error","kind":"class","full_name":"Redis::Cluster::Error","name":"Error"},{"html_id":"redis/Redis/Graph/Error","kind":"class","full_name":"Redis::Graph::Error","name":"Error"},{"html_id":"redis/Redis/NoGroup","kind":"class","full_name":"Redis::NoGroup","name":"NoGroup"},{"html_id":"redis/Redis/Subscription/InvalidMessage","kind":"class","full_name":"Redis::Subscription::InvalidMessage","name":"InvalidMessage"}],"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"instance_methods":[{"html_id":"==(other:self)-instance-method","name":"==","doc":"Returns `true` if this reference is the same as *other*. Invokes `same?`.","summary":"

    Returns true if this reference is the same as other.

    ","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"self"}],"args_string":"(other : self)","args_html":"(other : self)","def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"self"}],"visibility":"Public","body":"if same?(other)\n return true\nend\ntrue\n"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"

    See Object#hash(hasher)

    ","abstract":false,"args":[{"name":"hasher","external_name":"hasher","restriction":""}],"args_string":"(hasher)","args_html":"(hasher)","def":{"name":"hash","args":[{"name":"hasher","external_name":"hasher","restriction":""}],"visibility":"Public","body":"hasher"}}],"macros":[{"html_id":"define(type,code=(name.gsub(/\\A.*::/,\"\")).upcase)-macro","name":"define","abstract":false,"args":[{"name":"type","external_name":"type","restriction":""},{"name":"code","default_value":"(name.gsub(/\\A.*::/, \"\")).upcase","external_name":"code","restriction":""}],"args_string":"(type, code = (name.gsub(/\\A.*::/, \"\")).upcase)","args_html":"(type, code = (name.gsub(/\\A.*::/, "")).upcase)","location":{"filename":"src/errors.cr","line_number":5,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/errors.cr#L5"},"def":{"name":"define","args":[{"name":"type","external_name":"type","restriction":""},{"name":"code","default_value":"(name.gsub(/\\A.*::/, \"\")).upcase","external_name":"code","restriction":""}],"visibility":"Public","body":" class \n{{ type }}\n < \n{{ @type }}\n\n \n{% if code != nil %}\n ERROR_MAP[{{ code }}] = self\n {% end %}\n\n \nend\n \n"}}]},{"html_id":"redis/Redis/FullText","path":"Redis/FullText.html","kind":"struct","full_name":"Redis::FullText(Runnable)","name":"FullText","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/search.cr","line_number":23,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L23"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"doc":"`Redis::FullText` wraps a `Redis::Client` or `Redis::Cluster` to execute\ncommands against a fulltext search index located on a given server.\n\n```\nredis = Redis::Client.new\nredis.ft.create <<-INDEX\n people-index ON HASH\n PREFIX 1 person:\n SCHEMA\n name TEXT NOSTEM SORTABLE\n email TEXT NOSTEM SORTABLE\n location GEO\nINDEX\n```\n\nIf your Redis server is running in Cluster mode, you can\n`require \"redis/cluster/search\"` to send read-only `FullText` commands to\nshard replicas.","summary":"

    Redis::FullText wraps a Redis::Client or Redis::Cluster to execute commands against a fulltext search index located on a given server.

    \n

    EXPERIMENTAL RediSearch support is still under development. Some APIs may change while details are discovered.

    ","instance_methods":[{"html_id":"create(string:String)-instance-method","name":"create","doc":"Create a search index using the syntax specified in the [RediSearch\n`FT.CREATE` docs](https://oss.redis.com/redisearch/Commands/#ftcreate).\n\n```\nredis = Redis::Client.new\nredis.ft.create <<-INDEX\n people-index ON HASH\n PREFIX 1 person:\n SCHEMA\n name TEXT NOSTEM SORTABLE\n email TEXT NOSTEM SORTABLE\n location GEO\nINDEX\n```\n\nNOTE: This method returns immediately, before the index is complete. You can run searches against an incomplete index, but you will also have incomplete results. To find how far along the index is, you can use the `info` method.\nTODO: Add a method that generates the string passed into this overload.","summary":"

    Create a search index using the syntax specified in the RediSearch FT.CREATE docs.

    ","abstract":false,"args":[{"name":"string","external_name":"string","restriction":"String"}],"args_string":"(string : String)","args_html":"(string : String)","location":{"filename":"src/search.cr","line_number":75,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L75"},"def":{"name":"create","args":[{"name":"string","external_name":"string","restriction":"String"}],"visibility":"Public","body":"command = [] of String\nstart = 0\nin_quotes = false\nstart.upto(string.size - 1) do |index|\n if string[index] == '\"'\n if in_quotes\n part = string[start...index].strip\n if part.empty?\n else\n command << part\n end\n in_quotes = false\n else\n in_quotes = true\n end\n start = index + 1\n else\n if (string[index].whitespace? && (!string[index - 1].whitespace?)) && (!in_quotes)\n part = part = string[start...index].strip\n if part.empty?\n else\n command << part\n end\n start = index + 1\n end\n end\nend\ncommand << string[start..-1]\n@redis.run([\"ft.create\"] + command)\n"}},{"html_id":"drop(index:String,keepdocs=false)-instance-method","name":"drop","doc":"Drop the specified `index`.","summary":"

    Drop the specified index.

    ","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"String"},{"name":"keepdocs","default_value":"false","external_name":"keepdocs","restriction":""}],"args_string":"(index : String, keepdocs = false)","args_html":"(index : String, keepdocs = false)","location":{"filename":"src/search.cr","line_number":308,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L308"},"def":{"name":"drop","args":[{"name":"index","external_name":"index","restriction":"String"},{"name":"keepdocs","default_value":"false","external_name":"keepdocs","restriction":""}],"visibility":"Public","body":"dropindex(index, keepdocs)"}},{"html_id":"dropindex(key:String,keepdocs=false)-instance-method","name":"dropindex","doc":"Drop the specified `index`.","summary":"

    Drop the specified index.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"keepdocs","default_value":"false","external_name":"keepdocs","restriction":""}],"args_string":"(key : String, keepdocs = false)","args_html":"(key : String, keepdocs = false)","location":{"filename":"src/search.cr","line_number":313,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L313"},"def":{"name":"dropindex","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"keepdocs","default_value":"false","external_name":"keepdocs","restriction":""}],"visibility":"Public","body":"command = [\"ft.dropindex\", key]\nif keepdocs\n command << \"keepdocs\"\nend\n@redis.run(command)\n"}},{"html_id":"info(index:String)-instance-method","name":"info","doc":"Get information about the search index contained in `index`. For more\ndetails, see [the `FT.INFO` documentation](https://oss.redis.com/redisearch/Commands/#ftinfo).","summary":"

    Get information about the search index contained in index.

    ","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"String"}],"args_string":"(index : String)","args_html":"(index : String)","location":{"filename":"src/search.cr","line_number":104,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L104"},"def":{"name":"info","args":[{"name":"index","external_name":"index","restriction":"String"}],"visibility":"Public","body":"@redis.run({\"ft.info\", index})"}},{"html_id":"profile(index:String,query:String)-instance-method","name":"profile","doc":"Profile the given search. For further details, see [the `FT.PROFILE`\ndocumentation](https://oss.redis.com/redisearch/Commands/#ftprofile).","summary":"

    Profile the given search.

    ","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"String"},{"name":"query","external_name":"query","restriction":"String"}],"args_string":"(index : String, query : String)","args_html":"(index : String, query : String)","location":{"filename":"src/search.cr","line_number":303,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L303"},"def":{"name":"profile","args":[{"name":"index","external_name":"index","restriction":"String"},{"name":"query","external_name":"query","restriction":"String"}],"visibility":"Public","body":"@redis.run({\"ft.profile\", index, \"search\", \"query\", query})"}},{"html_id":"search(index:String,query:String,nocontent=false,verbatim=false,nostopwords=false,withscores=false,withpayloads=false,withsortkeys=false,filter:Array(Filter)|Nil=nil,geofilter:GeoFilter|Nil=nil,inkeys:Array(String)|Nil=nil,infields:Array(String)|Nil=nil,returnreturn_value:Array(String)|Nil=nil,summarize:Summarize|Nil=nil,highlight:Highlight|Nil=nil,slop:Int|Nil=nil,timeout:Time::Span|Nil=nil,inorder:Bool|Nil=nil,language:String|Nil=nil,expander:String|Nil=nil,scorer:String|Nil=nil,explainscore:Bool|Nil=nil,payload:String|Bytes|Nil=nil,sortby:SortBy|Nil=nil,limit:Tuple(Int,Int)|Nil=nil,params:NamedTuple|Hash(String,String)|Nil=nil,dialect:Int|Nil=nil)-instance-method","name":"search","doc":"Run the specified `query` against `index`. Customize the search with various other arguments. For details about what each one does and the return value, see [the `FT.SEARCH`\ndocumentation](https://oss.redis.com/redisearch/Commands/#ftsearch).\n\n```\nresult = redis.ft.search \"people-index\", \"@name:Jamie\",\n return: %w[name email],\n sortby: Redis::FullText::SortBy.new(\"name\", :asc)\n```","summary":"

    Run the specified query against index.

    ","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"String"},{"name":"query","external_name":"query","restriction":"String"},{"name":"nocontent","default_value":"false","external_name":"nocontent","restriction":""},{"name":"verbatim","default_value":"false","external_name":"verbatim","restriction":""},{"name":"nostopwords","default_value":"false","external_name":"nostopwords","restriction":""},{"name":"withscores","default_value":"false","external_name":"withscores","restriction":""},{"name":"withpayloads","default_value":"false","external_name":"withpayloads","restriction":""},{"name":"withsortkeys","default_value":"false","external_name":"withsortkeys","restriction":""},{"name":"filter","default_value":"nil","external_name":"filter","restriction":"Array(Filter) | ::Nil"},{"name":"geofilter","default_value":"nil","external_name":"geofilter","restriction":"GeoFilter | ::Nil"},{"name":"inkeys","default_value":"nil","external_name":"inkeys","restriction":"Array(String) | ::Nil"},{"name":"infields","default_value":"nil","external_name":"infields","restriction":"Array(String) | ::Nil"},{"name":"return_value","default_value":"nil","external_name":"return","restriction":"Array(String) | ::Nil"},{"name":"summarize","default_value":"nil","external_name":"summarize","restriction":"Summarize | ::Nil"},{"name":"highlight","default_value":"nil","external_name":"highlight","restriction":"Highlight | ::Nil"},{"name":"slop","default_value":"nil","external_name":"slop","restriction":"Int | ::Nil"},{"name":"timeout","default_value":"nil","external_name":"timeout","restriction":"Time::Span | ::Nil"},{"name":"inorder","default_value":"nil","external_name":"inorder","restriction":"Bool | ::Nil"},{"name":"language","default_value":"nil","external_name":"language","restriction":"String | ::Nil"},{"name":"expander","default_value":"nil","external_name":"expander","restriction":"String | ::Nil"},{"name":"scorer","default_value":"nil","external_name":"scorer","restriction":"String | ::Nil"},{"name":"explainscore","default_value":"nil","external_name":"explainscore","restriction":"Bool | ::Nil"},{"name":"payload","default_value":"nil","external_name":"payload","restriction":"String | Bytes | Nil"},{"name":"sortby","default_value":"nil","external_name":"sortby","restriction":"SortBy | ::Nil"},{"name":"limit","default_value":"nil","external_name":"limit","restriction":"::Tuple(Int, Int) | ::Nil"},{"name":"params","default_value":"nil","external_name":"params","restriction":"NamedTuple | Hash(String, String) | Nil"},{"name":"dialect","default_value":"nil","external_name":"dialect","restriction":"Int | ::Nil"}],"args_string":"(index : String, query : String, nocontent = false, verbatim = false, nostopwords = false, withscores = false, withpayloads = false, withsortkeys = false, filter : Array(Filter) | Nil = nil, geofilter : GeoFilter | Nil = nil, inkeys : Array(String) | Nil = nil, infields : Array(String) | Nil = nil, return return_value : Array(String) | Nil = nil, summarize : Summarize | Nil = nil, highlight : Highlight | Nil = nil, slop : Int | Nil = nil, timeout : Time::Span | Nil = nil, inorder : Bool | Nil = nil, language : String | Nil = nil, expander : String | Nil = nil, scorer : String | Nil = nil, explainscore : Bool | Nil = nil, payload : String | Bytes | Nil = nil, sortby : SortBy | Nil = nil, limit : Tuple(Int, Int) | Nil = nil, params : NamedTuple | Hash(String, String) | Nil = nil, dialect : Int | Nil = nil)","args_html":"(index : String, query : String, nocontent = false, verbatim = false, nostopwords = false, withscores = false, withpayloads = false, withsortkeys = false, filter : Array(Filter) | Nil = nil, geofilter : GeoFilter | Nil = nil, inkeys : Array(String) | Nil = nil, infields : Array(String) | Nil = nil, return return_value : Array(String) | Nil = nil, summarize : Summarize | Nil = nil, highlight : Highlight | Nil = nil, slop : Int | Nil = nil, timeout : Time::Span | Nil = nil, inorder : Bool | Nil = nil, language : String | Nil = nil, expander : String | Nil = nil, scorer : String | Nil = nil, explainscore : Bool | Nil = nil, payload : String | Bytes | Nil = nil, sortby : SortBy | Nil = nil, limit : Tuple(Int, Int) | Nil = nil, params : NamedTuple | Hash(String, String) | Nil = nil, dialect : Int | Nil = nil)","location":{"filename":"src/search.cr","line_number":120,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L120"},"def":{"name":"search","args":[{"name":"index","external_name":"index","restriction":"String"},{"name":"query","external_name":"query","restriction":"String"},{"name":"nocontent","default_value":"false","external_name":"nocontent","restriction":""},{"name":"verbatim","default_value":"false","external_name":"verbatim","restriction":""},{"name":"nostopwords","default_value":"false","external_name":"nostopwords","restriction":""},{"name":"withscores","default_value":"false","external_name":"withscores","restriction":""},{"name":"withpayloads","default_value":"false","external_name":"withpayloads","restriction":""},{"name":"withsortkeys","default_value":"false","external_name":"withsortkeys","restriction":""},{"name":"filter","default_value":"nil","external_name":"filter","restriction":"Array(Filter) | ::Nil"},{"name":"geofilter","default_value":"nil","external_name":"geofilter","restriction":"GeoFilter | ::Nil"},{"name":"inkeys","default_value":"nil","external_name":"inkeys","restriction":"Array(String) | ::Nil"},{"name":"infields","default_value":"nil","external_name":"infields","restriction":"Array(String) | ::Nil"},{"name":"return_value","default_value":"nil","external_name":"return","restriction":"Array(String) | ::Nil"},{"name":"summarize","default_value":"nil","external_name":"summarize","restriction":"Summarize | ::Nil"},{"name":"highlight","default_value":"nil","external_name":"highlight","restriction":"Highlight | ::Nil"},{"name":"slop","default_value":"nil","external_name":"slop","restriction":"Int | ::Nil"},{"name":"timeout","default_value":"nil","external_name":"timeout","restriction":"Time::Span | ::Nil"},{"name":"inorder","default_value":"nil","external_name":"inorder","restriction":"Bool | ::Nil"},{"name":"language","default_value":"nil","external_name":"language","restriction":"String | ::Nil"},{"name":"expander","default_value":"nil","external_name":"expander","restriction":"String | ::Nil"},{"name":"scorer","default_value":"nil","external_name":"scorer","restriction":"String | ::Nil"},{"name":"explainscore","default_value":"nil","external_name":"explainscore","restriction":"Bool | ::Nil"},{"name":"payload","default_value":"nil","external_name":"payload","restriction":"String | Bytes | Nil"},{"name":"sortby","default_value":"nil","external_name":"sortby","restriction":"SortBy | ::Nil"},{"name":"limit","default_value":"nil","external_name":"limit","restriction":"::Tuple(Int, Int) | ::Nil"},{"name":"params","default_value":"nil","external_name":"params","restriction":"NamedTuple | Hash(String, String) | Nil"},{"name":"dialect","default_value":"nil","external_name":"dialect","restriction":"Int | ::Nil"}],"visibility":"Public","body":"command = Array(String).new((((((((((((((((((((((((((((((((1 + 1) + 1) + 1) + 1) + 1) + 1) + 4) + 6) + (inkeys.try(&.size) || 0)) + 1) + (infields.try(&.size) || 0)) + 1) + (return_value.try(&.size) || 0)) + 1) + (summarize.try(&.fields).try(&.size) || 0)) + 8) + (highlight.try(&.fields).try(&.size) || 0)) + 6) + 2) + 2) + 1) + 2) + 2) + 2) + 1) + 2) + 3) + 3) + 1) + (params.try do |params|\n params.size * 2\nend || 0)) + 2) + 0)\n((command << \"ft.search\") << index) << query\nif nocontent\n command << \"nocontent\"\nend\nif verbatim\n command << \"verbatim\"\nend\nif nostopwords\n command << \"nostopwords\"\nend\nif withscores\n command << \"withscores\"\nend\nif withpayloads\n command << \"withpayloads\"\nend\nif withsortkeys\n command << \"withsortkeys\"\nend\nif filter\n filter.each do |f|\n (((command << \"filter\") << f.field) << f.min) << f.max\n end\nend\nif geofilter\n (((((command << \"geofilter\") << geofilter.field) << geofilter.longitude.to_s) << geofilter.latitude.to_s) << geofilter.radius.to_s) << geofilter.unit.to_s.downcase\nend\nif inkeys\n command << \"inkeys\"\n command.concat(inkeys)\nend\nif infields\n command << \"infields\"\n command.concat(infields)\nend\nif return_value\n (command << \"return\") << return_value.size.to_s\n command.concat(return_value)\nend\nif summarize\n command << \"summarize\"\n if fields = summarize.fields\n (command << \"fields\") << fields.size.to_s\n command.concat(fields)\n end\n if frags = summarize.frags\n (command << \"frags\") << frags.to_s\n end\n if len = summarize.len\n (command << \"len\") << len.to_s\n end\n if separator = summarize.separator\n (command << \"separator\") << separator\n end\nend\nif highlight\n command << \"highlight\"\n if fields = highlight.fields\n field_names = fields\n (command << \"fields\") << fields.size.to_s\n if field_names\n command.concat(field_names)\n end\n end\n if tags = highlight.tags\n command << \"tags\"\n command.concat(tags)\n end\nend\nif slop\n (command << \"slop\") << slop.to_s\nend\nif inorder\n command << \"inorder\"\nend\nif language\n (command << \"language\") << language\nend\nif expander\n (command << \"expander\") << expander\nend\nif scorer\n (command << \"scorer\") << scorer\nend\nif explainscore\n command << \"explainscore\"\nend\ncase payload\nwhen String\n command << payload\nwhen Bytes\n command << (String.new(payload))\nend\nif sortby\n ((command << \"sortby\") << sortby.attribute) << sortby.direction.to_s\nend\nif limit\n command << \"limit\"\n command.concat(limit.map(&.to_s).to_a)\nend\nif params\n (command << \"params\") << (params.size * 2).to_s\n case params\n in NamedTuple\n params.each do |key, value|\n (command << key.to_s) << value.to_s\n end\n in Hash\n params.each do |__temp_65|\n key, value = __temp_65\n (command << key) << value\n end\n in Nil\n end\n dialect || (dialect = 2)\nend\nif dialect\n (command << \"dialect\") << dialect.to_s\nend\n(@redis.run(command)).as(Array)\n"}},{"html_id":"tagvals(index:String,field:String)-instance-method","name":"tagvals","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"String"},{"name":"field","external_name":"field","restriction":"String"}],"args_string":"(index : String, field : String)","args_html":"(index : String, field : String)","location":{"filename":"src/search.cr","line_number":108,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L108"},"def":{"name":"tagvals","args":[{"name":"index","external_name":"index","restriction":"String"},{"name":"field","external_name":"field","restriction":"String"}],"visibility":"Public","body":"@redis.run({\"ft.tagvals\", index, field})"}}],"types":[{"html_id":"redis/Redis/FullText/Filter","path":"Redis/FullText/Filter.html","kind":"struct","full_name":"Redis::FullText::Filter","name":"Filter","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/search.cr","line_number":320,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L320"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/FullText","kind":"struct","full_name":"Redis::FullText(Runnable)","name":"FullText"},"constructors":[{"html_id":"new(field:String,min:String,max:String)-class-method","name":"new","abstract":false,"args":[{"name":"field","external_name":"field","restriction":"String"},{"name":"min","external_name":"min","restriction":"String"},{"name":"max","external_name":"max","restriction":"String"}],"args_string":"(field : String, min : String, max : String)","args_html":"(field : String, min : String, max : String)","location":{"filename":"src/search.cr","line_number":320,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L320"},"def":{"name":"new","args":[{"name":"field","external_name":"field","restriction":"String"},{"name":"min","external_name":"min","restriction":"String"},{"name":"max","external_name":"max","restriction":"String"}],"visibility":"Public","body":"_ = allocate\n_.initialize(field, min, max)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}},{"html_id":"new(field:String,range:Range(B,E))forallB,E-class-method","name":"new","abstract":false,"args":[{"name":"field","external_name":"field","restriction":"String"},{"name":"range","external_name":"range","restriction":"Range(B, E)"}],"args_string":"(field : String, range : Range(B, E)) forall B, E","args_html":"(field : String, range : Range(B, E)) forall B, E","location":{"filename":"src/search.cr","line_number":321,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L321"},"def":{"name":"new","args":[{"name":"field","external_name":"field","restriction":"String"},{"name":"range","external_name":"range","restriction":"Range(B, E)"}],"visibility":"Public","body":"new(field, min: (range.begin || \"-inf\").to_s, max: (range.end || \"+inf\").to_s)"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/search.cr","line_number":320,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L320"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@field.clone, @min.clone, @max.clone)"}},{"html_id":"copy_with(field_field=@field,min_min=@min,max_max=@max)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_field","default_value":"@field","external_name":"field","restriction":""},{"name":"_min","default_value":"@min","external_name":"min","restriction":""},{"name":"_max","default_value":"@max","external_name":"max","restriction":""}],"args_string":"(field _field = @field, min _min = @min, max _max = @max)","args_html":"(field _field = @field, min _min = @min, max _max = @max)","location":{"filename":"src/search.cr","line_number":320,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L320"},"def":{"name":"copy_with","args":[{"name":"_field","default_value":"@field","external_name":"field","restriction":""},{"name":"_min","default_value":"@min","external_name":"min","restriction":""},{"name":"_max","default_value":"@max","external_name":"max","restriction":""}],"visibility":"Public","body":"self.class.new(_field, _min, _max)"}},{"html_id":"field:String-instance-method","name":"field","abstract":false,"def":{"name":"field","return_type":"String","visibility":"Public","body":"@field"}},{"html_id":"max:String-instance-method","name":"max","abstract":false,"def":{"name":"max","return_type":"String","visibility":"Public","body":"@max"}},{"html_id":"min:String-instance-method","name":"min","abstract":false,"def":{"name":"min","return_type":"String","visibility":"Public","body":"@min"}}]},{"html_id":"redis/Redis/FullText/GeoFilter","path":"Redis/FullText/GeoFilter.html","kind":"struct","full_name":"Redis::FullText::GeoFilter","name":"GeoFilter","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/search.cr","line_number":327,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L327"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/FullText","kind":"struct","full_name":"Redis::FullText(Runnable)","name":"FullText"},"constructors":[{"html_id":"new(field:String,longitude:Float64,latitude:Float64,radius:Int64|Float64,unit:GeoUnit)-class-method","name":"new","abstract":false,"args":[{"name":"field","external_name":"field","restriction":"String"},{"name":"longitude","external_name":"longitude","restriction":"Float64"},{"name":"latitude","external_name":"latitude","restriction":"Float64"},{"name":"radius","external_name":"radius","restriction":"Int64 | Float64"},{"name":"unit","external_name":"unit","restriction":"GeoUnit"}],"args_string":"(field : String, longitude : Float64, latitude : Float64, radius : Int64 | Float64, unit : GeoUnit)","args_html":"(field : String, longitude : Float64, latitude : Float64, radius : Int64 | Float64, unit : GeoUnit)","location":{"filename":"src/search.cr","line_number":327,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L327"},"def":{"name":"new","args":[{"name":"field","external_name":"field","restriction":"String"},{"name":"longitude","external_name":"longitude","restriction":"Float64"},{"name":"latitude","external_name":"latitude","restriction":"Float64"},{"name":"radius","external_name":"radius","restriction":"Int64 | Float64"},{"name":"unit","external_name":"unit","restriction":"GeoUnit"}],"visibility":"Public","body":"_ = allocate\n_.initialize(field, longitude, latitude, radius, unit)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/search.cr","line_number":327,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L327"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@field.clone, @longitude.clone, @latitude.clone, @radius.clone, @unit.clone)"}},{"html_id":"copy_with(field_field=@field,longitude_longitude=@longitude,latitude_latitude=@latitude,radius_radius=@radius,unit_unit=@unit)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_field","default_value":"@field","external_name":"field","restriction":""},{"name":"_longitude","default_value":"@longitude","external_name":"longitude","restriction":""},{"name":"_latitude","default_value":"@latitude","external_name":"latitude","restriction":""},{"name":"_radius","default_value":"@radius","external_name":"radius","restriction":""},{"name":"_unit","default_value":"@unit","external_name":"unit","restriction":""}],"args_string":"(field _field = @field, longitude _longitude = @longitude, latitude _latitude = @latitude, radius _radius = @radius, unit _unit = @unit)","args_html":"(field _field = @field, longitude _longitude = @longitude, latitude _latitude = @latitude, radius _radius = @radius, unit _unit = @unit)","location":{"filename":"src/search.cr","line_number":327,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L327"},"def":{"name":"copy_with","args":[{"name":"_field","default_value":"@field","external_name":"field","restriction":""},{"name":"_longitude","default_value":"@longitude","external_name":"longitude","restriction":""},{"name":"_latitude","default_value":"@latitude","external_name":"latitude","restriction":""},{"name":"_radius","default_value":"@radius","external_name":"radius","restriction":""},{"name":"_unit","default_value":"@unit","external_name":"unit","restriction":""}],"visibility":"Public","body":"self.class.new(_field, _longitude, _latitude, _radius, _unit)"}},{"html_id":"field:String-instance-method","name":"field","abstract":false,"def":{"name":"field","return_type":"String","visibility":"Public","body":"@field"}},{"html_id":"latitude:Float64-instance-method","name":"latitude","abstract":false,"def":{"name":"latitude","return_type":"Float64","visibility":"Public","body":"@latitude"}},{"html_id":"longitude:Float64-instance-method","name":"longitude","abstract":false,"def":{"name":"longitude","return_type":"Float64","visibility":"Public","body":"@longitude"}},{"html_id":"radius:Int64|Float64-instance-method","name":"radius","abstract":false,"def":{"name":"radius","return_type":"Int64 | Float64","visibility":"Public","body":"@radius"}},{"html_id":"unit:GeoUnit-instance-method","name":"unit","abstract":false,"def":{"name":"unit","return_type":"GeoUnit","visibility":"Public","body":"@unit"}}]},{"html_id":"redis/Redis/FullText/GeoUnit","path":"Redis/FullText/GeoUnit.html","kind":"enum","full_name":"Redis::FullText::GeoUnit","name":"GeoUnit","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/search.cr","line_number":45,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L45"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"M","name":"M","value":"0"},{"id":"KM","name":"KM","value":"1"},{"id":"MI","name":"MI","value":"2"},{"id":"FT","name":"FT","value":"3"}],"namespace":{"html_id":"redis/Redis/FullText","kind":"struct","full_name":"Redis::FullText(Runnable)","name":"FullText"},"doc":"Pass to the `search` method's `geofilter` argument to filter within the\nspecified range. For example, to search for pizza places within 25 miles\nof the Baltimore Ravens stadium:\n\n```\nredis.ft.search \"places-index\", \"pizza\",\n geofilter: {\"location\", -76.622400, 39.277751, 25, :mi}\n```","summary":"

    Pass to the search method's geofilter argument to filter within the specified range.

    ","instance_methods":[{"html_id":"ft?-instance-method","name":"ft?","abstract":false,"location":{"filename":"src/search.cr","line_number":49,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L49"},"def":{"name":"ft?","visibility":"Public","body":"self == FT"}},{"html_id":"km?-instance-method","name":"km?","abstract":false,"location":{"filename":"src/search.cr","line_number":47,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L47"},"def":{"name":"km?","visibility":"Public","body":"self == KM"}},{"html_id":"m?-instance-method","name":"m?","abstract":false,"location":{"filename":"src/search.cr","line_number":46,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L46"},"def":{"name":"m?","visibility":"Public","body":"self == M"}},{"html_id":"mi?-instance-method","name":"mi?","abstract":false,"location":{"filename":"src/search.cr","line_number":48,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L48"},"def":{"name":"mi?","visibility":"Public","body":"self == MI"}}]},{"html_id":"redis/Redis/FullText/Highlight","path":"Redis/FullText/Highlight.html","kind":"struct","full_name":"Redis::FullText::Highlight","name":"Highlight","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/search.cr","line_number":296,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L296"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/FullText","kind":"struct","full_name":"Redis::FullText(Runnable)","name":"FullText"},"constructors":[{"html_id":"new(fields:Array(String)|Nil=nil,tags:Tuple(String,String)|Nil=nil)-class-method","name":"new","abstract":false,"args":[{"name":"fields","default_value":"nil","external_name":"fields","restriction":"Array(String) | ::Nil"},{"name":"tags","default_value":"nil","external_name":"tags","restriction":"::Tuple(String, String) | ::Nil"}],"args_string":"(fields : Array(String) | Nil = nil, tags : Tuple(String, String) | Nil = nil)","args_html":"(fields : Array(String) | Nil = nil, tags : Tuple(String, String) | Nil = nil)","location":{"filename":"src/search.cr","line_number":296,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L296"},"def":{"name":"new","args":[{"name":"fields","default_value":"nil","external_name":"fields","restriction":"Array(String) | ::Nil"},{"name":"tags","default_value":"nil","external_name":"tags","restriction":"::Tuple(String, String) | ::Nil"}],"visibility":"Public","body":"_ = allocate\n_.initialize(fields, tags)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/search.cr","line_number":296,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L296"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@fields.clone, @tags.clone)"}},{"html_id":"copy_with(fields_fields=@fields,tags_tags=@tags)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_fields","default_value":"@fields","external_name":"fields","restriction":""},{"name":"_tags","default_value":"@tags","external_name":"tags","restriction":""}],"args_string":"(fields _fields = @fields, tags _tags = @tags)","args_html":"(fields _fields = @fields, tags _tags = @tags)","location":{"filename":"src/search.cr","line_number":296,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L296"},"def":{"name":"copy_with","args":[{"name":"_fields","default_value":"@fields","external_name":"fields","restriction":""},{"name":"_tags","default_value":"@tags","external_name":"tags","restriction":""}],"visibility":"Public","body":"self.class.new(_fields, _tags)"}},{"html_id":"fields:Array(String)|Nil-instance-method","name":"fields","abstract":false,"def":{"name":"fields","return_type":"Array(String) | ::Nil","visibility":"Public","body":"@fields"}},{"html_id":"tags:Tuple(String,String)|Nil-instance-method","name":"tags","abstract":false,"def":{"name":"tags","return_type":"::Tuple(String, String) | ::Nil","visibility":"Public","body":"@tags"}}]},{"html_id":"redis/Redis/FullText/SortBy","path":"Redis/FullText/SortBy.html","kind":"struct","full_name":"Redis::FullText::SortBy","name":"SortBy","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/search.cr","line_number":35,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L35"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/FullText","kind":"struct","full_name":"Redis::FullText(Runnable)","name":"FullText"},"doc":"Pass to the `search` method's `sortby` argument to sort the results on the\ngiven attribute.\n\n```\nredis.ft.search \"people-index\", \"@name:Jamie\",\n sortby: Redis::FullText::SortBy.new(\"name\", :asc)\n```","summary":"

    Pass to the search method's sortby argument to sort the results on the given attribute.

    ","constructors":[{"html_id":"new(attribute:String,direction:SortDirection=:asc)-class-method","name":"new","abstract":false,"args":[{"name":"attribute","external_name":"attribute","restriction":"String"},{"name":"direction","default_value":":asc","external_name":"direction","restriction":"SortDirection"}],"args_string":"(attribute : String, direction : SortDirection = :asc)","args_html":"(attribute : String, direction : SortDirection = :asc)","location":{"filename":"src/search.cr","line_number":35,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L35"},"def":{"name":"new","args":[{"name":"attribute","external_name":"attribute","restriction":"String"},{"name":"direction","default_value":":asc","external_name":"direction","restriction":"SortDirection"}],"visibility":"Public","body":"_ = allocate\n_.initialize(attribute, direction)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"attribute:String-instance-method","name":"attribute","abstract":false,"def":{"name":"attribute","return_type":"String","visibility":"Public","body":"@attribute"}},{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/search.cr","line_number":35,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L35"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@attribute.clone, @direction.clone)"}},{"html_id":"copy_with(attribute_attribute=@attribute,direction_direction=@direction)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_attribute","default_value":"@attribute","external_name":"attribute","restriction":""},{"name":"_direction","default_value":"@direction","external_name":"direction","restriction":""}],"args_string":"(attribute _attribute = @attribute, direction _direction = @direction)","args_html":"(attribute _attribute = @attribute, direction _direction = @direction)","location":{"filename":"src/search.cr","line_number":35,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L35"},"def":{"name":"copy_with","args":[{"name":"_attribute","default_value":"@attribute","external_name":"attribute","restriction":""},{"name":"_direction","default_value":"@direction","external_name":"direction","restriction":""}],"visibility":"Public","body":"self.class.new(_attribute, _direction)"}},{"html_id":"direction:SortDirection-instance-method","name":"direction","abstract":false,"def":{"name":"direction","return_type":"SortDirection","visibility":"Public","body":"@direction"}}]},{"html_id":"redis/Redis/FullText/SortDirection","path":"Redis/FullText/SortDirection.html","kind":"enum","full_name":"Redis::FullText::SortDirection","name":"SortDirection","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/search.cr","line_number":53,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L53"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"ASC","name":"ASC","value":"0"},{"id":"DESC","name":"DESC","value":"1"}],"namespace":{"html_id":"redis/Redis/FullText","kind":"struct","full_name":"Redis::FullText(Runnable)","name":"FullText"},"doc":"Pass to a `SortBy` constructor to specify a fulltext search sort direction.","summary":"

    Pass to a SortBy constructor to specify a fulltext search sort direction.

    ","instance_methods":[{"html_id":"asc?-instance-method","name":"asc?","abstract":false,"location":{"filename":"src/search.cr","line_number":54,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L54"},"def":{"name":"asc?","visibility":"Public","body":"self == ASC"}},{"html_id":"desc?-instance-method","name":"desc?","abstract":false,"location":{"filename":"src/search.cr","line_number":55,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L55"},"def":{"name":"desc?","visibility":"Public","body":"self == DESC"}}]},{"html_id":"redis/Redis/FullText/Summarize","path":"Redis/FullText/Summarize.html","kind":"struct","full_name":"Redis::FullText::Summarize","name":"Summarize","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/search.cr","line_number":289,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L289"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/FullText","kind":"struct","full_name":"Redis::FullText(Runnable)","name":"FullText"},"constructors":[{"html_id":"new(fields:Array(String)|Nil=nil,frags:Int32|Nil=nil,len:Int32|Nil=nil,separator:String|Nil=nil)-class-method","name":"new","abstract":false,"args":[{"name":"fields","default_value":"nil","external_name":"fields","restriction":"Array(String) | ::Nil"},{"name":"frags","default_value":"nil","external_name":"frags","restriction":"Int32 | ::Nil"},{"name":"len","default_value":"nil","external_name":"len","restriction":"Int32 | ::Nil"},{"name":"separator","default_value":"nil","external_name":"separator","restriction":"String | ::Nil"}],"args_string":"(fields : Array(String) | Nil = nil, frags : Int32 | Nil = nil, len : Int32 | Nil = nil, separator : String | Nil = nil)","args_html":"(fields : Array(String) | Nil = nil, frags : Int32 | Nil = nil, len : Int32 | Nil = nil, separator : String | Nil = nil)","location":{"filename":"src/search.cr","line_number":289,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L289"},"def":{"name":"new","args":[{"name":"fields","default_value":"nil","external_name":"fields","restriction":"Array(String) | ::Nil"},{"name":"frags","default_value":"nil","external_name":"frags","restriction":"Int32 | ::Nil"},{"name":"len","default_value":"nil","external_name":"len","restriction":"Int32 | ::Nil"},{"name":"separator","default_value":"nil","external_name":"separator","restriction":"String | ::Nil"}],"visibility":"Public","body":"_ = allocate\n_.initialize(fields, frags, len, separator)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/search.cr","line_number":289,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L289"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@fields.clone, @frags.clone, @len.clone, @separator.clone)"}},{"html_id":"copy_with(fields_fields=@fields,frags_frags=@frags,len_len=@len,separator_separator=@separator)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_fields","default_value":"@fields","external_name":"fields","restriction":""},{"name":"_frags","default_value":"@frags","external_name":"frags","restriction":""},{"name":"_len","default_value":"@len","external_name":"len","restriction":""},{"name":"_separator","default_value":"@separator","external_name":"separator","restriction":""}],"args_string":"(fields _fields = @fields, frags _frags = @frags, len _len = @len, separator _separator = @separator)","args_html":"(fields _fields = @fields, frags _frags = @frags, len _len = @len, separator _separator = @separator)","location":{"filename":"src/search.cr","line_number":289,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/search.cr#L289"},"def":{"name":"copy_with","args":[{"name":"_fields","default_value":"@fields","external_name":"fields","restriction":""},{"name":"_frags","default_value":"@frags","external_name":"frags","restriction":""},{"name":"_len","default_value":"@len","external_name":"len","restriction":""},{"name":"_separator","default_value":"@separator","external_name":"separator","restriction":""}],"visibility":"Public","body":"self.class.new(_fields, _frags, _len, _separator)"}},{"html_id":"fields:Array(String)|Nil-instance-method","name":"fields","abstract":false,"def":{"name":"fields","return_type":"Array(String) | ::Nil","visibility":"Public","body":"@fields"}},{"html_id":"frags:Int32|Nil-instance-method","name":"frags","abstract":false,"def":{"name":"frags","return_type":"Int32 | ::Nil","visibility":"Public","body":"@frags"}},{"html_id":"len:Int32|Nil-instance-method","name":"len","abstract":false,"def":{"name":"len","return_type":"Int32 | ::Nil","visibility":"Public","body":"@len"}},{"html_id":"separator:String|Nil-instance-method","name":"separator","abstract":false,"def":{"name":"separator","return_type":"String | ::Nil","visibility":"Public","body":"@separator"}}]}]},{"html_id":"redis/Redis/Future","path":"Redis/Future.html","kind":"class","full_name":"Redis::Future","name":"Future","abstract":false,"superclass":{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/pipeline.cr","line_number":33,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/pipeline.cr#L33"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"doc":"A `Redis::Future` is what pipelined commands return. They will be resolved\nwith the value of the command that spawned them.","summary":"

    A Redis::Future is what pipelined commands return.

    ","instance_methods":[{"html_id":"resolve(value:Value)-instance-method","name":"resolve","doc":"Resolves a Future with the supplied Redis::Value","summary":"

    Resolves a Future with the supplied Redis::Value

    ","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"Value"}],"args_string":"(value : Value)","args_html":"(value : Value)","location":{"filename":"src/pipeline.cr","line_number":38,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/pipeline.cr#L38"},"def":{"name":"resolve","args":[{"name":"value","external_name":"value","restriction":"Value"}],"visibility":"Public","body":"@resolved = true\n@value = value\n"}},{"html_id":"resolved?:Bool-instance-method","name":"resolved?","abstract":false,"location":{"filename":"src/pipeline.cr","line_number":35,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/pipeline.cr#L35"},"def":{"name":"resolved?","visibility":"Public","body":"@resolved"}},{"html_id":"value-instance-method","name":"value","doc":"Read the value contained in this Future after it is resolved. If this\nmethod is called before the Future is resolved, it will raise a\n`Redis::Future::NotResolved` exception.","summary":"

    Read the value contained in this Future after it is resolved.

    ","abstract":false,"location":{"filename":"src/pipeline.cr","line_number":46,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/pipeline.cr#L46"},"def":{"name":"value","visibility":"Public","body":"if resolved?\n @value\nelse\n raise(NotResolved.new(\"Attempted to get the value of an unresolved Redis::Future\"))\nend"}}],"types":[{"html_id":"redis/Redis/Future/NotResolved","path":"Redis/Future/NotResolved.html","kind":"class","full_name":"Redis::Future::NotResolved","name":"NotResolved","abstract":false,"superclass":{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},"ancestors":[{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/pipeline.cr","line_number":57,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/pipeline.cr#L57"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Future","kind":"class","full_name":"Redis::Future","name":"Future"},"doc":"A `Redis::Future::NotResolved` is raised when attempting to access the\nvalue of a `Future` that has not been resolved yet. For example, calling\n`pipeline.get(\"my-key\").value`.","summary":"

    A Redis::Future::NotResolved is raised when attempting to access the value of a Future that has not been resolved yet.

    "}]},{"html_id":"redis/Redis/Graph","path":"Redis/Graph.html","kind":"module","full_name":"Redis::Graph","name":"Graph","abstract":false,"locations":[{"filename":"src/graph.cr","line_number":52,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L52"},{"filename":"src/graph/serializable.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph/serializable.cr#L1"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"doc":"[RedisGraph](https://redis.io/docs/stack/graph/) is a graph database built\non top of Redis that you query using the [Cypher](https://opencypher.org)\nquery language.\n\nIf your Redis server is running RedisGraph (for example, using [Redis\nStack](https://redis.io/docs/stack/)), you can branch off of your existing\n`Redis::Client` using the `Redis::Client#graph` method:\n\n```\nrequire \"redis/graph\"\n\nstruct Person\n include Redis::Graph::Serializable::Node\n\n getter id : Int64\n getter name : String\nend\n\nredis = Redis::Client.new\n\n# Store the graph data in the Redis key \"my-graph\"\ngraph = redis.graph(key: \"my-graph\")\n\n# Create some data in our graph\ngraph.write_query <<-CYPHER, id: 123, name: \"Jamie\"\n CREATE (person:Person{id: $id, name: $name})\nCYPHER\n\n# The `return` argument specifies the return types of the results in your\n# Cypher query's `RETURN` clause\npp graph.read_query(<<-CYPHER, {id: 123}, return: {Person})\n MATCH (person:Person{id: $id})\n RETURN person\nCYPHER\n# => [{Person(\n# @id=123,\n# @name=\"Jamie\",\n# @node=\n# Redis::Graph::Serializable::Node::Metadata(@id=0, @labels=[\"Person\"]))}]\n```\n\nIn addition to basic Redis property types, `Redis::Graph::Serializable` types\nalso support `Bool`, `UUID`, and `Time`.","summary":"

    RedisGraph is a graph database built on top of Redis that you query using the Cypher query language.

    \n

    EXPERIMENTAL The Redis::Graph API is experimental and may be subject to change.

    ","types":[{"html_id":"redis/Redis/Graph/Client","path":"Redis/Graph/Client.html","kind":"struct","full_name":"Redis::Graph::Client(Runnable)","name":"Client","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph.cr","line_number":56,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L56"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"},"constructors":[{"html_id":"new(redis:Runnable,key:String)-class-method","name":"new","abstract":false,"args":[{"name":"redis","external_name":"redis","restriction":"Runnable"},{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(redis : Runnable, key : String)","args_html":"(redis : Runnable, key : String)","location":{"filename":"src/graph.cr","line_number":57,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L57"},"def":{"name":"new","args":[{"name":"redis","external_name":"redis","restriction":"Runnable"},{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"_ = Client(Runnable).allocate\n_.initialize(redis, key)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"multi(&)-instance-method","name":"multi","doc":"Execute a transaction within the given graph\n\n```\ngraph.multi do |txn|\n txn.write_query <<-CYPHER, team_id: 123\n MATCH (\n CYPHER\nend\n```","summary":"

    Execute a transaction within the given graph

    \n

    EXPERIMENTAL This method may be difficult to use, since it relies primarily on Redis::Client#multi, which is not graph-aware. It is currently intended primarily to roll back previous writes if others do not succeed when a single query is not feasible. This may be iterated on in the future.

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":165,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L165"},"def":{"name":"multi","yields":1,"block_arity":1,"visibility":"Public","body":"@redis.multi do |txn|\n yield Client.new(txn.@connection, @key)\nend"}},{"html_id":"read_query(cypher:String,params:NamedTuple|Hash,returntypes:Tuple(*T))forallT-instance-method","name":"read_query","doc":"Query the graph with the given Cypher query, passing in the given\nparams, and returning the given types corresponding to the values in\nyour Cypher `RETURN` clause.\n\n```\ngraph.read_query <<-CYPHER, {team_id: 123}, return: {Person}\n MATCH (team:Team{id: $team_id})\n MATCH (person)-[:MEMBER_OF]->(team)\n RETURN person\nCYPHER\n```","summary":"

    Query the graph with the given Cypher query, passing in the given params, and returning the given types corresponding to the values in your Cypher RETURN clause.

    ","abstract":false,"args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"params","external_name":"params","restriction":"NamedTuple | Hash"},{"name":"types","external_name":"return","restriction":"Tuple(*T)"}],"args_string":"(cypher : String, params : NamedTuple | Hash, return types : Tuple(*T)) forall T","args_html":"(cypher : String, params : NamedTuple | Hash, return types : Tuple(*T)) forall T","location":{"filename":"src/graph.cr","line_number":141,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L141"},"def":{"name":"read_query","args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"params","external_name":"params","restriction":"NamedTuple | Hash"},{"name":"types","external_name":"return","restriction":"Tuple(*T)"}],"visibility":"Public","body":"{% if true %}\n result = Result.new(@redis.run({\"GRAPH.RO_QUERY\", @key, build_query(cypher, params)}).as(Array))\n TypedResult({ {{ (T.type_vars.map(&.instance).join(\", \")).id }} }).new(result)\n {% end %}"}},{"html_id":"read_query(cypher:String,params:NamedTuple|Hash,returntype:T.class)forallT-instance-method","name":"read_query","abstract":false,"args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"params","external_name":"params","restriction":"NamedTuple | Hash"},{"name":"type","external_name":"return","restriction":"T.class"}],"args_string":"(cypher : String, params : NamedTuple | Hash, return type : T.class) forall T","args_html":"(cypher : String, params : NamedTuple | Hash, return type : T.class) forall T","location":{"filename":"src/graph.cr","line_number":148,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L148"},"def":{"name":"read_query","args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"params","external_name":"params","restriction":"NamedTuple | Hash"},{"name":"type","external_name":"return","restriction":"T.class"}],"visibility":"Public","body":"{% if true %}\n result = Result.new(@redis.run({\"GRAPH.RO_QUERY\", @key, build_query(cypher, params)}).as(Array))\n TypedResult({{ T.instance }}).new(result)\n {% end %}"}},{"html_id":"read_query(cypher:String,returntypes:Tuple(*T))forallT-instance-method","name":"read_query","abstract":false,"args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"types","external_name":"return","restriction":"Tuple(*T)"}],"args_string":"(cypher : String, return types : Tuple(*T)) forall T","args_html":"(cypher : String, return types : Tuple(*T)) forall T","location":{"filename":"src/graph.cr","line_number":126,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L126"},"def":{"name":"read_query","args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"types","external_name":"return","restriction":"Tuple(*T)"}],"visibility":"Public","body":"read_query(cypher, params: NamedTuple.new, return: types)"}},{"html_id":"read_query(cypher:String)-instance-method","name":"read_query","doc":"Query the graph with the given Cypher query.\n\n```\ngraph.read_query <<-CYPHER\n MATCH (person:Person)\n RETURN person\nCYPHER\n```","summary":"

    Query the graph with the given Cypher query.

    ","abstract":false,"args":[{"name":"cypher","external_name":"cypher","restriction":"String"}],"args_string":"(cypher : String)","args_html":"(cypher : String)","location":{"filename":"src/graph.cr","line_number":108,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L108"},"def":{"name":"read_query","args":[{"name":"cypher","external_name":"cypher","restriction":"String"}],"visibility":"Public","body":"Result.new((@redis.run({\"GRAPH.RO_QUERY\", @key, cypher})).as(Array))"}},{"html_id":"read_query(cypher:String,**params)-instance-method","name":"read_query","doc":"Query the graph with the given Cypher query, passing in the given\nparams.\n\n```\ngraph.read_query <<-CYPHER, team_id: 123\n MATCH (team:Team{id: $team_id})\n MATCH (person)-[membership:MEMBER_OF]->(team)\n RETURN person, membership, team\nCYPHER\n```","summary":"

    Query the graph with the given Cypher query, passing in the given params.

    ","abstract":false,"args":[{"name":"cypher","external_name":"cypher","restriction":"String"}],"args_string":"(cypher : String, **params)","args_html":"(cypher : String, **params)","location":{"filename":"src/graph.cr","line_number":122,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L122"},"def":{"name":"read_query","args":[{"name":"cypher","external_name":"cypher","restriction":"String"}],"double_splat":{"name":"params","external_name":"params","restriction":""},"visibility":"Public","body":"Result.new((@redis.run({\"GRAPH.RO_QUERY\", @key, build_query(cypher, params)})).as(Array))"}},{"html_id":"write_query(cypher:String,params:NamedTuple|Hash,returntypes:Tuple(*T))forallT-instance-method","name":"write_query","doc":"Write data to the graph using the given cypher query, passing in the\ngiven params and returning the given types for the values in your\nquery's `RETURN` clause.\n\n```\ngraph.write_query <<-CYPHER, {id: 123, now: Time.utc.to_unix_ms}, return: {Person}\n MATCH (person:Person{id: $id})\n SET person.confirmed_at = $now\n RETURN person\nCYPHER\n```","summary":"

    Write data to the graph using the given cypher query, passing in the given params and returning the given types for the values in your query's RETURN clause.

    ","abstract":false,"args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"params","external_name":"params","restriction":"NamedTuple | Hash"},{"name":"types","external_name":"return","restriction":"Tuple(*T)"}],"args_string":"(cypher : String, params : NamedTuple | Hash, return types : Tuple(*T)) forall T","args_html":"(cypher : String, params : NamedTuple | Hash, return types : Tuple(*T)) forall T","location":{"filename":"src/graph.cr","line_number":80,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L80"},"def":{"name":"write_query","args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"params","external_name":"params","restriction":"NamedTuple | Hash"},{"name":"types","external_name":"return","restriction":"Tuple(*T)"}],"visibility":"Public","body":"{% if true %}\n result = Result.new(@redis.run({\"GRAPH.QUERY\", @key, build_query(cypher, params)}).as(Array))\n TypedResult({ {{ (T.type_vars.map(&.instance).join(\", \")).id }} }).new(result)\n {% end %}"}},{"html_id":"write_query(cypher:String,params:NamedTuple|Hash,returntype:T.class)forallT-instance-method","name":"write_query","abstract":false,"args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"params","external_name":"params","restriction":"NamedTuple | Hash"},{"name":"type","external_name":"return","restriction":"T.class"}],"args_string":"(cypher : String, params : NamedTuple | Hash, return type : T.class) forall T","args_html":"(cypher : String, params : NamedTuple | Hash, return type : T.class) forall T","location":{"filename":"src/graph.cr","line_number":87,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L87"},"def":{"name":"write_query","args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"params","external_name":"params","restriction":"NamedTuple | Hash"},{"name":"type","external_name":"return","restriction":"T.class"}],"visibility":"Public","body":"{% if true %}\n result = Result.new(@redis.run({\"GRAPH.QUERY\", @key, build_query(cypher, params)}).as(Array))\n TypedResult({{ T.instance }}).new(result)\n {% end %}"}},{"html_id":"write_query(cypher:String)-instance-method","name":"write_query","doc":"Write data to this graph using the given Cypher query.\n\n```\ngraph.write_query \"MATCH (u:User{active: true}) SET u:ActiveUser, u.active = null\"\n```","summary":"

    Write data to this graph using the given Cypher query.

    ","abstract":false,"args":[{"name":"cypher","external_name":"cypher","restriction":"String"}],"args_string":"(cypher : String)","args_html":"(cypher : String)","location":{"filename":"src/graph.cr","line_number":65,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L65"},"def":{"name":"write_query","args":[{"name":"cypher","external_name":"cypher","restriction":"String"}],"visibility":"Public","body":"Result.new((@redis.run({\"GRAPH.QUERY\", @key, cypher})).as(Array))"}},{"html_id":"write_query(cypher:String,**params)-instance-method","name":"write_query","doc":"Write data to the graph using the given cypher query, passing in the\ngiven query parameters.","summary":"

    Write data to the graph using the given cypher query, passing in the given query parameters.

    ","abstract":false,"args":[{"name":"cypher","external_name":"cypher","restriction":"String"}],"args_string":"(cypher : String, **params)","args_html":"(cypher : String, **params)","location":{"filename":"src/graph.cr","line_number":96,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L96"},"def":{"name":"write_query","args":[{"name":"cypher","external_name":"cypher","restriction":"String"}],"double_splat":{"name":"params","external_name":"params","restriction":""},"visibility":"Public","body":"Result.new((@redis.run({\"GRAPH.QUERY\", @key, build_query(cypher, params)})).as(Array))"}}]},{"html_id":"redis/Redis/Graph/Error","path":"Redis/Graph/Error.html","kind":"class","full_name":"Redis::Graph::Error","name":"Error","abstract":false,"superclass":{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},"ancestors":[{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph.cr","line_number":53,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L53"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"}},{"html_id":"redis/Redis/Graph/List","path":"Redis/Graph/List.html","kind":"alias","full_name":"Redis::Graph::List","name":"List","abstract":false,"locations":[{"filename":"src/graph.cr","line_number":339,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L339"}],"repository_name":"redis","program":false,"enum":false,"alias":true,"aliased":"Array(Array(Array(Redis::Value) | Int64 | Redis::Error | Redis::Graph::Node | Redis::Graph::Relationship | String | Nil) | Array(Redis::Value) | Int64 | Redis::Error | Redis::Graph::Node | Redis::Graph::Relationship | String | Nil)","aliased_html":"Array(Array(Array(Redis::Value) | Int64 | Redis::Error | Redis::Graph::Node | Redis::Graph::Relationship | String | Nil) | Array(Redis::Value) | Int64 | Redis::Error | Redis::Graph::Node | Redis::Graph::Relationship | String | Nil)","const":false,"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"}},{"html_id":"redis/Redis/Graph/Map","path":"Redis/Graph/Map.html","kind":"alias","full_name":"Redis::Graph::Map","name":"Map","abstract":false,"locations":[{"filename":"src/graph.cr","line_number":340,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L340"}],"repository_name":"redis","program":false,"enum":false,"alias":true,"aliased":"Hash(String, Array(Redis::Value) | Int64 | Redis::Error | String | Nil)","aliased_html":"Hash(String, Array(Redis::Value) | Int64 | Redis::Error | String | Nil)","const":false,"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"}},{"html_id":"redis/Redis/Graph/Node","path":"Redis/Graph/Node.html","kind":"struct","full_name":"Redis::Graph::Node","name":"Node","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph.cr","line_number":233,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L233"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"},"doc":"Represents a node in the graph.\n\n```\nresult = graph.read_query(<<-CYPHER)\n MATCH (u:User)\n RETURN u\nCYPHER\n\nresult.each do |(user)|\n user = user.as(Redis::Graph::Node)\n # ...\nend\n```","summary":"

    Represents a node in the graph.

    ","instance_methods":[{"html_id":"id:Int64-instance-method","name":"id","abstract":false,"location":{"filename":"src/graph.cr","line_number":234,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L234"},"def":{"name":"id","return_type":"Int64","visibility":"Public","body":"@id"}},{"html_id":"labels:Array(String)-instance-method","name":"labels","abstract":false,"location":{"filename":"src/graph.cr","line_number":235,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L235"},"def":{"name":"labels","return_type":"Array(String)","visibility":"Public","body":"@labels"}},{"html_id":"properties:Hash(String,Property)-instance-method","name":"properties","abstract":false,"location":{"filename":"src/graph.cr","line_number":236,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L236"},"def":{"name":"properties","return_type":"Hash(String, Property)","visibility":"Public","body":"@properties"}}]},{"html_id":"redis/Redis/Graph/Property","path":"Redis/Graph/Property.html","kind":"alias","full_name":"Redis::Graph::Property","name":"Property","abstract":false,"locations":[{"filename":"src/graph.cr","line_number":337,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L337"}],"repository_name":"redis","program":false,"enum":false,"alias":true,"aliased":"Redis::Value","aliased_html":"Redis::Value","const":false,"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"}},{"html_id":"redis/Redis/Graph/Relationship","path":"Redis/Graph/Relationship.html","kind":"struct","full_name":"Redis::Graph::Relationship","name":"Relationship","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph.cr","line_number":274,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L274"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"},"doc":"Represents a relationship in your graph\n\n```\nresult = graph.read_query(<<-CYPHER)\n MATCH (:User)-[membership:MEMBER_OF]->(:Team)\n RETURN membership\nCYPHER\n\nresult.each do |(membership)|\n membership = membership.as(Redis::Graph::Relationship)\n # ...\nend\n```","summary":"

    Represents a relationship in your graph

    ","instance_methods":[{"html_id":"dest_node:Int64-instance-method","name":"dest_node","doc":"The node that this relationship points to, for example with\n`(person)-[membership]->(team)`, it will be the node id of `team`.\n\nWARNING: This will not match an `id` *property* of the destination node.","summary":"

    The node that this relationship points to, for example with (person)-[membership]->(team), it will be the node id of team.

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":297,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L297"},"def":{"name":"dest_node","return_type":"Int64","visibility":"Public","body":"@dest_node"}},{"html_id":"id:Int64-instance-method","name":"id","doc":"The identifier of the relationship.\n\nNOTE: If this relationship has an `id` property, this is *not* that.\nWARNING: Do not try to query against this. RedisGraph provides no\nguarantees that this relationship will be at the same offset it was at\nthe last time you queried it.","summary":"

    The identifier of the relationship.

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":281,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L281"},"def":{"name":"id","return_type":"Int64","visibility":"Public","body":"@id"}},{"html_id":"properties:Hash(String,Property)-instance-method","name":"properties","doc":"The hash of properties for this relationship.\n\n```\nresult = graph.write_query <<-CYPHER, now: Time.utc.to_unix_ms\n CREATE (person)-[membership{since: $now}]->(team)\n RETURN membership\nCYPHER\nresult.first.properties # => {\"since\" => 2022-05-15T05:48:23 UTC}\n```","summary":"

    The hash of properties for this relationship.

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":308,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L308"},"def":{"name":"properties","return_type":"Hash(String, Property)","visibility":"Public","body":"@properties"}},{"html_id":"src_node:Int64-instance-method","name":"src_node","doc":"The node that this relationship originates from, for example with\n`(person)-[membership]->(team)`, it will be the node id of `person`.\n\nWARNING: This will not match an `id` *property* of the source node.","summary":"

    The node that this relationship originates from, for example with (person)-[membership]->(team), it will be the node id of person.

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":291,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L291"},"def":{"name":"src_node","return_type":"Int64","visibility":"Public","body":"@src_node"}},{"html_id":"type:String-instance-method","name":"type","doc":"The type of relationship, for example with `[:MEMBER_OF]`, the `type`\nwill be `\"MEMBER_OF\"`.","summary":"

    The type of relationship, for example with [:MEMBER_OF], the #type will be "MEMBER_OF".

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":285,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L285"},"def":{"name":"type","return_type":"String","visibility":"Public","body":"@type"}}]},{"html_id":"redis/Redis/Graph/Result","path":"Redis/Graph/Result.html","kind":"struct","full_name":"Redis::Graph::Result","name":"Result","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph.cr","line_number":344,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L344"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"redis/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"}],"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"},"doc":"Parses the results of a Cypher query","summary":"

    Parses the results of a Cypher query

    ","constructors":[{"html_id":"new(raw:Array)-class-method","name":"new","abstract":false,"args":[{"name":"raw","external_name":"raw","restriction":"Array"}],"args_string":"(raw : Array)","args_html":"(raw : Array)","location":{"filename":"src/graph.cr","line_number":371,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L371"},"def":{"name":"new","args":[{"name":"raw","external_name":"raw","restriction":"Array"}],"visibility":"Public","body":"case raw.size\nwhen 1\n fields = [] of String\n rows = [] of Redis::Value\n metadata = raw.first\nwhen 3\n fields, rows, metadata = raw\nelse\n raise(Error.new(\"Don't know how to process this result: #{raw.inspect}\"))\nend\nlabels_added = 0_i64\nnodes_created = 0_i64\nrelationships_created = 0_i64\nproperties_set = 0_i64\ncached = false\nquery_time = 0.seconds\n(metadata.as(Array)).each do |item|\n case item\n when /Labels added: (\\d+)/\n labels_added = $~[1].to_i64\n when /Nodes created: (\\d+)/\n nodes_created = $~[1].to_i64\n when /Relationships created: (\\d+)/\n relationships_created = $~[1].to_i64\n when /Properties set: (\\d+)/\n properties_set = $~[1].to_i64\n when /Query internal execution time: (\\d+\\.\\d+) milliseconds/\n query_time = $~[1].to_f64.milliseconds\n when /Cached execution: (\\d+)/\n cached = ($~[1] != \"0\")\n end\nend\nnew(fields: (fields.as(Array)).map() do |__arg11|\n __arg11.as(String)\nend, rows: (rows.as(Array)).map do |row|\n row = row.as(Array)\n list = List.new(initial_capacity: row.size)\n row.each do |item|\n (case item\n in String, Int64, Nil\n list << item\n in Array\n list << (((Node.from?(item)) || (Relationship.from?(item))) || item)\n in Redis::Error\n raise(item)\n end).as(ResultValue | List)\n end\n list\nend, cached_execution: !(!cached), duration: query_time, labels_added: labels_added, nodes_created: nodes_created, relationships_created: relationships_created, properties_set: properties_set)\n"}},{"html_id":"new(*,fields:Array(String),rows:Array(Array(Array(Array(Redis::Value)|Int64|Redis::Error|Redis::Graph::Node|Redis::Graph::Relationship|String|Nil)|Array(Redis::Value)|Int64|Redis::Error|Redis::Graph::Node|Redis::Graph::Relationship|String|Nil)),cached_execution:Bool,duration:Time::Span,labels_added:Int64,nodes_created:Int64,relationships_created:Int64,properties_set:Int64)-class-method","name":"new","abstract":false,"args":[{"name":"","external_name":"","restriction":""},{"name":"fields","external_name":"fields","restriction":"::Array(::String)"},{"name":"rows","external_name":"rows","restriction":"::Array(::Array(::Array(::Array(::Redis::Value) | ::Int64 | ::Redis::Error | ::Redis::Graph::Node | ::Redis::Graph::Relationship | ::String | ::Nil) | ::Array(::Redis::Value) | ::Int64 | ::Redis::Error | ::Redis::Graph::Node | ::Redis::Graph::Relationship | ::String | ::Nil))"},{"name":"cached_execution","external_name":"cached_execution","restriction":"::Bool"},{"name":"duration","external_name":"duration","restriction":"::Time::Span"},{"name":"labels_added","external_name":"labels_added","restriction":"::Int64"},{"name":"nodes_created","external_name":"nodes_created","restriction":"::Int64"},{"name":"relationships_created","external_name":"relationships_created","restriction":"::Int64"},{"name":"properties_set","external_name":"properties_set","restriction":"::Int64"}],"args_string":"(*, fields : Array(String), rows : Array(Array(Array(Array(Redis::Value) | Int64 | Redis::Error | Redis::Graph::Node | Redis::Graph::Relationship | String | Nil) | Array(Redis::Value) | Int64 | Redis::Error | Redis::Graph::Node | Redis::Graph::Relationship | String | Nil)), cached_execution : Bool, duration : Time::Span, labels_added : Int64, nodes_created : Int64, relationships_created : Int64, properties_set : Int64)","args_html":"(*, fields : Array(String), rows : Array(Array(Array(Array(Redis::Value) | Int64 | Redis::Error | Redis::Graph::Node | Redis::Graph::Relationship | String | Nil) | Array(Redis::Value) | Int64 | Redis::Error | Redis::Graph::Node | Redis::Graph::Relationship | String | Nil)), cached_execution : Bool, duration : Time::Span, labels_added : Int64, nodes_created : Int64, relationships_created : Int64, properties_set : Int64)","location":{"filename":"src/graph.cr","line_number":433,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L433"},"def":{"name":"new","args":[{"name":"","external_name":"","restriction":""},{"name":"fields","external_name":"fields","restriction":"::Array(::String)"},{"name":"rows","external_name":"rows","restriction":"::Array(::Array(::Array(::Array(::Redis::Value) | ::Int64 | ::Redis::Error | ::Redis::Graph::Node | ::Redis::Graph::Relationship | ::String | ::Nil) | ::Array(::Redis::Value) | ::Int64 | ::Redis::Error | ::Redis::Graph::Node | ::Redis::Graph::Relationship | ::String | ::Nil))"},{"name":"cached_execution","external_name":"cached_execution","restriction":"::Bool"},{"name":"duration","external_name":"duration","restriction":"::Time::Span"},{"name":"labels_added","external_name":"labels_added","restriction":"::Int64"},{"name":"nodes_created","external_name":"nodes_created","restriction":"::Int64"},{"name":"relationships_created","external_name":"relationships_created","restriction":"::Int64"},{"name":"properties_set","external_name":"properties_set","restriction":"::Int64"}],"splat_index":0,"visibility":"Public","body":"_ = allocate\n_.initialize(fields: fields, rows: rows, cached_execution: cached_execution, duration: duration, labels_added: labels_added, nodes_created: nodes_created, relationships_created: relationships_created, properties_set: properties_set)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"cached_execution?:Bool-instance-method","name":"cached_execution?","doc":"Indicates whether the query was cached by RedisGraph","summary":"

    Indicates whether the query was cached by RedisGraph

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":354,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L354"},"def":{"name":"cached_execution?","return_type":"Bool","visibility":"Public","body":"@cached_execution"}},{"html_id":"duration:Time::Span-instance-method","name":"duration","doc":"How long it took RedisGraph to execute the query on the server side.","summary":"

    How long it took RedisGraph to execute the query on the server side.

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":357,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L357"},"def":{"name":"duration","return_type":"Time::Span","visibility":"Public","body":"@duration"}},{"html_id":"each(&)-instance-method","name":"each","doc":"Must yield this collection's elements to the block.","summary":"

    Must yield this collection's elements to the block.

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":436,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L436"},"def":{"name":"each","yields":1,"block_arity":1,"visibility":"Public","body":"@rows.each do |row|\n yield row\nend"}},{"html_id":"fields:Array(String)-instance-method","name":"fields","doc":"The names of the fields in a query's `RETURN` clause","summary":"

    The names of the fields in a query's RETURN clause

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":348,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L348"},"def":{"name":"fields","return_type":"Array(String)","visibility":"Public","body":"@fields"}},{"html_id":"labels_added:Int64-instance-method","name":"labels_added","doc":"How many labels were added in this query","summary":"

    How many labels were added in this query

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":360,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L360"},"def":{"name":"labels_added","return_type":"Int64","visibility":"Public","body":"@labels_added"}},{"html_id":"nodes_created:Int64-instance-method","name":"nodes_created","doc":"How many nodes were created in this query","summary":"

    How many nodes were created in this query

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":363,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L363"},"def":{"name":"nodes_created","return_type":"Int64","visibility":"Public","body":"@nodes_created"}},{"html_id":"properties_set:Int64-instance-method","name":"properties_set","doc":"How many properties were set in this query","summary":"

    How many properties were set in this query

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":369,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L369"},"def":{"name":"properties_set","return_type":"Int64","visibility":"Public","body":"@properties_set"}},{"html_id":"relationships_created:Int64-instance-method","name":"relationships_created","doc":"How many relationships were created in this query","summary":"

    How many relationships were created in this query

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":366,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L366"},"def":{"name":"relationships_created","return_type":"Int64","visibility":"Public","body":"@relationships_created"}},{"html_id":"rows:Array(List)-instance-method","name":"rows","doc":"The values of the fields in a query's `RETURN` clause","summary":"

    The values of the fields in a query's RETURN clause

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":351,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L351"},"def":{"name":"rows","return_type":"Array(List)","visibility":"Public","body":"@rows"}}]},{"html_id":"redis/Redis/Graph/ResultValue","path":"Redis/Graph/ResultValue.html","kind":"alias","full_name":"Redis::Graph::ResultValue","name":"ResultValue","abstract":false,"locations":[{"filename":"src/graph.cr","line_number":338,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L338"}],"repository_name":"redis","program":false,"enum":false,"alias":true,"aliased":"(Array(Redis::Value) | Int64 | Redis::Error | Redis::Graph::Node | Redis::Graph::Relationship | String | Nil)","aliased_html":"Array(Redis::Value) | Int64 | Redis::Error | Redis::Graph::Node | Redis::Graph::Relationship | String | Nil","const":false,"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"}},{"html_id":"redis/Redis/Graph/Serializable","path":"Redis/Graph/Serializable.html","kind":"module","full_name":"Redis::Graph::Serializable","name":"Serializable","abstract":false,"locations":[{"filename":"src/graph/serializable.cr","line_number":49,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph/serializable.cr#L49"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"},"doc":"The `Redis::Graph::Serializable::*` mixins tell `Redis::Graph::Client` how\nto deserialize nodes and relationships as your own Crystal object types,\nsimilar to [`DB::Serializable`](http://crystal-lang.github.io/crystal-db/api/0.11.0/DB/Serializable.html).\n\n```\nrequire \"redis/graph\"\n\nstruct Person\n include Redis::Graph::Serializable::Node\n\n getter id : UUID\n getter name : String\n getter created_at : Time\nend\n\nstruct Team\n include Redis::Graph::Serializable::Node\n\n getter name : String\nend\n\nstruct Membership\n include Redis::Graph::Serializable::Relationship\n\n getter since : Time\nend\n\nredis = Redis::Client.new\nredis.del \"my-graph\"\n\n# Store the graph data in the Redis key \"my-graph\"\ngraph = redis.graph(key: \"my-graph\")\n\nid = UUID.random\n\n# Create some data in our graph\npp graph.write_query <<-CYPHER, id: id, name: \"Jamie\", now: Time.utc.to_unix_ms, team_name: \"My Team\"\n CREATE (:Person{id: $id, name: $name, created_at: $now})-[:MEMBER_OF{since: $now}]->(team:Team{name: $team_name})\nCYPHER\n\n# The `return` argument specifies the return types of the results in your\n# Cypher query's `RETURN` clause\npp graph.read_query(<<-CYPHER, {id: id}, return: {Person, Membership, Team})\n MATCH (person:Person{id: $id})-[membership:MEMBER_OF]->(team:Team)\n RETURN person, membership, team\nCYPHER\n```","summary":"

    The Redis::Graph::Serializable::* mixins tell Redis::Graph::Client how to deserialize nodes and relationships as your own Crystal object types, similar to DB::Serializable.

    ","types":[{"html_id":"redis/Redis/Graph/Serializable/Node","path":"Redis/Graph/Serializable/Node.html","kind":"module","full_name":"Redis::Graph::Serializable::Node","name":"Node","abstract":false,"locations":[{"filename":"src/graph/serializable.cr","line_number":53,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph/serializable.cr#L53"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph/Serializable","kind":"module","full_name":"Redis::Graph::Serializable","name":"Serializable"},"types":[{"html_id":"redis/Redis/Graph/Serializable/Node/Metadata","path":"Redis/Graph/Serializable/Node/Metadata.html","kind":"struct","full_name":"Redis::Graph::Serializable::Node::Metadata","name":"Metadata","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph/serializable.cr","line_number":54,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph/serializable.cr#L54"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph/Serializable/Node","kind":"module","full_name":"Redis::Graph::Serializable::Node","name":"Node"},"constructors":[{"html_id":"new(id:Int64,labels:Array(String))-class-method","name":"new","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"Int64"},{"name":"labels","external_name":"labels","restriction":"Array(String)"}],"args_string":"(id : Int64, labels : Array(String))","args_html":"(id : Int64, labels : Array(String))","location":{"filename":"src/graph/serializable.cr","line_number":54,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph/serializable.cr#L54"},"def":{"name":"new","args":[{"name":"id","external_name":"id","restriction":"Int64"},{"name":"labels","external_name":"labels","restriction":"Array(String)"}],"visibility":"Public","body":"_ = allocate\n_.initialize(id, labels)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/graph/serializable.cr","line_number":54,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph/serializable.cr#L54"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@id.clone, @labels.clone)"}},{"html_id":"copy_with(id_id=@id,labels_labels=@labels)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_id","default_value":"@id","external_name":"id","restriction":""},{"name":"_labels","default_value":"@labels","external_name":"labels","restriction":""}],"args_string":"(id _id = @id, labels _labels = @labels)","args_html":"(id _id = @id, labels _labels = @labels)","location":{"filename":"src/graph/serializable.cr","line_number":54,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph/serializable.cr#L54"},"def":{"name":"copy_with","args":[{"name":"_id","default_value":"@id","external_name":"id","restriction":""},{"name":"_labels","default_value":"@labels","external_name":"labels","restriction":""}],"visibility":"Public","body":"self.class.new(_id, _labels)"}},{"html_id":"id:Int64-instance-method","name":"id","abstract":false,"def":{"name":"id","return_type":"Int64","visibility":"Public","body":"@id"}},{"html_id":"labels:Array(String)-instance-method","name":"labels","abstract":false,"def":{"name":"labels","return_type":"Array(String)","visibility":"Public","body":"@labels"}}]}]},{"html_id":"redis/Redis/Graph/Serializable/Property","path":"Redis/Graph/Serializable/Property.html","kind":"annotation","full_name":"Redis::Graph::Serializable::Property","name":"Property","abstract":false,"locations":[{"filename":"src/graph/serializable.cr","line_number":50,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph/serializable.cr#L50"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph/Serializable","kind":"module","full_name":"Redis::Graph::Serializable","name":"Serializable"}},{"html_id":"redis/Redis/Graph/Serializable/Relationship","path":"Redis/Graph/Serializable/Relationship.html","kind":"module","full_name":"Redis::Graph::Serializable::Relationship","name":"Relationship","abstract":false,"locations":[{"filename":"src/graph/serializable.cr","line_number":130,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph/serializable.cr#L130"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph/Serializable","kind":"module","full_name":"Redis::Graph::Serializable","name":"Serializable"},"types":[{"html_id":"redis/Redis/Graph/Serializable/Relationship/Metadata","path":"Redis/Graph/Serializable/Relationship/Metadata.html","kind":"struct","full_name":"Redis::Graph::Serializable::Relationship::Metadata","name":"Metadata","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph/serializable.cr","line_number":131,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph/serializable.cr#L131"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph/Serializable/Relationship","kind":"module","full_name":"Redis::Graph::Serializable::Relationship","name":"Relationship"},"constructors":[{"html_id":"new(id:Int64,type:String,source_node:Int64,destination_node:Int64)-class-method","name":"new","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"Int64"},{"name":"type","external_name":"type","restriction":"String"},{"name":"source_node","external_name":"source_node","restriction":"Int64"},{"name":"destination_node","external_name":"destination_node","restriction":"Int64"}],"args_string":"(id : Int64, type : String, source_node : Int64, destination_node : Int64)","args_html":"(id : Int64, type : String, source_node : Int64, destination_node : Int64)","location":{"filename":"src/graph/serializable.cr","line_number":131,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph/serializable.cr#L131"},"def":{"name":"new","args":[{"name":"id","external_name":"id","restriction":"Int64"},{"name":"type","external_name":"type","restriction":"String"},{"name":"source_node","external_name":"source_node","restriction":"Int64"},{"name":"destination_node","external_name":"destination_node","restriction":"Int64"}],"visibility":"Public","body":"_ = allocate\n_.initialize(id, type, source_node, destination_node)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/graph/serializable.cr","line_number":131,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph/serializable.cr#L131"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@id.clone, @type.clone, @source_node.clone, @destination_node.clone)"}},{"html_id":"copy_with(id_id=@id,type_type=@type,source_node_source_node=@source_node,destination_node_destination_node=@destination_node)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_id","default_value":"@id","external_name":"id","restriction":""},{"name":"_type","default_value":"@type","external_name":"type","restriction":""},{"name":"_source_node","default_value":"@source_node","external_name":"source_node","restriction":""},{"name":"_destination_node","default_value":"@destination_node","external_name":"destination_node","restriction":""}],"args_string":"(id _id = @id, type _type = @type, source_node _source_node = @source_node, destination_node _destination_node = @destination_node)","args_html":"(id _id = @id, type _type = @type, source_node _source_node = @source_node, destination_node _destination_node = @destination_node)","location":{"filename":"src/graph/serializable.cr","line_number":131,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph/serializable.cr#L131"},"def":{"name":"copy_with","args":[{"name":"_id","default_value":"@id","external_name":"id","restriction":""},{"name":"_type","default_value":"@type","external_name":"type","restriction":""},{"name":"_source_node","default_value":"@source_node","external_name":"source_node","restriction":""},{"name":"_destination_node","default_value":"@destination_node","external_name":"destination_node","restriction":""}],"visibility":"Public","body":"self.class.new(_id, _type, _source_node, _destination_node)"}},{"html_id":"destination_node:Int64-instance-method","name":"destination_node","abstract":false,"def":{"name":"destination_node","return_type":"Int64","visibility":"Public","body":"@destination_node"}},{"html_id":"id:Int64-instance-method","name":"id","abstract":false,"def":{"name":"id","return_type":"Int64","visibility":"Public","body":"@id"}},{"html_id":"source_node:Int64-instance-method","name":"source_node","abstract":false,"def":{"name":"source_node","return_type":"Int64","visibility":"Public","body":"@source_node"}},{"html_id":"type:String-instance-method","name":"type","abstract":false,"def":{"name":"type","return_type":"String","visibility":"Public","body":"@type"}}]}]}]},{"html_id":"redis/Redis/Graph/TypedResult","path":"Redis/Graph/TypedResult.html","kind":"struct","full_name":"Redis::Graph::TypedResult(T)","name":"TypedResult","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph.cr","line_number":441,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L441"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"redis/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"}],"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"},"instance_methods":[{"html_id":"cached_execution?:Bool-instance-method","name":"cached_execution?","doc":"Indicates whether the query was cached by RedisGraph","summary":"

    Indicates whether the query was cached by RedisGraph

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":449,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L449"},"def":{"name":"cached_execution?","return_type":"Bool","visibility":"Public","body":"@cached_execution"}},{"html_id":"duration:Time::Span-instance-method","name":"duration","doc":"How long it took RedisGraph to execute the query on the server side.","summary":"

    How long it took RedisGraph to execute the query on the server side.

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":451,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L451"},"def":{"name":"duration","return_type":"Time::Span","visibility":"Public","body":"@duration"}},{"html_id":"each(&)-instance-method","name":"each","doc":"Iterate over each of the results, yielding a tuple containing instances\nof the types in `T`.","summary":"

    Iterate over each of the results, yielding a tuple containing instances of the types in T.

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":489,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L489"},"def":{"name":"each","yields":1,"block_arity":1,"visibility":"Public","body":"@rows.each do |row|\n yield row\nend"}},{"html_id":"fields:Array(String)-instance-method","name":"fields","doc":"The names of the fields in a query's `RETURN` clause","summary":"

    The names of the fields in a query's RETURN clause

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":445,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L445"},"def":{"name":"fields","return_type":"Array(String)","visibility":"Public","body":"@fields"}},{"html_id":"labels_added:Int64-instance-method","name":"labels_added","doc":"How many labels were added in this query","summary":"

    How many labels were added in this query

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":453,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L453"},"def":{"name":"labels_added","return_type":"Int64","visibility":"Public","body":"@labels_added"}},{"html_id":"nodes_created:Int64-instance-method","name":"nodes_created","doc":"How many nodes were created in this query","summary":"

    How many nodes were created in this query

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":455,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L455"},"def":{"name":"nodes_created","return_type":"Int64","visibility":"Public","body":"@nodes_created"}},{"html_id":"properties_set:Int64-instance-method","name":"properties_set","doc":"How many properties were set in this query","summary":"

    How many properties were set in this query

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":459,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L459"},"def":{"name":"properties_set","return_type":"Int64","visibility":"Public","body":"@properties_set"}},{"html_id":"relationships_created:Int64-instance-method","name":"relationships_created","doc":"How many relationships were created in this query","summary":"

    How many relationships were created in this query

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":457,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L457"},"def":{"name":"relationships_created","return_type":"Int64","visibility":"Public","body":"@relationships_created"}},{"html_id":"rows:Array(T)-instance-method","name":"rows","doc":"The values of the fields in a query's `RETURN` clause","summary":"

    The values of the fields in a query's RETURN clause

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":447,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L447"},"def":{"name":"rows","return_type":"Array(T)","visibility":"Public","body":"@rows"}}]},{"html_id":"redis/Redis/Graph/Value","path":"Redis/Graph/Value.html","kind":"alias","full_name":"Redis::Graph::Value","name":"Value","abstract":false,"locations":[{"filename":"src/graph.cr","line_number":341,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/graph.cr#L341"}],"repository_name":"redis","program":false,"enum":false,"alias":true,"aliased":"(Array(Array(Array(Redis::Value) | Int64 | Redis::Error | Redis::Graph::Node | Redis::Graph::Relationship | String | Nil) | Array(Redis::Value) | Int64 | Redis::Error | Redis::Graph::Node | Redis::Graph::Relationship | String | Nil) | Array(Redis::Value) | Hash(String, Array(Redis::Value) | Int64 | Redis::Error | String | Nil) | Int64 | Redis::Error | Redis::Graph::Node | Redis::Graph::Relationship | String | Nil)","aliased_html":"Array(Array(Array(Redis::Value) | Int64 | Redis::Error | Redis::Graph::Node | Redis::Graph::Relationship | String | Nil) | Array(Redis::Value) | Int64 | Redis::Error | Redis::Graph::Node | Redis::Graph::Relationship | String | Nil) | Array(Redis::Value) | Hash(String, Array(Redis::Value) | Int64 | Redis::Error | String | Nil) | Int64 | Redis::Error | Redis::Graph::Node | Redis::Graph::Relationship | String | Nil","const":false,"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"}}]},{"html_id":"redis/Redis/JSON","path":"Redis/JSON.html","kind":"struct","full_name":"Redis::JSON(Runnable)","name":"JSON","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/json.cr","line_number":36,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L36"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"doc":"`Redis::JSON` wraps a `Redis::Client` or `Redis::Cluster` to execute\ncommands against keys storing JSON data using the\n[RedisJSON](https://oss.redis.com/redisjson/) plugin for Redis.\n\n```\nrequire \"redis\"\nrequire \"redis/json\"\nrequire \"uuid/json\"\n\nstruct Person\n include JSON::Serializable\n\n getter id : UUID\n getter name : String\n getter email : String\n\n def initialize(@id, @name, @email)\n end\nend\n\nredis = Redis::Client.new\n\nid = UUID.random\n\nredis.json.set \"person:#{id}\", \".\", Person.new(id, \"Jamie\", \"jamie@example.com\")\nredis.json.get(\"person:#{id}\", \".\", as: Person)\n# => Person(@email=\"jamie@example.com\", @id=UUID(081af617-6b50-48d3-b53f-dbc17a1072f5), @name=\"Jamie\")\nredis.json.get(\"person:#{id}\", \".name\", as: String)\n# => \"Jamie\"\n```","summary":"

    Redis::JSON wraps a Redis::Client or Redis::Cluster to execute commands against keys storing JSON data using the RedisJSON plugin for Redis.

    ","constructors":[{"html_id":"new(redis:Runnable)-class-method","name":"new","abstract":false,"args":[{"name":"redis","external_name":"redis","restriction":"Runnable"}],"args_string":"(redis : Runnable)","args_html":"(redis : Runnable)","location":{"filename":"src/json.cr","line_number":37,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L37"},"def":{"name":"new","args":[{"name":"redis","external_name":"redis","restriction":"Runnable"}],"visibility":"Public","body":"_ = JSON(Runnable).allocate\n_.initialize(redis)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"arrappend(key:String,path:String,value)-instance-method","name":"arrappend","doc":"Append `value` as JSON to the array located at the JSONPath in `key`\n\n```\nredis.json.arrappend \"posts:#{id}\", \".tags\", \"redis\"\n```","summary":"

    Append value as JSON to the array located at the JSONPath in key

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"value","external_name":"value","restriction":""}],"args_string":"(key : String, path : String, value)","args_html":"(key : String, path : String, value)","location":{"filename":"src/json.cr","line_number":219,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L219"},"def":{"name":"arrappend","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"value","external_name":"value","restriction":""}],"visibility":"Public","body":"@redis.run({\"json.arrappend\", key, path, value.to_json})"}},{"html_id":"arrappend(key:String,path:String,*,values:Array)-instance-method","name":"arrappend","doc":"Append `values` as JSON to the array located at the JSONPath in `key`\n\n```\nredis.json.arrappend \"posts:#{id}\", \".tags\", %w[redis crystal]\n```","summary":"

    Append values as JSON to the array located at the JSONPath in key

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"","external_name":"","restriction":""},{"name":"values","external_name":"values","restriction":"Array"}],"args_string":"(key : String, path : String, *, values : Array)","args_html":"(key : String, path : String, *, values : Array)","location":{"filename":"src/json.cr","line_number":228,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L228"},"def":{"name":"arrappend","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"","external_name":"","restriction":""},{"name":"values","external_name":"values","restriction":"Array"}],"splat_index":2,"visibility":"Public","body":"command = Array(String).new(initial_capacity: 3 + values.size)\n((command << \"json.arrappend\") << key) << path\nvalues.each do |value|\n command << value.to_json\nend\n@redis.run(command)\n"}},{"html_id":"arrindex(key:String,path:String,value,betweenrange:Range(Int,Int|Nil))-instance-method","name":"arrindex","doc":"Get the index of `value` in the array located at the JSONPath in `key` if\nand only if it falls in the specified `range`\n\n```\nredis.json.arrindex \"posts:#{id}\", \".tags\", \"redis\", between: 1..3\n# => 2\n```","summary":"

    Get the index of value in the array located at the JSONPath in key if and only if it falls in the specified range

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"value","external_name":"value","restriction":""},{"name":"range","external_name":"between","restriction":"Range(Int, Int | ::Nil)"}],"args_string":"(key : String, path : String, value, between range : Range(Int, Int | Nil))","args_html":"(key : String, path : String, value, between range : Range(Int, Int | Nil))","location":{"filename":"src/json.cr","line_number":254,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L254"},"def":{"name":"arrindex","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"value","external_name":"value","restriction":""},{"name":"range","external_name":"between","restriction":"Range(Int, Int | ::Nil)"}],"visibility":"Public","body":"command = {\"json.arrindex\", key, path, value.to_json, range.begin.to_s}\nif last = range.end\n if range.excludes_end?\n command = command + {last.to_s}\n else\n command = command + {(last + 1).to_s}\n end\nend\n@redis.run(command)\n"}},{"html_id":"arrindex(key:String,path:String,value)-instance-method","name":"arrindex","doc":"Get the index of `value` in the array located at the JSONPath in `key`\n\n```\nredis.json.arrindex \"posts:#{id}\", \".tags\", \"redis\" # => 2\n```","summary":"

    Get the index of value in the array located at the JSONPath in key

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"value","external_name":"value","restriction":""}],"args_string":"(key : String, path : String, value)","args_html":"(key : String, path : String, value)","location":{"filename":"src/json.cr","line_number":243,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L243"},"def":{"name":"arrindex","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"value","external_name":"value","restriction":""}],"visibility":"Public","body":"@redis.run({\"json.arrindex\", key, path, value.to_json})"}},{"html_id":"arrinsert(key:String,path:String,index:Int,value)-instance-method","name":"arrinsert","doc":"Insert `value` into the array located at the JSONPath in `key` at `index`\n\n```\nredis.json.arrinsert \"posts:#{id}\", \".tags\", index: 1, value: \"redis\"\n# => 3\n```","summary":"

    Insert value into the array located at the JSONPath in key at index

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"index","external_name":"index","restriction":"Int"},{"name":"value","external_name":"value","restriction":""}],"args_string":"(key : String, path : String, index : Int, value)","args_html":"(key : String, path : String, index : Int, value)","location":{"filename":"src/json.cr","line_number":273,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L273"},"def":{"name":"arrinsert","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"index","external_name":"index","restriction":"Int"},{"name":"value","external_name":"value","restriction":""}],"visibility":"Public","body":"@redis.run({\"json.arrinsert\", key, path, index.to_s, value.to_json})"}},{"html_id":"arrinsert(key:String,path:String,index:Int,*,values:Array)-instance-method","name":"arrinsert","doc":"Insert the elements of `values` into the array located at the JSONPath in\n`key` at `index`\n\n```\nredis.json.arrinsert \"posts:#{id}\", \".tags\", index: 1, values: %w[\n redis\n crystal\n]\n# => 4\n```","summary":"

    Insert the elements of values into the array located at the JSONPath in key at index

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"index","external_name":"index","restriction":"Int"},{"name":"","external_name":"","restriction":""},{"name":"values","external_name":"values","restriction":"Array"}],"args_string":"(key : String, path : String, index : Int, *, values : Array)","args_html":"(key : String, path : String, index : Int, *, values : Array)","location":{"filename":"src/json.cr","line_number":287,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L287"},"def":{"name":"arrinsert","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"index","external_name":"index","restriction":"Int"},{"name":"","external_name":"","restriction":""},{"name":"values","external_name":"values","restriction":"Array"}],"splat_index":3,"visibility":"Public","body":"command = Array(String).new(initial_capacity: 4 + values.size)\n(((command << \"json.arrinsert\") << key) << path) << index.to_s\nvalues.each do |value|\n command << value.to_json\nend\n@redis.run(command)\n"}},{"html_id":"arrlen(key:String,path:String)-instance-method","name":"arrlen","doc":"Get the number of elements in the array located at the JSONPath in `key`\n\n```\nredis.json.arrlen \"posts:#{id}\", \".tags\"\n# => 4\n```","summary":"

    Get the number of elements in the array located at the JSONPath in key

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"}],"args_string":"(key : String, path : String)","args_html":"(key : String, path : String)","location":{"filename":"src/json.cr","line_number":303,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L303"},"def":{"name":"arrlen","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"}],"visibility":"Public","body":"@redis.run({\"json.arrlen\", key, path})"}},{"html_id":"arrpop(key:String,path:String|Nil=nil,*,index:Int=-1)-instance-method","name":"arrpop","doc":"Remove and return the value located at `index` (defaulting to the last\nelement) in the array located at the JSONPath in `key`\n\n```\nredis.json.arrlen \"posts:#{id}\", \".tags\"\n# => 4\n```","summary":"

    Remove and return the value located at index (defaulting to the last element) in the array located at the JSONPath in key

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","default_value":"nil","external_name":"path","restriction":"String | ::Nil"},{"name":"","external_name":"","restriction":""},{"name":"index","default_value":"-1","external_name":"index","restriction":"Int"}],"args_string":"(key : String, path : String | Nil = nil, *, index : Int = -1)","args_html":"(key : String, path : String | Nil = nil, *, index : Int = -1)","location":{"filename":"src/json.cr","line_number":314,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L314"},"def":{"name":"arrpop","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","default_value":"nil","external_name":"path","restriction":"String | ::Nil"},{"name":"","external_name":"","restriction":""},{"name":"index","default_value":"-1","external_name":"index","restriction":"Int"}],"splat_index":2,"visibility":"Public","body":"command = {\"json.arrpop\", key}\nif path\n command = command + {path}\n if index != -1\n command = command + {index.to_s}\n end\nend\n@redis.run(command)\n"}},{"html_id":"arrpop(key:String,path:String,*,index:Int=-1,as:T.class):T|NilforallT-instance-method","name":"arrpop","doc":"Remove and return the value located at `index` (defaulting to the last\nelement) in the array located at the JSONPath in `key`\n\n```\nredis.json.arrlen \"posts:#{id}\", \".tags\"\n# => 4\n```\n\nNOTE: This method cannot be invoked on a pipeline or the transaction\nyielded to a `Redis::Connection#multi` block.","summary":"

    Remove and return the value located at index (defaulting to the last element) in the array located at the JSONPath in key

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"","external_name":"","restriction":""},{"name":"index","default_value":"-1","external_name":"index","restriction":"Int"},{"name":"as","external_name":"as","restriction":"T.class"}],"args_string":"(key : String, path : String, *, index : Int = -1, as : T.class) : T | Nil forall T","args_html":"(key : String, path : String, *, index : Int = -1, as : T.class) : T | Nil forall T","location":{"filename":"src/json.cr","line_number":334,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L334"},"def":{"name":"arrpop","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"","external_name":"","restriction":""},{"name":"index","default_value":"-1","external_name":"index","restriction":"Int"},{"name":"as","external_name":"as","restriction":"T.class"}],"splat_index":2,"return_type":"T | ::Nil","visibility":"Public","body":"if result = arrpop(key, path, index: index)\n T.from_json(result.as(String))\nend"}},{"html_id":"clear(key:String,path:String|Nil=nil)-instance-method","name":"clear","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","default_value":"nil","external_name":"path","restriction":"String | ::Nil"}],"args_string":"(key : String, path : String | Nil = nil)","args_html":"(key : String, path : String | Nil = nil)","location":{"filename":"src/json.cr","line_number":166,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L166"},"def":{"name":"clear","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","default_value":"nil","external_name":"path","restriction":"String | ::Nil"}],"visibility":"Public","body":"command = {\"json.clear\", key}\nif path\n command = command + {path}\nend\n@redis.run(command)\n"}},{"html_id":"del(key:String,path:String|Nil=nil)-instance-method","name":"del","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","default_value":"nil","external_name":"path","restriction":"String | ::Nil"}],"args_string":"(key : String, path : String | Nil = nil)","args_html":"(key : String, path : String | Nil = nil)","location":{"filename":"src/json.cr","line_number":173,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L173"},"def":{"name":"del","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","default_value":"nil","external_name":"path","restriction":"String | ::Nil"}],"visibility":"Public","body":"command = {\"json.del\", key}\nif path\n command = command + {path}\nend\n@redis.run(command)\n"}},{"html_id":"get(key:String,path:String,astype:T.class):T|NilforallT-instance-method","name":"get","doc":"Get the value stored at the given JSONPath inside the given `key`,\ndeserializing the value into the type `T`. You can use this to deserialize\nyour custom `JSON::Serializable` objects.\n\n```\nstruct Order\n include JSON::Serializable\n getter id : UUID\n getter customer_id : UUID\n getter line_items : Array(LineItem)\nend\n\nstruct LineItem\n include JSON::Serializable\n getter product_id : UUID\n getter quantity : Int32\n getter unit_price_cents : Int32\nend\n\n# Get the Order at the root\nredis.json.get(\"order:#{id}\", \".\", as: Order)\n# Get the LineItems at the `.line_items` JSONPath\n# Note the `$` at the beginning to make it an array\nredis.json.get(\"order:#{id}\", \"$.line_items\", as: Array(LineItem))\n# Get only the `product_id` properties of all the `line_items`\nredis.json.get(\"order:#{id}\", \"$.line_items..product_id\", as: Array(UUID))\n```\n\nNOTE: This method _cannot_ be used in a pipeline or `Redis::Connection#multi`\nblock because it operates on the value returned from the Redis server\ninside the method, which isn't possible when using pipelines or `multi`.","summary":"

    Get the value stored at the given JSONPath inside the given key, deserializing the value into the type T.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"type","external_name":"as","restriction":"T.class"}],"args_string":"(key : String, path : String, as type : T.class) : T | Nil forall T","args_html":"(key : String, path : String, as type : T.class) : T | Nil forall T","location":{"filename":"src/json.cr","line_number":138,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L138"},"def":{"name":"get","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"type","external_name":"as","restriction":"T.class"}],"return_type":"T | ::Nil","visibility":"Public","body":"if result = @redis.run({\"json.get\", key, path})\n T.from_json(result.as(String))\nend"}},{"html_id":"get(key:String,path:String)-instance-method","name":"get","doc":"Get the raw JSON string representation at the given `key` nested at the\ngiven JSONPath.\n\n```\nemail = redis.json.get(\"user:#{id}\", \".email\").as(String)\n# => \"me@example.com\"\n```","summary":"

    Get the raw JSON string representation at the given key nested at the given JSONPath.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"}],"args_string":"(key : String, path : String)","args_html":"(key : String, path : String)","location":{"filename":"src/json.cr","line_number":84,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L84"},"def":{"name":"get","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"}],"visibility":"Public","body":"@redis.run({\"json.get\", key, path})"}},{"html_id":"get(key:String,paths:Array(String),astype:T.class=::JSON::Any)forallT-instance-method","name":"get","doc":"Get the values stored at the specifed JSONPaths, deserializing them into\nthe specified type as values in a `Hash`.\n\n```\nif result = redis.json.get(\"posts:#{id}\", %w[title tags], as: String | Array(String))\n result # => {\"title\" => \"JSON with Redis\", tags: [\"redis\", \"json\", \"crystal\"]}\n typeof(result) # => Hash(String, String | Array(String))\nend\n```\n\nNOTE: This method _cannot_ be used in a pipeline or `Redis::Connection#multi`\nblock because it operates on the value returned from the Redis server,\nwhich isn't a thing when using pipelines or `multi`.","summary":"

    Get the values stored at the specifed JSONPaths, deserializing them into the specified type as values in a Hash.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"paths","external_name":"paths","restriction":"Array(String)"},{"name":"type","default_value":"::JSON::Any","external_name":"as","restriction":"T.class"}],"args_string":"(key : String, paths : Array(String), as type : T.class = ::JSON::Any) forall T","args_html":"(key : String, paths : Array(String), as type : T.class = ::JSON::Any) forall T","location":{"filename":"src/json.cr","line_number":101,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L101"},"def":{"name":"get","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"paths","external_name":"paths","restriction":"Array(String)"},{"name":"type","default_value":"::JSON::Any","external_name":"as","restriction":"T.class"}],"visibility":"Public","body":"if result = @redis.run([\"json.get\", key] + paths)\n Hash(String, T).from_json(result.as(String))\nend"}},{"html_id":"get(key:String)-instance-method","name":"get","doc":"Get the raw JSON string at the specified `key`","summary":"

    Get the raw JSON string at the specified key

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/json.cr","line_number":73,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L73"},"def":{"name":"get","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"@redis.run({\"json.get\", key})"}},{"html_id":"mget(keys:Array(String),path:String,astype:T.class):Array(T|Nil)forallT-instance-method","name":"mget","doc":"Get the values for all `keys` at the specified JSONPaths.\n\nNOTE: This method _cannot_ be used in a pipeline or `Redis::Connection#multi`\nblock because it operates on the value returned from the Redis server\ninside the method, which isn't possible when using pipelines or `multi`.\nNOTE: If you are using a cluster, the `keys` _must_ all be on the same\nshard, or you may only get some of them back with this method. When using\n`mget` in a cluster, you'll most likely want to use subhashed keys (with\n`{}` around the same part of the name) to ensure all keys are on the same\nshard.","summary":"

    Get the values for all keys at the specified JSONPaths.

    ","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"Array(String)"},{"name":"path","external_name":"path","restriction":"String"},{"name":"type","external_name":"as","restriction":"T.class"}],"args_string":"(keys : Array(String), path : String, as type : T.class) : Array(T | Nil) forall T","args_html":"(keys : Array(String), path : String, as type : T.class) : Array(T | Nil) forall T","location":{"filename":"src/json.cr","line_number":154,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L154"},"def":{"name":"mget","args":[{"name":"keys","external_name":"keys","restriction":"Array(String)"},{"name":"path","external_name":"path","restriction":"String"},{"name":"type","external_name":"as","restriction":"T.class"}],"return_type":"Array(T | ::Nil)","visibility":"Public","body":"if result = @redis.run(([\"json.mget\"] + keys) + [path])\n (result.as(Array)).map do |value|\n if value\n T.from_json(value.as(String))\n end\n end\nelse\n raise(\"lolwut?\")\nend"}},{"html_id":"numincrby(key:String,path:String,count:String|Int,astype:T.class):TforallT-instance-method","name":"numincrby","doc":"Increment the number at the specified JSONPath\n\n```\nredis.json.numincrby \"product:#{id}\", \".purchase_count\", 1, as: Int64\n# => 2\n```\n\nIf `key` exists and an incrementable number exists at the specified\nJSONPath (including the possibility of incrementing multiple numbers if\nthe JSONPath resolves to multiple numeric values), then this method\nreturns a value of type `T`. If the JSONPath resolves to multiple values\n(for example, it begins with \"$\" or is recursive), you will need to\nspecify that it can be an `Array` of that type.\n\nNOTE: This method cannot be used on deferred command runners like\n`Redis::Pipeline` or `Redis::Transaction`. It eagerly consumes the\nresult from the server, so the result must not be deferred.","summary":"

    Increment the number at the specified JSONPath

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"count","external_name":"count","restriction":"String | Int"},{"name":"type","external_name":"as","restriction":"T.class"}],"args_string":"(key : String, path : String, count : String | Int, as type : T.class) : T forall T","args_html":"(key : String, path : String, count : String | Int, as type : T.class) : T forall T","location":{"filename":"src/json.cr","line_number":206,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L206"},"def":{"name":"numincrby","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"count","external_name":"count","restriction":"String | Int"},{"name":"type","external_name":"as","restriction":"T.class"}],"return_type":"T","visibility":"Public","body":"T.from_json((numincrby(key, path, count)).as(String))"}},{"html_id":"numincrby(key:String,path:String,count:String|Int)-instance-method","name":"numincrby","doc":"Increment the number at the specified JSONPath\n\n```\nredis.json.numincrby \"product:#{id}\", \".purchase_count\", 1\n```","summary":"

    Increment the number at the specified JSONPath

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"count","external_name":"count","restriction":"String | Int"}],"args_string":"(key : String, path : String, count : String | Int)","args_html":"(key : String, path : String, count : String | Int)","location":{"filename":"src/json.cr","line_number":185,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L185"},"def":{"name":"numincrby","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"count","external_name":"count","restriction":"String | Int"}],"visibility":"Public","body":"@redis.run({\"json.numincrby\", key, path, count.to_s})"}},{"html_id":"set(key:String,path:String,value,*,nx=false,xx=false)-instance-method","name":"set","doc":"Set the given key to the given JSON `value`. The `value` will have\n`to_json` called on it automatically. The `nx` and `xx` arguments are\nidentical to `Redis::Commands#set`.\n\nStore a user at the root JSONPath (`.`) of the specified key:\n\n```\nstruct User\n include JSON::Serializable\n\n getter id : UUID\n getter name : String\n getter email : String\nend\n\nredis.json.set \"user:#{user.id}\", \".\", user\n```\n\nUpdate (with `xx` so we ensure the key exists) a user's email by setting\nthe new email value at the `.email` JSONPath:\n\n```\nredis.json.set \"user:#{id}\", \".email\", new_email, xx: true\n```","summary":"

    Set the given key to the given JSON value.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"value","external_name":"value","restriction":""},{"name":"","external_name":"","restriction":""},{"name":"nx","default_value":"false","external_name":"nx","restriction":""},{"name":"xx","default_value":"false","external_name":"xx","restriction":""}],"args_string":"(key : String, path : String, value, *, nx = false, xx = false)","args_html":"(key : String, path : String, value, *, nx = false, xx = false)","location":{"filename":"src/json.cr","line_number":64,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L64"},"def":{"name":"set","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"value","external_name":"value","restriction":""},{"name":"","external_name":"","restriction":""},{"name":"nx","default_value":"false","external_name":"nx","restriction":""},{"name":"xx","default_value":"false","external_name":"xx","restriction":""}],"splat_index":3,"visibility":"Public","body":"command = {\"json.set\", key, path, value.to_json}\nif nx\n command = command + {\"nx\"}\nend\nif xx\n command = command + {\"xx\"}\nend\n@redis.run(command)\n"}},{"html_id":"toggle(key:String,path:String)-instance-method","name":"toggle","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"}],"args_string":"(key : String, path : String)","args_html":"(key : String, path : String)","location":{"filename":"src/json.cr","line_number":210,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/json.cr#L210"},"def":{"name":"toggle","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"}],"visibility":"Public","body":"@redis.run({\"json.toggle\", key, path})"}}]},{"html_id":"redis/Redis/NoGroup","path":"Redis/NoGroup.html","kind":"class","full_name":"Redis::NoGroup","name":"NoGroup","abstract":false,"superclass":{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},"ancestors":[{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/errors.cr","line_number":16,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/errors.cr#L16"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"}},{"html_id":"redis/Redis/Parser","path":"Redis/Parser.html","kind":"struct","full_name":"Redis::Parser","name":"Parser","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/parser.cr","line_number":5,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/parser.cr#L5"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"constructors":[{"html_id":"new(io:IO)-class-method","name":"new","doc":"Initialize a parser to read from the given IO","summary":"

    Initialize a parser to read from the given IO

    ","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/parser.cr","line_number":7,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/parser.cr#L7"},"def":{"name":"new","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"_ = allocate\n_.initialize(io)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"read:Value-instance-method","name":"read","doc":"Read a `Redis::Value` from the parser's `IO`\n\nExample:\n\n```\nio = IO::Memory.new\nio << \"$3\\r\\n\"\nio << \"foo\\r\\n\"\nio.rewind\n\nParser.new(io).read # => \"foo\"\n```","summary":"

    Read a Redis::Value from the parser's IO

    ","abstract":false,"location":{"filename":"src/parser.cr","line_number":22,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/parser.cr#L22"},"def":{"name":"read","return_type":"Value","visibility":"Public","body":"read do\n raise(IO::Error.new(\"Connection closed\"))\nend"}},{"html_id":"read?-instance-method","name":"read?","doc":"Reads a value from the `IO`, returning `nil` on EOF.","summary":"

    Reads a value from the IO, returning nil on EOF.

    ","abstract":false,"location":{"filename":"src/parser.cr","line_number":27,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/parser.cr#L27"},"def":{"name":"read?","visibility":"Public","body":"if @io.closed?\n return\nend\nread do\n nil\nend\n"}}]},{"html_id":"redis/Redis/Pipeline","path":"Redis/Pipeline.html","kind":"class","full_name":"Redis::Pipeline","name":"Pipeline","abstract":false,"superclass":{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},{"html_id":"redis/Redis/Commands/Stream","kind":"module","full_name":"Redis::Commands::Stream","name":"Stream"},{"html_id":"redis/Redis/Commands/SortedSet","kind":"module","full_name":"Redis::Commands::SortedSet","name":"SortedSet"},{"html_id":"redis/Redis/Commands/Set","kind":"module","full_name":"Redis::Commands::Set","name":"Set"},{"html_id":"redis/Redis/Commands/List","kind":"module","full_name":"Redis::Commands::List","name":"List"},{"html_id":"redis/Redis/Commands/Hash","kind":"module","full_name":"Redis::Commands::Hash","name":"Hash"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/pipeline.cr","line_number":6,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/pipeline.cr#L6"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"constructors":[{"html_id":"new(connection:Connection)-class-method","name":"new","doc":"Wraps a connection so that our `run` and `commit` methods can execute against it.","summary":"

    Wraps a connection so that our #run and #commit methods can execute against it.

    ","abstract":false,"args":[{"name":"connection","external_name":"connection","restriction":"Connection"}],"args_string":"(connection : Connection)","args_html":"(connection : Connection)","location":{"filename":"src/pipeline.cr","line_number":12,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/pipeline.cr#L12"},"def":{"name":"new","args":[{"name":"connection","external_name":"connection","restriction":"Connection"}],"visibility":"Public","body":"_ = allocate\n_.initialize(connection)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"commit-instance-method","name":"commit","doc":"Read all of the return values from all of the commands we've sent to Redis\nand resolve all `Redis::Future`s with them in the order they were sent.","summary":"

    Read all of the return values from all of the commands we've sent to Redis and resolve all Redis::Futures with them in the order they were sent.

    ","abstract":false,"location":{"filename":"src/pipeline.cr","line_number":26,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/pipeline.cr#L26"},"def":{"name":"commit","visibility":"Public","body":"@futures.map(&.resolve(@connection.read))"}},{"html_id":"run(command)-instance-method","name":"run","doc":"The `run` method is required by the `Commands` mixin. When you run a Redis\ncommand, it gets pushed to the server via this method.","summary":"

    The #run method is required by the Commands mixin.

    ","abstract":false,"args":[{"name":"command","external_name":"command","restriction":""}],"args_string":"(command)","args_html":"(command)","location":{"filename":"src/pipeline.cr","line_number":17,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/pipeline.cr#L17"},"def":{"name":"run","args":[{"name":"command","external_name":"command","restriction":""}],"visibility":"Public","body":"@connection.encode(command)\nfuture = Future.new\n@futures << future\nfuture\n"}}]},{"html_id":"redis/Redis/Streaming","path":"Redis/Streaming.html","kind":"module","full_name":"Redis::Streaming","name":"Streaming","abstract":false,"locations":[{"filename":"src/streaming.cr","line_number":4,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L4"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"types":[{"html_id":"redis/Redis/Streaming/Message","path":"Redis/Streaming/Message.html","kind":"struct","full_name":"Redis::Streaming::Message","name":"Message","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/streaming.cr","line_number":92,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L92"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Streaming","kind":"module","full_name":"Redis::Streaming","name":"Streaming"},"constructors":[{"html_id":"new(message:Array)-class-method","name":"new","abstract":false,"args":[{"name":"message","external_name":"message","restriction":"Array"}],"args_string":"(message : Array)","args_html":"(message : Array)","location":{"filename":"src/streaming.cr","line_number":95,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L95"},"def":{"name":"new","args":[{"name":"message","external_name":"message","restriction":"Array"}],"visibility":"Public","body":"_ = allocate\n_.initialize(message)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"id:String-instance-method","name":"id","abstract":false,"location":{"filename":"src/streaming.cr","line_number":93,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L93"},"def":{"name":"id","visibility":"Public","body":"@id"}},{"html_id":"values:Hash(String,String)-instance-method","name":"values","abstract":false,"location":{"filename":"src/streaming.cr","line_number":93,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L93"},"def":{"name":"values","visibility":"Public","body":"@values"}}]},{"html_id":"redis/Redis/Streaming/XAutoClaimResponse","path":"Redis/Streaming/XAutoClaimResponse.html","kind":"struct","full_name":"Redis::Streaming::XAutoClaimResponse","name":"XAutoClaimResponse","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/streaming.cr","line_number":77,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L77"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Streaming","kind":"module","full_name":"Redis::Streaming","name":"Streaming"},"constructors":[{"html_id":"new(response:Array)-class-method","name":"new","abstract":false,"args":[{"name":"response","external_name":"response","restriction":"Array"}],"args_string":"(response : Array)","args_html":"(response : Array)","location":{"filename":"src/streaming.cr","line_number":81,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L81"},"def":{"name":"new","args":[{"name":"response","external_name":"response","restriction":"Array"}],"visibility":"Public","body":"_ = allocate\n_.initialize(response)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"id:String-instance-method","name":"id","abstract":false,"location":{"filename":"src/streaming.cr","line_number":78,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L78"},"def":{"name":"id","return_type":"String","visibility":"Public","body":"@id"}},{"html_id":"messages:Array(Message)-instance-method","name":"messages","abstract":false,"location":{"filename":"src/streaming.cr","line_number":79,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L79"},"def":{"name":"messages","return_type":"Array(Message)","visibility":"Public","body":"@messages"}}]},{"html_id":"redis/Redis/Streaming/XPendingBaseResponse","path":"Redis/Streaming/XPendingBaseResponse.html","kind":"struct","full_name":"Redis::Streaming::XPendingBaseResponse","name":"XPendingBaseResponse","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/streaming.cr","line_number":5,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L5"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Streaming","kind":"module","full_name":"Redis::Streaming","name":"Streaming"},"constructors":[{"html_id":"new(response:Array)-class-method","name":"new","abstract":false,"args":[{"name":"response","external_name":"response","restriction":"Array"}],"args_string":"(response : Array)","args_html":"(response : Array)","location":{"filename":"src/streaming.cr","line_number":8,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L8"},"def":{"name":"new","args":[{"name":"response","external_name":"response","restriction":"Array"}],"visibility":"Public","body":"_ = allocate\n_.initialize(response)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"count:Int64-instance-method","name":"count","abstract":false,"location":{"filename":"src/streaming.cr","line_number":6,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L6"},"def":{"name":"count","visibility":"Public","body":"@count"}},{"html_id":"data:Array(Data)-instance-method","name":"data","abstract":false,"location":{"filename":"src/streaming.cr","line_number":6,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L6"},"def":{"name":"data","return_type":"Array(Data)","visibility":"Public","body":"@data"}},{"html_id":"earliest:String-instance-method","name":"earliest","abstract":false,"location":{"filename":"src/streaming.cr","line_number":6,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L6"},"def":{"name":"earliest","visibility":"Public","body":"@earliest"}},{"html_id":"latest:String-instance-method","name":"latest","abstract":false,"location":{"filename":"src/streaming.cr","line_number":6,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L6"},"def":{"name":"latest","visibility":"Public","body":"@latest"}}],"types":[{"html_id":"redis/Redis/Streaming/XPendingBaseResponse/Data","path":"Redis/Streaming/XPendingBaseResponse/Data.html","kind":"struct","full_name":"Redis::Streaming::XPendingBaseResponse::Data","name":"Data","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/streaming.cr","line_number":21,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L21"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Streaming/XPendingBaseResponse","kind":"struct","full_name":"Redis::Streaming::XPendingBaseResponse","name":"XPendingBaseResponse"},"constructors":[{"html_id":"new(consumer:String,pending_count:Int64)-class-method","name":"new","abstract":false,"args":[{"name":"consumer","external_name":"consumer","restriction":"String"},{"name":"pending_count","external_name":"pending_count","restriction":"Int64"}],"args_string":"(consumer : String, pending_count : Int64)","args_html":"(consumer : String, pending_count : Int64)","location":{"filename":"src/streaming.cr","line_number":21,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L21"},"def":{"name":"new","args":[{"name":"consumer","external_name":"consumer","restriction":"String"},{"name":"pending_count","external_name":"pending_count","restriction":"Int64"}],"visibility":"Public","body":"_ = allocate\n_.initialize(consumer, pending_count)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/streaming.cr","line_number":21,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L21"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@consumer.clone, @pending_count.clone)"}},{"html_id":"consumer:String-instance-method","name":"consumer","abstract":false,"def":{"name":"consumer","return_type":"String","visibility":"Public","body":"@consumer"}},{"html_id":"copy_with(consumer_consumer=@consumer,pending_count_pending_count=@pending_count)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_consumer","default_value":"@consumer","external_name":"consumer","restriction":""},{"name":"_pending_count","default_value":"@pending_count","external_name":"pending_count","restriction":""}],"args_string":"(consumer _consumer = @consumer, pending_count _pending_count = @pending_count)","args_html":"(consumer _consumer = @consumer, pending_count _pending_count = @pending_count)","location":{"filename":"src/streaming.cr","line_number":21,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L21"},"def":{"name":"copy_with","args":[{"name":"_consumer","default_value":"@consumer","external_name":"consumer","restriction":""},{"name":"_pending_count","default_value":"@pending_count","external_name":"pending_count","restriction":""}],"visibility":"Public","body":"self.class.new(_consumer, _pending_count)"}},{"html_id":"pending_count:Int64-instance-method","name":"pending_count","abstract":false,"def":{"name":"pending_count","return_type":"Int64","visibility":"Public","body":"@pending_count"}}]}]},{"html_id":"redis/Redis/Streaming/XPendingExtendedResponse","path":"Redis/Streaming/XPendingExtendedResponse.html","kind":"struct","full_name":"Redis::Streaming::XPendingExtendedResponse","name":"XPendingExtendedResponse","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/streaming.cr","line_number":24,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L24"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Streaming","kind":"module","full_name":"Redis::Streaming","name":"Streaming"},"constructors":[{"html_id":"new(data:Array,now:Time=Time.utc)-class-method","name":"new","abstract":false,"args":[{"name":"data","external_name":"data","restriction":"Array"},{"name":"now","default_value":"Time.utc","external_name":"now","restriction":"Time"}],"args_string":"(data : Array, now : Time = Time.utc)","args_html":"(data : Array, now : Time = Time.utc)","location":{"filename":"src/streaming.cr","line_number":27,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L27"},"def":{"name":"new","args":[{"name":"data","external_name":"data","restriction":"Array"},{"name":"now","default_value":"Time.utc","external_name":"now","restriction":"Time"}],"visibility":"Public","body":"_ = allocate\n_.initialize(data, now)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"messages:Array(MessageData)-instance-method","name":"messages","abstract":false,"location":{"filename":"src/streaming.cr","line_number":25,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L25"},"def":{"name":"messages","return_type":"Array(MessageData)","visibility":"Public","body":"@messages"}}],"types":[{"html_id":"redis/Redis/Streaming/XPendingExtendedResponse/MessageData","path":"Redis/Streaming/XPendingExtendedResponse/MessageData.html","kind":"struct","full_name":"Redis::Streaming::XPendingExtendedResponse::MessageData","name":"MessageData","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/streaming.cr","line_number":40,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L40"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Streaming/XPendingExtendedResponse","kind":"struct","full_name":"Redis::Streaming::XPendingExtendedResponse","name":"XPendingExtendedResponse"},"constructors":[{"html_id":"new(id:String,consumer:String,last_delivered_at:Time,delivery_count:Int64)-class-method","name":"new","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"::String"},{"name":"consumer","external_name":"consumer","restriction":"::String"},{"name":"last_delivered_at","external_name":"last_delivered_at","restriction":"::Time"},{"name":"delivery_count","external_name":"delivery_count","restriction":"::Int64"}],"args_string":"(id : String, consumer : String, last_delivered_at : Time, delivery_count : Int64)","args_html":"(id : String, consumer : String, last_delivered_at : Time, delivery_count : Int64)","location":{"filename":"src/streaming.cr","line_number":46,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L46"},"def":{"name":"new","args":[{"name":"id","external_name":"id","restriction":"::String"},{"name":"consumer","external_name":"consumer","restriction":"::String"},{"name":"last_delivered_at","external_name":"last_delivered_at","restriction":"::Time"},{"name":"delivery_count","external_name":"delivery_count","restriction":"::Int64"}],"visibility":"Public","body":"_ = allocate\n_.initialize(id, consumer, last_delivered_at, delivery_count)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"age-instance-method","name":"age","abstract":false,"location":{"filename":"src/streaming.cr","line_number":49,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L49"},"def":{"name":"age","visibility":"Public","body":"Time.utc - last_delivered_at"}},{"html_id":"consumer:String-instance-method","name":"consumer","abstract":false,"location":{"filename":"src/streaming.cr","line_number":42,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L42"},"def":{"name":"consumer","return_type":"String","visibility":"Public","body":"@consumer"}},{"html_id":"delivery_count:Int64-instance-method","name":"delivery_count","abstract":false,"location":{"filename":"src/streaming.cr","line_number":44,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L44"},"def":{"name":"delivery_count","return_type":"Int64","visibility":"Public","body":"@delivery_count"}},{"html_id":"id:String-instance-method","name":"id","abstract":false,"location":{"filename":"src/streaming.cr","line_number":41,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L41"},"def":{"name":"id","return_type":"String","visibility":"Public","body":"@id"}},{"html_id":"last_delivered_at:Time-instance-method","name":"last_delivered_at","abstract":false,"location":{"filename":"src/streaming.cr","line_number":43,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L43"},"def":{"name":"last_delivered_at","return_type":"Time","visibility":"Public","body":"@last_delivered_at"}}]}]},{"html_id":"redis/Redis/Streaming/XReadGroupResponse","path":"Redis/Streaming/XReadGroupResponse.html","kind":"struct","full_name":"Redis::Streaming::XReadGroupResponse","name":"XReadGroupResponse","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/streaming.cr","line_number":55,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L55"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Streaming","kind":"module","full_name":"Redis::Streaming","name":"Streaming"},"constructors":[{"html_id":"new(response:Array(Redis::Value))-class-method","name":"new","abstract":false,"args":[{"name":"response","external_name":"response","restriction":"Array(Redis::Value)"}],"args_string":"(response : Array(Redis::Value))","args_html":"(response : Array(Redis::Value))","location":{"filename":"src/streaming.cr","line_number":58,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L58"},"def":{"name":"new","args":[{"name":"response","external_name":"response","restriction":"Array(Redis::Value)"}],"visibility":"Public","body":"_ = allocate\n_.initialize(response)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"results:Array(Redis::Streaming::XReadGroupResponse::Result)-instance-method","name":"results","abstract":false,"location":{"filename":"src/streaming.cr","line_number":56,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L56"},"def":{"name":"results","visibility":"Public","body":"@results"}}],"types":[{"html_id":"redis/Redis/Streaming/XReadGroupResponse/Result","path":"Redis/Streaming/XReadGroupResponse/Result.html","kind":"struct","full_name":"Redis::Streaming::XReadGroupResponse::Result","name":"Result","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/streaming.cr","line_number":67,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L67"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Streaming/XReadGroupResponse","kind":"struct","full_name":"Redis::Streaming::XReadGroupResponse","name":"XReadGroupResponse"},"constructors":[{"html_id":"new(key:String,messages:Array)-class-method","name":"new","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"messages","external_name":"messages","restriction":"Array"}],"args_string":"(key : String, messages : Array)","args_html":"(key : String, messages : Array)","location":{"filename":"src/streaming.cr","line_number":71,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L71"},"def":{"name":"new","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"messages","external_name":"messages","restriction":"Array"}],"visibility":"Public","body":"_ = allocate\n_.initialize(key, messages)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"key:String-instance-method","name":"key","abstract":false,"location":{"filename":"src/streaming.cr","line_number":69,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L69"},"def":{"name":"key","return_type":"String","visibility":"Public","body":"@key"}},{"html_id":"messages:Array(Message)-instance-method","name":"messages","abstract":false,"location":{"filename":"src/streaming.cr","line_number":68,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/streaming.cr#L68"},"def":{"name":"messages","return_type":"Array(Message)","visibility":"Public","body":"@messages"}}]}]}]},{"html_id":"redis/Redis/Subscription","path":"Redis/Subscription.html","kind":"class","full_name":"Redis::Subscription","name":"Subscription","abstract":false,"superclass":{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/connection.cr","line_number":484,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L484"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"doc":"The `Subscription` is what is yielded to a `Connection#subscribe` block. It\nis used to setup callbacks when messages come in, the connection is\nsubscribed to other channels or patterns, or unsubscribed from any channels\nor patterns.\n\n```\nredis.subscribe \"channel1\", \"channel2\" do |subscription, connection|\n subscription.on_message do |channel, message|\n if message == \"unsubscribe\"\n connection.unsubscribe channel\n end\n\n # ...\n end\n\n # Respond to new subscribers\n subscription.on_subscribe do |channel, sub_count|\n connection.incr \"sub_count:#{channel}\"\n end\n\n # Respond to losing subscribers\n subscription.on_unsubscribe do |channel, sub_count|\n connection.incr \"sub_count:#{channel}\"\n end\nend\n```\n\nFor more information, see the documentation for:\n- [`SUBSCRIBE`](https://redis.io/commands/subscribe/)\n- [`PSUBSCRIBE`](https://redis.io/commands/psubscribe/)","summary":"

    The Subscription is what is yielded to a Connection#subscribe block.

    ","instance_methods":[{"html_id":"close-instance-method","name":"close","abstract":false,"location":{"filename":"src/connection.cr","line_number":571,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L571"},"def":{"name":"close","visibility":"Public","body":"@channels.each do |channel|\n @connection.unsubscribe(channel)\nend"}},{"html_id":"on_message(&on_message:String,String,String->)-instance-method","name":"on_message","doc":"Define a callback for when a new message is received.\n\n```\nsubscription.on_message do |channel, message|\n pp channel: channel, message: message\nend\n```","summary":"

    Define a callback for when a new message is received.

    ","abstract":false,"location":{"filename":"src/connection.cr","line_number":501,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L501"},"def":{"name":"on_message","yields":3,"block_arity":3,"block_arg":{"name":"on_message","external_name":"on_message","restriction":"(String, String, String ->)"},"visibility":"Public","body":"@on_message = on_message\nself\n"}},{"html_id":"on_subscribe(&on_subscribe:String,Int64->)-instance-method","name":"on_subscribe","doc":"Define a callback to execute when the connection is subscribed to another\nchannel.","summary":"

    Define a callback to execute when the connection is subscribed to another channel.

    ","abstract":false,"location":{"filename":"src/connection.cr","line_number":507,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L507"},"def":{"name":"on_subscribe","yields":2,"block_arity":2,"block_arg":{"name":"on_subscribe","external_name":"on_subscribe","restriction":"(String, Int64 ->)"},"visibility":"Public","body":"@on_subscribe = on_subscribe\nself\n"}},{"html_id":"on_unsubscribe(&on_unsubscribe:String,Int64->)-instance-method","name":"on_unsubscribe","doc":"Define a callback to execute when the connection is unsubscribed from\nanother channel.","summary":"

    Define a callback to execute when the connection is unsubscribed from another channel.

    ","abstract":false,"location":{"filename":"src/connection.cr","line_number":513,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L513"},"def":{"name":"on_unsubscribe","yields":2,"block_arity":2,"block_arg":{"name":"on_unsubscribe","external_name":"on_unsubscribe","restriction":"(String, Int64 ->)"},"visibility":"Public","body":"@on_unsubscribe = on_unsubscribe\nself\n"}}],"types":[{"html_id":"redis/Redis/Subscription/InvalidMessage","path":"Redis/Subscription/InvalidMessage.html","kind":"class","full_name":"Redis::Subscription::InvalidMessage","name":"InvalidMessage","abstract":false,"superclass":{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},"ancestors":[{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/connection.cr","line_number":577,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/connection.cr#L577"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Subscription","kind":"class","full_name":"Redis::Subscription","name":"Subscription"}}]},{"html_id":"redis/Redis/TimeSeries","path":"Redis/TimeSeries.html","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":13,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L13"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"doc":"Time-series support for Redis using the\n[RedisTimeSeries module](https://oss.redis.com/redistimeseries/).\n\n```\nrequire \"redis\"\nrequire \"redis/time_series\"\n```","summary":"

    Time-series support for Redis using the RedisTimeSeries module.

    \n

    EXPERIMENTAL Support for the Redis TimeSeries module is subject to change.

    ","instance_methods":[{"html_id":"add(key:String,value:Float64|Int64,retention:Time::Span|Nil=nil,encoding:Encoding|Nil=nil,chunk_size:Int64|Nil=nil,on_duplicateduplicate_policy:DuplicatePolicy|Nil=nil,labels:Hash(String,String|Int32|Int64)|Nil=nil)-instance-method","name":"add","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"value","external_name":"value","restriction":"Float64 | Int64"},{"name":"retention","default_value":"nil","external_name":"retention","restriction":"Time::Span | ::Nil"},{"name":"encoding","default_value":"nil","external_name":"encoding","restriction":"Encoding | ::Nil"},{"name":"chunk_size","default_value":"nil","external_name":"chunk_size","restriction":"Int64 | ::Nil"},{"name":"duplicate_policy","default_value":"nil","external_name":"on_duplicate","restriction":"DuplicatePolicy | ::Nil"},{"name":"labels","default_value":"nil","external_name":"labels","restriction":"Hash(String, String | Int32 | Int64) | ::Nil"}],"args_string":"(key : String, value : Float64 | Int64, retention : Time::Span | Nil = nil, encoding : Encoding | Nil = nil, chunk_size : Int64 | Nil = nil, on_duplicate duplicate_policy : DuplicatePolicy | Nil = nil, labels : Hash(String, String | Int32 | Int64) | Nil = nil)","args_html":"(key : String, value : Float64 | Int64, retention : Time::Span | Nil = nil, encoding : Encoding | Nil = nil, chunk_size : Int64 | Nil = nil, on_duplicate duplicate_policy : DuplicatePolicy | Nil = nil, labels : Hash(String, String | Int32 | Int64) | Nil = nil)","location":{"filename":"src/time_series.cr","line_number":54,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L54"},"def":{"name":"add","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"value","external_name":"value","restriction":"Float64 | Int64"},{"name":"retention","default_value":"nil","external_name":"retention","restriction":"Time::Span | ::Nil"},{"name":"encoding","default_value":"nil","external_name":"encoding","restriction":"Encoding | ::Nil"},{"name":"chunk_size","default_value":"nil","external_name":"chunk_size","restriction":"Int64 | ::Nil"},{"name":"duplicate_policy","default_value":"nil","external_name":"on_duplicate","restriction":"DuplicatePolicy | ::Nil"},{"name":"labels","default_value":"nil","external_name":"labels","restriction":"Hash(String, String | Int32 | Int64) | ::Nil"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 12 + ((labels.try(&.size) || 0) * 2))\n(((command << \"ts.add\") << key) << \"*\") << value.to_s\nif retention\n (command << \"retention\") << retention.total_milliseconds.to_i64.to_s\nend\nif encoding\n (command << \"encoding\") << encoding.to_s\nend\nif chunk_size\n (command << \"chunk_size\") << chunk_size.to_s\nend\nif duplicate_policy\n (command << \"on_duplicate\") << duplicate_policy.to_s\nend\nif labels && labels.any?\n command << \"labels\"\n labels.each do |key, value|\n (command << key) << value.to_s\n end\nend\n@redis.run(command)\n"}},{"html_id":"add(key:String,timestamp:Time,value:Float64|Int64,retention:Time::Span|Nil=nil,encoding:Encoding|Nil=nil,chunk_size:Int64|Nil=nil,on_duplicateduplicate_policy:DuplicatePolicy|Nil=nil,labels:Hash(String,String|Int32|Int64)|Nil=nil)-instance-method","name":"add","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"timestamp","external_name":"timestamp","restriction":"Time"},{"name":"value","external_name":"value","restriction":"Float64 | Int64"},{"name":"retention","default_value":"nil","external_name":"retention","restriction":"Time::Span | ::Nil"},{"name":"encoding","default_value":"nil","external_name":"encoding","restriction":"Encoding | ::Nil"},{"name":"chunk_size","default_value":"nil","external_name":"chunk_size","restriction":"Int64 | ::Nil"},{"name":"duplicate_policy","default_value":"nil","external_name":"on_duplicate","restriction":"DuplicatePolicy | ::Nil"},{"name":"labels","default_value":"nil","external_name":"labels","restriction":"Hash(String, String | Int32 | Int64) | ::Nil"}],"args_string":"(key : String, timestamp : Time, value : Float64 | Int64, retention : Time::Span | Nil = nil, encoding : Encoding | Nil = nil, chunk_size : Int64 | Nil = nil, on_duplicate duplicate_policy : DuplicatePolicy | Nil = nil, labels : Hash(String, String | Int32 | Int64) | Nil = nil)","args_html":"(key : String, timestamp : Time, value : Float64 | Int64, retention : Time::Span | Nil = nil, encoding : Encoding | Nil = nil, chunk_size : Int64 | Nil = nil, on_duplicate duplicate_policy : DuplicatePolicy | Nil = nil, labels : Hash(String, String | Int32 | Int64) | Nil = nil)","location":{"filename":"src/time_series.cr","line_number":91,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L91"},"def":{"name":"add","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"timestamp","external_name":"timestamp","restriction":"Time"},{"name":"value","external_name":"value","restriction":"Float64 | Int64"},{"name":"retention","default_value":"nil","external_name":"retention","restriction":"Time::Span | ::Nil"},{"name":"encoding","default_value":"nil","external_name":"encoding","restriction":"Encoding | ::Nil"},{"name":"chunk_size","default_value":"nil","external_name":"chunk_size","restriction":"Int64 | ::Nil"},{"name":"duplicate_policy","default_value":"nil","external_name":"on_duplicate","restriction":"DuplicatePolicy | ::Nil"},{"name":"labels","default_value":"nil","external_name":"labels","restriction":"Hash(String, String | Int32 | Int64) | ::Nil"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 13 + ((labels.try(&.size) || 0) * 2))\n(((command << \"ts.add\") << key) << timestamp.to_unix_ms.to_s) << value.to_s\nif retention\n (command << \"retention\") << retention.total_milliseconds.to_i64.to_s\nend\nif encoding\n (command << \"encoding\") << encoding.to_s\nend\nif chunk_size\n (command << \"chunk_size\") << chunk_size.to_s\nend\nif duplicate_policy\n (command << \"on_duplicate\") << duplicate_policy.to_s\nend\nif labels && labels.any?\n command << \"labels\"\n labels.each do |key, value|\n (command << key) << value.to_s\n end\nend\n@redis.run(command)\n"}},{"html_id":"aggregation(aggregator:AggregationType,bucket_duration:Time::Span,align:Alignment|Time|Nil=nil,buckettimestamp:BucketTimestamp|Nil=nil,empty:Bool|Nil=nil)-instance-method","name":"aggregation","abstract":false,"args":[{"name":"aggregator","external_name":"aggregator","restriction":"AggregationType"},{"name":"bucket_duration","external_name":"bucket_duration","restriction":"Time::Span"},{"name":"align","default_value":"nil","external_name":"align","restriction":"Alignment | Time | Nil"},{"name":"buckettimestamp","default_value":"nil","external_name":"buckettimestamp","restriction":"BucketTimestamp | ::Nil"},{"name":"empty","default_value":"nil","external_name":"empty","restriction":"Bool | ::Nil"}],"args_string":"(aggregator : AggregationType, bucket_duration : Time::Span, align : Alignment | Time | Nil = nil, buckettimestamp : BucketTimestamp | Nil = nil, empty : Bool | Nil = nil)","args_html":"(aggregator : AggregationType, bucket_duration : Time::Span, align : Alignment | Time | Nil = nil, buckettimestamp : BucketTimestamp | Nil = nil, empty : Bool | Nil = nil)","location":{"filename":"src/time_series.cr","line_number":153,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L153"},"def":{"name":"aggregation","args":[{"name":"aggregator","external_name":"aggregator","restriction":"AggregationType"},{"name":"bucket_duration","external_name":"bucket_duration","restriction":"Time::Span"},{"name":"align","default_value":"nil","external_name":"align","restriction":"Alignment | Time | Nil"},{"name":"buckettimestamp","default_value":"nil","external_name":"buckettimestamp","restriction":"BucketTimestamp | ::Nil"},{"name":"empty","default_value":"nil","external_name":"empty","restriction":"Bool | ::Nil"}],"visibility":"Public","body":"Aggregation.new(aggregator: aggregator, bucket_duration: bucket_duration, alignment: align, buckettimestamp: buckettimestamp, empty: empty)"}},{"html_id":"create(key:String,retention:Time::Span|Nil=nil,encoding:Encoding|Nil=nil,chunk_size:Int64|Nil=nil,duplicate_policy:DuplicatePolicy|Nil=nil,labels:Hash(String,String|Int32|Int64)|Nil=nil)-instance-method","name":"create","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"retention","default_value":"nil","external_name":"retention","restriction":"Time::Span | ::Nil"},{"name":"encoding","default_value":"nil","external_name":"encoding","restriction":"Encoding | ::Nil"},{"name":"chunk_size","default_value":"nil","external_name":"chunk_size","restriction":"Int64 | ::Nil"},{"name":"duplicate_policy","default_value":"nil","external_name":"duplicate_policy","restriction":"DuplicatePolicy | ::Nil"},{"name":"labels","default_value":"nil","external_name":"labels","restriction":"Hash(String, String | Int32 | Int64) | ::Nil"}],"args_string":"(key : String, retention : Time::Span | Nil = nil, encoding : Encoding | Nil = nil, chunk_size : Int64 | Nil = nil, duplicate_policy : DuplicatePolicy | Nil = nil, labels : Hash(String, String | Int32 | Int64) | Nil = nil)","args_html":"(key : String, retention : Time::Span | Nil = nil, encoding : Encoding | Nil = nil, chunk_size : Int64 | Nil = nil, duplicate_policy : DuplicatePolicy | Nil = nil, labels : Hash(String, String | Int32 | Int64) | Nil = nil)","location":{"filename":"src/time_series.cr","line_number":18,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L18"},"def":{"name":"create","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"retention","default_value":"nil","external_name":"retention","restriction":"Time::Span | ::Nil"},{"name":"encoding","default_value":"nil","external_name":"encoding","restriction":"Encoding | ::Nil"},{"name":"chunk_size","default_value":"nil","external_name":"chunk_size","restriction":"Int64 | ::Nil"},{"name":"duplicate_policy","default_value":"nil","external_name":"duplicate_policy","restriction":"DuplicatePolicy | ::Nil"},{"name":"labels","default_value":"nil","external_name":"labels","restriction":"Hash(String, String | Int32 | Int64) | ::Nil"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 11 + ((labels.try(&.size) || 0) * 2))\n(command << \"ts.create\") << key\nif retention\n (command << \"retention\") << retention.total_milliseconds.to_i64.to_s\nend\nif encoding\n (command << \"encoding\") << encoding.to_s\nend\nif chunk_size\n (command << \"chunk_size\") << chunk_size.to_s\nend\nif duplicate_policy\n (command << \"duplicate_policy\") << duplicate_policy.to_s\nend\nif labels && labels.any?\n command << \"labels\"\n labels.each do |key, value|\n (command << key) << value.to_s\n end\nend\n@redis.run(command)\n"}},{"html_id":"get(key:String)-instance-method","name":"get","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/time_series.cr","line_number":126,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L126"},"def":{"name":"get","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"@redis.run({\"ts.get\", key})"}},{"html_id":"info(key:String)-instance-method","name":"info","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/time_series.cr","line_number":145,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L145"},"def":{"name":"info","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"@redis.run({\"ts.info\", key})"}},{"html_id":"mrange(time_range:::Range(Time,Time|Nil),filter:String,filter_by_ts:Enumerable(Time)|Nil=nil,filter_by_value:::Range(Float64,Float64)|Nil=nil,withlabels:Bool|Nil=nil,selected_labels:Enumerable(String)|Nil=nil,count:Int|Nil=nil,aggregation:Aggregation|Nil=nil,groupby:String|Nil=nil,reduce:String|Nil=nil)-instance-method","name":"mrange","abstract":false,"args":[{"name":"time_range","external_name":"time_range","restriction":"::Range(Time, Time | ::Nil)"},{"name":"filter","external_name":"filter","restriction":"String"},{"name":"filter_by_ts","default_value":"nil","external_name":"filter_by_ts","restriction":"Enumerable(Time) | ::Nil"},{"name":"filter_by_value","default_value":"nil","external_name":"filter_by_value","restriction":"::Range(Float64, Float64) | ::Nil"},{"name":"withlabels","default_value":"nil","external_name":"withlabels","restriction":"Bool | ::Nil"},{"name":"selected_labels","default_value":"nil","external_name":"selected_labels","restriction":"Enumerable(String) | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"Int | ::Nil"},{"name":"aggregation","default_value":"nil","external_name":"aggregation","restriction":"Aggregation | ::Nil"},{"name":"groupby","default_value":"nil","external_name":"groupby","restriction":"String | ::Nil"},{"name":"reduce","default_value":"nil","external_name":"reduce","restriction":"String | ::Nil"}],"args_string":"(time_range : ::Range(Time, Time | Nil), filter : String, filter_by_ts : Enumerable(Time) | Nil = nil, filter_by_value : ::Range(Float64, Float64) | Nil = nil, withlabels : Bool | Nil = nil, selected_labels : Enumerable(String) | Nil = nil, count : Int | Nil = nil, aggregation : Aggregation | Nil = nil, groupby : String | Nil = nil, reduce : String | Nil = nil)","args_html":"(time_range : ::Range(Time, Time | Nil), filter : String, filter_by_ts : Enumerable(Time) | Nil = nil, filter_by_value : ::Range(Float64, Float64) | Nil = nil, withlabels : Bool | Nil = nil, selected_labels : Enumerable(String) | Nil = nil, count : Int | Nil = nil, aggregation : Aggregation | Nil = nil, groupby : String | Nil = nil, reduce : String | Nil = nil)","location":{"filename":"src/time_series.cr","line_number":181,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L181"},"def":{"name":"mrange","args":[{"name":"time_range","external_name":"time_range","restriction":"::Range(Time, Time | ::Nil)"},{"name":"filter","external_name":"filter","restriction":"String"},{"name":"filter_by_ts","default_value":"nil","external_name":"filter_by_ts","restriction":"Enumerable(Time) | ::Nil"},{"name":"filter_by_value","default_value":"nil","external_name":"filter_by_value","restriction":"::Range(Float64, Float64) | ::Nil"},{"name":"withlabels","default_value":"nil","external_name":"withlabels","restriction":"Bool | ::Nil"},{"name":"selected_labels","default_value":"nil","external_name":"selected_labels","restriction":"Enumerable(String) | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"Int | ::Nil"},{"name":"aggregation","default_value":"nil","external_name":"aggregation","restriction":"Aggregation | ::Nil"},{"name":"groupby","default_value":"nil","external_name":"groupby","restriction":"String | ::Nil"},{"name":"reduce","default_value":"nil","external_name":"reduce","restriction":"String | ::Nil"}],"visibility":"Public","body":"mrange(time_range: time_range, filter: [filter], filter_by_ts: filter_by_ts, filter_by_value: filter_by_value, withlabels: withlabels, selected_labels: selected_labels, count: count, aggregation: aggregation, groupby: groupby, reduce: reduce)"}},{"html_id":"mrange(time_range:::Range(Time,Time|Nil),filter:Array(String),filter_by_ts:Enumerable(Time)|Nil=nil,filter_by_value:::Range(Float64,Float64)|Nil=nil,withlabels:Bool|Nil=nil,selected_labels:Enumerable(String)|Nil=nil,count:Int|Nil=nil,aggregation:Aggregation|Nil=nil,groupby:String|Nil=nil,reduce:String|Nil=nil)-instance-method","name":"mrange","abstract":false,"args":[{"name":"time_range","external_name":"time_range","restriction":"::Range(Time, Time | ::Nil)"},{"name":"filter","external_name":"filter","restriction":"Array(String)"},{"name":"filter_by_ts","default_value":"nil","external_name":"filter_by_ts","restriction":"Enumerable(Time) | ::Nil"},{"name":"filter_by_value","default_value":"nil","external_name":"filter_by_value","restriction":"::Range(Float64, Float64) | ::Nil"},{"name":"withlabels","default_value":"nil","external_name":"withlabels","restriction":"Bool | ::Nil"},{"name":"selected_labels","default_value":"nil","external_name":"selected_labels","restriction":"Enumerable(String) | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"Int | ::Nil"},{"name":"aggregation","default_value":"nil","external_name":"aggregation","restriction":"Aggregation | ::Nil"},{"name":"groupby","default_value":"nil","external_name":"groupby","restriction":"String | ::Nil"},{"name":"reduce","default_value":"nil","external_name":"reduce","restriction":"String | ::Nil"}],"args_string":"(time_range : ::Range(Time, Time | Nil), filter : Array(String), filter_by_ts : Enumerable(Time) | Nil = nil, filter_by_value : ::Range(Float64, Float64) | Nil = nil, withlabels : Bool | Nil = nil, selected_labels : Enumerable(String) | Nil = nil, count : Int | Nil = nil, aggregation : Aggregation | Nil = nil, groupby : String | Nil = nil, reduce : String | Nil = nil)","args_html":"(time_range : ::Range(Time, Time | Nil), filter : Array(String), filter_by_ts : Enumerable(Time) | Nil = nil, filter_by_value : ::Range(Float64, Float64) | Nil = nil, withlabels : Bool | Nil = nil, selected_labels : Enumerable(String) | Nil = nil, count : Int | Nil = nil, aggregation : Aggregation | Nil = nil, groupby : String | Nil = nil, reduce : String | Nil = nil)","location":{"filename":"src/time_series.cr","line_number":207,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L207"},"def":{"name":"mrange","args":[{"name":"time_range","external_name":"time_range","restriction":"::Range(Time, Time | ::Nil)"},{"name":"filter","external_name":"filter","restriction":"Array(String)"},{"name":"filter_by_ts","default_value":"nil","external_name":"filter_by_ts","restriction":"Enumerable(Time) | ::Nil"},{"name":"filter_by_value","default_value":"nil","external_name":"filter_by_value","restriction":"::Range(Float64, Float64) | ::Nil"},{"name":"withlabels","default_value":"nil","external_name":"withlabels","restriction":"Bool | ::Nil"},{"name":"selected_labels","default_value":"nil","external_name":"selected_labels","restriction":"Enumerable(String) | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"Int | ::Nil"},{"name":"aggregation","default_value":"nil","external_name":"aggregation","restriction":"Aggregation | ::Nil"},{"name":"groupby","default_value":"nil","external_name":"groupby","restriction":"String | ::Nil"},{"name":"reduce","default_value":"nil","external_name":"reduce","restriction":"String | ::Nil"}],"visibility":"Public","body":"from = time_range.begin\nto = time_range.end || (Time::UNIX_EPOCH + Int32::MAX.seconds)\ncommand_size = (((((((((((1 + 2) + 1) + (filter_by_ts.try(&.size) || 0)) + 3) + 1) + 1) + (selected_labels.try(&.size) || 0)) + 2) + 8) + 1) + filter.size) + 4\ncommand = Array(String).new(initial_capacity: command_size)\n((command << \"ts.mrange\") << from.to_unix_ms.to_s) << to.to_unix_ms.to_s\nif filter_by_ts\n command << \"filter_by_ts\"\n filter_by_ts.each do |ts|\n command << ts.to_unix_ms.to_s\n end\nend\nif filter_by_value\n command << \"filter_by_value\"\n command << filter_by_value.begin.to_s\n command << filter_by_value.end.to_s\nend\nif withlabels\n command << \"withlabels\"\nend\nif selected_labels\n command << \"selected_labels\"\n selected_labels.each do |label|\n command << label\n end\nend\nif count\n (command << \"count\") << count.to_s\nend\nif aggregation\n case alignment = aggregation.alignment\n in Alignment\n (command << \"align\") << alignment.to_s.downcase\n in Time\n (command << \"align\") << alignment.to_unix_ms.to_s\n in Nil\n end\n ((command << \"aggregation\") << aggregation.aggregator.to_s) << aggregation.bucket_duration.total_milliseconds.to_i64.to_s\n if bucket_ts = aggregation.buckettimestamp\n (command << \"buckettimestamp\") << bucket_ts.to_s\n end\n if aggregation.empty\n command << \"empty\"\n end\nend\ncommand << \"filter\"\nfilter.each do |filter_expr|\n command << filter_expr\nend\nif groupby && reduce\n (((command << \"groupby\") << groupby) << \"reduce\") << reduce\nend\n@redis.run(command)\n"}},{"html_id":"queryindex(filter:String)-instance-method","name":"queryindex","abstract":false,"args":[{"name":"filter","external_name":"filter","restriction":"String"}],"args_string":"(filter : String)","args_html":"(filter : String)","location":{"filename":"src/time_series.cr","line_number":149,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L149"},"def":{"name":"queryindex","args":[{"name":"filter","external_name":"filter","restriction":"String"}],"visibility":"Public","body":"@redis.run({\"ts.queryindex\", filter})"}},{"html_id":"range(key:String,time_range:::Range(Time,Time),&:RangeOptions->)-instance-method","name":"range","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"time_range","external_name":"time_range","restriction":"::Range(Time, Time)"}],"args_string":"(key : String, time_range : ::Range(Time, Time), & : RangeOptions -> )","args_html":"(key : String, time_range : ::Range(Time, Time), & : RangeOptions -> )","location":{"filename":"src/time_series.cr","line_number":130,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L130"},"def":{"name":"range","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"time_range","external_name":"time_range","restriction":"::Range(Time, Time)"}],"yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(RangeOptions ->)"},"visibility":"Public","body":"command = Array(String).new(initial_capacity: 14)\noptions = RangeOptions.new\n(((command << \"ts.range\") << key) << time_range.begin.to_unix_ms.to_s) << time_range.end.to_unix_ms.to_s\nyield options\nif agg = options.aggregation\n ((command << \"aggregation\") << agg.type.to_s) << agg.time_bucket.total_milliseconds.to_i.to_s\nend\n@redis.run(command)\n"}}],"types":[{"html_id":"redis/Redis/TimeSeries/Aggregation","path":"Redis/TimeSeries/Aggregation.html","kind":"struct","full_name":"Redis::TimeSeries::Aggregation","name":"Aggregation","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":169,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L169"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/TimeSeries","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries"},"constructors":[{"html_id":"new(aggregator:AggregationType,bucket_duration:Time::Span,alignment:Alignment|Time|Nil=nil,buckettimestamp:BucketTimestamp|Nil=nil,empty:Bool|Nil=nil)-class-method","name":"new","abstract":false,"args":[{"name":"aggregator","external_name":"aggregator","restriction":"AggregationType"},{"name":"bucket_duration","external_name":"bucket_duration","restriction":"Time::Span"},{"name":"alignment","default_value":"nil","external_name":"alignment","restriction":"Alignment | Time | Nil"},{"name":"buckettimestamp","default_value":"nil","external_name":"buckettimestamp","restriction":"BucketTimestamp | ::Nil"},{"name":"empty","default_value":"nil","external_name":"empty","restriction":"Bool | ::Nil"}],"args_string":"(aggregator : AggregationType, bucket_duration : Time::Span, alignment : Alignment | Time | Nil = nil, buckettimestamp : BucketTimestamp | Nil = nil, empty : Bool | Nil = nil)","args_html":"(aggregator : AggregationType, bucket_duration : Time::Span, alignment : Alignment | Time | Nil = nil, buckettimestamp : BucketTimestamp | Nil = nil, empty : Bool | Nil = nil)","location":{"filename":"src/time_series.cr","line_number":169,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L169"},"def":{"name":"new","args":[{"name":"aggregator","external_name":"aggregator","restriction":"AggregationType"},{"name":"bucket_duration","external_name":"bucket_duration","restriction":"Time::Span"},{"name":"alignment","default_value":"nil","external_name":"alignment","restriction":"Alignment | Time | Nil"},{"name":"buckettimestamp","default_value":"nil","external_name":"buckettimestamp","restriction":"BucketTimestamp | ::Nil"},{"name":"empty","default_value":"nil","external_name":"empty","restriction":"Bool | ::Nil"}],"visibility":"Public","body":"_ = allocate\n_.initialize(aggregator, bucket_duration, alignment, buckettimestamp, empty)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"aggregator:AggregationType-instance-method","name":"aggregator","abstract":false,"def":{"name":"aggregator","return_type":"AggregationType","visibility":"Public","body":"@aggregator"}},{"html_id":"alignment:Alignment|Time|Nil-instance-method","name":"alignment","abstract":false,"def":{"name":"alignment","return_type":"Alignment | Time | Nil","visibility":"Public","body":"@alignment"}},{"html_id":"bucket_duration:Time::Span-instance-method","name":"bucket_duration","abstract":false,"def":{"name":"bucket_duration","return_type":"Time::Span","visibility":"Public","body":"@bucket_duration"}},{"html_id":"buckettimestamp:BucketTimestamp|Nil-instance-method","name":"buckettimestamp","abstract":false,"def":{"name":"buckettimestamp","return_type":"BucketTimestamp | ::Nil","visibility":"Public","body":"@buckettimestamp"}},{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/time_series.cr","line_number":169,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L169"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@aggregator.clone, @bucket_duration.clone, @alignment.clone, @buckettimestamp.clone, @empty.clone)"}},{"html_id":"copy_with(aggregator_aggregator=@aggregator,bucket_duration_bucket_duration=@bucket_duration,alignment_alignment=@alignment,buckettimestamp_buckettimestamp=@buckettimestamp,empty_empty=@empty)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_aggregator","default_value":"@aggregator","external_name":"aggregator","restriction":""},{"name":"_bucket_duration","default_value":"@bucket_duration","external_name":"bucket_duration","restriction":""},{"name":"_alignment","default_value":"@alignment","external_name":"alignment","restriction":""},{"name":"_buckettimestamp","default_value":"@buckettimestamp","external_name":"buckettimestamp","restriction":""},{"name":"_empty","default_value":"@empty","external_name":"empty","restriction":""}],"args_string":"(aggregator _aggregator = @aggregator, bucket_duration _bucket_duration = @bucket_duration, alignment _alignment = @alignment, buckettimestamp _buckettimestamp = @buckettimestamp, empty _empty = @empty)","args_html":"(aggregator _aggregator = @aggregator, bucket_duration _bucket_duration = @bucket_duration, alignment _alignment = @alignment, buckettimestamp _buckettimestamp = @buckettimestamp, empty _empty = @empty)","location":{"filename":"src/time_series.cr","line_number":169,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L169"},"def":{"name":"copy_with","args":[{"name":"_aggregator","default_value":"@aggregator","external_name":"aggregator","restriction":""},{"name":"_bucket_duration","default_value":"@bucket_duration","external_name":"bucket_duration","restriction":""},{"name":"_alignment","default_value":"@alignment","external_name":"alignment","restriction":""},{"name":"_buckettimestamp","default_value":"@buckettimestamp","external_name":"buckettimestamp","restriction":""},{"name":"_empty","default_value":"@empty","external_name":"empty","restriction":""}],"visibility":"Public","body":"self.class.new(_aggregator, _bucket_duration, _alignment, _buckettimestamp, _empty)"}},{"html_id":"empty:Bool|Nil-instance-method","name":"empty","abstract":false,"def":{"name":"empty","return_type":"Bool | ::Nil","visibility":"Public","body":"@empty"}}]},{"html_id":"redis/Redis/TimeSeries/AggregationType","path":"Redis/TimeSeries/AggregationType.html","kind":"enum","full_name":"Redis::TimeSeries::AggregationType","name":"AggregationType","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":392,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L392"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"AVG","name":"AVG","value":"0"},{"id":"SUM","name":"SUM","value":"1"},{"id":"MIN","name":"MIN","value":"2"},{"id":"MAX","name":"MAX","value":"3"},{"id":"RANGE","name":"RANGE","value":"4"},{"id":"COUNT","name":"COUNT","value":"5"},{"id":"FIRST","name":"FIRST","value":"6"},{"id":"LAST","name":"LAST","value":"7"},{"id":"STD_P","name":"STD_P","value":"8"},{"id":"STD_S","name":"STD_S","value":"9"},{"id":"VAR_P","name":"VAR_P","value":"10"},{"id":"VAR_S","name":"VAR_S","value":"11"}],"namespace":{"html_id":"redis/Redis/TimeSeries","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries"},"instance_methods":[{"html_id":"avg?-instance-method","name":"avg?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":393,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L393"},"def":{"name":"avg?","visibility":"Public","body":"self == AVG"}},{"html_id":"count?-instance-method","name":"count?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":398,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L398"},"def":{"name":"count?","visibility":"Public","body":"self == COUNT"}},{"html_id":"first?-instance-method","name":"first?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":399,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L399"},"def":{"name":"first?","visibility":"Public","body":"self == FIRST"}},{"html_id":"last?-instance-method","name":"last?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":400,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L400"},"def":{"name":"last?","visibility":"Public","body":"self == LAST"}},{"html_id":"max?-instance-method","name":"max?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":396,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L396"},"def":{"name":"max?","visibility":"Public","body":"self == MAX"}},{"html_id":"min?-instance-method","name":"min?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":395,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L395"},"def":{"name":"min?","visibility":"Public","body":"self == MIN"}},{"html_id":"range?-instance-method","name":"range?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":397,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L397"},"def":{"name":"range?","visibility":"Public","body":"self == RANGE"}},{"html_id":"std_p?-instance-method","name":"std_p?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":401,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L401"},"def":{"name":"std_p?","visibility":"Public","body":"self == STD_P"}},{"html_id":"std_s?-instance-method","name":"std_s?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":402,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L402"},"def":{"name":"std_s?","visibility":"Public","body":"self == STD_S"}},{"html_id":"sum?-instance-method","name":"sum?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":394,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L394"},"def":{"name":"sum?","visibility":"Public","body":"self == SUM"}},{"html_id":"var_p?-instance-method","name":"var_p?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":403,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L403"},"def":{"name":"var_p?","visibility":"Public","body":"self == VAR_P"}},{"html_id":"var_s?-instance-method","name":"var_s?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":404,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L404"},"def":{"name":"var_s?","visibility":"Public","body":"self == VAR_S"}}]},{"html_id":"redis/Redis/TimeSeries/Alignment","path":"Redis/TimeSeries/Alignment.html","kind":"enum","full_name":"Redis::TimeSeries::Alignment","name":"Alignment","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":176,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L176"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"Start","name":"Start","value":"0"},{"id":"End","name":"End","value":"1"}],"namespace":{"html_id":"redis/Redis/TimeSeries","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries"},"instance_methods":[{"html_id":"end?-instance-method","name":"end?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":178,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L178"},"def":{"name":"end?","visibility":"Public","body":"self == End"}},{"html_id":"start?-instance-method","name":"start?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":177,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L177"},"def":{"name":"start?","visibility":"Public","body":"self == Start"}}]},{"html_id":"redis/Redis/TimeSeries/BucketTimestamp","path":"Redis/TimeSeries/BucketTimestamp.html","kind":"enum","full_name":"Redis::TimeSeries::BucketTimestamp","name":"BucketTimestamp","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":407,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L407"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"HIGH","name":"HIGH","value":"0"},{"id":"MID","name":"MID","value":"1"},{"id":"LOW","name":"LOW","value":"2"}],"namespace":{"html_id":"redis/Redis/TimeSeries","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries"},"instance_methods":[{"html_id":"high?-instance-method","name":"high?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":408,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L408"},"def":{"name":"high?","visibility":"Public","body":"self == HIGH"}},{"html_id":"low?-instance-method","name":"low?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":410,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L410"},"def":{"name":"low?","visibility":"Public","body":"self == LOW"}},{"html_id":"mid?-instance-method","name":"mid?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":409,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L409"},"def":{"name":"mid?","visibility":"Public","body":"self == MID"}}]},{"html_id":"redis/Redis/TimeSeries/Datapoint","path":"Redis/TimeSeries/Datapoint.html","kind":"struct","full_name":"Redis::TimeSeries::Datapoint","name":"Datapoint","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":307,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L307"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/TimeSeries","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries"},"constructors":[{"html_id":"new(timestamp:Time,value:Float64)-class-method","name":"new","abstract":false,"args":[{"name":"timestamp","external_name":"timestamp","restriction":"Time"},{"name":"value","external_name":"value","restriction":"Float64"}],"args_string":"(timestamp : Time, value : Float64)","args_html":"(timestamp : Time, value : Float64)","location":{"filename":"src/time_series.cr","line_number":307,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L307"},"def":{"name":"new","args":[{"name":"timestamp","external_name":"timestamp","restriction":"Time"},{"name":"value","external_name":"value","restriction":"Float64"}],"visibility":"Public","body":"_ = allocate\n_.initialize(timestamp, value)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/time_series.cr","line_number":307,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L307"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@timestamp.clone, @value.clone)"}},{"html_id":"copy_with(timestamp_timestamp=@timestamp,value_value=@value)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_timestamp","default_value":"@timestamp","external_name":"timestamp","restriction":""},{"name":"_value","default_value":"@value","external_name":"value","restriction":""}],"args_string":"(timestamp _timestamp = @timestamp, value _value = @value)","args_html":"(timestamp _timestamp = @timestamp, value _value = @value)","location":{"filename":"src/time_series.cr","line_number":307,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L307"},"def":{"name":"copy_with","args":[{"name":"_timestamp","default_value":"@timestamp","external_name":"timestamp","restriction":""},{"name":"_value","default_value":"@value","external_name":"value","restriction":""}],"visibility":"Public","body":"self.class.new(_timestamp, _value)"}},{"html_id":"timestamp:Time-instance-method","name":"timestamp","abstract":false,"def":{"name":"timestamp","return_type":"Time","visibility":"Public","body":"@timestamp"}},{"html_id":"value:Float64-instance-method","name":"value","abstract":false,"def":{"name":"value","return_type":"Float64","visibility":"Public","body":"@value"}}]},{"html_id":"redis/Redis/TimeSeries/Datapoints","path":"Redis/TimeSeries/Datapoints.html","kind":"struct","full_name":"Redis::TimeSeries::Datapoints","name":"Datapoints","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":310,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L310"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"redis/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"}],"namespace":{"html_id":"redis/Redis/TimeSeries","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries"},"constructors":[{"html_id":"new(labels:Labels,datapoints:Array(Datapoint))-class-method","name":"new","abstract":false,"args":[{"name":"labels","external_name":"labels","restriction":"Labels"},{"name":"datapoints","external_name":"datapoints","restriction":"Array(Datapoint)"}],"args_string":"(labels : Labels, datapoints : Array(Datapoint))","args_html":"(labels : Labels, datapoints : Array(Datapoint))","location":{"filename":"src/time_series.cr","line_number":310,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L310"},"def":{"name":"new","args":[{"name":"labels","external_name":"labels","restriction":"Labels"},{"name":"datapoints","external_name":"datapoints","restriction":"Array(Datapoint)"}],"visibility":"Public","body":"_ = allocate\n_.initialize(labels, datapoints)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"<<(datapoint:Datapoint)-instance-method","name":"<<","abstract":false,"args":[{"name":"datapoint","external_name":"datapoint","restriction":"Datapoint"}],"args_string":"(datapoint : Datapoint)","args_html":"(datapoint : Datapoint)","location":{"filename":"src/time_series.cr","line_number":317,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L317"},"def":{"name":"<<","args":[{"name":"datapoint","external_name":"datapoint","restriction":"Datapoint"}],"visibility":"Public","body":"datapoints << datapoint"}},{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/time_series.cr","line_number":310,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L310"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@labels.clone, @datapoints.clone)"}},{"html_id":"copy_with(labels_labels=@labels,datapoints_datapoints=@datapoints)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_labels","default_value":"@labels","external_name":"labels","restriction":""},{"name":"_datapoints","default_value":"@datapoints","external_name":"datapoints","restriction":""}],"args_string":"(labels _labels = @labels, datapoints _datapoints = @datapoints)","args_html":"(labels _labels = @labels, datapoints _datapoints = @datapoints)","location":{"filename":"src/time_series.cr","line_number":310,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L310"},"def":{"name":"copy_with","args":[{"name":"_labels","default_value":"@labels","external_name":"labels","restriction":""},{"name":"_datapoints","default_value":"@datapoints","external_name":"datapoints","restriction":""}],"visibility":"Public","body":"self.class.new(_labels, _datapoints)"}},{"html_id":"datapoints:Array(Datapoint)-instance-method","name":"datapoints","abstract":false,"def":{"name":"datapoints","return_type":"Array(Datapoint)","visibility":"Public","body":"@datapoints"}},{"html_id":"each(&)-instance-method","name":"each","doc":"Must yield this collection's elements to the block.","summary":"

    Must yield this collection's elements to the block.

    ","abstract":false,"location":{"filename":"src/time_series.cr","line_number":312,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L312"},"def":{"name":"each","yields":1,"block_arity":1,"visibility":"Public","body":"datapoints.each do |datapoint|\n yield datapoint\nend"}},{"html_id":"labels:Labels-instance-method","name":"labels","abstract":false,"def":{"name":"labels","return_type":"Labels","visibility":"Public","body":"@labels"}}]},{"html_id":"redis/Redis/TimeSeries/DuplicatePolicy","path":"Redis/TimeSeries/DuplicatePolicy.html","kind":"enum","full_name":"Redis::TimeSeries::DuplicatePolicy","name":"DuplicatePolicy","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":418,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L418"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"BLOCK","name":"BLOCK","value":"0","doc":"An error will occur for any out-of-order sample","summary":"

    An error will occur for any out-of-order sample

    "},{"id":"FIRST","name":"FIRST","value":"1","doc":"Ignore the new value","summary":"

    Ignore the new value

    "},{"id":"LAST","name":"LAST","value":"2","doc":"Override with the latest value","summary":"

    Override with the latest value

    "},{"id":"MIN","name":"MIN","value":"3","doc":"Only override if the new value is lower than the existing value","summary":"

    Only override if the new value is lower than the existing value

    "},{"id":"MAX","name":"MAX","value":"4","doc":"Only override if the new value is higher than the existing value","summary":"

    Only override if the new value is higher than the existing value

    "},{"id":"SUM","name":"SUM","value":"5","doc":"If a previous sample exists, add the new sample to it so that the\nupdated value is equal to `previous + new`. If no previous sample\nexists, set the updated value equal to the new value.","summary":"

    If a previous sample exists, add the new sample to it so that the updated value is equal to previous + new.

    "}],"namespace":{"html_id":"redis/Redis/TimeSeries","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries"},"instance_methods":[{"html_id":"block?-instance-method","name":"block?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":420,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L420"},"def":{"name":"block?","visibility":"Public","body":"self == BLOCK"}},{"html_id":"first?-instance-method","name":"first?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":423,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L423"},"def":{"name":"first?","visibility":"Public","body":"self == FIRST"}},{"html_id":"last?-instance-method","name":"last?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":426,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L426"},"def":{"name":"last?","visibility":"Public","body":"self == LAST"}},{"html_id":"max?-instance-method","name":"max?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":432,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L432"},"def":{"name":"max?","visibility":"Public","body":"self == MAX"}},{"html_id":"min?-instance-method","name":"min?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":429,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L429"},"def":{"name":"min?","visibility":"Public","body":"self == MIN"}},{"html_id":"sum?-instance-method","name":"sum?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":437,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L437"},"def":{"name":"sum?","visibility":"Public","body":"self == SUM"}}]},{"html_id":"redis/Redis/TimeSeries/Encoding","path":"Redis/TimeSeries/Encoding.html","kind":"enum","full_name":"Redis::TimeSeries::Encoding","name":"Encoding","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":413,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L413"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"COMPRESSED","name":"COMPRESSED","value":"0"},{"id":"UNCOMPRESSED","name":"UNCOMPRESSED","value":"1"}],"namespace":{"html_id":"redis/Redis/TimeSeries","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries"},"instance_methods":[{"html_id":"compressed?-instance-method","name":"compressed?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":414,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L414"},"def":{"name":"compressed?","visibility":"Public","body":"self == COMPRESSED"}},{"html_id":"uncompressed?-instance-method","name":"uncompressed?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":415,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L415"},"def":{"name":"uncompressed?","visibility":"Public","body":"self == UNCOMPRESSED"}}]},{"html_id":"redis/Redis/TimeSeries/Labels","path":"Redis/TimeSeries/Labels.html","kind":"alias","full_name":"Redis::TimeSeries::Labels","name":"Labels","abstract":false,"locations":[{"filename":"src/time_series.cr","line_number":306,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L306"}],"repository_name":"redis","program":false,"enum":false,"alias":true,"aliased":"Hash(String, String)","aliased_html":"Hash(String, String)","const":false,"namespace":{"html_id":"redis/Redis/TimeSeries","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries"}},{"html_id":"redis/Redis/TimeSeries/MRangeResponse","path":"Redis/TimeSeries/MRangeResponse.html","kind":"struct","full_name":"Redis::TimeSeries::MRangeResponse","name":"MRangeResponse","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":322,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L322"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"redis/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"}],"namespace":{"html_id":"redis/Redis/TimeSeries","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries"},"constructors":[{"html_id":"new(response)-class-method","name":"new","abstract":false,"args":[{"name":"response","external_name":"response","restriction":""}],"args_string":"(response)","args_html":"(response)","location":{"filename":"src/time_series.cr","line_number":329,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L329"},"def":{"name":"new","args":[{"name":"response","external_name":"response","restriction":""}],"visibility":"Public","body":"_ = allocate\n_.initialize(response)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"[](key:String)-instance-method","name":"[]","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/time_series.cr","line_number":363,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L363"},"def":{"name":"[]","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"@data[key]"}},{"html_id":"[]?(key:String)-instance-method","name":"[]?","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/time_series.cr","line_number":367,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L367"},"def":{"name":"[]?","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"@data[key]?"}},{"html_id":"data:DatapointMap-instance-method","name":"data","abstract":false,"location":{"filename":"src/time_series.cr","line_number":327,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L327"},"def":{"name":"data","return_type":"DatapointMap","visibility":"Public","body":"@data"}},{"html_id":"each(&)-instance-method","name":"each","doc":"Must yield this collection's elements to the block.","summary":"

    Must yield this collection's elements to the block.

    ","abstract":false,"location":{"filename":"src/time_series.cr","line_number":359,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L359"},"def":{"name":"each","yields":1,"block_arity":1,"visibility":"Public","body":"data.each do |i|\n yield i\nend"}}],"types":[{"html_id":"redis/Redis/TimeSeries/MRangeResponse/DatapointMap","path":"Redis/TimeSeries/MRangeResponse/DatapointMap.html","kind":"alias","full_name":"Redis::TimeSeries::MRangeResponse::DatapointMap","name":"DatapointMap","abstract":false,"locations":[{"filename":"src/time_series.cr","line_number":325,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L325"}],"repository_name":"redis","program":false,"enum":false,"alias":true,"aliased":"Hash(String, Redis::TimeSeries::Datapoints)","aliased_html":"Hash(String, Redis::TimeSeries::Datapoints)","const":false,"namespace":{"html_id":"redis/Redis/TimeSeries/MRangeResponse","kind":"struct","full_name":"Redis::TimeSeries::MRangeResponse","name":"MRangeResponse"}}]},{"html_id":"redis/Redis/TimeSeries/Range","path":"Redis/TimeSeries/Range.html","kind":"struct","full_name":"Redis::TimeSeries::Range","name":"Range","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":372,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L372"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/TimeSeries","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries"},"constructors":[{"html_id":"new(raw_data:Array)-class-method","name":"new","abstract":false,"args":[{"name":"raw_data","external_name":"raw_data","restriction":"Array"}],"args_string":"(raw_data : Array)","args_html":"(raw_data : Array)","location":{"filename":"src/time_series.cr","line_number":373,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L373"},"def":{"name":"new","args":[{"name":"raw_data","external_name":"raw_data","restriction":"Array"}],"visibility":"Public","body":"_ = allocate\n_.initialize(raw_data)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}]},{"html_id":"redis/Redis/TimeSeries/RangeOptions","path":"Redis/TimeSeries/RangeOptions.html","kind":"class","full_name":"Redis::TimeSeries::RangeOptions","name":"RangeOptions","abstract":false,"superclass":{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":382,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L382"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/TimeSeries","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries"},"instance_methods":[{"html_id":"aggregation(type:AggregationType,bucket:Time::Span)-instance-method","name":"aggregation","abstract":false,"args":[{"name":"type","external_name":"type","restriction":"AggregationType"},{"name":"bucket","external_name":"bucket","restriction":"Time::Span"}],"args_string":"(type : AggregationType, bucket : Time::Span)","args_html":"(type : AggregationType, bucket : Time::Span)","location":{"filename":"src/time_series.cr","line_number":385,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L385"},"def":{"name":"aggregation","args":[{"name":"type","external_name":"type","restriction":"AggregationType"},{"name":"bucket","external_name":"bucket","restriction":"Time::Span"}],"visibility":"Public","body":"@aggregation = Aggregation.new(type, bucket)"}},{"html_id":"aggregation:Aggregation|Nil-instance-method","name":"aggregation","abstract":false,"location":{"filename":"src/time_series.cr","line_number":383,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L383"},"def":{"name":"aggregation","return_type":"Aggregation | ::Nil","visibility":"Public","body":"@aggregation"}}],"types":[{"html_id":"redis/Redis/TimeSeries/RangeOptions/Aggregation","path":"Redis/TimeSeries/RangeOptions/Aggregation.html","kind":"struct","full_name":"Redis::TimeSeries::RangeOptions::Aggregation","name":"Aggregation","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":389,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L389"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/TimeSeries/RangeOptions","kind":"class","full_name":"Redis::TimeSeries::RangeOptions","name":"RangeOptions"},"constructors":[{"html_id":"new(type:AggregationType,time_bucket:Time::Span)-class-method","name":"new","abstract":false,"args":[{"name":"type","external_name":"type","restriction":"AggregationType"},{"name":"time_bucket","external_name":"time_bucket","restriction":"Time::Span"}],"args_string":"(type : AggregationType, time_bucket : Time::Span)","args_html":"(type : AggregationType, time_bucket : Time::Span)","location":{"filename":"src/time_series.cr","line_number":389,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L389"},"def":{"name":"new","args":[{"name":"type","external_name":"type","restriction":"AggregationType"},{"name":"time_bucket","external_name":"time_bucket","restriction":"Time::Span"}],"visibility":"Public","body":"_ = allocate\n_.initialize(type, time_bucket)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/time_series.cr","line_number":389,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L389"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@type.clone, @time_bucket.clone)"}},{"html_id":"copy_with(type_type=@type,time_bucket_time_bucket=@time_bucket)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_type","default_value":"@type","external_name":"type","restriction":""},{"name":"_time_bucket","default_value":"@time_bucket","external_name":"time_bucket","restriction":""}],"args_string":"(type _type = @type, time_bucket _time_bucket = @time_bucket)","args_html":"(type _type = @type, time_bucket _time_bucket = @time_bucket)","location":{"filename":"src/time_series.cr","line_number":389,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/time_series.cr#L389"},"def":{"name":"copy_with","args":[{"name":"_type","default_value":"@type","external_name":"type","restriction":""},{"name":"_time_bucket","default_value":"@time_bucket","external_name":"time_bucket","restriction":""}],"visibility":"Public","body":"self.class.new(_type, _time_bucket)"}},{"html_id":"time_bucket:Time::Span-instance-method","name":"time_bucket","abstract":false,"def":{"name":"time_bucket","return_type":"Time::Span","visibility":"Public","body":"@time_bucket"}},{"html_id":"type:AggregationType-instance-method","name":"type","abstract":false,"def":{"name":"type","return_type":"AggregationType","visibility":"Public","body":"@type"}}]}]}]},{"html_id":"redis/Redis/Transaction","path":"Redis/Transaction.html","kind":"class","full_name":"Redis::Transaction","name":"Transaction","abstract":false,"superclass":{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},{"html_id":"redis/Redis/Commands/Stream","kind":"module","full_name":"Redis::Commands::Stream","name":"Stream"},{"html_id":"redis/Redis/Commands/SortedSet","kind":"module","full_name":"Redis::Commands::SortedSet","name":"SortedSet"},{"html_id":"redis/Redis/Commands/Set","kind":"module","full_name":"Redis::Commands::Set","name":"Set"},{"html_id":"redis/Redis/Commands/List","kind":"module","full_name":"Redis::Commands::List","name":"List"},{"html_id":"redis/Redis/Commands/Hash","kind":"module","full_name":"Redis::Commands::Hash","name":"Hash"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/transaction.cr","line_number":5,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/transaction.cr#L5"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"constructors":[{"html_id":"new(connection:Connection)-class-method","name":"new","abstract":false,"args":[{"name":"connection","external_name":"connection","restriction":"Connection"}],"args_string":"(connection : Connection)","args_html":"(connection : Connection)","location":{"filename":"src/transaction.cr","line_number":10,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/transaction.cr#L10"},"def":{"name":"new","args":[{"name":"connection","external_name":"connection","restriction":"Connection"}],"visibility":"Public","body":"_ = allocate\n_.initialize(connection)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"discard:Nil-instance-method","name":"discard","abstract":false,"location":{"filename":"src/transaction.cr","line_number":14,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/transaction.cr#L14"},"def":{"name":"discard","return_type":"Nil","visibility":"Public","body":"@discarded = true\nfinish(\"discard\")\n"}},{"html_id":"discarded?:Bool?-instance-method","name":"discarded?","abstract":false,"location":{"filename":"src/transaction.cr","line_number":8,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/transaction.cr#L8"},"def":{"name":"discarded?","visibility":"Public","body":"@discarded"}},{"html_id":"exec-instance-method","name":"exec","abstract":false,"location":{"filename":"src/transaction.cr","line_number":25,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/transaction.cr#L25"},"def":{"name":"exec","visibility":"Public","body":"(finish(\"exec\")).as(Array)"}},{"html_id":"run(command):Nil-instance-method","name":"run","doc":"Execute the given command and return the result from the server. Commands\nmust be an `Enumerable` and its `size` method must be re-entrant.\n\n```\nrun({\"set\", \"foo\", \"bar\"})\n```","summary":"

    Execute the given command and return the result from the server.

    ","abstract":false,"args":[{"name":"command","external_name":"command","restriction":""}],"args_string":"(command) : Nil","args_html":"(command) : Nil","location":{"filename":"src/transaction.cr","line_number":19,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/transaction.cr#L19"},"def":{"name":"run","args":[{"name":"command","external_name":"command","restriction":""}],"return_type":"Nil","visibility":"Public","body":"if discarded?\n return\nend\n@connection.encode(command)\n@command_count = @command_count + 1\n"}},{"html_id":"start!-instance-method","name":"start!","abstract":false,"location":{"filename":"src/transaction.cr","line_number":29,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/transaction.cr#L29"},"def":{"name":"start!","visibility":"Public","body":"@connection.encode({\"multi\"})"}}]},{"html_id":"redis/Redis/Value","path":"Redis/Value.html","kind":"alias","full_name":"Redis::Value","name":"Value","abstract":false,"locations":[{"filename":"src/value.cr","line_number":6,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/value.cr#L6"}],"repository_name":"redis","program":false,"enum":false,"alias":true,"aliased":"(Array(Redis::Value) | Int64 | Redis::Error | String | Nil)","aliased_html":"Array(Redis::Value) | Int64 | Redis::Error | String | Nil","const":false,"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"doc":"Values consumed and emitted by Redis can be strings, 64-bit integers, `nil`,\nor an array of any of these types.","summary":"

    Values consumed and emitted by Redis can be strings, 64-bit integers, nil, or an array of any of these types.

    "},{"html_id":"redis/Redis/Writer","path":"Redis/Writer.html","kind":"struct","full_name":"Redis::Writer","name":"Writer","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/writer.cr","line_number":2,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/writer.cr#L2"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"CRLF","name":"CRLF","value":"\"\\r\\n\""}],"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"constructors":[{"html_id":"new(io:IO)-class-method","name":"new","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/writer.cr","line_number":7,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/writer.cr#L7"},"def":{"name":"new","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"_ = allocate\n_.initialize(io)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"io:IO-instance-method","name":"io","abstract":false,"location":{"filename":"src/writer.cr","line_number":5,"url":"https://github.com/jgaskins/redis/blob/v0.9.0/src/writer.cr#L5"},"def":{"name":"io","visibility":"Public","body":"@io"}}]}]}]}}) \ No newline at end of file +crystal_doc_search_index_callback({"repository_name":"redis","body":"# redis\n\nA pure-Crystal implementation of the Redis protocol\n\n## Installation\n\n1. Add the dependency to your `shard.yml`:\n\n ```yaml\n dependencies:\n redis:\n github: jgaskins/redis\n ```\n\n2. Run `shards`\n\n## Usage\n\n```crystal\nrequire \"redis\"\n\nredis = Redis::Client.new # Defaults to `localhost` port 6379\n\nredis.set \"foo\", \"bar\"\nredis.get \"foo\" # => \"bar\"\n\nredis.incr \"counter\" # => 1\nredis.incr \"counter\" # => 2\nredis.decr \"counter\" # => 1\n\nredis.del \"foo\", \"counter\" # => 2\n```\n\n### Pipelined queries\n\nTo mitigate latency with multiple queries whose inputs and outputs are completely independent of each other, you can \"pipeline\" your queries by sending them all at once before reading them. To do this, you can use the `pipeline` method:\n\n```crystal\nredis.pipeline do |pipe|\n pipe.incr \"foo\"\n pipe.set \"bar\", \"baz\"\n pipe.lpush \"my-list\", \"my value\"\nend\n```\n\nThe return value of `pipeline` will be an array containing the values of each of those calls in the order they were sent. So in this case, it might be `[1, nil, 2]` to match the return values of `incr`, `set`, and `lpush`, respectively.\n\n### Transactions\n\nThe Redis [`MULTI` command](https://redis.io/commands/multi) begins a transaction, so you can use the `multi` method to execute a transaction against the server:\n\n```crystal\nredis.multi do |txn|\n txn.set \"foo\", \"bar\"\n txn.incr \"baz\"\n txn.lpush \"my-list\", \"my value\"\nend\n```\n\nThe transaction is automatically committed with [`EXEC`](https://redis.io/commands/exec) at the end of the block. If an exception occurs within the block, the transaction will be rolled back with [`DISCARD`](https://redis.io/commands/discard) before exiting the block.\n\nYou may also call `txn.discard`, which will effectively disable the transaction (all further methods called on the transaction do nothing), but will not exit the block. You will need to exit the block explicitly with `break` if there are operations within the block that cannot be rolled back, such as sending an email or sending a request to a third-party API.\n\nThe reason for this is that the only way to exit a containing block from an inner method in Crystal is to raise an exception, and this library chooses not to use exceptions for flow control.\n\n### Beyond `localhost`\n\nTo use a Redis server that isn't at `localhost:6379`, pass a `URI` to the client. For example, if you store it in your shell environment:\n\n```crystal\nredis = Redis::Client.new(URI.parse(ENV[\"REDIS_URL\"]))\n\n# ... or ...\n\nredis = Redis::Client.from_env(\"REDIS_URL\")\n```\n\nTo connect via SSL, make sure you use the `rediss://` URL scheme. If your Redis server requires a password or uses a different database slot than `0`, make sure you include them in the URL:\n\n```crystal\nredis = Redis::Client.new(URI.parse(\"rediss://:my_password@example.com/3\"))\n```\n\n### Connection Pool\n\nThe `Redis::Client` maintains a connection pool, so there is no need to run your own within your application. When you execute a command on the `Redis::Client`, it is automatically executed against a connection. When you execute a pipeline or transaction with `multi`, all commands within that block will automatically be routed to the same connection.\n\n**Configuration**\n\nFor this shard, we use the following default setting (outside of the Standard Lib defaults);\n\n```\nmax_idle_pool_size = 25\n```\n\n> You can override this manually using the URI parameters.\n> All other settings follow the DB::Pool defaults.\n\nThe behaviour of the connection pool can be configured from a set of query string parameters in the connection URI.\n\n| Name | Default value |\n| :--- | :--- |\n| initial\\_pool\\_size | 1 |\n| max\\_pool\\_size | 0 \\(unlimited\\) |\n| max\\_idle\\_pool\\_size | 1 |\n| checkout\\_timeout | 5.0 \\(seconds\\) |\n| retry\\_attempts | 1 |\n| retry\\_delay | 1.0 \\(seconds\\) |\n\nSee [Crystal guides](https://crystal-lang.org/reference/1.6/database/connection_pool.html) to learn more.\n\n**Example**\n\n```crystal\npool_params = \"?initial_pool_size=1&max_pool_size=10&checkout_timeout=10&retry_attempts=2&retry_delay=0.5&max_idle_pool_size=50\"\nredis = Redis::Client.new(URI.parse(\"redis://localhost:6379/0#{pool_params}\"))\n```\n\n**Recommendations**\n\nIf you encounter any issues, keep these setting the same;\n\n- `initial_pool_size`\n- `max_pool_size`\n- `max_idle_pool_size`\n\nExample:\n\n```\ninitial_pool_size = 50\nmax_pool_size = 50\nmax_idle_pool_size = 50\n```\n\n### TCP Keep-Alive\n\nThe `Redis::Client` uses a pool of `Redis::Connection` under the hood.\nWithin `Redis::Connection` we create a `TCPSocket`, which can accept keepalive params.\nThe TCP keepalive settings can help you mitigate Redis connection stability issues.\n\n> NOTE: This behaviour is disabled by default. See Configuration below on how to enable it.\n\n**Configuration**\n\nFor this shard, we use the following override setting;\n\n| Name | Default value |\n| :--- | :--- |\n| keepalive | false |\n| keepalive\\_count | 3 |\n| keepalive\\_idle | 60 |\n| keepalive\\_interval | 30 |\n\n> You can override this manually using the URI parameters.\n> The settings above have proven to have good results in production environments. However, every environment is different, so tweaking these settings may be necessary.\n\nSee [Crystal API](https://crystal-lang.org/api/1.6.0/TCPSocket.html) to learn more.\n\n**Example**\n\n```crystal\nparams = \"?keepalive=true&keepalive_count=5&keepalive_idle=10&keepalive_interval=15\"\n\nredis = Redis::Client.new(URI.parse(\"redis://localhost:6379/0#{params}\"))\n# or direct connections\nredis = Redis::Connection.new(URI.parse(\"redis://localhost:6379/0#{params}\"))\n```\n\n**Recommendations**\n\nEnable this setting with the defaults if you are encountering connection issues.\n\nExample:\n\n```crystal\nparams = \"?keepalive=true\"\n\nredis = Redis::Client.new(URI.parse(\"redis://localhost:6379/0#{params}\"))\n# or direct connections\nredis = Redis::Connection.new(URI.parse(\"redis://localhost:6379/0#{params}\"))\n```\n\n## Development\n\nMake sure you have a Redis or KeyDB server running locally on port 6379.\n\nRedis must be installed with a stack server for the full text search (`ft`) and time series modules (`ts`) in order for all specs to run.\n\n### With Docker\n\nYou can use this for your docker-compose file\n\n```yaml\nredis:\n image: redis/redis-stack-server\n ports:\n - \"6379:6379\"\n```\n\n### With Homebrew\n\nInstall the [`redis-stack` from homebrew](https://github.com/redis-stack/homebrew-redis-stack)\n\n\n## Contributing\n\n1. Fork it ()\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n## Contributors\n\n- [Jamie Gaskins](https://github.com/jgaskins) - creator and maintainer\n","program":{"html_id":"redis/toplevel","path":"toplevel.html","kind":"module","full_name":"Top Level Namespace","name":"Top Level Namespace","abstract":false,"locations":[],"repository_name":"redis","program":true,"enum":false,"alias":false,"const":false,"types":[{"html_id":"redis/Redis","path":"Redis.html","kind":"module","full_name":"Redis","name":"Redis","abstract":false,"locations":[{"filename":"src/client.cr","line_number":7,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/client.cr#L7"},{"filename":"src/cluster.cr","line_number":8,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/cluster.cr#L8"},{"filename":"src/commands.cr","line_number":8,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L8"},{"filename":"src/connection.cr","line_number":13,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L13"},{"filename":"src/errors.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/errors.cr#L1"},{"filename":"src/graph.cr","line_number":12,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L12"},{"filename":"src/json.cr","line_number":5,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L5"},{"filename":"src/log.cr","line_number":3,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/log.cr#L3"},{"filename":"src/parser.cr","line_number":4,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/parser.cr#L4"},{"filename":"src/pipeline.cr","line_number":5,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/pipeline.cr#L5"},{"filename":"src/read_only_commands.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/read_only_commands.cr#L1"},{"filename":"src/redis.cr","line_number":9,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/redis.cr#L9"},{"filename":"src/search.cr","line_number":3,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L3"},{"filename":"src/streaming.cr","line_number":3,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L3"},{"filename":"src/time_series.cr","line_number":4,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L4"},{"filename":"src/to_hash.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/to_hash.cr#L1"},{"filename":"src/transaction.cr","line_number":4,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/transaction.cr#L4"},{"filename":"src/value.cr","line_number":3,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/value.cr#L3"},{"filename":"src/version.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/version.cr#L1"},{"filename":"src/writer.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/writer.cr#L1"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ERROR_MAP","name":"ERROR_MAP","value":"Hash(String, Error.class).new(default_value: Error)"},{"id":"Log","name":"Log","value":"::Log.for(self)","doc":"Default Redis log","summary":"

    Default Redis log

    "},{"id":"READ_ONLY_COMMANDS","name":"READ_ONLY_COMMANDS","value":"([\"bf.card\", \"bf.debug\", \"bf.exists\", \"bf.info\", \"bf.mexists\", \"bf.scandump\", \"bitcount\", \"bitfield_ro\", \"bitpos\", \"cf.compact\", \"cf.count\", \"cf.debug\", \"cf.exists\", \"cf.info\", \"cf.mexists\", \"cf.scandump\", \"cms.info\", \"cms.query\", \"dbsize\", \"dump\", \"eval_ro\", \"evalsha_ro\", \"exists\", \"expiretime\", \"fcall_ro\", \"ft._aliasaddifnx\", \"ft._aliasdelifx\", \"ft._list\", \"ft.aggregate\", \"ft.aliasadd\", \"ft.aliasdel\", \"ft.aliasupdate\", \"ft.config\", \"ft.cursor\", \"ft.debug\", \"ft.dictadd\", \"ft.dictdel\", \"ft.dictdump\", \"ft.explain\", \"ft.explaincli\", \"ft.get\", \"ft.info\", \"ft.mget\", \"ft.profile\", \"ft.search\", \"ft.spellcheck\", \"ft.sugget\", \"ft.suglen\", \"ft.syndump\", \"ft.tagvals\", \"geodist\", \"geohash\", \"geopos\", \"georadius_ro\", \"georadiusbymember_ro\", \"geosearch\", \"get\", \"getbit\", \"getrange\", \"hexists\", \"hget\", \"hgetall\", \"hkeys\", \"hlen\", \"hmget\", \"hrandfield\", \"hscan\", \"hstrlen\", \"hvals\", \"json.arrindex\", \"json.arrlen\", \"json.debug\", \"json.get\", \"json.mget\", \"json.objkeys\", \"json.objlen\", \"json.resp\", \"json.strlen\", \"json.type\", \"keys\", \"lcs\", \"lindex\", \"llen\", \"lolwut\", \"lpos\", \"lrange\", \"mget\", \"pexpiretime\", \"pfcount\", \"pttl\", \"randomkey\", \"redisgears_2.clusterset\", \"redisgears_2.clustersetfromshard\", \"redisgears_2.forceshardsconnection\", \"redisgears_2.hello\", \"redisgears_2.infocluster\", \"redisgears_2.innercommunication\", \"redisgears_2.networktest\", \"redisgears_2.refreshcluster\", \"scan\", \"scard\", \"sdiff\", \"sinter\", \"sintercard\", \"sismember\", \"smembers\", \"smismember\", \"sort_ro\", \"srandmember\", \"sscan\", \"strlen\", \"substr\", \"sunion\", \"tdigest.byrank\", \"tdigest.byrevrank\", \"tdigest.cdf\", \"tdigest.info\", \"tdigest.max\", \"tdigest.min\", \"tdigest.quantile\", \"tdigest.rank\", \"tdigest.revrank\", \"tdigest.trimmed_mean\", \"timeseries.clusterset\", \"timeseries.clustersetfromshard\", \"timeseries.forceshardsconnection\", \"timeseries.hello\", \"timeseries.infocluster\", \"timeseries.innercommunication\", \"timeseries.networktest\", \"timeseries.refreshcluster\", \"topk.info\", \"topk.list\", \"topk.query\", \"touch\", \"ts.get\", \"ts.info\", \"ts.mget\", \"ts.mrange\", \"ts.mrevrange\", \"ts.queryindex\", \"ts.range\", \"ts.revrange\", \"ttl\", \"type\", \"xlen\", \"xpending\", \"xrange\", \"xread\", \"xrevrange\", \"zcard\", \"zcount\", \"zdiff\", \"zinter\", \"zintercard\", \"zlexcount\", \"zmscore\", \"zrandmember\", \"zrange\", \"zrangebylex\", \"zrangebyscore\", \"zrank\", \"zrevrange\", \"zrevrangebylex\", \"zrevrangebyscore\", \"zrevrank\", \"zscan\", \"zscore\", \"zunion\"] of ::String).to_set","doc":"Commands in this set are routed to replicas by `Redis::Cluster` and\n`Redis::ReplicationClient`.\n\nYou can add additional commands that this shard does not yet know about\n(for example, one provided by a custom Redis module) by using the `<<` method:\n\n```\nRedis::READ_ONLY_COMMANDS << \"mymodule.mycommand\"\n```","summary":"

    Commands in this set are routed to replicas by Redis::Cluster and Redis::ReplicationClient.

    "},{"id":"VERSION","name":"VERSION","value":"\"0.10.0\""}],"class_methods":[{"html_id":"to_hash(array:Array,value_type:T.class):Hash(String,T)forallT-class-method","name":"to_hash","abstract":false,"args":[{"name":"array","external_name":"array","restriction":"Array"},{"name":"value_type","external_name":"value_type","restriction":"T.class"}],"args_string":"(array : Array, value_type : T.class) : Hash(String, T) forall T","args_html":"(array : Array, value_type : T.class) : Hash(String, T) forall T","location":{"filename":"src/to_hash.cr","line_number":6,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/to_hash.cr#L6"},"def":{"name":"to_hash","args":[{"name":"array","external_name":"array","restriction":"Array"},{"name":"value_type","external_name":"value_type","restriction":"T.class"}],"return_type":"::Hash(String, T)","visibility":"Public","body":"if array.size.even?\nelse\n raise(ArgumentError.new(\"Array must have an even number of arguments to convert to a hash\"))\nend\nhash = ::Hash(String, T).new(initial_capacity: array.size // 2)\n(0...array.size).step(2) do |index|\n hash[array[index].as(String)] = array[index + 1].as(T)\nend\nhash\n"}},{"html_id":"to_hash(array:Array)-class-method","name":"to_hash","abstract":false,"args":[{"name":"array","external_name":"array","restriction":"::Array"}],"args_string":"(array : Array)","args_html":"(array : Array)","location":{"filename":"src/to_hash.cr","line_number":2,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/to_hash.cr#L2"},"def":{"name":"to_hash","args":[{"name":"array","external_name":"array","restriction":"::Array"}],"visibility":"Public","body":"to_hash(array, value_type: Value)"}}],"types":[{"html_id":"redis/Redis/BusyGroup","path":"Redis/BusyGroup.html","kind":"class","full_name":"Redis::BusyGroup","name":"BusyGroup","abstract":false,"superclass":{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},"ancestors":[{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/errors.cr","line_number":17,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/errors.cr#L17"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"}},{"html_id":"redis/Redis/Client","path":"Redis/Client.html","kind":"class","full_name":"Redis::Client","name":"Client","abstract":false,"superclass":{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},{"html_id":"redis/Redis/Commands/Stream","kind":"module","full_name":"Redis::Commands::Stream","name":"Stream"},{"html_id":"redis/Redis/Commands/SortedSet","kind":"module","full_name":"Redis::Commands::SortedSet","name":"SortedSet"},{"html_id":"redis/Redis/Commands/Set","kind":"module","full_name":"Redis::Commands::Set","name":"Set"},{"html_id":"redis/Redis/Commands/List","kind":"module","full_name":"Redis::Commands::List","name":"List"},{"html_id":"redis/Redis/Commands/Hash","kind":"module","full_name":"Redis::Commands::Hash","name":"Hash"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/client.cr","line_number":21,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/client.cr#L21"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"doc":"The Redis client is the expected entrypoint for this shard. By default, it will connect to localhost:6379, but you can also supply a `URI` to connect to an arbitrary Redis server. SSL, password authentication, and DB selection are all supported.\n\n```\n# Connects to localhost:6379\nredis = Redis::Client.new\n\n# Connects to a server at \"redis.example.com\" on port 6000 over a TLS\n# connection, authenticates with the password \"password\", and uses DB 3\nredis = Redis::Client.new(URI.parse(\"rediss://:password@redis.example.com:6000/3\"))\n\n# Connects to a server at the URL in `ENV[\"REDIS_URL\"]`\nredis = Redis::Client.from_env(\"REDIS_URL\")\n```","summary":"

    The Redis client is the expected entrypoint for this shard.

    ","class_methods":[{"html_id":"from_env(env_var)-class-method","name":"from_env","abstract":false,"args":[{"name":"env_var","external_name":"env_var","restriction":""}],"args_string":"(env_var)","args_html":"(env_var)","location":{"filename":"src/client.cr","line_number":26,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/client.cr#L26"},"def":{"name":"from_env","args":[{"name":"env_var","external_name":"env_var","restriction":""}],"visibility":"Public","body":"new(URI.parse(ENV[env_var]))"}}],"constructors":[{"html_id":"new(uri:URI=URI.parse(ENV.fetch(\"REDIS_URL\",\"redis:///\")),log:::Log=Log)-class-method","name":"new","doc":"The client holds a pool of connections that expands and contracts as\nneeded.","summary":"

    The client holds a pool of connections that expands and contracts as needed.

    ","abstract":false,"args":[{"name":"uri","default_value":"URI.parse(ENV.fetch(\"REDIS_URL\", \"redis:///\"))","external_name":"uri","restriction":"URI"},{"name":"log","default_value":"Log","external_name":"log","restriction":"::Log"}],"args_string":"(uri : URI = URI.parse(ENV.fetch(\"REDIS_URL\", \"redis:///\")), log : ::Log = Log)","args_html":"(uri : URI = URI.parse(ENV.fetch("REDIS_URL", "redis:///")), log : ::Log = Log)","location":{"filename":"src/client.cr","line_number":32,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/client.cr#L32"},"def":{"name":"new","args":[{"name":"uri","default_value":"URI.parse(ENV.fetch(\"REDIS_URL\", \"redis:///\"))","external_name":"uri","restriction":"URI"},{"name":"log","default_value":"Log","external_name":"log","restriction":"::Log"}],"visibility":"Public","body":"_ = allocate\n_.initialize(uri, log)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"close-instance-method","name":"close","abstract":false,"location":{"filename":"src/client.cr","line_number":92,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/client.cr#L92"},"def":{"name":"close","visibility":"Public","body":"@pool.close"}},{"html_id":"hscan_each(key:String,*,matchpattern:String|Nil=nil,count:String|Int|Nil=nil,&):Nil-instance-method","name":"hscan_each","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"","external_name":"","restriction":""},{"name":"pattern","default_value":"nil","external_name":"match","restriction":"String | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"}],"args_string":"(key : String, *, match pattern : String | Nil = nil, count : String | Int | Nil = nil, &) : Nil","args_html":"(key : String, *, match pattern : String | Nil = nil, count : String | Int | Nil = nil, &) : Nil","location":{"filename":"src/client.cr","line_number":61,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/client.cr#L61"},"def":{"name":"hscan_each","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"","external_name":"","restriction":""},{"name":"pattern","default_value":"nil","external_name":"match","restriction":"String | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"}],"splat_index":1,"yields":1,"block_arity":1,"return_type":"Nil","visibility":"Public","body":"@pool.checkout(&.hscan_each(key: key, match: pattern, count: count) do |key|\n yield key\nend)"}},{"html_id":"multi(&)-instance-method","name":"multi","abstract":false,"location":{"filename":"src/client.cr","line_number":80,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/client.cr#L80"},"def":{"name":"multi","yields":1,"block_arity":1,"visibility":"Public","body":"@pool.checkout(&.multi do |txn|\n yield txn\nend)"}},{"html_id":"pipeline(&)-instance-method","name":"pipeline","abstract":false,"location":{"filename":"src/client.cr","line_number":76,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/client.cr#L76"},"def":{"name":"pipeline","yields":1,"block_arity":1,"visibility":"Public","body":"@pool.checkout(&.pipeline do |pipe|\n yield pipe\nend)"}},{"html_id":"psubscribe(*channels,&)-instance-method","name":"psubscribe","abstract":false,"args":[{"name":"channels","external_name":"channels","restriction":""}],"args_string":"(*channels, &)","args_html":"(*channels, &)","location":{"filename":"src/client.cr","line_number":88,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/client.cr#L88"},"def":{"name":"psubscribe","args":[{"name":"channels","external_name":"channels","restriction":""}],"splat_index":0,"yields":2,"block_arity":2,"visibility":"Public","body":"@pool.checkout(&.psubscribe(*channels) do |subscription, conn|\n yield subscription, conn\nend)"}},{"html_id":"run(command)-instance-method","name":"run","doc":"All Redis commands invoked on the client check out a connection from the\nconnection pool, invoke the command on that connection, and then check the\nconnection back into the pool.\n\n```\nredis = Redis::Client.new\n```","summary":"

    All Redis commands invoked on the client check out a connection from the connection pool, invoke the command on that connection, and then check the connection back into the pool.

    ","abstract":false,"args":[{"name":"command","external_name":"command","restriction":""}],"args_string":"(command)","args_html":"(command)","location":{"filename":"src/client.cr","line_number":72,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/client.cr#L72"},"def":{"name":"run","args":[{"name":"command","external_name":"command","restriction":""}],"visibility":"Public","body":"@pool.checkout(&.run(command))"}},{"html_id":"scan_each(matchpattern:String|Nil=nil,count:String|Int|Nil=nil,type:String|Nil=nil,&):Nil-instance-method","name":"scan_each","abstract":false,"args":[{"name":"pattern","default_value":"nil","external_name":"match","restriction":"String | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"},{"name":"type","default_value":"nil","external_name":"type","restriction":"String | ::Nil"}],"args_string":"(match pattern : String | Nil = nil, count : String | Int | Nil = nil, type : String | Nil = nil, &) : Nil","args_html":"(match pattern : String | Nil = nil, count : String | Int | Nil = nil, type : String | Nil = nil, &) : Nil","location":{"filename":"src/client.cr","line_number":57,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/client.cr#L57"},"def":{"name":"scan_each","args":[{"name":"pattern","default_value":"nil","external_name":"match","restriction":"String | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"},{"name":"type","default_value":"nil","external_name":"type","restriction":"String | ::Nil"}],"yields":1,"block_arity":1,"return_type":"Nil","visibility":"Public","body":"@pool.checkout(&.scan_each(match: pattern, count: count, type: type) do |key|\n yield key\nend)"}},{"html_id":"subscribe(*channels,&)-instance-method","name":"subscribe","abstract":false,"args":[{"name":"channels","external_name":"channels","restriction":""}],"args_string":"(*channels, &)","args_html":"(*channels, &)","location":{"filename":"src/client.cr","line_number":84,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/client.cr#L84"},"def":{"name":"subscribe","args":[{"name":"channels","external_name":"channels","restriction":""}],"splat_index":0,"yields":2,"block_arity":2,"visibility":"Public","body":"@pool.checkout(&.subscribe(*channels) do |subscription, conn|\n yield subscription, conn\nend)"}}]},{"html_id":"redis/Redis/Cluster","path":"Redis/Cluster.html","kind":"class","full_name":"Redis::Cluster","name":"Cluster","abstract":false,"superclass":{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},{"html_id":"redis/Redis/Commands/Stream","kind":"module","full_name":"Redis::Commands::Stream","name":"Stream"},{"html_id":"redis/Redis/Commands/SortedSet","kind":"module","full_name":"Redis::Commands::SortedSet","name":"SortedSet"},{"html_id":"redis/Redis/Commands/Set","kind":"module","full_name":"Redis::Commands::Set","name":"Set"},{"html_id":"redis/Redis/Commands/List","kind":"module","full_name":"Redis::Commands::List","name":"List"},{"html_id":"redis/Redis/Commands/Hash","kind":"module","full_name":"Redis::Commands::Hash","name":"Hash"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/cluster.cr","line_number":32,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/cluster.cr#L32"},{"filename":"src/errors.cr","line_number":19,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/errors.cr#L19"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"doc":"Use in place of a `Redis::Client` when talking to Redis clusters. This class\nwill discover all nodes in a Redis cluster when given a URI for any of them,\nroute commands to appropriate shards based on the keys they operate on, and\nroute commands which do not change state to shard replicas to spread the\nload across the cluster.\n\nIt's important that, when using commands which operate on multiple keys (for\nexample: `MGET`, `DEL`, `RPOPLPUSH`, etc) that _all_ specified keys reside\non the same shard in the cluster. Usually, this means designing your key\nnames with curly braces around parts of them to ensure they hash to the same\n[key slot](https://redis.io/commands/cluster-keyslot). For example:\n\n```\nredis.del \"{comment}:1\", \"{comment}:2\"\nvalue = redis.rpoplpush \"{queue}:default\", \"{queue}:default:pending\"\n```\n\nIf you want to use a Redis module that provides custom commands, you can\nregister them as read-only with `Redis::Cluster.register_read_only_commands`\nand they will automatically be routed to replicas. See\n[`redis/cluster/json.cr`](https://github.com/jgaskins/redis/blob/3e874563dd524df9af6827f72edecca13a615802/src/cluster/json.cr#L5-L15)\nfor example usage.","summary":"

    Use in place of a Redis::Client when talking to Redis clusters.

    \n

    EXPERIMENTAL Cluster support is still under development. Some APIs may change while details are discovered and highly customized clusters (for example, servers handling individual hash slots or multiple hash-slot ranges) are not yet supported.

    ","class_methods":[{"html_id":"register_read_only_command(command:String)-class-method","name":"register_read_only_command","doc":"Tell the cluster driver that the specified Redis command can be routed to\nread-only replicas.\n\n```\nRedis::Cluster.register_read_only_command \"mymodule.get\"\n```","summary":"

    Tell the cluster driver that the specified Redis command can be routed to read-only replicas.

    ","abstract":false,"args":[{"name":"command","external_name":"command","restriction":"String"}],"args_string":"(command : String)","args_html":"(command : String)","location":{"filename":"src/cluster.cr","line_number":67,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/cluster.cr#L67"},"def":{"name":"register_read_only_command","args":[{"name":"command","external_name":"command","restriction":"String"}],"visibility":"Public","body":"READ_ONLY_COMMANDS << command"}},{"html_id":"register_read_only_commands(commands:Enumerable(String))-class-method","name":"register_read_only_commands","doc":"Tell the cluster driver that all the specified Redis commands can be\nrouted to read-only replicas.\n\n```\nRedis::Cluster.register_read_only_commands %w[\n mymodule.get\n mymodule.mget\n]\n```","summary":"

    Tell the cluster driver that all the specified Redis commands can be routed to read-only replicas.

    ","abstract":false,"args":[{"name":"commands","external_name":"commands","restriction":"Enumerable(String)"}],"args_string":"(commands : Enumerable(String))","args_html":"(commands : Enumerable(String))","location":{"filename":"src/cluster.cr","line_number":57,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/cluster.cr#L57"},"def":{"name":"register_read_only_commands","args":[{"name":"commands","external_name":"commands","restriction":"Enumerable(String)"}],"visibility":"Public","body":"commands.each do |command|\n register_read_only_command(command)\nend"}}],"constructors":[{"html_id":"new(uri:URI=URI.parse(ENV[\"REDIS_CLUSTER_URL\"]?||\"redis:///\"))-class-method","name":"new","doc":"Pass a `URI` (defaulting to the `REDIS_CLUSTER_URL` environment variable)\nto connect to the specified Redis cluster — the URI can point to _any_\nserver in the cluster and `Redis::Cluster` will discover the rest.","summary":"

    Pass a URI (defaulting to the REDIS_CLUSTER_URL environment variable) to connect to the specified Redis cluster — the URI can point to any server in the cluster and Redis::Cluster will discover the rest.

    ","abstract":false,"args":[{"name":"uri","default_value":"URI.parse(ENV[\"REDIS_CLUSTER_URL\"]? || \"redis:///\")","external_name":"uri","restriction":"URI"}],"args_string":"(uri : URI = URI.parse(ENV[\"REDIS_CLUSTER_URL\"]? || \"redis:///\"))","args_html":"(uri : URI = URI.parse(ENV["REDIS_CLUSTER_URL"]? || "redis:///"))","location":{"filename":"src/cluster.cr","line_number":74,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/cluster.cr#L74"},"def":{"name":"new","args":[{"name":"uri","default_value":"URI.parse(ENV[\"REDIS_CLUSTER_URL\"]? || \"redis:///\")","external_name":"uri","restriction":"URI"}],"visibility":"Public","body":"_ = allocate\n_.initialize(uri)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"close-instance-method","name":"close","doc":"Close all connections to this Redis cluster","summary":"

    Close all connections to this Redis cluster

    ","abstract":false,"location":{"filename":"src/cluster.cr","line_number":253,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/cluster.cr#L253"},"def":{"name":"close","visibility":"Public","body":"begin\n @write_pools.each do |__temp_54|\n _, pool = __temp_54\n pool.close\n end\n @read_pools.each do |__temp_55|\n _, pool = __temp_55\n pool.close\n end\nensure\n @closed = true\nend"}},{"html_id":"flushdb-instance-method","name":"flushdb","doc":"Executes `flushdb` on each shard in the cluster.","summary":"

    Executes #flushdb on each shard in the cluster.

    ","abstract":false,"location":{"filename":"src/cluster.cr","line_number":214,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/cluster.cr#L214"},"def":{"name":"flushdb","visibility":"Public","body":"each_master(&.run({\"flushdb\"}))"}},{"html_id":"pipeline(key:String,&)-instance-method","name":"pipeline","doc":"Run a pipeline for the specified key\n\n```\ncluster.pipeline \"{widgets}\" do |pipe|\n widget_ids.each do |id|\n pipe.get \"{widgets}:#{id}\"\n end\nend\n```\n\nWARNING: All keys that this pipeline operates on _MUST_ reside on the same\nshard. It's best to pass a pre-hashed key (one containing `{}`) to this\nmethod. See the example above.","summary":"

    Run a pipeline for the specified key

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String, &)","args_html":"(key : String, &)","location":{"filename":"src/cluster.cr","line_number":204,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/cluster.cr#L204"},"def":{"name":"pipeline","args":[{"name":"key","external_name":"key","restriction":"String"}],"yields":1,"block_arity":1,"visibility":"Public","body":"(write_pool_for(key)).checkout(&.pipeline do |pipe|\n yield pipe\nend)"}},{"html_id":"run(commandfull_command)-instance-method","name":"run","doc":"Execute the given command and return the result from the server. Commands\nmust be an `Enumerable` and its `size` method must be re-entrant.\n\n```\nrun({\"set\", \"foo\", \"bar\"})\n```","summary":"

    Execute the given command and return the result from the server.

    ","abstract":false,"args":[{"name":"full_command","external_name":"command","restriction":""}],"args_string":"(command full_command)","args_html":"(command full_command)","location":{"filename":"src/cluster.cr","line_number":218,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/cluster.cr#L218"},"def":{"name":"run","args":[{"name":"full_command","external_name":"command","restriction":""}],"visibility":"Public","body":"if full_command.empty?\n raise(ArgumentError.new(\"Redis commands must have at least one component\"))\nend\ncommand = full_command[0]\nif key = full_command[1]?\n if command =~ (/[A-Z]/)\n command = command.downcase\n end\n started_at = Time.monotonic\n (if READ_ONLY_COMMANDS.includes?(command)\n read_pool_for(key)\n else\n write_pool_for(key)\n end).checkout do |connection|\n connection.run(full_command)\n end.tap do\n LOG.debug(&.emit(command: full_command.join(' '), duration: (Time.monotonic - started_at).total_seconds))\n end\nelse\n raise(Error.new(\"No key was specified for this command, so the cluster driver cannot route it to an appropriate Redis shard. A cluster-specific method must be added to handle cases like these until a generalized solution is added.\"))\nend\n"}},{"html_id":"scan_each(*args,**kwargs,&):Nil-instance-method","name":"scan_each","doc":"Execute `Commands#scan_each` on each shard, yielding any matching keys.","summary":"

    Execute Commands#scan_each on each shard, yielding any matching keys.

    ","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **kwargs, &) : Nil","args_html":"(*args, **kwargs, &) : Nil","location":{"filename":"src/cluster.cr","line_number":209,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/cluster.cr#L209"},"def":{"name":"scan_each","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"kwargs","external_name":"kwargs","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"return_type":"Nil","visibility":"Public","body":"each_unique_replica(&.scan_each(*args, **kwargs) do |key|\n yield key\nend)"}},{"html_id":"slot_for(key:String)-instance-method","name":"slot_for","doc":"Return the Redis hash slot for the given key. This is useful for seeing\nwhich shard your command will be routed to.","summary":"

    Return the Redis hash slot for the given key.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/cluster.cr","line_number":296,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/cluster.cr#L296"},"def":{"name":"slot_for","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"if (hash_start = key.index('{')) && (hash_end = key.index('}', hash_start + 1))\n key = key[(hash_start + 1)..(hash_end - 1)]\nend\n(CRC16.checksum(key)) % 16384\n"}}],"types":[{"html_id":"redis/Redis/Cluster/Ask","path":"Redis/Cluster/Ask.html","kind":"class","full_name":"Redis::Cluster::Ask","name":"Ask","abstract":false,"superclass":{"html_id":"redis/Redis/Cluster/Error","kind":"class","full_name":"Redis::Cluster::Error","name":"Error"},"ancestors":[{"html_id":"redis/Redis/Cluster/Error","kind":"class","full_name":"Redis::Cluster::Error","name":"Error"},{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/errors.cr","line_number":22,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/errors.cr#L22"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Cluster","kind":"class","full_name":"Redis::Cluster","name":"Cluster"}},{"html_id":"redis/Redis/Cluster/CrossSlot","path":"Redis/Cluster/CrossSlot.html","kind":"class","full_name":"Redis::Cluster::CrossSlot","name":"CrossSlot","abstract":false,"superclass":{"html_id":"redis/Redis/Cluster/Error","kind":"class","full_name":"Redis::Cluster::Error","name":"Error"},"ancestors":[{"html_id":"redis/Redis/Cluster/Error","kind":"class","full_name":"Redis::Cluster::Error","name":"Error"},{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/errors.cr","line_number":23,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/errors.cr#L23"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Cluster","kind":"class","full_name":"Redis::Cluster","name":"Cluster"}},{"html_id":"redis/Redis/Cluster/Error","path":"Redis/Cluster/Error.html","kind":"class","full_name":"Redis::Cluster::Error","name":"Error","abstract":false,"superclass":{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},"ancestors":[{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/errors.cr","line_number":20,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/errors.cr#L20"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"subclasses":[{"html_id":"redis/Redis/Cluster/Ask","kind":"class","full_name":"Redis::Cluster::Ask","name":"Ask"},{"html_id":"redis/Redis/Cluster/CrossSlot","kind":"class","full_name":"Redis::Cluster::CrossSlot","name":"CrossSlot"},{"html_id":"redis/Redis/Cluster/Moved","kind":"class","full_name":"Redis::Cluster::Moved","name":"Moved"}],"namespace":{"html_id":"redis/Redis/Cluster","kind":"class","full_name":"Redis::Cluster","name":"Cluster"}},{"html_id":"redis/Redis/Cluster/Moved","path":"Redis/Cluster/Moved.html","kind":"class","full_name":"Redis::Cluster::Moved","name":"Moved","abstract":false,"superclass":{"html_id":"redis/Redis/Cluster/Error","kind":"class","full_name":"Redis::Cluster::Error","name":"Error"},"ancestors":[{"html_id":"redis/Redis/Cluster/Error","kind":"class","full_name":"Redis::Cluster::Error","name":"Error"},{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/errors.cr","line_number":21,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/errors.cr#L21"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Cluster","kind":"class","full_name":"Redis::Cluster","name":"Cluster"}}]},{"html_id":"redis/Redis/Commands","path":"Redis/Commands.html","kind":"module","full_name":"Redis::Commands","name":"Commands","abstract":false,"ancestors":[{"html_id":"redis/Redis/Commands/Stream","kind":"module","full_name":"Redis::Commands::Stream","name":"Stream"},{"html_id":"redis/Redis/Commands/SortedSet","kind":"module","full_name":"Redis::Commands::SortedSet","name":"SortedSet"},{"html_id":"redis/Redis/Commands/Set","kind":"module","full_name":"Redis::Commands::Set","name":"Set"},{"html_id":"redis/Redis/Commands/List","kind":"module","full_name":"Redis::Commands::List","name":"List"},{"html_id":"redis/Redis/Commands/Hash","kind":"module","full_name":"Redis::Commands::Hash","name":"Hash"}],"locations":[{"filename":"src/commands.cr","line_number":14,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L14"},{"filename":"src/commands/hash.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/hash.cr#L1"},{"filename":"src/graph.cr","line_number":505,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L505"},{"filename":"src/json.cr","line_number":341,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L341"},{"filename":"src/search.cr","line_number":335,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L335"},{"filename":"src/time_series.cr","line_number":441,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L441"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"redis/Redis/Commands/Hash","kind":"module","full_name":"Redis::Commands::Hash","name":"Hash"},{"html_id":"redis/Redis/Commands/List","kind":"module","full_name":"Redis::Commands::List","name":"List"},{"html_id":"redis/Redis/Commands/Set","kind":"module","full_name":"Redis::Commands::Set","name":"Set"},{"html_id":"redis/Redis/Commands/SortedSet","kind":"module","full_name":"Redis::Commands::SortedSet","name":"SortedSet"},{"html_id":"redis/Redis/Commands/Stream","kind":"module","full_name":"Redis::Commands::Stream","name":"Stream"}],"including_types":[{"html_id":"redis/Redis/Client","kind":"class","full_name":"Redis::Client","name":"Client"},{"html_id":"redis/Redis/Cluster","kind":"class","full_name":"Redis::Cluster","name":"Cluster"},{"html_id":"redis/Redis/Connection","kind":"class","full_name":"Redis::Connection","name":"Connection"},{"html_id":"redis/Redis/Pipeline","kind":"class","full_name":"Redis::Pipeline","name":"Pipeline"},{"html_id":"redis/Redis/ReplicationClient","kind":"class","full_name":"Redis::ReplicationClient","name":"ReplicationClient"},{"html_id":"redis/Redis/Transaction","kind":"class","full_name":"Redis::Transaction","name":"Transaction"}],"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"doc":"All Redis commands are defined in this module. Any paradigm that needs to\nuse these commands simply overrides `run`, which takes a single `command`\nobject, which must be an `Enumerable`.\n\nTODO: Add more Redis commands from https://redis.io/commands","summary":"

    All Redis commands are defined in this module.

    ","instance_methods":[{"html_id":"decr(key:String)-instance-method","name":"decr","doc":"Atomically decrement and return the integer value for the specified key,\ncreating it if it does not exist\n\n```\nredis.del \"counter\"\nredis.decr \"counter\" # => -1\n```","summary":"

    Atomically decrement and return the integer value for the specified key, creating it if it does not exist

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands.cr","line_number":104,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L104"},"def":{"name":"decr","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"decr\", key})"}},{"html_id":"decrby(key:String,amount:Int|String)-instance-method","name":"decrby","doc":"Atomically decrement and return the integer value for the specified key by\nthe specified amount, creating it if it does not exist\n\n```\nredis.del \"counter\"\nredis.decrby \"counter\", 2 # => -2\n```","summary":"

    Atomically decrement and return the integer value for the specified key by the specified amount, creating it if it does not exist

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"amount","external_name":"amount","restriction":"Int | String"}],"args_string":"(key : String, amount : Int | String)","args_html":"(key : String, amount : Int | String)","location":{"filename":"src/commands.cr","line_number":126,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L126"},"def":{"name":"decrby","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"amount","external_name":"amount","restriction":"Int | String"}],"visibility":"Public","body":"run({\"decrby\", key, amount.to_s})"}},{"html_id":"del(keys:Enumerable(String))-instance-method","name":"del","doc":"Delete all specified keys and return the number of keys deleted.\n\n```\nredis.set \"foo\", \"12\"\nredis.del [\"foo\", \"bar\"] # => 1\nredis.del [\"foo\", \"bar\"] # => 0\n```","summary":"

    Delete all specified keys and return the number of keys deleted.

    ","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"Enumerable(String)"}],"args_string":"(keys : Enumerable(String))","args_html":"(keys : Enumerable(String))","location":{"filename":"src/commands.cr","line_number":148,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L148"},"def":{"name":"del","args":[{"name":"keys","external_name":"keys","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 1 + keys.size)\ncommand << \"del\"\nkeys.each do |key|\n command << key\nend\nrun(command)\n"}},{"html_id":"del(*keys:String)-instance-method","name":"del","doc":"Delete all specified keys and return the number of keys deleted.\n\n```\nredis.set \"foo\", \"12\"\nredis.del \"foo\", \"bar\" # => 1\nredis.del \"foo\", \"bar\" # => 0\n```","summary":"

    Delete all specified keys and return the number of keys deleted.

    ","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"String"}],"args_string":"(*keys : String)","args_html":"(*keys : String)","location":{"filename":"src/commands.cr","line_number":137,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L137"},"def":{"name":"del","args":[{"name":"keys","external_name":"keys","restriction":"String"}],"splat_index":0,"visibility":"Public","body":"run({\"del\"} + keys)"}},{"html_id":"eval(script:String,keys:Enumerable(String)=EmptyEnumerable.new,args:Enumerable(String)=EmptyEnumerable.new)-instance-method","name":"eval","doc":"Evaluate the given Lua script, either referenced by SHA with `evalsha`\nor directly with `eval`.\n\nNOTE: Use `eval` only for very trivial scripts and `evalsha` for larger\nor frequently executed scripts to amortize parse/compile time as well as\nsend fewer bytes along the wire.\n\nNOTE: Use `eval_ro` and `evalsha_ro` in a clustered environment to\nevaluate the scripts on read-only replicas.\n\n```\nscript = <<-LUA\n return \"this script was \" + ARGV[1]\nLUA\n\nsha = redis.script_load(script)\nredis.eval(script, args: [\"evaluated on the fly\"]\nredis.evalsha(sha, args: [\"precompiled\"])\n```","summary":"

    Evaluate the given Lua script, either referenced by SHA with #evalsha or directly with #eval.

    ","abstract":false,"args":[{"name":"script","external_name":"script","restriction":"String"},{"name":"keys","default_value":"EmptyEnumerable.new","external_name":"keys","restriction":"Enumerable(String)"},{"name":"args","default_value":"EmptyEnumerable.new","external_name":"args","restriction":"Enumerable(String)"}],"args_string":"(script : String, keys : Enumerable(String) = EmptyEnumerable.new, args : Enumerable(String) = EmptyEnumerable.new)","args_html":"(script : String, keys : Enumerable(String) = EmptyEnumerable.new, args : Enumerable(String) = EmptyEnumerable.new)","location":{"filename":"src/commands.cr","line_number":277,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L277"},"def":{"name":"eval","args":[{"name":"script","external_name":"script","restriction":"String"},{"name":"keys","default_value":"EmptyEnumerable.new","external_name":"keys","restriction":"Enumerable(String)"},{"name":"args","default_value":"EmptyEnumerable.new","external_name":"args","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: (3 + keys.size) + args.size)\n((command << \"eval\") << script) << keys.size.to_s\nkeys.each do |key|\n command << key\nend\nargs.each do |arg|\n command << arg\nend\nrun(command)\n"}},{"html_id":"eval_ro(script:String,keys:Enumerable(String)=EmptyEnumerable.new,args:Enumerable(String)=EmptyEnumerable.new)-instance-method","name":"eval_ro","doc":"Evaluate the given Lua script, either referenced by SHA with `evalsha`\nor directly with `eval`.\n\nNOTE: Use `eval` only for very trivial scripts and `evalsha` for larger\nor frequently executed scripts to amortize parse/compile time as well as\nsend fewer bytes along the wire.\n\nNOTE: Use `eval_ro` and `evalsha_ro` in a clustered environment to\nevaluate the scripts on read-only replicas.\n\n```\nscript = <<-LUA\n return \"this script was \" + ARGV[1]\nLUA\n\nsha = redis.script_load(script)\nredis.eval(script, args: [\"evaluated on the fly\"]\nredis.evalsha(sha, args: [\"precompiled\"])\n```","summary":"

    Evaluate the given Lua script, either referenced by SHA with #evalsha or directly with #eval.

    ","abstract":false,"args":[{"name":"script","external_name":"script","restriction":"String"},{"name":"keys","default_value":"EmptyEnumerable.new","external_name":"keys","restriction":"Enumerable(String)"},{"name":"args","default_value":"EmptyEnumerable.new","external_name":"args","restriction":"Enumerable(String)"}],"args_string":"(script : String, keys : Enumerable(String) = EmptyEnumerable.new, args : Enumerable(String) = EmptyEnumerable.new)","args_html":"(script : String, keys : Enumerable(String) = EmptyEnumerable.new, args : Enumerable(String) = EmptyEnumerable.new)","location":{"filename":"src/commands.cr","line_number":278,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L278"},"def":{"name":"eval_ro","args":[{"name":"script","external_name":"script","restriction":"String"},{"name":"keys","default_value":"EmptyEnumerable.new","external_name":"keys","restriction":"Enumerable(String)"},{"name":"args","default_value":"EmptyEnumerable.new","external_name":"args","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: (3 + keys.size) + args.size)\n((command << \"eval_ro\") << script) << keys.size.to_s\nkeys.each do |key|\n command << key\nend\nargs.each do |arg|\n command << arg\nend\nrun(command)\n"}},{"html_id":"evalsha(sha:String,keys:Enumerable(String)=EmptyEnumerable.new,args:Enumerable(String)=EmptyEnumerable.new)-instance-method","name":"evalsha","doc":"Evaluate the given Lua script, either referenced by SHA with `evalsha`\nor directly with `eval`.\n\nNOTE: Use `eval` only for very trivial scripts and `evalsha` for larger\nor frequently executed scripts to amortize parse/compile time as well as\nsend fewer bytes along the wire.\n\nNOTE: Use `eval_ro` and `evalsha_ro` in a clustered environment to\nevaluate the scripts on read-only replicas.\n\n```\nscript = <<-LUA\n return \"this script was \" + ARGV[1]\nLUA\n\nsha = redis.script_load(script)\nredis.eval(script, args: [\"evaluated on the fly\"]\nredis.evalsha(sha, args: [\"precompiled\"])\n```","summary":"

    Evaluate the given Lua script, either referenced by SHA with #evalsha or directly with #eval.

    ","abstract":false,"args":[{"name":"sha","external_name":"sha","restriction":"String"},{"name":"keys","default_value":"EmptyEnumerable.new","external_name":"keys","restriction":"Enumerable(String)"},{"name":"args","default_value":"EmptyEnumerable.new","external_name":"args","restriction":"Enumerable(String)"}],"args_string":"(sha : String, keys : Enumerable(String) = EmptyEnumerable.new, args : Enumerable(String) = EmptyEnumerable.new)","args_html":"(sha : String, keys : Enumerable(String) = EmptyEnumerable.new, args : Enumerable(String) = EmptyEnumerable.new)","location":{"filename":"src/commands.cr","line_number":275,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L275"},"def":{"name":"evalsha","args":[{"name":"sha","external_name":"sha","restriction":"String"},{"name":"keys","default_value":"EmptyEnumerable.new","external_name":"keys","restriction":"Enumerable(String)"},{"name":"args","default_value":"EmptyEnumerable.new","external_name":"args","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: (3 + keys.size) + args.size)\n((command << \"evalsha\") << sha) << keys.size.to_s\nkeys.each do |key|\n command << key\nend\nargs.each do |arg|\n command << arg\nend\nrun(command)\n"}},{"html_id":"evalsha_ro(script:String,keys:Enumerable(String)=EmptyEnumerable.new,args:Enumerable(String)=EmptyEnumerable.new)-instance-method","name":"evalsha_ro","doc":"Evaluate the given Lua script, either referenced by SHA with `evalsha`\nor directly with `eval`.\n\nNOTE: Use `eval` only for very trivial scripts and `evalsha` for larger\nor frequently executed scripts to amortize parse/compile time as well as\nsend fewer bytes along the wire.\n\nNOTE: Use `eval_ro` and `evalsha_ro` in a clustered environment to\nevaluate the scripts on read-only replicas.\n\n```\nscript = <<-LUA\n return \"this script was \" + ARGV[1]\nLUA\n\nsha = redis.script_load(script)\nredis.eval(script, args: [\"evaluated on the fly\"]\nredis.evalsha(sha, args: [\"precompiled\"])\n```","summary":"

    Evaluate the given Lua script, either referenced by SHA with #evalsha or directly with #eval.

    ","abstract":false,"args":[{"name":"script","external_name":"script","restriction":"String"},{"name":"keys","default_value":"EmptyEnumerable.new","external_name":"keys","restriction":"Enumerable(String)"},{"name":"args","default_value":"EmptyEnumerable.new","external_name":"args","restriction":"Enumerable(String)"}],"args_string":"(script : String, keys : Enumerable(String) = EmptyEnumerable.new, args : Enumerable(String) = EmptyEnumerable.new)","args_html":"(script : String, keys : Enumerable(String) = EmptyEnumerable.new, args : Enumerable(String) = EmptyEnumerable.new)","location":{"filename":"src/commands.cr","line_number":276,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L276"},"def":{"name":"evalsha_ro","args":[{"name":"script","external_name":"script","restriction":"String"},{"name":"keys","default_value":"EmptyEnumerable.new","external_name":"keys","restriction":"Enumerable(String)"},{"name":"args","default_value":"EmptyEnumerable.new","external_name":"args","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: (3 + keys.size) + args.size)\n((command << \"evalsha_ro\") << script) << keys.size.to_s\nkeys.each do |key|\n command << key\nend\nargs.each do |arg|\n command << arg\nend\nrun(command)\n"}},{"html_id":"exists(*keys:String)-instance-method","name":"exists","doc":"Return the number of specified keys that exist\n\n```\nredis.exists(\"foo\", \"bar\") # => 0\nredis.set \"foo\", \"exists now\"\nredis.exists(\"foo\", \"bar\") # => 1\nredis.set \"bar\", \"also exists now\"\nredis.exists(\"foo\", \"bar\") # => 2\n```","summary":"

    Return the number of specified keys that exist

    ","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"String"}],"args_string":"(*keys : String)","args_html":"(*keys : String)","location":{"filename":"src/commands.cr","line_number":177,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L177"},"def":{"name":"exists","args":[{"name":"keys","external_name":"keys","restriction":"String"}],"splat_index":0,"visibility":"Public","body":"run({\"exists\"} + keys)"}},{"html_id":"expire(key:String,ttl:Time::Span)-instance-method","name":"expire","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"ttl","external_name":"ttl","restriction":"Time::Span"}],"args_string":"(key : String, ttl : Time::Span)","args_html":"(key : String, ttl : Time::Span)","location":{"filename":"src/commands.cr","line_number":292,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L292"},"def":{"name":"expire","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"ttl","external_name":"ttl","restriction":"Time::Span"}],"visibility":"Public","body":"expire(key, ttl.total_seconds.to_i64)"}},{"html_id":"expire(key:String,ttl:Int)-instance-method","name":"expire","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"ttl","external_name":"ttl","restriction":"Int"}],"args_string":"(key : String, ttl : Int)","args_html":"(key : String, ttl : Int)","location":{"filename":"src/commands.cr","line_number":296,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L296"},"def":{"name":"expire","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"ttl","external_name":"ttl","restriction":"Int"}],"visibility":"Public","body":"run({\"expire\", key, ttl.to_s})"}},{"html_id":"expireat(key:String,at:Time)-instance-method","name":"expireat","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"at","external_name":"at","restriction":"Time"}],"args_string":"(key : String, at : Time)","args_html":"(key : String, at : Time)","location":{"filename":"src/commands.cr","line_number":308,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L308"},"def":{"name":"expireat","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"at","external_name":"at","restriction":"Time"}],"visibility":"Public","body":"run({\"expireat\", key, at.to_unix.to_s})"}},{"html_id":"flushall-instance-method","name":"flushall","doc":"Delete all the keys of all the existing databases,\nnot just the currently selected one.","summary":"

    Delete all the keys of all the existing databases, not just the currently selected one.

    ","abstract":false,"location":{"filename":"src/commands.cr","line_number":353,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L353"},"def":{"name":"flushall","visibility":"Public","body":"run({\"flushall\"})"}},{"html_id":"flushdb-instance-method","name":"flushdb","doc":"Delete all the keys of the currently selected DB","summary":"

    Delete all the keys of the currently selected DB

    ","abstract":false,"location":{"filename":"src/commands.cr","line_number":347,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L347"},"def":{"name":"flushdb","visibility":"Public","body":"run({\"flushdb\"})"}},{"html_id":"ft-instance-method","name":"ft","summary":"

    EXPERIMENTAL RediSearch support is still under development. Some APIs may change while details are discovered.

    ","abstract":false,"location":{"filename":"src/search.cr","line_number":337,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L337"},"def":{"name":"ft","visibility":"Public","body":"FullText.new(self)"}},{"html_id":"get(key:String)-instance-method","name":"get","doc":"Get the value for the specified key\n\n```\nredis.set \"foo\", \"bar\"\nredis.get(\"foo\") # => \"bar\"\n```","summary":"

    Get the value for the specified key

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands.cr","line_number":82,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L82"},"def":{"name":"get","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"get\", key})"}},{"html_id":"graph(key:String)-instance-method","name":"graph","doc":"Instantiate a `Redis::Graph::Client` backed by this `Redis::Client`.","summary":"

    Instantiate a Redis::Graph::Client backed by this Redis::Client.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/graph.cr","line_number":507,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L507"},"def":{"name":"graph","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"Graph::Client.new(self, key)"}},{"html_id":"incr(key:String)-instance-method","name":"incr","doc":"Atomically increment and return the integer value for the specified key,\ncreating it if it does not exist\n\n```\nredis.del \"counter\"\nredis.incr \"counter\" # => 1\n```","summary":"

    Atomically increment and return the integer value for the specified key, creating it if it does not exist

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands.cr","line_number":93,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L93"},"def":{"name":"incr","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"incr\", key})"}},{"html_id":"incrby(key:String,amount:Int|String)-instance-method","name":"incrby","doc":"Atomically increment and return the integer value for the specified key by\nthe specified amount, creating it if it does not exist\n\n```\nredis.del \"counter\"\nredis.incrby \"counter\", 2 # => 2\n```","summary":"

    Atomically increment and return the integer value for the specified key by the specified amount, creating it if it does not exist

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"amount","external_name":"amount","restriction":"Int | String"}],"args_string":"(key : String, amount : Int | String)","args_html":"(key : String, amount : Int | String)","location":{"filename":"src/commands.cr","line_number":115,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L115"},"def":{"name":"incrby","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"amount","external_name":"amount","restriction":"Int | String"}],"visibility":"Public","body":"run({\"incrby\", key, amount.to_s})"}},{"html_id":"info-instance-method","name":"info","abstract":false,"location":{"filename":"src/commands.cr","line_number":357,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L357"},"def":{"name":"info","visibility":"Public","body":"((run({\"info\"})).as(String)).lines.reject do |line|\n line =~ (/^(#|$)/)\nend.map(&.split(':', 2)).to_h"}},{"html_id":"json-instance-method","name":"json","doc":"Return a `Redis::JSON` instance that wraps the current `Redis::Client` or\n`Redis::Cluster`.","summary":"

    Return a Redis::JSON instance that wraps the current Redis::Client or Redis::Cluster.

    \n

    EXPERIMENTAL Support for the RedisJSON module is still under development and subject to change.

    ","abstract":false,"location":{"filename":"src/json.cr","line_number":345,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L345"},"def":{"name":"json","visibility":"Public","body":"JSON.new(self)"}},{"html_id":"keys(pattern=\"*\")-instance-method","name":"keys","doc":"Get the keys whose names follow the specified glob pattern. If a pattern\nis not specified, it will return all keys by default. Be careful when\nusing this command on Redis servers with a lot of traffic and millions\nof keys.\n\n```\nredis.keys # => [\"foo\", \"bar\", \"baz\"]\nredis.keys(\"f*\") # => [\"foo\"]\nredis.keys(\"b*\") # => [\"bar\", \"baz\"]\n```","summary":"

    Get the keys whose names follow the specified glob pattern.

    ","abstract":false,"args":[{"name":"pattern","default_value":"\"*\"","external_name":"pattern","restriction":""}],"args_string":"(pattern = \"*\")","args_html":"(pattern = "*")","location":{"filename":"src/commands.cr","line_number":39,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L39"},"def":{"name":"keys","args":[{"name":"pattern","default_value":"\"*\"","external_name":"pattern","restriction":""}],"visibility":"Public","body":"run({\"keys\", pattern})"}},{"html_id":"mget(keys:Enumerable(String))-instance-method","name":"mget","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"Enumerable(String)"}],"args_string":"(keys : Enumerable(String))","args_html":"(keys : Enumerable(String))","location":{"filename":"src/commands.cr","line_number":328,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L328"},"def":{"name":"mget","args":[{"name":"keys","external_name":"keys","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 1 + keys.size)\ncommand << \"mget\"\nkeys.each do |key|\n command << key\nend\nrun(command)\n"}},{"html_id":"mset(data:Hash(String,String))-instance-method","name":"mset","abstract":false,"args":[{"name":"data","external_name":"data","restriction":"Hash(String, String)"}],"args_string":"(data : Hash(String, String))","args_html":"(data : Hash(String, String))","location":{"filename":"src/commands.cr","line_number":336,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L336"},"def":{"name":"mset","args":[{"name":"data","external_name":"data","restriction":"Hash(String, String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 1 + data.size)\ncommand << \"mset\"\ndata.each do |key, value|\n (command << key) << value\nend\nrun(command)\n"}},{"html_id":"pexpire(key:String,ttl:Time::Span)-instance-method","name":"pexpire","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"ttl","external_name":"ttl","restriction":"Time::Span"}],"args_string":"(key : String, ttl : Time::Span)","args_html":"(key : String, ttl : Time::Span)","location":{"filename":"src/commands.cr","line_number":300,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L300"},"def":{"name":"pexpire","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"ttl","external_name":"ttl","restriction":"Time::Span"}],"visibility":"Public","body":"pexpire(key, ttl.total_milliseconds.to_i64)"}},{"html_id":"pexpire(key:String,ttl:Int)-instance-method","name":"pexpire","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"ttl","external_name":"ttl","restriction":"Int"}],"args_string":"(key : String, ttl : Int)","args_html":"(key : String, ttl : Int)","location":{"filename":"src/commands.cr","line_number":304,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L304"},"def":{"name":"pexpire","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"ttl","external_name":"ttl","restriction":"Int"}],"visibility":"Public","body":"run({\"pexpire\", key, ttl.to_s})"}},{"html_id":"pexpireat(key:String,at:Time)-instance-method","name":"pexpireat","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"at","external_name":"at","restriction":"Time"}],"args_string":"(key : String, at : Time)","args_html":"(key : String, at : Time)","location":{"filename":"src/commands.cr","line_number":312,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L312"},"def":{"name":"pexpireat","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"at","external_name":"at","restriction":"Time"}],"visibility":"Public","body":"run({\"pexpireat\", key, at.to_unix_ms.to_s})"}},{"html_id":"pttl(key:String)-instance-method","name":"pttl","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands.cr","line_number":320,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L320"},"def":{"name":"pttl","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"pttl\", key})"}},{"html_id":"publish(channel:String,message:String)-instance-method","name":"publish","abstract":false,"args":[{"name":"channel","external_name":"channel","restriction":"String"},{"name":"message","external_name":"message","restriction":"String"}],"args_string":"(channel : String, message : String)","args_html":"(channel : String, message : String)","location":{"filename":"src/commands.cr","line_number":191,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L191"},"def":{"name":"publish","args":[{"name":"channel","external_name":"channel","restriction":"String"},{"name":"message","external_name":"message","restriction":"String"}],"visibility":"Public","body":"run({\"publish\", channel, message})"}},{"html_id":"run(command)-instance-method","name":"run","doc":"Execute the given command and return the result from the server. Commands\nmust be an `Enumerable` and its `size` method must be re-entrant.\n\n```\nrun({\"set\", \"foo\", \"bar\"})\n```","summary":"

    Execute the given command and return the result from the server.

    ","abstract":true,"args":[{"name":"command","external_name":"command","restriction":""}],"args_string":"(command)","args_html":"(command)","location":{"filename":"src/commands.cr","line_number":27,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L27"},"def":{"name":"run","args":[{"name":"command","external_name":"command","restriction":""}],"visibility":"Public","body":""}},{"html_id":"scan(cursor:String=\"0\",match:String|Nil=nil,count:String|Int|Nil=nil,type:String|Nil=nil)-instance-method","name":"scan","abstract":false,"args":[{"name":"cursor","default_value":"\"0\"","external_name":"cursor","restriction":"String"},{"name":"match","default_value":"nil","external_name":"match","restriction":"String | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"},{"name":"type","default_value":"nil","external_name":"type","restriction":"String | ::Nil"}],"args_string":"(cursor : String = \"0\", match : String | Nil = nil, count : String | Int | Nil = nil, type : String | Nil = nil)","args_html":"(cursor : String = "0", match : String | Nil = nil, count : String | Int | Nil = nil, type : String | Nil = nil)","location":{"filename":"src/commands.cr","line_number":181,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L181"},"def":{"name":"scan","args":[{"name":"cursor","default_value":"\"0\"","external_name":"cursor","restriction":"String"},{"name":"match","default_value":"nil","external_name":"match","restriction":"String | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"},{"name":"type","default_value":"nil","external_name":"type","restriction":"String | ::Nil"}],"visibility":"Public","body":"command = {\"scan\", cursor}\nif match\n command = command + {\"match\", match}\nend\nif count\n command = command + {\"count\", count.to_s}\nend\nif type\n command = command + {\"type\", type}\nend\nrun(command)\n"}},{"html_id":"script_exists(shas:Enumerable(String))-instance-method","name":"script_exists","doc":"Return an array where each entry is `1` if the corresponding entry in the\nlist of `shas` exists or `0` if it does not.","summary":"

    Return an array where each entry is 1 if the corresponding entry in the list of shas exists or 0 if it does not.

    ","abstract":false,"args":[{"name":"shas","external_name":"shas","restriction":"Enumerable(String)"}],"args_string":"(shas : Enumerable(String))","args_html":"(shas : Enumerable(String))","location":{"filename":"src/commands.cr","line_number":229,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L229"},"def":{"name":"script_exists","args":[{"name":"shas","external_name":"shas","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + keys.size)\n(command << \"script\") << \"exists\"\nshas.each do |sha|\n command << sha\nend\nrun(command)\n"}},{"html_id":"script_exists(*shas:String)-instance-method","name":"script_exists","doc":"Return an array where each entry is `1` if the corresponding entry in the\nlist of `shas` exists or `0` if it does not.","summary":"

    Return an array where each entry is 1 if the corresponding entry in the list of shas exists or 0 if it does not.

    ","abstract":false,"args":[{"name":"shas","external_name":"shas","restriction":"String"}],"args_string":"(*shas : String)","args_html":"(*shas : String)","location":{"filename":"src/commands.cr","line_number":224,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L224"},"def":{"name":"script_exists","args":[{"name":"shas","external_name":"shas","restriction":"String"}],"splat_index":0,"visibility":"Public","body":"script_exists(shas)"}},{"html_id":"script_flush(mode:ScriptFlushMode)-instance-method","name":"script_flush","doc":"Flush the Lua scripts cache, see [the official docs](https://redis.io/commands/script-flush/).\n\n```\nredis.script_flush :async # Flush scripts asynchronously\nredis.script_flush :sync # Flush scripts immediately\n```","summary":"

    Flush the Lua scripts cache, see the official docs.

    ","abstract":false,"args":[{"name":"mode","external_name":"mode","restriction":"ScriptFlushMode"}],"args_string":"(mode : ScriptFlushMode)","args_html":"(mode : ScriptFlushMode)","location":{"filename":"src/commands.cr","line_number":213,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L213"},"def":{"name":"script_flush","args":[{"name":"mode","external_name":"mode","restriction":"ScriptFlushMode"}],"visibility":"Public","body":"run({\"script\", \"flush\", mode.to_s})"}},{"html_id":"script_kill-instance-method","name":"script_kill","doc":"Kill the currently executing `eval` script, assuming no write operation\nwas yet performed by the script.","summary":"

    Kill the currently executing #eval script, assuming no write operation was yet performed by the script.

    ","abstract":false,"location":{"filename":"src/commands.cr","line_number":239,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L239"},"def":{"name":"script_kill","visibility":"Public","body":"run({\"script\", \"kill\"})"}},{"html_id":"script_load(script:String)-instance-method","name":"script_load","doc":"Preload a Lua script, returning the SHA of the script to pass to `evalsha`.\n```\nsha = redis.script_load(<<-LUA)\n return \"Hello \" + ARGV[1]\nLUA\n\nredis.evalsha(sha, args: [\"world\"]) # => \"Hello world\"\n```","summary":"

    Preload a Lua script, returning the SHA of the script to pass to #evalsha.

    ","abstract":false,"args":[{"name":"script","external_name":"script","restriction":"String"}],"args_string":"(script : String)","args_html":"(script : String)","location":{"filename":"src/commands.cr","line_number":203,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L203"},"def":{"name":"script_load","args":[{"name":"script","external_name":"script","restriction":"String"}],"visibility":"Public","body":"run({\"script\", \"load\", script})"}},{"html_id":"set(key:String,value:String,ex:String|Int|Nil=nil,px:String|Int|Nil=nil,nx=false,xx=false,keepttl=false)-instance-method","name":"set","doc":"Set a given key to a given value, optionally specifying time-to-live (TTL).\n\n- `ex`: TTL in seconds (mnemonic: \"ex\" = \"expiration\")\n- `px`: TTL in milliseconds\n- `nx`: Only set this key if it does not exist (mnemonic: \"nx\" = it does \"not exist\")\n- `xx`: only set this key if it does exist (mnemonic: \"xx\" = it \"exists exists\" — look, I don't make the rules)\n- `keepttl`: If there is a TTL already set on the key, retain that TTL instead of overwriting it\n\n```\nredis.set \"foo\", \"bar\", ex: 1\nredis.get(\"foo\") # => \"bar\"\nsleep 1.second\nredis.get(\"foo\") # => nil\n```","summary":"

    Set a given key to a given value, optionally specifying time-to-live (TTL).

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"value","external_name":"value","restriction":"String"},{"name":"ex","default_value":"nil","external_name":"ex","restriction":"String | Int | ::Nil"},{"name":"px","default_value":"nil","external_name":"px","restriction":"String | Int | Nil"},{"name":"nx","default_value":"false","external_name":"nx","restriction":""},{"name":"xx","default_value":"false","external_name":"xx","restriction":""},{"name":"keepttl","default_value":"false","external_name":"keepttl","restriction":""}],"args_string":"(key : String, value : String, ex : String | Int | Nil = nil, px : String | Int | Nil = nil, nx = false, xx = false, keepttl = false)","args_html":"(key : String, value : String, ex : String | Int | Nil = nil, px : String | Int | Nil = nil, nx = false, xx = false, keepttl = false)","location":{"filename":"src/commands.cr","line_number":57,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L57"},"def":{"name":"set","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"value","external_name":"value","restriction":"String"},{"name":"ex","default_value":"nil","external_name":"ex","restriction":"String | Int | ::Nil"},{"name":"px","default_value":"nil","external_name":"px","restriction":"String | Int | Nil"},{"name":"nx","default_value":"false","external_name":"nx","restriction":""},{"name":"xx","default_value":"false","external_name":"xx","restriction":""},{"name":"keepttl","default_value":"false","external_name":"keepttl","restriction":""}],"visibility":"Public","body":"command = {\"set\", key, value}\nif ex\n command = command + {\"ex\", ex.to_s}\nend\nif px\n command = command + {\"px\", px.to_s}\nend\nif nx\n command = command + {\"nx\"}\nend\nif xx\n command = command + {\"xx\"}\nend\nif keepttl\n command = command + {\"keepttl\"}\nend\nrun(command)\n"}},{"html_id":"set(key,value,ex:Time,nx=false,xx=false,keepttl=false)-instance-method","name":"set","abstract":false,"args":[{"name":"key","external_name":"key","restriction":""},{"name":"value","external_name":"value","restriction":""},{"name":"ex","external_name":"ex","restriction":"Time"},{"name":"nx","default_value":"false","external_name":"nx","restriction":""},{"name":"xx","default_value":"false","external_name":"xx","restriction":""},{"name":"keepttl","default_value":"false","external_name":"keepttl","restriction":""}],"args_string":"(key, value, ex : Time, nx = false, xx = false, keepttl = false)","args_html":"(key, value, ex : Time, nx = false, xx = false, keepttl = false)","location":{"filename":"src/commands.cr","line_number":68,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L68"},"def":{"name":"set","args":[{"name":"key","external_name":"key","restriction":""},{"name":"value","external_name":"value","restriction":""},{"name":"ex","external_name":"ex","restriction":"Time"},{"name":"nx","default_value":"false","external_name":"nx","restriction":""},{"name":"xx","default_value":"false","external_name":"xx","restriction":""},{"name":"keepttl","default_value":"false","external_name":"keepttl","restriction":""}],"visibility":"Public","body":"set(key, value, ex: ex - Time.utc, nx: nx, xx: xx, keepttl: keepttl)"}},{"html_id":"set(key,value,ex:Time::Span,nx=false,xx=false,keepttl=false)-instance-method","name":"set","abstract":false,"args":[{"name":"key","external_name":"key","restriction":""},{"name":"value","external_name":"value","restriction":""},{"name":"ex","external_name":"ex","restriction":"Time::Span"},{"name":"nx","default_value":"false","external_name":"nx","restriction":""},{"name":"xx","default_value":"false","external_name":"xx","restriction":""},{"name":"keepttl","default_value":"false","external_name":"keepttl","restriction":""}],"args_string":"(key, value, ex : Time::Span, nx = false, xx = false, keepttl = false)","args_html":"(key, value, ex : Time::Span, nx = false, xx = false, keepttl = false)","location":{"filename":"src/commands.cr","line_number":72,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L72"},"def":{"name":"set","args":[{"name":"key","external_name":"key","restriction":""},{"name":"value","external_name":"value","restriction":""},{"name":"ex","external_name":"ex","restriction":"Time::Span"},{"name":"nx","default_value":"false","external_name":"nx","restriction":""},{"name":"xx","default_value":"false","external_name":"xx","restriction":""},{"name":"keepttl","default_value":"false","external_name":"keepttl","restriction":""}],"visibility":"Public","body":"set(key, value, px: ex.total_milliseconds.to_i64, nx: nx, xx: xx, keepttl: keepttl)"}},{"html_id":"ts-instance-method","name":"ts","doc":"Return a `Redis::TimeSeries` that wraps the current `Redis::Client` or\n`Redis::Cluster`.","summary":"

    Return a Redis::TimeSeries that wraps the current Redis::Client or Redis::Cluster.

    ","abstract":false,"location":{"filename":"src/time_series.cr","line_number":444,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L444"},"def":{"name":"ts","visibility":"Public","body":"TimeSeries.new(self)"}},{"html_id":"ttl(key:String)-instance-method","name":"ttl","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands.cr","line_number":316,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L316"},"def":{"name":"ttl","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"ttl\", key})"}},{"html_id":"type(key:String)-instance-method","name":"type","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands.cr","line_number":324,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L324"},"def":{"name":"type","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"type\", key})"}},{"html_id":"unlink(keys:Enumerable(String))-instance-method","name":"unlink","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"Enumerable(String)"}],"args_string":"(keys : Enumerable(String))","args_html":"(keys : Enumerable(String))","location":{"filename":"src/commands.cr","line_number":160,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L160"},"def":{"name":"unlink","args":[{"name":"keys","external_name":"keys","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 1 + keys.size)\ncommand << \"unlink\"\nkeys.each do |key|\n command << key\nend\nrun(command)\n"}},{"html_id":"unlink(*keys:String)-instance-method","name":"unlink","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"String"}],"args_string":"(*keys : String)","args_html":"(*keys : String)","location":{"filename":"src/commands.cr","line_number":156,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L156"},"def":{"name":"unlink","args":[{"name":"keys","external_name":"keys","restriction":"String"}],"splat_index":0,"visibility":"Public","body":"run({\"unlink\"} + keys)"}},{"html_id":"wait(numreplicasreplica_count:Int|String,timeout:Time::Span)-instance-method","name":"wait","abstract":false,"args":[{"name":"replica_count","external_name":"numreplicas","restriction":"Int | String"},{"name":"timeout","external_name":"timeout","restriction":"Time::Span"}],"args_string":"(numreplicas replica_count : Int | String, timeout : Time::Span)","args_html":"(numreplicas replica_count : Int | String, timeout : Time::Span)","location":{"filename":"src/commands.cr","line_number":366,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L366"},"def":{"name":"wait","args":[{"name":"replica_count","external_name":"numreplicas","restriction":"Int | String"},{"name":"timeout","external_name":"timeout","restriction":"Time::Span"}],"visibility":"Public","body":"wait(replica_count, timeout.total_seconds.ceil.to_i)"}},{"html_id":"wait(numreplicasreplica_count:Int|String,timeout:Int|String)-instance-method","name":"wait","abstract":false,"args":[{"name":"replica_count","external_name":"numreplicas","restriction":"Int | String"},{"name":"timeout","external_name":"timeout","restriction":"Int | String"}],"args_string":"(numreplicas replica_count : Int | String, timeout : Int | String)","args_html":"(numreplicas replica_count : Int | String, timeout : Int | String)","location":{"filename":"src/commands.cr","line_number":370,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L370"},"def":{"name":"wait","args":[{"name":"replica_count","external_name":"numreplicas","restriction":"Int | String"},{"name":"timeout","external_name":"timeout","restriction":"Int | String"}],"visibility":"Public","body":"run({\"wait\", replica_count.to_s, timeout.to_s})"}}],"types":[{"html_id":"redis/Redis/Commands/EmptyEnumerable","path":"Redis/Commands/EmptyEnumerable.html","kind":"struct","full_name":"Redis::Commands::EmptyEnumerable","name":"EmptyEnumerable","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/commands.cr","line_number":281,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L281"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"redis/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"}],"namespace":{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},"doc":"This type exists to avoid allocation of an array on the heap.","summary":"

    This type exists to avoid allocation of an array on the heap.

    ","constructors":[{"html_id":"new-class-method","name":"new","abstract":false,"location":{"filename":"src/commands.cr","line_number":281,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L281"},"def":{"name":"new","visibility":"Public","body":"x = allocate\nif x.responds_to?(:finalize)\n ::GC.add_finalizer(x)\nend\nx\n"}}],"instance_methods":[{"html_id":"each(&block:String->)-instance-method","name":"each","doc":"Must yield this collection's elements to the block.","summary":"

    Must yield this collection's elements to the block.

    ","abstract":false,"location":{"filename":"src/commands.cr","line_number":284,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L284"},"def":{"name":"each","yields":1,"block_arity":1,"block_arg":{"name":"block","external_name":"block","restriction":"(String ->)"},"visibility":"Public","body":""}},{"html_id":"initialize-instance-method","name":"initialize","abstract":false,"location":{"filename":"src/commands.cr","line_number":281,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L281"},"def":{"name":"initialize","visibility":"Public","body":""}},{"html_id":"size-instance-method","name":"size","doc":"Returns the number of elements in the collection.\n\n```\n[1, 2, 3, 4].size # => 4\n```","summary":"

    Returns the number of elements in the collection.

    ","abstract":false,"location":{"filename":"src/commands.cr","line_number":287,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L287"},"def":{"name":"size","visibility":"Public","body":"0"}}]},{"html_id":"redis/Redis/Commands/Hash","path":"Redis/Commands/Hash.html","kind":"module","full_name":"Redis::Commands::Hash","name":"Hash","abstract":false,"locations":[{"filename":"src/commands/hash.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/hash.cr#L1"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"namespace":{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},"instance_methods":[{"html_id":"hdel(key:String,fields:Enumerable(String))-instance-method","name":"hdel","doc":"Delete one or more `fields` from the given `key`, returning the number of\ndeleted fields.\n\n```\nfields = %w[pending nonexistent-field]\nredis.hdel \"my-hash\", fields\n# => 1\n```","summary":"

    Delete one or more fields from the given key, returning the number of deleted fields.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"Enumerable(String)"}],"args_string":"(key : String, fields : Enumerable(String))","args_html":"(key : String, fields : Enumerable(String))","location":{"filename":"src/commands/hash.cr","line_number":23,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/hash.cr#L23"},"def":{"name":"hdel","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + fields.size)\n(command << \"hdel\") << key\nfields.each do |key|\n command << key\nend\nrun(command)\n"}},{"html_id":"hdel(key:String,*fields:String)-instance-method","name":"hdel","doc":"Delete one or more `fields` from the given `key`, returning the number of\ndeleted fields.\n\n```\nredis.hdel \"my-hash\",\n \"pending\",\n \"nonexistent-field\"\n# => 1\n```","summary":"

    Delete one or more fields from the given key, returning the number of deleted fields.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"String"}],"args_string":"(key : String, *fields : String)","args_html":"(key : String, *fields : String)","location":{"filename":"src/commands/hash.cr","line_number":11,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/hash.cr#L11"},"def":{"name":"hdel","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"String"}],"splat_index":1,"visibility":"Public","body":"run({\"hdel\", key} + fields)"}},{"html_id":"hget(key:String,field:String)-instance-method","name":"hget","doc":"Return the value of `field` for `key`, if both exist.\n\n```\nredis.hset \"person:jamie\", email: \"jamie@example.com\"\nredis.hget \"person:jamie\", \"email\" # => \"jamie@example.com\"\nredis.hget \"person:jamie\", \"password\" # => nil\n```","summary":"

    Return the value of field for key, if both exist.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"field","external_name":"field","restriction":"String"}],"args_string":"(key : String, field : String)","args_html":"(key : String, field : String)","location":{"filename":"src/commands/hash.cr","line_number":38,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/hash.cr#L38"},"def":{"name":"hget","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"field","external_name":"field","restriction":"String"}],"visibility":"Public","body":"run({\"hget\", key, field})"}},{"html_id":"hgetall(key:String)-instance-method","name":"hgetall","doc":"Return the entire hash stored at `key` as an `Array`\n\n```\nredis.hset \"person:jamie\", email: \"jamie@example.com\", name: \"Jamie\"\nredis.hgetall \"person:jamie\"\n# => [\"email\", \"jamie@example.com\", \"name\", \"Jamie\"]\n```","summary":"

    Return the entire hash stored at key as an Array

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands/hash.cr","line_number":49,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/hash.cr#L49"},"def":{"name":"hgetall","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"hgetall\", key})"}},{"html_id":"hincrby(key:String,field:String,increment:Int|String)-instance-method","name":"hincrby","doc":"Increment the numeric value for `field` in the hash stored in `key` by\n`increment`, returning the new value.\n\n```\nid = 1234\nredis.hincrby \"posts:#{id}\", \"likes\", 1 # => 1\nredis.hincrby \"posts:#{id}\", \"likes\", 1 # => 2\n```","summary":"

    Increment the numeric value for field in the hash stored in key by increment, returning the new value.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"field","external_name":"field","restriction":"String"},{"name":"increment","external_name":"increment","restriction":"Int | String"}],"args_string":"(key : String, field : String, increment : Int | String)","args_html":"(key : String, field : String, increment : Int | String)","location":{"filename":"src/commands/hash.cr","line_number":169,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/hash.cr#L169"},"def":{"name":"hincrby","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"field","external_name":"field","restriction":"String"},{"name":"increment","external_name":"increment","restriction":"Int | String"}],"visibility":"Public","body":"run({\"hincrby\", key, field, increment.to_s})"}},{"html_id":"hmget(key:String,fields:Enumerable(String))-instance-method","name":"hmget","doc":"Return the values for `fields` in `key` as an `Array`\n\n```\nredis.hset \"person:jamie\", email: \"jamie@example.com\", name: \"Jamie\"\nredis.hmget \"person:jamie\", %w[email name] # => [\"jamie@example.com\", \"Jamie\"]\nredis.hmget \"person:jamie\", %w[nonexistent fake-field] # => [nil, nil]\n```","summary":"

    Return the values for fields in key as an Array

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"Enumerable(String)"}],"args_string":"(key : String, fields : Enumerable(String))","args_html":"(key : String, fields : Enumerable(String))","location":{"filename":"src/commands/hash.cr","line_number":71,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/hash.cr#L71"},"def":{"name":"hmget","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + fields.size)\n(command << \"hmget\") << key\nfields.each do |field|\n command << field\nend\nrun(command)\n"}},{"html_id":"hmget(key:String,*fields:String)-instance-method","name":"hmget","doc":"Return the values for `fields` in `key` as an `Array`\n\n```\nredis.hset \"person:jamie\", email: \"jamie@example.com\", name: \"Jamie\"\nredis.hmget \"person:jamie\", \"email\", \"name\" # => [\"jamie@example.com\", \"Jamie\"]\nredis.hmget \"person:jamie\", \"nonexistent\", \"fake-field\" # => [nil, nil]\n```","summary":"

    Return the values for fields in key as an Array

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"String"}],"args_string":"(key : String, *fields : String)","args_html":"(key : String, *fields : String)","location":{"filename":"src/commands/hash.cr","line_number":60,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/hash.cr#L60"},"def":{"name":"hmget","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"String"}],"splat_index":1,"visibility":"Public","body":"run({\"hmget\", key} + fields)"}},{"html_id":"hmset(key:String,data:::Hash(String,String))-instance-method","name":"hmset","summary":"

    DEPRECATED The Redis HMSET command is deprecated. Use HSET instead. This method will be removed in v1.0.0 of this shard. See https://redis.io/commands/hmset/

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"data","external_name":"data","restriction":"::Hash(String, String)"}],"args_string":"(key : String, data : ::Hash(String, String))","args_html":"(key : String, data : ::Hash(String, String))","location":{"filename":"src/commands/hash.cr","line_number":201,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/hash.cr#L201"},"def":{"name":"hmset","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"data","external_name":"data","restriction":"::Hash(String, String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + data.size)\n(command << \"hmset\") << key\ndata.each do |key, value|\n (command << key) << value\nend\nrun(command)\n"}},{"html_id":"hscan(key:String,cursor:String,*,matchpattern:String|Nil=nil,count:String|Int|Nil=nil)-instance-method","name":"hscan","doc":"Execute the `HSCAN` command to return a subset of keys in the hash stored at\n`key`, allowing you to iterate through the keys in the hash without blocking\nthe Redis server for too long at a time.\n\nNOTE: You probably want to use `Redis::Client#hscan_each` instead of using\nthis method directly.\n\n```\ncursor = \"\"\nuntil cursor == \"0\"\n response = redis.hscan(key, cursor)\n cursor, fields = response.as(Array)\n cursor = cursor.as(String)\n fields.as(Array).each do |field|\n # Do something with that hash field...\n end\nend\n```","summary":"

    Execute the HSCAN command to return a subset of keys in the hash stored at key, allowing you to iterate through the keys in the hash without blocking the Redis server for too long at a time.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"cursor","external_name":"cursor","restriction":"String"},{"name":"","external_name":"","restriction":""},{"name":"pattern","default_value":"nil","external_name":"match","restriction":"String | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"}],"args_string":"(key : String, cursor : String, *, match pattern : String | Nil = nil, count : String | Int | Nil = nil)","args_html":"(key : String, cursor : String, *, match pattern : String | Nil = nil, count : String | Int | Nil = nil)","location":{"filename":"src/commands/hash.cr","line_number":191,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/hash.cr#L191"},"def":{"name":"hscan","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"cursor","external_name":"cursor","restriction":"String"},{"name":"","external_name":"","restriction":""},{"name":"pattern","default_value":"nil","external_name":"match","restriction":"String | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"}],"splat_index":2,"visibility":"Public","body":"command = Array(String).new(initial_capacity: 7)\n((command << \"hscan\") << key) << cursor.to_s\nif pattern\n (command << \"match\") << pattern\nend\nif count\n (command << \"count\") << count.to_s\nend\nrun(command)\n"}},{"html_id":"hset(key:String,fields:Enumerable(String))-instance-method","name":"hset","doc":"Set the values for `fields` in the hash stored in `key`, returning the\nnumber of fields created (not updated)\n\nNOTE: `fields` _MUST_ contain an even number of elements\n\n```\nredis.hset \"person:jamie\", %w[email jamie@example.com name Jamie] # => 2\nredis.hset \"person:jamie\", %w[email jamie@example.dev admin true] # => 1\nredis.hset \"person:jamie\", %w[admin false] # => 0\n```","summary":"

    Set the values for fields in the hash stored in key, returning the number of fields created (not updated)

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"Enumerable(String)"}],"args_string":"(key : String, fields : Enumerable(String))","args_html":"(key : String, fields : Enumerable(String))","location":{"filename":"src/commands/hash.cr","line_number":120,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/hash.cr#L120"},"def":{"name":"hset","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + fields.size)\n(command << \"hset\") << key\nfields.each do |field|\n command << field\nend\nrun(command)\n"}},{"html_id":"hset(key:String,fields:::Hash(String,String))-instance-method","name":"hset","doc":"Set the values for `fields` in the hash stored in `key`, returning the\nnumber of fields created (not updated)\n\n```\nredis.hset \"person:jamie\", {\"email\" => \"jamie@example.com\", \"name\" => \"Jamie\"} # => 2\nredis.hset \"person:jamie\", {\"email\" => \"jamie@example.dev\", \"admin\" => \"true\"} # => 1\nredis.hset \"person:jamie\", {\"admin\" => \"false\"} # => 0\n```","summary":"

    Set the values for fields in the hash stored in key, returning the number of fields created (not updated)

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"::Hash(String, String)"}],"args_string":"(key : String, fields : ::Hash(String, String))","args_html":"(key : String, fields : ::Hash(String, String))","location":{"filename":"src/commands/hash.cr","line_number":137,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/hash.cr#L137"},"def":{"name":"hset","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"::Hash(String, String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + (2 * fields.size))\n(command << \"hset\") << key\nfields.each do |key, value|\n (command << key) << value\nend\nrun(command)\n"}},{"html_id":"hset(key:String,*fields:String)-instance-method","name":"hset","doc":"Set the values for `fields` in the hash stored in `key`, returning the\nnumber of fields created (not updated).\n\nNOTE: You _MUST_ pass an even number of arguments to `fields`\n\n```\nredis.hset \"person:jamie\", \"email\", \"jamie@example.com\", \"name\", \"Jamie\" # => 2\nredis.hset \"person:jamie\", \"email\", \"jamie@example.dev\", \"admin\", \"true\" # => 1\nredis.hset \"person:jamie\", \"admin\", \"false\" # => 0\n```","summary":"

    Set the values for fields in the hash stored in key, returning the number of fields created (not updated).

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"String"}],"args_string":"(key : String, *fields : String)","args_html":"(key : String, *fields : String)","location":{"filename":"src/commands/hash.cr","line_number":106,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/hash.cr#L106"},"def":{"name":"hset","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"fields","external_name":"fields","restriction":"String"}],"splat_index":1,"visibility":"Public","body":"run({\"hset\", key} + fields)"}},{"html_id":"hset(key:String,**fields:String)-instance-method","name":"hset","doc":"Set the values for `fields` in the hash stored in `key`, returning the\nnumber of fields created (not updated)\n\n```\nredis.hset \"person:jamie\", email: \"jamie@example.com\", name: \"Jamie\" # => 2\nredis.hset \"person:jamie\", email: \"jamie@example.dev\", admin: \"true\" # => 1\nredis.hset \"person:jamie\", admin: \"false\" # => 0\n```","summary":"

    Set the values for fields in the hash stored in key, returning the number of fields created (not updated)

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String, **fields : String)","args_html":"(key : String, **fields : String)","location":{"filename":"src/commands/hash.cr","line_number":87,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/hash.cr#L87"},"def":{"name":"hset","args":[{"name":"key","external_name":"key","restriction":"String"}],"double_splat":{"name":"fields","external_name":"fields","restriction":"String"},"visibility":"Public","body":"hash = ::Hash(String, String).new(initial_capacity: fields.size)\nfields.each do |key, value|\n hash[key.to_s] = value\nend\nhset(key, hash)\n"}},{"html_id":"hsetnx(key:String,field:String,value:String)-instance-method","name":"hsetnx","doc":"Set `field` in the hash stored in `key` to `value` if and only if it does not exist. Returns `1` if the field was set, `0` if it was not.\n\n```\nid = 1234\n\nredis.hsetnx \"job:#{id}\", \"locked_at\", Time.utc.to_rfc3339 # => 1\n# Returned 1, lock succeeds\n\nredis.hsetnx \"job:#{id}\", \"locked_at\", Time.utc.to_rfc3339 # => 0\n# Returned 0, lock did not succeed, so the job is already being processed\n```","summary":"

    Set field in the hash stored in key to value if and only if it does not exist.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"field","external_name":"field","restriction":"String"},{"name":"value","external_name":"value","restriction":"String"}],"args_string":"(key : String, field : String, value : String)","args_html":"(key : String, field : String, value : String)","location":{"filename":"src/commands/hash.cr","line_number":157,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/hash.cr#L157"},"def":{"name":"hsetnx","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"field","external_name":"field","restriction":"String"},{"name":"value","external_name":"value","restriction":"String"}],"visibility":"Public","body":"run({\"hsetnx\", key, field, value})"}}]},{"html_id":"redis/Redis/Commands/List","path":"Redis/Commands/List.html","kind":"module","full_name":"Redis::Commands::List","name":"List","abstract":false,"locations":[{"filename":"src/commands/list.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L1"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"namespace":{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},"instance_methods":[{"html_id":"blpop(keys:Enumerable(String),timeout:Time::Span)-instance-method","name":"blpop","doc":"Remove and return an element from the end of the given list. If the list\nis empty or the key does not exist, this method waits the specified amount\nof time for an element to be added to it by another connection. If the\nelement *is* added by another connection within that amount of time, this\nmethod will return it immediately. If it *is not*, then this method returns\n`nil`.\n\n```\nkeys = %w[foo bar]\nredis.rpush \"foo\", \"first\"\nspawn do\n sleep 100.milliseconds\n redis.rpush \"foo\", \"second\"\nend\nredis.blpop keys, 1.second # => \"first\"\nredis.blpop keys, 1.second # => \"second\" (after 100 milliseconds)\nredis.blpop keys, 1.second # => nil (after 1 second)\n```","summary":"

    Remove and return an element from the end of the given list.

    ","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"Enumerable(String)"},{"name":"timeout","external_name":"timeout","restriction":"Time::Span"}],"args_string":"(keys : Enumerable(String), timeout : Time::Span)","args_html":"(keys : Enumerable(String), timeout : Time::Span)","location":{"filename":"src/commands/list.cr","line_number":128,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L128"},"def":{"name":"blpop","args":[{"name":"keys","external_name":"keys","restriction":"Enumerable(String)"},{"name":"timeout","external_name":"timeout","restriction":"Time::Span"}],"visibility":"Public","body":"command = Array(String).new(2 + keys.size)\ncommand << \"blpop\"\ncommand.concat(keys)\ncommand << timeout.total_seconds.to_i.to_s\nrun(command)\n"}},{"html_id":"blpop(*keys:String,timeout:Time::Span)-instance-method","name":"blpop","doc":"Remove and return an element from the end of the given list. If the list\nis empty or the key does not exist, this method waits the specified amount\nof time for an element to be added to it by another connection. If the\nelement *is* added by another connection within that amount of time, this\nmethod will return it immediately. If it *is not*, then this method returns\n`nil`.\n\n```\nredis.rpush \"foo\", \"first\"\nspawn do\n sleep 100.milliseconds\n redis.rpush \"foo\", \"second\"\nend\nredis.blpop \"foo\", 1.second # => \"first\"\nredis.blpop \"foo\", 1.second # => \"second\" (after 100 milliseconds)\nredis.blpop \"foo\", 1.second # => nil (after 1 second)\n```","summary":"

    Remove and return an element from the end of the given list.

    ","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"Time::Span"}],"args_string":"(*keys : String, timeout : Time::Span)","args_html":"(*keys : String, timeout : Time::Span)","location":{"filename":"src/commands/list.cr","line_number":154,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L154"},"def":{"name":"blpop","args":[{"name":"keys","external_name":"keys","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"Time::Span"}],"splat_index":0,"visibility":"Public","body":"blpop(*keys, timeout: timeout.total_seconds.to_i.to_s)"}},{"html_id":"blpop(*keys:String,timeout:Int|Float)-instance-method","name":"blpop","doc":"Remove and return an element from the end of the given list. If the list\nis empty or the key does not exist, this method waits the specified number\nof seconds for an element to be added to it by another connection. If the\nelement *is* added by another connection within that number of seconds,\nthis method will return it immediately. If it *is not*, then this method\nreturns `nil`.\n\n```\nredis.lpush \"foo\", \"first\"\nspawn do\n sleep 100.milliseconds\n redis.lpush \"foo\", \"second\"\nend\nredis.blpop \"foo\", 1 # => \"first\"\nredis.blpop \"foo\", 1 # => \"second\" (after 100 milliseconds)\nredis.blpop \"foo\", 1 # => nil (after 1 second)\n```","summary":"

    Remove and return an element from the end of the given list.

    ","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"Int | Float"}],"args_string":"(*keys : String, timeout : Int | Float)","args_html":"(*keys : String, timeout : Int | Float)","location":{"filename":"src/commands/list.cr","line_number":175,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L175"},"def":{"name":"blpop","args":[{"name":"keys","external_name":"keys","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"Int | Float"}],"splat_index":0,"visibility":"Public","body":"if timeout == timeout.to_i\n timeout = timeout.to_i\nend\nblpop(*keys, timeout: timeout.to_s)\n"}},{"html_id":"blpop(*keys:String,timeout:String)-instance-method","name":"blpop","doc":"Remove and return an element from the end of the given list. If the list\nis empty or the key does not exist, this method waits the specified number\nof seconds for an element to be added to it by another connection. If the\nelement *is* added by another connection within that number of seconds,\nthis method will return it immediately. If it *is not*, then this method\nreturns `nil`.\n\n```\nredis.lpush \"foo\", \"first\"\nspawn do\n sleep 100.milliseconds\n redis.lpush \"foo\", \"second\"\nend\nredis.blpop \"foo\", \"1\" # => \"first\"\nredis.blpop \"foo\", \"1\" # => \"second\" (after 100 milliseconds)\nredis.blpop \"foo\", \"1\" # => nil (after 1 second)\n```","summary":"

    Remove and return an element from the end of the given list.

    ","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"String"}],"args_string":"(*keys : String, timeout : String)","args_html":"(*keys : String, timeout : String)","location":{"filename":"src/commands/list.cr","line_number":197,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L197"},"def":{"name":"blpop","args":[{"name":"keys","external_name":"keys","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"String"}],"splat_index":0,"visibility":"Public","body":"run(({\"blpop\"} + keys) + {timeout})"}},{"html_id":"brpop(keys:Enumerable(String),timeout:Int)-instance-method","name":"brpop","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"Enumerable(String)"},{"name":"timeout","external_name":"timeout","restriction":"Int"}],"args_string":"(keys : Enumerable(String), timeout : Int)","args_html":"(keys : Enumerable(String), timeout : Int)","location":{"filename":"src/commands/list.cr","line_number":316,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L316"},"def":{"name":"brpop","args":[{"name":"keys","external_name":"keys","restriction":"Enumerable(String)"},{"name":"timeout","external_name":"timeout","restriction":"Int"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + keys.size)\ncommand << \"brpop\"\nkeys.each do |key|\n command << key\nend\ncommand << timeout.to_s\nrun(command)\n"}},{"html_id":"brpop(*keys:String,timeout:Time::Span)-instance-method","name":"brpop","doc":"Remove and return an element from the end of the given list. If the list\nis empty or the key does not exist, this method waits the specified amount\nof time for an element to be added to it by another connection. If the\nelement *is* added by another connection within that amount of time, this\nmethod will return it immediately. If it *is not*, then this method returns\n`nil`.\n\n```\nredis.lpush \"foo\", \"first\"\nspawn do\n sleep 100.milliseconds\n redis.lpush \"foo\", \"second\"\nend\nredis.brpop \"foo\", 1.second # => \"first\"\nredis.brpop \"foo\", 1.second # => \"second\" (after 100 milliseconds)\nredis.brpop \"foo\", 1.second # => nil (after 1 second)\n```","summary":"

    Remove and return an element from the end of the given list.

    ","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"Time::Span"}],"args_string":"(*keys : String, timeout : Time::Span)","args_html":"(*keys : String, timeout : Time::Span)","location":{"filename":"src/commands/list.cr","line_number":218,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L218"},"def":{"name":"brpop","args":[{"name":"keys","external_name":"keys","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"Time::Span"}],"splat_index":0,"visibility":"Public","body":"brpop(*keys, timeout: timeout.total_seconds)"}},{"html_id":"brpop(*keys:String,timeout:Number)-instance-method","name":"brpop","doc":"Remove and return an element from the end of the given list. If the list\nis empty or the key does not exist, this method waits the specified number\nof seconds for an element to be added to it by another connection. If the\nelement *is* added by another connection within that number of seconds,\nthis method will return it immediately. If it *is not*, then this method\nreturns `nil`.\n\n```\nredis.lpush \"foo\", \"first\"\nspawn do\n sleep 100.milliseconds\n redis.lpush \"foo\", \"second\"\nend\nredis.brpop \"foo\", 1 # => \"first\"\nredis.brpop \"foo\", 1 # => \"second\" (after 100 milliseconds)\nredis.brpop \"foo\", 1 # => nil (after 1 second)\n```","summary":"

    Remove and return an element from the end of the given list.

    ","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"Number"}],"args_string":"(*keys : String, timeout : Number)","args_html":"(*keys : String, timeout : Number)","location":{"filename":"src/commands/list.cr","line_number":239,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L239"},"def":{"name":"brpop","args":[{"name":"keys","external_name":"keys","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"Number"}],"splat_index":0,"visibility":"Public","body":"if timeout == timeout.to_i\n timeout = timeout.to_i\nend\nbrpop(*keys, timeout: timeout.to_s)\n"}},{"html_id":"brpop(*keys:String,timeout:String)-instance-method","name":"brpop","doc":"Remove and return an element from the end of the given list. If the list\nis empty or the key does not exist, this method waits the specified number\nof seconds for an element to be added to it by another connection. If the\nelement *is* added by another connection within that number of seconds,\nthis method will return it immediately. If it *is not*, then this method\nreturns `nil`.\n\n```\nredis.lpush \"foo\", \"first\"\nspawn do\n sleep 100.milliseconds\n redis.lpush \"foo\", \"second\"\nend\nredis.brpop \"foo\", \"1\" # => \"first\"\nredis.brpop \"foo\", \"1\" # => \"second\" (after 100 milliseconds)\nredis.brpop \"foo\", \"1\" # => nil (after 1 second)\n```","summary":"

    Remove and return an element from the end of the given list.

    ","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"String"}],"args_string":"(*keys : String, timeout : String)","args_html":"(*keys : String, timeout : String)","location":{"filename":"src/commands/list.cr","line_number":261,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L261"},"def":{"name":"brpop","args":[{"name":"keys","external_name":"keys","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"String"}],"splat_index":0,"visibility":"Public","body":"run(({\"brpop\"} + keys) + {timeout})"}},{"html_id":"brpoplpush(source:String,destination:String,timeout:Time::Span)-instance-method","name":"brpoplpush","abstract":false,"args":[{"name":"source","external_name":"source","restriction":"String"},{"name":"destination","external_name":"destination","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"Time::Span"}],"args_string":"(source : String, destination : String, timeout : Time::Span)","args_html":"(source : String, destination : String, timeout : Time::Span)","location":{"filename":"src/commands/list.cr","line_number":328,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L328"},"def":{"name":"brpoplpush","args":[{"name":"source","external_name":"source","restriction":"String"},{"name":"destination","external_name":"destination","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"Time::Span"}],"visibility":"Public","body":"brpoplpush(source, destination, timeout.total_seconds.to_i)"}},{"html_id":"brpoplpush(source:String,destination:String,timeout:Int|String)-instance-method","name":"brpoplpush","abstract":false,"args":[{"name":"source","external_name":"source","restriction":"String"},{"name":"destination","external_name":"destination","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"Int | String"}],"args_string":"(source : String, destination : String, timeout : Int | String)","args_html":"(source : String, destination : String, timeout : Int | String)","location":{"filename":"src/commands/list.cr","line_number":332,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L332"},"def":{"name":"brpoplpush","args":[{"name":"source","external_name":"source","restriction":"String"},{"name":"destination","external_name":"destination","restriction":"String"},{"name":"timeout","external_name":"timeout","restriction":"Int | String"}],"visibility":"Public","body":"run({\"brpoplpush\", source, destination, timeout.to_s})"}},{"html_id":"llen(key:String)-instance-method","name":"llen","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands/list.cr","line_number":265,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L265"},"def":{"name":"llen","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"llen\", key})"}},{"html_id":"lmove(fromsource:String,todestination:String,from_sidesource_side:Side,to_sidedestination_side:Side)-instance-method","name":"lmove","doc":"Atomically remove an item from the end of a list and insert it at the\nbeginning of another. Returns that list item. If the first list is empty,\nnothing happens and this method returns `nil`.\n\n```\nredis.del \"foo\"\nredis.lpush \"foo\", \"hello\", \"world\"\nredis.lmove \"foo\", \"bar\" # => \"hello\"\nredis.lmove \"foo\", \"bar\" # => \"world\"\nredis.lmove \"foo\", \"bar\" # => nil\n```","summary":"

    Atomically remove an item from the end of a list and insert it at the beginning of another.

    ","abstract":false,"args":[{"name":"source","external_name":"from","restriction":"String"},{"name":"destination","external_name":"to","restriction":"String"},{"name":"source_side","external_name":"from_side","restriction":"Side"},{"name":"destination_side","external_name":"to_side","restriction":"Side"}],"args_string":"(from source : String, to destination : String, from_side source_side : Side, to_side destination_side : Side)","args_html":"(from source : String, to destination : String, from_side source_side : Side, to_side destination_side : Side)","location":{"filename":"src/commands/list.cr","line_number":53,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L53"},"def":{"name":"lmove","args":[{"name":"source","external_name":"from","restriction":"String"},{"name":"destination","external_name":"to","restriction":"String"},{"name":"source_side","external_name":"from_side","restriction":"Side"},{"name":"destination_side","external_name":"to_side","restriction":"Side"}],"visibility":"Public","body":"run({\"lmove\", source, destination, source_side.to_s, destination_side.to_s})"}},{"html_id":"lpop(key:String,count:String|Nil=nil)-instance-method","name":"lpop","doc":"Remove an item from the beginning of a list, returning the item or `nil`\nif the list was empty.\n\n```\nredis.del \"my-list\" # Delete so we know it's empty\nredis.lpush \"my-list\", \"foo\"\nredis.lpop \"my-list\" # => \"foo\"\nredis.lpop \"my-list\" # => nil\n```","summary":"

    Remove an item from the beginning of a list, returning the item or nil if the list was empty.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | ::Nil"}],"args_string":"(key : String, count : String | Nil = nil)","args_html":"(key : String, count : String | Nil = nil)","location":{"filename":"src/commands/list.cr","line_number":31,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L31"},"def":{"name":"lpop","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | ::Nil"}],"visibility":"Public","body":"command = {\"lpop\", key}\nif count\n command = command + {count}\nend\nrun(command)\n"}},{"html_id":"lpush(key:String,values:Enumerable(String))-instance-method","name":"lpush","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"Enumerable(String)"}],"args_string":"(key : String, values : Enumerable(String))","args_html":"(key : String, values : Enumerable(String))","location":{"filename":"src/commands/list.cr","line_number":14,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L14"},"def":{"name":"lpush","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + values.size)\n(command << \"lpush\") << key\nvalues.each do |value|\n command << value\nend\nrun(command)\n"}},{"html_id":"lpush(key,*values:String)-instance-method","name":"lpush","doc":"Insert an item at the beginning of a list, returning the number of items\nin the list after the insert.\n\n```\nredis.del \"my-list\" # Delete so we know it's empty\nredis.lpush \"my-list\", \"foo\", \"bar\" # => 2\nredis.lpush \"my-list\", \"foo\", \"bar\" # => 4\n```","summary":"

    Insert an item at the beginning of a list, returning the number of items in the list after the insert.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":""},{"name":"values","external_name":"values","restriction":"String"}],"args_string":"(key, *values : String)","args_html":"(key, *values : String)","location":{"filename":"src/commands/list.cr","line_number":10,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L10"},"def":{"name":"lpush","args":[{"name":"key","external_name":"key","restriction":""},{"name":"values","external_name":"values","restriction":"String"}],"splat_index":1,"visibility":"Public","body":"run({\"lpush\", key} + values)"}},{"html_id":"lrange(key:String,start:String|Int,finish:String|Int)-instance-method","name":"lrange","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"start","external_name":"start","restriction":"String | Int"},{"name":"finish","external_name":"finish","restriction":"String | Int"}],"args_string":"(key : String, start : String | Int, finish : String | Int)","args_html":"(key : String, start : String | Int, finish : String | Int)","location":{"filename":"src/commands/list.cr","line_number":38,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L38"},"def":{"name":"lrange","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"start","external_name":"start","restriction":"String | Int"},{"name":"finish","external_name":"finish","restriction":"String | Int"}],"visibility":"Public","body":"run({\"lrange\", key, start.to_s, finish.to_s})"}},{"html_id":"lrem(key:String,count:Int,value:String)-instance-method","name":"lrem","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"count","external_name":"count","restriction":"Int"},{"name":"value","external_name":"value","restriction":"String"}],"args_string":"(key : String, count : Int, value : String)","args_html":"(key : String, count : Int, value : String)","location":{"filename":"src/commands/list.cr","line_number":269,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L269"},"def":{"name":"lrem","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"count","external_name":"count","restriction":"Int"},{"name":"value","external_name":"value","restriction":"String"}],"visibility":"Public","body":"run({\"lrem\", key, count.to_s, value})"}},{"html_id":"ltrim(key:String,start:String|Int,stop:String|Int)-instance-method","name":"ltrim","doc":"Trim the list contained in `key` so that it contains only the values at the\nindices in the given range.\n\n```\nredis.rpush \"ids\", %w[0 1 2 3 4 5 6 7 8 9]\nredis.ltrim \"ids\", 1, 2\n```","summary":"

    Trim the list contained in key so that it contains only the values at the indices in the given range.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"start","external_name":"start","restriction":"String | Int"},{"name":"stop","external_name":"stop","restriction":"String | Int"}],"args_string":"(key : String, start : String | Int, stop : String | Int)","args_html":"(key : String, start : String | Int, stop : String | Int)","location":{"filename":"src/commands/list.cr","line_number":312,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L312"},"def":{"name":"ltrim","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"start","external_name":"start","restriction":"String | Int"},{"name":"stop","external_name":"stop","restriction":"String | Int"}],"visibility":"Public","body":"run({\"ltrim\", key, start.to_s, stop.to_s})"}},{"html_id":"ltrim(key:String,range:Range(String,String))-instance-method","name":"ltrim","doc":"Trim the list contained in `key` so that it contains only the values at the\nindices in the given range.\n\n```\nredis.rpush \"ids\", %w[0 1 2 3 4 5 6 7 8 9]\nstart, stop = \"1,2\".split(',')\nredis.ltrim \"ids\", start..stop\n```","summary":"

    Trim the list contained in key so that it contains only the values at the indices in the given range.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"range","external_name":"range","restriction":"Range(String, String)"}],"args_string":"(key : String, range : Range(String, String))","args_html":"(key : String, range : Range(String, String))","location":{"filename":"src/commands/list.cr","line_number":281,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L281"},"def":{"name":"ltrim","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"range","external_name":"range","restriction":"Range(String, String)"}],"visibility":"Public","body":"if range.excludes_end?\n ltrim(key, range.begin.to_i, range.end.to_i)\nelse\n ltrim(key, range.begin, range.end)\nend"}},{"html_id":"ltrim(key:String,range:Range(Int32,Int32))-instance-method","name":"ltrim","doc":"Trim the list contained in `key` so that it contains only the values at the\nindices in the given range.\n\n```\nredis.rpush \"ids\", %w[0 1 2 3 4 5 6 7 8 9]\nredis.ltrim \"ids\", 1..2\n```","summary":"

    Trim the list contained in key so that it contains only the values at the indices in the given range.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"range","external_name":"range","restriction":"Range(Int32, Int32)"}],"args_string":"(key : String, range : Range(Int32, Int32))","args_html":"(key : String, range : Range(Int32, Int32))","location":{"filename":"src/commands/list.cr","line_number":296,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L296"},"def":{"name":"ltrim","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"range","external_name":"range","restriction":"Range(Int32, Int32)"}],"visibility":"Public","body":"range_end = range.end\nif range.excludes_end?\n range_end = range_end - 1\nend\nltrim(key, range.begin, range_end)\n"}},{"html_id":"rpop(key:String)-instance-method","name":"rpop","doc":"Remove and return an element from the end of the given list. If the list\nis empty or the key does not exist, this method returns `nil`\n\n```\nredis.lpush \"foo\", \"hello\"\nredis.rpop \"foo\" # => \"hello\"\nredis.rpop \"foo\" # => nil\n```","summary":"

    Remove and return an element from the end of the given list.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands/list.cr","line_number":86,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L86"},"def":{"name":"rpop","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"rpop\", key})"}},{"html_id":"rpoplpush(source:String,destination:String)-instance-method","name":"rpoplpush","doc":"Atomically remove an item from the end of a list and insert it at the\nbeginning of another. Returns that list item. If the first list is empty,\nnothing happens and this method returns `nil`.\n\n```\nredis.del \"foo\"\nredis.lpush \"foo\", \"hello\", \"world\"\nredis.rpoplpush \"foo\", \"bar\" # => \"hello\"\nredis.rpoplpush \"foo\", \"bar\" # => \"world\"\nredis.rpoplpush \"foo\", \"bar\" # => nil\n```","summary":"

    Atomically remove an item from the end of a list and insert it at the beginning of another.

    \n

    DEPRECATED Use the #lmove method instead. See the Redis docs for more inforamtion.

    ","abstract":false,"args":[{"name":"source","external_name":"source","restriction":"String"},{"name":"destination","external_name":"destination","restriction":"String"}],"args_string":"(source : String, destination : String)","args_html":"(source : String, destination : String)","location":{"filename":"src/commands/list.cr","line_number":74,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L74"},"def":{"name":"rpoplpush","args":[{"name":"source","external_name":"source","restriction":"String"},{"name":"destination","external_name":"destination","restriction":"String"}],"visibility":"Public","body":"run({\"rpoplpush\", source, destination})"}},{"html_id":"rpush(key:String,values:Enumerable(String))-instance-method","name":"rpush","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"Enumerable(String)"}],"args_string":"(key : String, values : Enumerable(String))","args_html":"(key : String, values : Enumerable(String))","location":{"filename":"src/commands/list.cr","line_number":102,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L102"},"def":{"name":"rpush","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + values.size)\n(command << \"rpush\") << key\nvalues.each do |value|\n command << value\nend\nrun(command)\n"}},{"html_id":"rpush(key,*values:String)-instance-method","name":"rpush","doc":"Insert an item at the end of a list, returning the number of items\nin the list after the insert.\n\n```\nredis.del \"my-list\" # Delete so we know it's empty\nredis.rpush \"my-list\", \"foo\", \"bar\" # => 2\nredis.rpush \"my-list\", \"foo\", \"bar\" # => 4\n```","summary":"

    Insert an item at the end of a list, returning the number of items in the list after the insert.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":""},{"name":"values","external_name":"values","restriction":"String"}],"args_string":"(key, *values : String)","args_html":"(key, *values : String)","location":{"filename":"src/commands/list.cr","line_number":98,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L98"},"def":{"name":"rpush","args":[{"name":"key","external_name":"key","restriction":""},{"name":"values","external_name":"values","restriction":"String"}],"splat_index":1,"visibility":"Public","body":"run({\"rpush\", key} + values)"}}],"types":[{"html_id":"redis/Redis/Commands/List/Side","path":"Redis/Commands/List/Side.html","kind":"enum","full_name":"Redis::Commands::List::Side","name":"Side","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/commands/list.cr","line_number":57,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L57"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"LEFT","name":"LEFT","value":"0"},{"id":"RIGHT","name":"RIGHT","value":"1"}],"namespace":{"html_id":"redis/Redis/Commands/List","kind":"module","full_name":"Redis::Commands::List","name":"List"},"instance_methods":[{"html_id":"left?-instance-method","name":"left?","abstract":false,"location":{"filename":"src/commands/list.cr","line_number":58,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L58"},"def":{"name":"left?","visibility":"Public","body":"self == LEFT"}},{"html_id":"right?-instance-method","name":"right?","abstract":false,"location":{"filename":"src/commands/list.cr","line_number":59,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/list.cr#L59"},"def":{"name":"right?","visibility":"Public","body":"self == RIGHT"}}]}]},{"html_id":"redis/Redis/Commands/ScriptFlushMode","path":"Redis/Commands/ScriptFlushMode.html","kind":"enum","full_name":"Redis::Commands::ScriptFlushMode","name":"ScriptFlushMode","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/commands.cr","line_number":217,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L217"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"ASYNC","name":"ASYNC","value":"0"},{"id":"SYNC","name":"SYNC","value":"1"}],"namespace":{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},"instance_methods":[{"html_id":"async?-instance-method","name":"async?","abstract":false,"location":{"filename":"src/commands.cr","line_number":218,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L218"},"def":{"name":"async?","visibility":"Public","body":"self == ASYNC"}},{"html_id":"sync?-instance-method","name":"sync?","abstract":false,"location":{"filename":"src/commands.cr","line_number":219,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands.cr#L219"},"def":{"name":"sync?","visibility":"Public","body":"self == SYNC"}}]},{"html_id":"redis/Redis/Commands/Set","path":"Redis/Commands/Set.html","kind":"module","full_name":"Redis::Commands::Set","name":"Set","abstract":false,"locations":[{"filename":"src/commands/set.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/set.cr#L1"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"namespace":{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},"instance_methods":[{"html_id":"sadd(key:String,*values:String)-instance-method","name":"sadd","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"String"}],"args_string":"(key : String, *values : String)","args_html":"(key : String, *values : String)","location":{"filename":"src/commands/set.cr","line_number":2,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/set.cr#L2"},"def":{"name":"sadd","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"String"}],"splat_index":1,"visibility":"Public","body":"run({\"sadd\", key} + values)"}},{"html_id":"scard(key:String)-instance-method","name":"scard","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands/set.cr","line_number":36,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/set.cr#L36"},"def":{"name":"scard","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"scard\", key})"}},{"html_id":"sdiff(first:String,second:String)-instance-method","name":"sdiff","abstract":false,"args":[{"name":"first","external_name":"first","restriction":"String"},{"name":"second","external_name":"second","restriction":"String"}],"args_string":"(first : String, second : String)","args_html":"(first : String, second : String)","location":{"filename":"src/commands/set.cr","line_number":28,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/set.cr#L28"},"def":{"name":"sdiff","args":[{"name":"first","external_name":"first","restriction":"String"},{"name":"second","external_name":"second","restriction":"String"}],"visibility":"Public","body":"run({\"sdiff\", first, second})"}},{"html_id":"sinter(first:String,*others:String)-instance-method","name":"sinter","abstract":false,"args":[{"name":"first","external_name":"first","restriction":"String"},{"name":"others","external_name":"others","restriction":"String"}],"args_string":"(first : String, *others : String)","args_html":"(first : String, *others : String)","location":{"filename":"src/commands/set.cr","line_number":32,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/set.cr#L32"},"def":{"name":"sinter","args":[{"name":"first","external_name":"first","restriction":"String"},{"name":"others","external_name":"others","restriction":"String"}],"splat_index":1,"visibility":"Public","body":"run({\"sinter\", first} + others)"}},{"html_id":"sismember(key:String,value:String)-instance-method","name":"sismember","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"value","external_name":"value","restriction":"String"}],"args_string":"(key : String, value : String)","args_html":"(key : String, value : String)","location":{"filename":"src/commands/set.cr","line_number":6,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/set.cr#L6"},"def":{"name":"sismember","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"value","external_name":"value","restriction":"String"}],"visibility":"Public","body":"run({\"sismember\", key, value})"}},{"html_id":"smembers(key:String)-instance-method","name":"smembers","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands/set.cr","line_number":10,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/set.cr#L10"},"def":{"name":"smembers","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"smembers\", key})"}},{"html_id":"srem(key:String,members:Enumerable(String))-instance-method","name":"srem","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"members","external_name":"members","restriction":"Enumerable(String)"}],"args_string":"(key : String, members : Enumerable(String))","args_html":"(key : String, members : Enumerable(String))","location":{"filename":"src/commands/set.cr","line_number":18,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/set.cr#L18"},"def":{"name":"srem","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"members","external_name":"members","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + members.size)\n(command << \"srem\") << key\nmembers.each do |member|\n command << member\nend\nrun(command)\n"}},{"html_id":"srem(key:String,*values:String)-instance-method","name":"srem","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"String"}],"args_string":"(key : String, *values : String)","args_html":"(key : String, *values : String)","location":{"filename":"src/commands/set.cr","line_number":14,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/set.cr#L14"},"def":{"name":"srem","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"String"}],"splat_index":1,"visibility":"Public","body":"run({\"srem\", key} + values)"}}]},{"html_id":"redis/Redis/Commands/SortedSet","path":"Redis/Commands/SortedSet.html","kind":"module","full_name":"Redis::Commands::SortedSet","name":"SortedSet","abstract":false,"locations":[{"filename":"src/commands/sorted_set.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/sorted_set.cr#L1"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"namespace":{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},"instance_methods":[{"html_id":"zadd(key:String,score:String|Int64,value:String)-instance-method","name":"zadd","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"score","external_name":"score","restriction":"String | Int64"},{"name":"value","external_name":"value","restriction":"String"}],"args_string":"(key : String, score : String | Int64, value : String)","args_html":"(key : String, score : String | Int64, value : String)","location":{"filename":"src/commands/sorted_set.cr","line_number":42,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/sorted_set.cr#L42"},"def":{"name":"zadd","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"score","external_name":"score","restriction":"String | Int64"},{"name":"value","external_name":"value","restriction":"String"}],"visibility":"Public","body":"run({\"zadd\", key, score.to_s, value})"}},{"html_id":"zadd(key:String,values:Enumerable(String))-instance-method","name":"zadd","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"Enumerable(String)"}],"args_string":"(key : String, values : Enumerable(String))","args_html":"(key : String, values : Enumerable(String))","location":{"filename":"src/commands/sorted_set.cr","line_number":46,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/sorted_set.cr#L46"},"def":{"name":"zadd","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + values.size)\n(command << \"zadd\") << key\nvalues.each do |value|\n command << value\nend\nrun(command)\n"}},{"html_id":"zcard(key:String)-instance-method","name":"zcard","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands/sorted_set.cr","line_number":2,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/sorted_set.cr#L2"},"def":{"name":"zcard","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"zcard\", key})"}},{"html_id":"zcount(key:String,min:String,max:String)-instance-method","name":"zcount","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"min","external_name":"min","restriction":"String"},{"name":"max","external_name":"max","restriction":"String"}],"args_string":"(key : String, min : String, max : String)","args_html":"(key : String, min : String, max : String)","location":{"filename":"src/commands/sorted_set.cr","line_number":70,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/sorted_set.cr#L70"},"def":{"name":"zcount","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"min","external_name":"min","restriction":"String"},{"name":"max","external_name":"max","restriction":"String"}],"visibility":"Public","body":"run({\"zcount\", key, min, max})"}},{"html_id":"zrange(key:String,starting:String|Int64,ending:String|Int64,with_scores:Bool=false)-instance-method","name":"zrange","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"starting","external_name":"starting","restriction":"String | Int64"},{"name":"ending","external_name":"ending","restriction":"String | Int64"},{"name":"with_scores","default_value":"false","external_name":"with_scores","restriction":"Bool"}],"args_string":"(key : String, starting : String | Int64, ending : String | Int64, with_scores : Bool = false)","args_html":"(key : String, starting : String | Int64, ending : String | Int64, with_scores : Bool = false)","location":{"filename":"src/commands/sorted_set.cr","line_number":15,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/sorted_set.cr#L15"},"def":{"name":"zrange","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"starting","external_name":"starting","restriction":"String | Int64"},{"name":"ending","external_name":"ending","restriction":"String | Int64"},{"name":"with_scores","default_value":"false","external_name":"with_scores","restriction":"Bool"}],"visibility":"Public","body":"command = {\"zrange\", key, starting.to_s, ending.to_s}\nif with_scores\n command = command + {\"withscores\"}\nend\nrun(command)\n"}},{"html_id":"zrangebyscore(key:String,low:String|Int64,high:String|Int64,limit:Enumerable(String)|Nil=nil)-instance-method","name":"zrangebyscore","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"low","external_name":"low","restriction":"String | Int64"},{"name":"high","external_name":"high","restriction":"String | Int64"},{"name":"limit","default_value":"nil","external_name":"limit","restriction":"Enumerable(String) | ::Nil"}],"args_string":"(key : String, low : String | Int64, high : String | Int64, limit : Enumerable(String) | Nil = nil)","args_html":"(key : String, low : String | Int64, high : String | Int64, limit : Enumerable(String) | Nil = nil)","location":{"filename":"src/commands/sorted_set.cr","line_number":24,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/sorted_set.cr#L24"},"def":{"name":"zrangebyscore","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"low","external_name":"low","restriction":"String | Int64"},{"name":"high","external_name":"high","restriction":"String | Int64"},{"name":"limit","default_value":"nil","external_name":"limit","restriction":"Enumerable(String) | ::Nil"}],"visibility":"Public","body":"command = {\"zrangebyscore\", key, low.to_s, high.to_s}\nif limit\n command = command + {\"limit\", limit[0], limit[1]}\nend\nrun(command)\n"}},{"html_id":"zrem(key:String,value:String)-instance-method","name":"zrem","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"value","external_name":"value","restriction":"String"}],"args_string":"(key : String, value : String)","args_html":"(key : String, value : String)","location":{"filename":"src/commands/sorted_set.cr","line_number":54,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/sorted_set.cr#L54"},"def":{"name":"zrem","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"value","external_name":"value","restriction":"String"}],"visibility":"Public","body":"run({\"zrem\", key, value})"}},{"html_id":"zrem(key:String,values:Enumerable(String))-instance-method","name":"zrem","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"Enumerable(String)"}],"args_string":"(key : String, values : Enumerable(String))","args_html":"(key : String, values : Enumerable(String))","location":{"filename":"src/commands/sorted_set.cr","line_number":62,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/sorted_set.cr#L62"},"def":{"name":"zrem","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + values.size)\n(command << \"zrem\") << key\nvalues.each do |value|\n command << (value.as(String))\nend\nrun(command)\n"}},{"html_id":"zrem(key:String,*values:String)-instance-method","name":"zrem","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"String"}],"args_string":"(key : String, *values : String)","args_html":"(key : String, *values : String)","location":{"filename":"src/commands/sorted_set.cr","line_number":58,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/sorted_set.cr#L58"},"def":{"name":"zrem","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"values","external_name":"values","restriction":"String"}],"splat_index":1,"visibility":"Public","body":"run({\"zrem\", key} + values)"}},{"html_id":"zremrangebyrank(key:String,low:Int64,high:Int64)-instance-method","name":"zremrangebyrank","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"low","external_name":"low","restriction":"Int64"},{"name":"high","external_name":"high","restriction":"Int64"}],"args_string":"(key : String, low : Int64, high : Int64)","args_html":"(key : String, low : Int64, high : Int64)","location":{"filename":"src/commands/sorted_set.cr","line_number":38,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/sorted_set.cr#L38"},"def":{"name":"zremrangebyrank","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"low","external_name":"low","restriction":"Int64"},{"name":"high","external_name":"high","restriction":"Int64"}],"visibility":"Public","body":"run({\"zremrangebyrank\", key, low.to_s, high.to_s})"}},{"html_id":"zremrangebyscore(key:String,low:String|Int64,high:String|Int64)-instance-method","name":"zremrangebyscore","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"low","external_name":"low","restriction":"String | Int64"},{"name":"high","external_name":"high","restriction":"String | Int64"}],"args_string":"(key : String, low : String | Int64, high : String | Int64)","args_html":"(key : String, low : String | Int64, high : String | Int64)","location":{"filename":"src/commands/sorted_set.cr","line_number":34,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/sorted_set.cr#L34"},"def":{"name":"zremrangebyscore","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"low","external_name":"low","restriction":"String | Int64"},{"name":"high","external_name":"high","restriction":"String | Int64"}],"visibility":"Public","body":"run({\"zremrangebyscore\", key, low.to_s, high.to_s})"}},{"html_id":"zrevrange(key:String,starting:String|Int64,ending:String|Int64,with_scores:Bool=false)-instance-method","name":"zrevrange","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"starting","external_name":"starting","restriction":"String | Int64"},{"name":"ending","external_name":"ending","restriction":"String | Int64"},{"name":"with_scores","default_value":"false","external_name":"with_scores","restriction":"Bool"}],"args_string":"(key : String, starting : String | Int64, ending : String | Int64, with_scores : Bool = false)","args_html":"(key : String, starting : String | Int64, ending : String | Int64, with_scores : Bool = false)","location":{"filename":"src/commands/sorted_set.cr","line_number":6,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/sorted_set.cr#L6"},"def":{"name":"zrevrange","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"starting","external_name":"starting","restriction":"String | Int64"},{"name":"ending","external_name":"ending","restriction":"String | Int64"},{"name":"with_scores","default_value":"false","external_name":"with_scores","restriction":"Bool"}],"visibility":"Public","body":"command = {\"zrevrange\", key, starting.to_s, ending.to_s}\nif with_scores\n command = command + {\"withscores\"}\nend\nrun(command)\n"}},{"html_id":"zscore(key:String,value:String)-instance-method","name":"zscore","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"value","external_name":"value","restriction":"String"}],"args_string":"(key : String, value : String)","args_html":"(key : String, value : String)","location":{"filename":"src/commands/sorted_set.cr","line_number":74,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/sorted_set.cr#L74"},"def":{"name":"zscore","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"value","external_name":"value","restriction":"String"}],"visibility":"Public","body":"run({\"zscore\", key, value})"}}]},{"html_id":"redis/Redis/Commands/Stream","path":"Redis/Commands/Stream.html","kind":"module","full_name":"Redis::Commands::Stream","name":"Stream","abstract":false,"locations":[{"filename":"src/commands/stream.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L1"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"namespace":{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},"instance_methods":[{"html_id":"xack(key:String,group:String,id:String)-instance-method","name":"xack","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"group","external_name":"group","restriction":"String"},{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(key : String, group : String, id : String)","args_html":"(key : String, group : String, id : String)","location":{"filename":"src/commands/stream.cr","line_number":249,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L249"},"def":{"name":"xack","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"group","external_name":"group","restriction":"String"},{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"run({\"xack\", key, group, id})"}},{"html_id":"xack(key:String,group:String,ids:Enumerable(String))-instance-method","name":"xack","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"group","external_name":"group","restriction":"String"},{"name":"ids","external_name":"ids","restriction":"Enumerable(String)"}],"args_string":"(key : String, group : String, ids : Enumerable(String))","args_html":"(key : String, group : String, ids : Enumerable(String))","location":{"filename":"src/commands/stream.cr","line_number":253,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L253"},"def":{"name":"xack","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"group","external_name":"group","restriction":"String"},{"name":"ids","external_name":"ids","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: ids.size + 3)\n((command << \"xack\") << key) << group\nids.each do |id|\n command << id\nend\nrun(command)\n"}},{"html_id":"xadd(key:String,id:String,maxlen,data:::Hash(String,String))-instance-method","name":"xadd","doc":"Append an entry with the specified data to the stream with the given `key`\nand gives it the specified `id`. If the id is `\"*\"`, Redis will assign it\nan id of the form `\"#{Time.utc.to_unix_ms}-#{autoincrementing_index}\"`.\nIf `maxlen` is provided, Redis will trim the stream to the specified\nlength. If `maxlen` is of the form `~ 1000`, Redis will trim it to\n*approximately* that length, removing entries when it can do so\nefficiently. This method returns the `id` that Redis stores.\n\n```\nredis.xadd \"my-stream\", \"*\", {\"name\" => \"foo\", \"id\" => UUID.random.to_s}\n```","summary":"

    Append an entry with the specified data to the stream with the given key and gives it the specified id.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"id","external_name":"id","restriction":"String"},{"name":"maxlen","external_name":"maxlen","restriction":""},{"name":"data","external_name":"data","restriction":"::Hash(String, String)"}],"args_string":"(key : String, id : String, maxlen, data : ::Hash(String, String))","args_html":"(key : String, id : String, maxlen, data : ::Hash(String, String))","location":{"filename":"src/commands/stream.cr","line_number":59,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L59"},"def":{"name":"xadd","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"id","external_name":"id","restriction":"String"},{"name":"maxlen","external_name":"maxlen","restriction":""},{"name":"data","external_name":"data","restriction":"::Hash(String, String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: (data.size * 2) + 3)\n(command << \"xadd\") << key\nif maxlen\n (command << \"maxlen\") << maxlen\nend\ncommand << id\ndata.each do |key, value|\n (command << key) << value\nend\nrun(command)\n"}},{"html_id":"xadd(key:String,id:String,data:::Hash(String,String))-instance-method","name":"xadd","doc":"Append an entry with the specified data to the stream with the given `key`\nand gives it the specified `id`. If the id is `\"*\"`, Redis will assign it\nan id of the form `\"#{Time.utc.to_unix_ms}-#{autoincrementing_index}\"`.\nIf `maxlen` is provided, Redis will trim the stream to the specified\nlength. If `maxlen` is of the form `~ 1000`, Redis will trim it to\n*approximately* that length, removing entries when it can do so\nefficiently. This method returns the `id` that Redis stores.\n\n```\nredis.xadd \"my-stream\", \"*\", {\"name\" => \"foo\", \"id\" => UUID.random.to_s}\n```","summary":"

    Append an entry with the specified data to the stream with the given key and gives it the specified id.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"id","external_name":"id","restriction":"String"},{"name":"data","external_name":"data","restriction":"::Hash(String, String)"}],"args_string":"(key : String, id : String, data : ::Hash(String, String))","args_html":"(key : String, id : String, data : ::Hash(String, String))","location":{"filename":"src/commands/stream.cr","line_number":44,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L44"},"def":{"name":"xadd","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"id","external_name":"id","restriction":"String"},{"name":"data","external_name":"data","restriction":"::Hash(String, String)"}],"visibility":"Public","body":"xadd(key, id, maxlen: nil, data: data)"}},{"html_id":"xadd(key:String,id:String,maxlen=nil,**data)-instance-method","name":"xadd","doc":"Append an entry with the specified data to the stream with the given `key`\nand gives it the specified `id`. If the id is `\"*\"`, Redis will assign it\nan id of the form `\"#{Time.utc.to_unix_ms}-#{autoincrementing_index}\"`.\nIf `maxlen` is provided, Redis will trim the stream to the specified\nlength. If `maxlen` is of the form `~ 1000`, Redis will trim it to\n*approximately* that length, removing entries when it can do so\nefficiently. This method returns the `id` that Redis stores.\n\n```\nredis.xadd \"my-stream\", \"*\", name: \"foo\", id: UUID.random.to_s\n```","summary":"

    Append an entry with the specified data to the stream with the given key and gives it the specified id.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"id","external_name":"id","restriction":"String"},{"name":"maxlen","default_value":"nil","external_name":"maxlen","restriction":""}],"args_string":"(key : String, id : String, maxlen = nil, **data)","args_html":"(key : String, id : String, maxlen = nil, **data)","location":{"filename":"src/commands/stream.cr","line_number":13,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L13"},"def":{"name":"xadd","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"id","external_name":"id","restriction":"String"},{"name":"maxlen","default_value":"nil","external_name":"maxlen","restriction":""}],"double_splat":{"name":"data","external_name":"data","restriction":""},"visibility":"Public","body":"command = Array(String).new(initial_capacity: (data.size * 2) + 6)\n(command << \"xadd\") << key\nif maxlen\n command << \"maxlen\"\n case maxlen\n when Tuple\n maxlen.each do |entry|\n command << entry\n end\n when String\n command << maxlen\n end\nend\ncommand << id\ndata.each do |key, value|\n (command << key.to_s) << value\nend\nrun(command)\n"}},{"html_id":"xautoclaim(key:String,group:String,consumer:String,min_idle_time:Time::Span,start:String,count:Int|String|Nil=nil)-instance-method","name":"xautoclaim","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"group","external_name":"group","restriction":"String"},{"name":"consumer","external_name":"consumer","restriction":"String"},{"name":"min_idle_time","external_name":"min_idle_time","restriction":"Time::Span"},{"name":"start","external_name":"start","restriction":"String"},{"name":"count","default_value":"nil","external_name":"count","restriction":"Int | String | Nil"}],"args_string":"(key : String, group : String, consumer : String, min_idle_time : Time::Span, start : String, count : Int | String | Nil = nil)","args_html":"(key : String, group : String, consumer : String, min_idle_time : Time::Span, start : String, count : Int | String | Nil = nil)","location":{"filename":"src/commands/stream.cr","line_number":261,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L261"},"def":{"name":"xautoclaim","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"group","external_name":"group","restriction":"String"},{"name":"consumer","external_name":"consumer","restriction":"String"},{"name":"min_idle_time","external_name":"min_idle_time","restriction":"Time::Span"},{"name":"start","external_name":"start","restriction":"String"},{"name":"count","default_value":"nil","external_name":"count","restriction":"Int | String | Nil"}],"visibility":"Public","body":"min_idle_time = min_idle_time.total_milliseconds.to_i.to_s\ncommand = {\"xautoclaim\", key, group, consumer, min_idle_time, start}\nif count\n command = command + {\"count\", count.to_s}\nend\nrun(command)\n"}},{"html_id":"xdel(key:String,ids:Enumerable(String))-instance-method","name":"xdel","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"ids","external_name":"ids","restriction":"Enumerable(String)"}],"args_string":"(key : String, ids : Enumerable(String))","args_html":"(key : String, ids : Enumerable(String))","location":{"filename":"src/commands/stream.cr","line_number":75,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L75"},"def":{"name":"xdel","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"ids","external_name":"ids","restriction":"Enumerable(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 2 + ids.size)\n(command << \"xdel\") << key\nids.each do |id|\n command << id\nend\nrun(command)\n"}},{"html_id":"xdel(key:String,*ids:String)-instance-method","name":"xdel","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"ids","external_name":"ids","restriction":"String"}],"args_string":"(key : String, *ids : String)","args_html":"(key : String, *ids : String)","location":{"filename":"src/commands/stream.cr","line_number":71,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L71"},"def":{"name":"xdel","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"ids","external_name":"ids","restriction":"String"}],"splat_index":1,"visibility":"Public","body":"xdel(key, ids)"}},{"html_id":"xgroup(command:String,key:String,groupname:String)-instance-method","name":"xgroup","doc":"Run a Redis XGROUP subcommand for a given stream. See the [XGROUP command in the Redis documentation](https://redis.io/commands/xgroup) for more information.\n\n```\nredis.xgroup \"DESTROY\", \"my-stream\", \"my-group\"\n```","summary":"

    Run a Redis XGROUP subcommand for a given stream.

    ","abstract":false,"args":[{"name":"command","external_name":"command","restriction":"String"},{"name":"key","external_name":"key","restriction":"String"},{"name":"groupname","external_name":"groupname","restriction":"String"}],"args_string":"(command : String, key : String, groupname : String)","args_html":"(command : String, key : String, groupname : String)","location":{"filename":"src/commands/stream.cr","line_number":135,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L135"},"def":{"name":"xgroup","args":[{"name":"command","external_name":"command","restriction":"String"},{"name":"key","external_name":"key","restriction":"String"},{"name":"groupname","external_name":"groupname","restriction":"String"}],"visibility":"Public","body":"run({\"xgroup\", command, key, groupname})"}},{"html_id":"xgroup(command:XGroup,key:String,groupname:String,*,id:String|Nil=nil,mkstream=false,consumer_name:String|Nil=nil)-instance-method","name":"xgroup","doc":"Run a Redis XGROUP subcommand for a given stream. See the [XGROUP command in the Redis documentation](https://redis.io/commands/xgroup) for more information.\n\n```\nredis.xgroup :create, \"my-stream\", \"my-group\", mkstream: true\n```","summary":"

    Run a Redis XGROUP subcommand for a given stream.

    ","abstract":false,"args":[{"name":"command","external_name":"command","restriction":"XGroup"},{"name":"key","external_name":"key","restriction":"String"},{"name":"groupname","external_name":"groupname","restriction":"String"},{"name":"","external_name":"","restriction":""},{"name":"id","default_value":"nil","external_name":"id","restriction":"String | ::Nil"},{"name":"mkstream","default_value":"false","external_name":"mkstream","restriction":""},{"name":"consumer_name","default_value":"nil","external_name":"consumer_name","restriction":"String | ::Nil"}],"args_string":"(command : XGroup, key : String, groupname : String, *, id : String | Nil = nil, mkstream = false, consumer_name : String | Nil = nil)","args_html":"(command : XGroup, key : String, groupname : String, *, id : String | Nil = nil, mkstream = false, consumer_name : String | Nil = nil)","location":{"filename":"src/commands/stream.cr","line_number":113,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L113"},"def":{"name":"xgroup","args":[{"name":"command","external_name":"command","restriction":"XGroup"},{"name":"key","external_name":"key","restriction":"String"},{"name":"groupname","external_name":"groupname","restriction":"String"},{"name":"","external_name":"","restriction":""},{"name":"id","default_value":"nil","external_name":"id","restriction":"String | ::Nil"},{"name":"mkstream","default_value":"false","external_name":"mkstream","restriction":""},{"name":"consumer_name","default_value":"nil","external_name":"consumer_name","restriction":"String | ::Nil"}],"splat_index":3,"visibility":"Public","body":"cmd = Array(String).new(initial_capacity: 7)\n(((cmd << \"xgroup\") << command.to_s) << key) << groupname\nif id\n cmd << id\nend\nif mkstream\n cmd << \"mkstream\"\nend\nif consumer_name\n cmd << consumer_name\nend\nrun(cmd)\n"}},{"html_id":"xgroup(command:String,key:String,groupname:String,*args:String)-instance-method","name":"xgroup","doc":"Run a Redis XGROUP subcommand for a given stream. See the [XGROUP command in the Redis documentation](https://redis.io/commands/xgroup) for more information.\n\n```\nredis.xgroup \"CREATE\", \"my-stream\", \"my-group\", \"0\"\n```","summary":"

    Run a Redis XGROUP subcommand for a given stream.

    ","abstract":false,"args":[{"name":"command","external_name":"command","restriction":"String"},{"name":"key","external_name":"key","restriction":"String"},{"name":"groupname","external_name":"groupname","restriction":"String"},{"name":"args","external_name":"args","restriction":"String"}],"args_string":"(command : String, key : String, groupname : String, *args : String)","args_html":"(command : String, key : String, groupname : String, *args : String)","location":{"filename":"src/commands/stream.cr","line_number":144,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L144"},"def":{"name":"xgroup","args":[{"name":"command","external_name":"command","restriction":"String"},{"name":"key","external_name":"key","restriction":"String"},{"name":"groupname","external_name":"groupname","restriction":"String"},{"name":"args","external_name":"args","restriction":"String"}],"splat_index":3,"visibility":"Public","body":"run({\"xgroup\", command, key, groupname} + args)"}},{"html_id":"xgroup_create(key:String,groupname:String,*,id:String=\"$\",mkstream=false)-instance-method","name":"xgroup_create","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"groupname","external_name":"groupname","restriction":"String"},{"name":"","external_name":"","restriction":""},{"name":"id","default_value":"\"$\"","external_name":"id","restriction":"String"},{"name":"mkstream","default_value":"false","external_name":"mkstream","restriction":""}],"args_string":"(key : String, groupname : String, *, id : String = \"$\", mkstream = false)","args_html":"(key : String, groupname : String, *, id : String = "$", mkstream = false)","location":{"filename":"src/commands/stream.cr","line_number":99,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L99"},"def":{"name":"xgroup_create","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"groupname","external_name":"groupname","restriction":"String"},{"name":"","external_name":"","restriction":""},{"name":"id","default_value":"\"$\"","external_name":"id","restriction":"String"},{"name":"mkstream","default_value":"false","external_name":"mkstream","restriction":""}],"splat_index":2,"visibility":"Public","body":"xgroup(XGroup::CREATE, key, groupname, id: id, mkstream: mkstream)"}},{"html_id":"xgroup_create_consumer(key:String,groupname:String,consumer_name:String)-instance-method","name":"xgroup_create_consumer","doc":"XGROUP CREATECONSUMER key groupname consumername","summary":"

    XGROUP CREATECONSUMER key groupname consumername

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"groupname","external_name":"groupname","restriction":"String"},{"name":"consumer_name","external_name":"consumer_name","restriction":"String"}],"args_string":"(key : String, groupname : String, consumer_name : String)","args_html":"(key : String, groupname : String, consumer_name : String)","location":{"filename":"src/commands/stream.cr","line_number":104,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L104"},"def":{"name":"xgroup_create_consumer","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"groupname","external_name":"groupname","restriction":"String"},{"name":"consumer_name","external_name":"consumer_name","restriction":"String"}],"visibility":"Public","body":"xgroup(XGroup::CREATECONSUMER, key, groupname, consumer_name: consumer_name)"}},{"html_id":"xlen(key:String)-instance-method","name":"xlen","doc":"Return the number of entries in the given stream","summary":"

    Return the number of entries in the given stream

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/commands/stream.cr","line_number":84,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L84"},"def":{"name":"xlen","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"run({\"xlen\", key})"}},{"html_id":"xpending(key:String,group:String,start:String,endfinish:String,count:String|Int,idle:String|Time::Span|Nil=nil)-instance-method","name":"xpending","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"group","external_name":"group","restriction":"String"},{"name":"start","external_name":"start","restriction":"String"},{"name":"finish","external_name":"end","restriction":"String"},{"name":"count","external_name":"count","restriction":"String | Int"},{"name":"idle","default_value":"nil","external_name":"idle","restriction":"String | Time::Span | Nil"}],"args_string":"(key : String, group : String, start : String, end finish : String, count : String | Int, idle : String | Time::Span | Nil = nil)","args_html":"(key : String, group : String, start : String, end finish : String, count : String | Int, idle : String | Time::Span | Nil = nil)","location":{"filename":"src/commands/stream.cr","line_number":229,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L229"},"def":{"name":"xpending","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"group","external_name":"group","restriction":"String"},{"name":"start","external_name":"start","restriction":"String"},{"name":"finish","external_name":"end","restriction":"String"},{"name":"count","external_name":"count","restriction":"String | Int"},{"name":"idle","default_value":"nil","external_name":"idle","restriction":"String | Time::Span | Nil"}],"visibility":"Public","body":"command = {\"xpending\", key, group}\ncase idle\nwhen String\n command = command + {\"idle\", idle}\nwhen Time::Span\n command = command + {\"idle\", idle.total_milliseconds.to_i.to_s}\nend\ncommand = command + {start, finish, count.to_s}\nrun(command)\n"}},{"html_id":"xpending(key:String,group:String)-instance-method","name":"xpending","doc":"XPENDING key group [[IDLE min-idle-time] start end count [consumer]]","summary":"

    XPENDING key group [[IDLE min-idle-time] start end count [consumer]]

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"group","external_name":"group","restriction":"String"}],"args_string":"(key : String, group : String)","args_html":"(key : String, group : String)","location":{"filename":"src/commands/stream.cr","line_number":225,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L225"},"def":{"name":"xpending","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"group","external_name":"group","restriction":"String"}],"visibility":"Public","body":"run({\"xpending\", key, group})"}},{"html_id":"xrange(key:String,startmin:String,endmax:String,count:String|Int|Nil=nil)-instance-method","name":"xrange","doc":"Return the entries in the given stream between the `start` and `end` ids.\nIf `count` is provided, Redis will return only that number of entries.","summary":"

    Return the entries in the given stream between the start and end ids.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"min","external_name":"start","restriction":"String"},{"name":"max","external_name":"end","restriction":"String"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"}],"args_string":"(key : String, start min : String, end max : String, count : String | Int | Nil = nil)","args_html":"(key : String, start min : String, end max : String, count : String | Int | Nil = nil)","location":{"filename":"src/commands/stream.cr","line_number":90,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L90"},"def":{"name":"xrange","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"min","external_name":"start","restriction":"String"},{"name":"max","external_name":"end","restriction":"String"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"}],"visibility":"Public","body":"command = {\"xrange\", key, min, max}\nif count\n command = command + {\"count\", count.to_s}\nend\nrun(command)\n"}},{"html_id":"xreadgroup(group:String,consumer:String,count:String|Int|Nil=nil,block:Time::Span|String|Int|Nil=nil,no_ack=false,streams:::Hash(String,String)={}ofString=>String)-instance-method","name":"xreadgroup","doc":"Execute an `XREADGROUP` command on the Redis server.\n\nThis is returned in its raw form from Redis, but you can pass it to a\n`Redis::Streaming::XReadGroupResponse` to make it easier to work with.","summary":"

    Execute an XREADGROUP command on the Redis server.

    ","abstract":false,"args":[{"name":"group","external_name":"group","restriction":"String"},{"name":"consumer","external_name":"consumer","restriction":"String"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"},{"name":"block","default_value":"nil","external_name":"block","restriction":"Time::Span | String | Int | Nil"},{"name":"no_ack","default_value":"false","external_name":"no_ack","restriction":""},{"name":"streams","default_value":"{} of String => String","external_name":"streams","restriction":"::Hash(String, String)"}],"args_string":"(group : String, consumer : String, count : String | Int | Nil = nil, block : Time::Span | String | Int | Nil = nil, no_ack = false, streams : ::Hash(String, String) = {} of String => String)","args_html":"(group : String, consumer : String, count : String | Int | Nil = nil, block : Time::Span | String | Int | Nil = nil, no_ack = false, streams : ::Hash(String, String) = {} of String => String)","location":{"filename":"src/commands/stream.cr","line_number":152,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L152"},"def":{"name":"xreadgroup","args":[{"name":"group","external_name":"group","restriction":"String"},{"name":"consumer","external_name":"consumer","restriction":"String"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"},{"name":"block","default_value":"nil","external_name":"block","restriction":"Time::Span | String | Int | Nil"},{"name":"no_ack","default_value":"false","external_name":"no_ack","restriction":""},{"name":"streams","default_value":"{} of String => String","external_name":"streams","restriction":"::Hash(String, String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 9 + (streams.size * 2))\n(((command << \"xreadgroup\") << \"group\") << group) << consumer\nif count\n (command << \"count\") << count.to_s\nend\ncase block\nin Time::Span\n (command << \"block\") << block.total_milliseconds.to_i.to_s\nin String\n (command << \"block\") << block\nin Int\n (command << \"block\") << block.to_s\nin Nil\nend\nif no_ack\n command << \"noack\"\nend\ncommand << \"streams\"\nstreams.each_key do |key|\n command << key\nend\nstreams.each_value do |value|\n command << value\nend\nrun(command)\n"}},{"html_id":"xreadgroup(group:String,consumer:String,count:String|Int|Nil=nil,block:Time::Span|String|Int|Nil=nil,no_ack=false,streams:NamedTuple=NamedTuple.new)-instance-method","name":"xreadgroup","doc":"Execute an `XREADGROUP` command on the Redis server. If `block` is not nil, the server will block for up to that much time (if you pass a number, it will be interpreted as milliseconds) until any new messages enter the stream.\n\nThis is returned in its raw form from Redis, but you can pass it to a\n`Redis::Streaming::XReadGroupResponse` to make it easier to work with.\n\n```\n# Long-poll for up to 10 messages from the stream with key `my_stream`,\n# blocking for up to 2 seconds if there are no messages waiting.\nresponse = redis.xreadgroup \"group\", \"consumer\",\n streams: {my_stream: \">\"},\n count: 10,\n block: 2.seconds\nresponse = Redis::Streaming::XReadGroupResponse.new(response)\n```","summary":"

    Execute an XREADGROUP command on the Redis server.

    ","abstract":false,"args":[{"name":"group","external_name":"group","restriction":"String"},{"name":"consumer","external_name":"consumer","restriction":"String"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"},{"name":"block","default_value":"nil","external_name":"block","restriction":"Time::Span | String | Int | Nil"},{"name":"no_ack","default_value":"false","external_name":"no_ack","restriction":""},{"name":"streams","default_value":"NamedTuple.new","external_name":"streams","restriction":"NamedTuple"}],"args_string":"(group : String, consumer : String, count : String | Int | Nil = nil, block : Time::Span | String | Int | Nil = nil, no_ack = false, streams : NamedTuple = NamedTuple.new)","args_html":"(group : String, consumer : String, count : String | Int | Nil = nil, block : Time::Span | String | Int | Nil = nil, no_ack = false, streams : NamedTuple = NamedTuple.new)","location":{"filename":"src/commands/stream.cr","line_number":195,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L195"},"def":{"name":"xreadgroup","args":[{"name":"group","external_name":"group","restriction":"String"},{"name":"consumer","external_name":"consumer","restriction":"String"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"},{"name":"block","default_value":"nil","external_name":"block","restriction":"Time::Span | String | Int | Nil"},{"name":"no_ack","default_value":"false","external_name":"no_ack","restriction":""},{"name":"streams","default_value":"NamedTuple.new","external_name":"streams","restriction":"NamedTuple"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 9 + (streams.size * 2))\n(((command << \"xreadgroup\") << \"group\") << group) << consumer\nif count\n (command << \"count\") << count.to_s\nend\ncase block\nin Time::Span\n (command << \"block\") << block.total_milliseconds.to_i.to_s\nin String\n (command << \"block\") << block\nin Int\n (command << \"block\") << block.to_s\nin Nil\nend\nif no_ack\n command << \"noack\"\nend\ncommand << \"streams\"\nstreams.each_key do |key|\n command << key.to_s\nend\nstreams.each_value do |value|\n command << value\nend\nrun(command)\n"}}],"types":[{"html_id":"redis/Redis/Commands/Stream/XGroup","path":"Redis/Commands/Stream/XGroup.html","kind":"enum","full_name":"Redis::Commands::Stream::XGroup","name":"XGroup","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/commands/stream.cr","line_number":123,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L123"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"CREATE","name":"CREATE","value":"0"},{"id":"DESTROY","name":"DESTROY","value":"1"},{"id":"CREATECONSUMER","name":"CREATECONSUMER","value":"2"},{"id":"DELCONSUMER","name":"DELCONSUMER","value":"3"}],"namespace":{"html_id":"redis/Redis/Commands/Stream","kind":"module","full_name":"Redis::Commands::Stream","name":"Stream"},"instance_methods":[{"html_id":"create?-instance-method","name":"create?","abstract":false,"location":{"filename":"src/commands/stream.cr","line_number":124,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L124"},"def":{"name":"create?","visibility":"Public","body":"self == CREATE"}},{"html_id":"createconsumer?-instance-method","name":"createconsumer?","abstract":false,"location":{"filename":"src/commands/stream.cr","line_number":126,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L126"},"def":{"name":"createconsumer?","visibility":"Public","body":"self == CREATECONSUMER"}},{"html_id":"delconsumer?-instance-method","name":"delconsumer?","abstract":false,"location":{"filename":"src/commands/stream.cr","line_number":127,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L127"},"def":{"name":"delconsumer?","visibility":"Public","body":"self == DELCONSUMER"}},{"html_id":"destroy?-instance-method","name":"destroy?","abstract":false,"location":{"filename":"src/commands/stream.cr","line_number":125,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/commands/stream.cr#L125"},"def":{"name":"destroy?","visibility":"Public","body":"self == DESTROY"}}]}]}]},{"html_id":"redis/Redis/Connection","path":"Redis/Connection.html","kind":"class","full_name":"Redis::Connection","name":"Connection","abstract":false,"superclass":{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},{"html_id":"redis/Redis/Commands/Stream","kind":"module","full_name":"Redis::Commands::Stream","name":"Stream"},{"html_id":"redis/Redis/Commands/SortedSet","kind":"module","full_name":"Redis::Commands::SortedSet","name":"SortedSet"},{"html_id":"redis/Redis/Commands/Set","kind":"module","full_name":"Redis::Commands::Set","name":"Set"},{"html_id":"redis/Redis/Commands/List","kind":"module","full_name":"Redis::Commands::List","name":"List"},{"html_id":"redis/Redis/Commands/Hash","kind":"module","full_name":"Redis::Commands::Hash","name":"Hash"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/connection.cr","line_number":15,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L15"},{"filename":"src/graph.cr","line_number":512,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L512"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"doc":"The connection wraps the TCP connection to the Redis server.","summary":"

    The connection wraps the TCP connection to the Redis server.

    ","constructors":[{"html_id":"new(uri:URI=URI.parse(\"redis:///\"),log:::Log=Log)-class-method","name":"new","doc":"We receive all connection information in the URI.\n\nSSL connections require specifying the `rediss://` scheme.\nPassword authentication uses the URI password.\nDB selection uses the URI path.","summary":"

    We receive all connection information in the URI.

    ","abstract":false,"args":[{"name":"uri","default_value":"URI.parse(\"redis:///\")","external_name":"uri","restriction":"URI"},{"name":"log","default_value":"Log","external_name":"log","restriction":"::Log"}],"args_string":"(uri : URI = URI.parse(\"redis:///\"), log : ::Log = Log)","args_html":"(uri : URI = URI.parse("redis:///"), log : ::Log = Log)","location":{"filename":"src/connection.cr","line_number":25,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L25"},"def":{"name":"new","args":[{"name":"uri","default_value":"URI.parse(\"redis:///\")","external_name":"uri","restriction":"URI"},{"name":"log","default_value":"Log","external_name":"log","restriction":"::Log"}],"visibility":"Public","body":"_ = allocate\n_.initialize(uri, log)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"close-instance-method","name":"close","doc":"Close the connection to the server.","summary":"

    Close the connection to the server.

    ","abstract":false,"location":{"filename":"src/connection.cr","line_number":402,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L402"},"def":{"name":"close","visibility":"Public","body":"@socket.close"}},{"html_id":"encode(command)-instance-method","name":"encode","doc":"Send the given command over the wire without waiting for a reply. This is\nuseful for query pipelining or sending commands that have no return value.\n\nWARNING: Be careful with this because you can get the client out of sync\nwith the server. You should almost never have to use this, but it can be\nuseful if a command like this has not been implemented yet.","summary":"

    Send the given command over the wire without waiting for a reply.

    ","abstract":false,"args":[{"name":"command","external_name":"command","restriction":""}],"args_string":"(command)","args_html":"(command)","location":{"filename":"src/connection.cr","line_number":449,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L449"},"def":{"name":"encode","args":[{"name":"command","external_name":"command","restriction":""}],"visibility":"Public","body":"@writer.encode(command)"}},{"html_id":"flush-instance-method","name":"flush","doc":"Flush the connection buffer and make sure we've sent everything to the\nserver.","summary":"

    Flush the connection buffer and make sure we've sent everything to the server.

    ","abstract":false,"location":{"filename":"src/connection.cr","line_number":413,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L413"},"def":{"name":"flush","visibility":"Public","body":"@socket.flush"}},{"html_id":"hscan_each(key:String,matchpattern:String|Nil=nil,count:String|Int|Nil=nil,&):Nil-instance-method","name":"hscan_each","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"pattern","default_value":"nil","external_name":"match","restriction":"String | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"}],"args_string":"(key : String, match pattern : String | Nil = nil, count : String | Int | Nil = nil, &) : Nil","args_html":"(key : String, match pattern : String | Nil = nil, count : String | Int | Nil = nil, &) : Nil","location":{"filename":"src/connection.cr","line_number":388,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L388"},"def":{"name":"hscan_each","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"pattern","default_value":"nil","external_name":"match","restriction":"String | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"}],"yields":1,"block_arity":1,"return_type":"Nil","visibility":"Public","body":"cursor = \"\"\nwhile !(cursor == \"0\")\n response = hscan(key, cursor, match: pattern, count: count)\n cursor, results = response.as(Array)\n cursor = cursor.as(String)\n (results.as(Array)).each do |key|\n yield key.as(String)\n end\nend\n"}},{"html_id":"multi(retries=5,&)-instance-method","name":"multi","doc":"Execute a transaction within the server. The transaction is automatically\ncommitted at the end of the block or can be rolled back with\n`Transaction#discard`. Transactions are also rolled back if an exception\nis raised.\n\n```\nredis.multi do |redis|\n redis.set \"foo\", \"bar\"\n redis.incr \"counter\"\n raise \"Oops!\"\nend\n\nredis.get \"foo\" # => nil\nredis.get \"counter\" # => nil\n```","summary":"

    Execute a transaction within the server.

    ","abstract":false,"args":[{"name":"retries","default_value":"5","external_name":"retries","restriction":""}],"args_string":"(retries = 5, &)","args_html":"(retries = 5, &)","location":{"filename":"src/connection.cr","line_number":113,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L113"},"def":{"name":"multi","args":[{"name":"retries","default_value":"5","external_name":"retries","restriction":""}],"yields":1,"block_arity":1,"visibility":"Public","body":"loop do\n begin\n txn = Transaction.new(self)\n begin\n txn.start!\n yield txn\n if txn.discarded?\n return [] of Value\n else\n return txn.exec.as(Array)\n end\n rescue ex\n txn.discard\n raise(ex)\n end\n rescue ex : IO::Error\n if retries > 0\n retries = retries - 1\n initialize(@uri)\n else\n raise(ex)\n end\n end\nend"}},{"html_id":"pipeline(&)-instance-method","name":"pipeline","doc":"Execute a pipeline of commands. A pipeline sends all commands to the\nserver before reading any of the results.\n\n```\nredis.pipeline do |redis|\n redis.set \"foo\", \"bar\"\n redis.incr \"counter\"\nend\n```","summary":"

    Execute a pipeline of commands.

    ","abstract":false,"location":{"filename":"src/connection.cr","line_number":79,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L79"},"def":{"name":"pipeline","yields":1,"block_arity":1,"visibility":"Public","body":"pipeline = Pipeline.new(self)\nerror = nil\nbegin\n yield pipeline\nrescue ex\n error = ex\nend\nflush\nresult = pipeline.commit\nif error\n raise(error)\nelse\n result\nend\n"}},{"html_id":"psubscribe(*channels:String,&block:Subscription,self->)-instance-method","name":"psubscribe","doc":"Subscribe to the given pubsub channels. The block yields a subscription\nobject and the connection. You can setup `on_message`, `on_subscribe`,\nand `on_unsubscribe` on the subscription.\n\n```\nredis.subscribe \"channel1\", \"channel2\" do |subscription, connection|\n subscription.on_message do |channel, message|\n if message == \"unsubscribe\"\n connection.unsubscribe channel\n end\n\n # ...\n end\n\n # Respond to new subscribers\n subscription.on_subscribe do |channel, sub_count|\n connection.set \"sub_count:#{channel}\", sub_count.to_s\n end\n\n # Respond to losing subscribers\n subscription.on_unsubscribe do |channel, sub_count|\n connection.set \"sub_count:#{channel}\", sub_count.to_s\n end\nend\n```\n\nFor more information, see the documentation for:\n- [`SUBSCRIBE`](https://redis.io/commands/subscribe/)\n- [`PSUBSCRIBE`](https://redis.io/commands/psubscribe/)","summary":"

    Subscribe to the given pubsub channels.

    ","abstract":false,"args":[{"name":"channels","external_name":"channels","restriction":"String"}],"args_string":"(*channels : String, &block : Subscription, self -> )","args_html":"(*channels : String, &block : Subscription, self -> )","location":{"filename":"src/connection.cr","line_number":139,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L139"},"def":{"name":"psubscribe","args":[{"name":"channels","external_name":"channels","restriction":"String"}],"splat_index":0,"yields":2,"block_arity":2,"block_arg":{"name":"block","external_name":"block","restriction":"(Subscription, self ->)"},"visibility":"Public","body":"subscription = Subscription.new(self)\n@writer.encode({\"psubscribe\"} + channels)\nflush\nyield subscription, self\nsubscription.call\n"}},{"html_id":"punsubscribe(*channels:String)-instance-method","name":"punsubscribe","abstract":false,"args":[{"name":"channels","external_name":"channels","restriction":"String"}],"args_string":"(*channels : String)","args_html":"(*channels : String)","location":{"filename":"src/connection.cr","line_number":200,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L200"},"def":{"name":"punsubscribe","args":[{"name":"channels","external_name":"channels","restriction":"String"}],"splat_index":0,"visibility":"Public","body":"@writer.encode({\"punsubscribe\"} + channels)\nflush\n"}},{"html_id":"read-instance-method","name":"read","doc":"Read the next value from the server","summary":"

    Read the next value from the server

    ","abstract":false,"location":{"filename":"src/connection.cr","line_number":418,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L418"},"def":{"name":"read","visibility":"Public","body":"case value = @parser.read\nwhen Error\n raise(value)\nelse\n value\nend"}},{"html_id":"read?-instance-method","name":"read?","doc":"Read the next value from the server, returning `nil` if the connection is\nclosed.","summary":"

    Read the next value from the server, returning nil if the connection is closed.

    ","abstract":false,"location":{"filename":"src/connection.cr","line_number":429,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L429"},"def":{"name":"read?","visibility":"Public","body":"case value = @parser.read?\nwhen Error\n raise(value)\nelse\n value\nend"}},{"html_id":"readonly!:Nil-instance-method","name":"readonly!","doc":"Put this connection in a readonly state. This is typically used when\ntalking to replicas, and used automatically by `Cluster` for cluster\nreplicas.","summary":"

    Put this connection in a readonly state.

    ","abstract":false,"location":{"filename":"src/connection.cr","line_number":208,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L208"},"def":{"name":"readonly!","return_type":"Nil","visibility":"Public","body":"run({\"readonly\"})"}},{"html_id":"run(command,retries=5):Value-instance-method","name":"run","doc":"Execute the given command and return the result from the server. Commands must be an `Enumerable`.\n\n```\nrun({\"set\", \"foo\", \"bar\"})\n```","summary":"

    Execute the given command and return the result from the server.

    ","abstract":false,"args":[{"name":"command","external_name":"command","restriction":""},{"name":"retries","default_value":"5","external_name":"retries","restriction":""}],"args_string":"(command, retries = 5) : Value","args_html":"(command, retries = 5) : Value","location":{"filename":"src/connection.cr","line_number":349,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L349"},"def":{"name":"run","args":[{"name":"command","external_name":"command","restriction":""},{"name":"retries","default_value":"5","external_name":"retries","restriction":""}],"return_type":"Value","visibility":"Public","body":"start = Time.monotonic\nloop do\n begin\n @writer.encode(command)\n flush\n result = read\n @log.debug(&.emit(\"redis\", command: command[0...2].join(' '), duration_ms: (Time.monotonic - start).total_milliseconds))\n return result\n rescue ex : IO::Error\n if retries > 0\n retries = retries - 1\n initialize(@uri)\n else\n raise(ex)\n end\n end\nend\n"}},{"html_id":"scan_each(matchpattern:String|Nil=nil,count:String|Int|Nil=nil,type:String|Nil=nil,&):Nil-instance-method","name":"scan_each","doc":"Iterate over keys that match the given pattern or all keys if no pattern\nis supplied, yielding each key to the block. This is a much more efficient\nway to iterate over keys than `keys.each` — it avoids loading every key in\nmemory at the same time and also doesn't block the Redis server while it\ngenerates the array of all those keys.","summary":"

    Iterate over keys that match the given pattern or all keys if no pattern is supplied, yielding each key to the block.

    ","abstract":false,"args":[{"name":"pattern","default_value":"nil","external_name":"match","restriction":"String | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"},{"name":"type","default_value":"nil","external_name":"type","restriction":"String | ::Nil"}],"args_string":"(match pattern : String | Nil = nil, count : String | Int | Nil = nil, type : String | Nil = nil, &) : Nil","args_html":"(match pattern : String | Nil = nil, count : String | Int | Nil = nil, type : String | Nil = nil, &) : Nil","location":{"filename":"src/connection.cr","line_number":373,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L373"},"def":{"name":"scan_each","args":[{"name":"pattern","default_value":"nil","external_name":"match","restriction":"String | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"String | Int | Nil"},{"name":"type","default_value":"nil","external_name":"type","restriction":"String | ::Nil"}],"yields":1,"block_arity":1,"return_type":"Nil","visibility":"Public","body":"has_scanned = false\ncursor = \"0\"\nwhile !(has_scanned && (cursor == \"0\"))\n has_scanned = true\n response = scan(cursor, match: pattern, count: count, type: type)\n cursor, results = response.as(Array)\n cursor = cursor.as(String)\n (results.as(Array)).each do |key|\n yield key.as(String)\n end\nend\n"}},{"html_id":"subscribe(*channels:String,&block:Subscription,self->)-instance-method","name":"subscribe","doc":"Subscribe to the given pubsub channels. The block yields a subscription\nobject and the connection. You can setup `on_message`, `on_subscribe`,\nand `on_unsubscribe` on the subscription.\n\n```\nredis.subscribe \"channel1\", \"channel2\" do |subscription, connection|\n subscription.on_message do |channel, message|\n if message == \"unsubscribe\"\n connection.unsubscribe channel\n end\n\n # ...\n end\n\n # Respond to new subscribers\n subscription.on_subscribe do |channel, sub_count|\n connection.set \"sub_count:#{channel}\", sub_count.to_s\n end\n\n # Respond to losing subscribers\n subscription.on_unsubscribe do |channel, sub_count|\n connection.set \"sub_count:#{channel}\", sub_count.to_s\n end\nend\n```\n\nFor more information, see the documentation for:\n- [`SUBSCRIBE`](https://redis.io/commands/subscribe/)\n- [`PSUBSCRIBE`](https://redis.io/commands/psubscribe/)","summary":"

    Subscribe to the given pubsub channels.

    ","abstract":false,"args":[{"name":"channels","external_name":"channels","restriction":"String"}],"args_string":"(*channels : String, &block : Subscription, self -> )","args_html":"(*channels : String, &block : Subscription, self -> )","location":{"filename":"src/connection.cr","line_number":139,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L139"},"def":{"name":"subscribe","args":[{"name":"channels","external_name":"channels","restriction":"String"}],"splat_index":0,"yields":2,"block_arity":2,"block_arg":{"name":"block","external_name":"block","restriction":"(Subscription, self ->)"},"visibility":"Public","body":"subscription = Subscription.new(self)\n@writer.encode({\"subscribe\"} + channels)\nflush\nyield subscription, self\nsubscription.call\n"}},{"html_id":"subscribe(*channels:String)-instance-method","name":"subscribe","doc":"Subscribe to the given channels without having to pass a block, which\nwould block execution. This is useful to run inside of other subscription\nblocks to add new subscriptions.","summary":"

    Subscribe to the given channels without having to pass a block, which would block execution.

    ","abstract":false,"args":[{"name":"channels","external_name":"channels","restriction":"String"}],"args_string":"(*channels : String)","args_html":"(*channels : String)","location":{"filename":"src/connection.cr","line_number":183,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L183"},"def":{"name":"subscribe","args":[{"name":"channels","external_name":"channels","restriction":"String"}],"splat_index":0,"visibility":"Public","body":"@writer.encode({\"subscribe\"} + channels)\nflush\n"}},{"html_id":"unsubscribe-instance-method","name":"unsubscribe","doc":"Unsubscribe this connection from all subscriptions.","summary":"

    Unsubscribe this connection from all subscriptions.

    ","abstract":false,"location":{"filename":"src/connection.cr","line_number":189,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L189"},"def":{"name":"unsubscribe","visibility":"Public","body":"@writer.encode({\"unsubscribe\"})\nflush\n"}},{"html_id":"unsubscribe(*channels:String)-instance-method","name":"unsubscribe","doc":"Unsubscribe this connection the given channels.","summary":"

    Unsubscribe this connection the given channels.

    ","abstract":false,"args":[{"name":"channels","external_name":"channels","restriction":"String"}],"args_string":"(*channels : String)","args_html":"(*channels : String)","location":{"filename":"src/connection.cr","line_number":195,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L195"},"def":{"name":"unsubscribe","args":[{"name":"channels","external_name":"channels","restriction":"String"}],"splat_index":0,"visibility":"Public","body":"@writer.encode({\"unsubscribe\"} + channels)\nflush\n"}},{"html_id":"url-instance-method","name":"url","doc":"The URI","summary":"

    The URI

    ","abstract":false,"location":{"filename":"src/connection.cr","line_number":439,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L439"},"def":{"name":"url","visibility":"Public","body":"@uri.to_s"}}],"macros":[{"html_id":"set_return_types!-macro","name":"set_return_types!","abstract":false,"location":{"filename":"src/connection.cr","line_number":230,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L230"},"def":{"name":"set_return_types!","visibility":"Public","body":" \n# When new commands are added to the Commands mixin, add an entry here to\n\n \n# make sure the return type is set when run directly on the connection.\n\n ::Redis::Connection.override_return_types(\n{\n keys: Array,\n del: Int64,\n unlink: Int64,\n ttl: Int64,\n pttl: Int64,\n script_load: String,\n\n \n# String commands\n\n append: Int64,\n decr: Int64,\n decrby: Int64,\n get: String?,\n getdel: String?,\n getex: String?,\n getrange: String,\n getset: String?,\n incr: Int64,\n incrby: Int64,\n incrbyfloat: String,\n mget: Array,\n mset: String,\n msetnx: Int64,\n psetex: String,\n set: String?,\n setex: String,\n setnx: Int64,\n setrange: Int64,\n strlen: Int64,\n substr: String,\n\n \n# List commands\n\n blmove: String?,\n blmpop: Array(Value)?,\n blpop: Array(Value)?,\n brpop: Array(Value)?,\n brpoplpush: String?,\n lindex: String?,\n linsert: Int64?,\n llen: Int64,\n lmove: String?,\n lmpop: Array(Value)?,\n lpop: String | Array(Value) | Nil,\n lpos: Int64 | Array(Value) | Nil,\n lpush: Int64,\n lpushx: Int64,\n lrange: Array,\n lrem: Int64,\n lset: String,\n ltrim: String,\n rpop: String?,\n rpoplpush: String?,\n rpush: Int64,\n rpushx: Int64,\n\n \n# Hash commands\n\n hdel: Int64,\n hexists: Int64,\n hget: String?,\n hgetall: Array,\n hincrby: Int64,\n hincrbyfloat: String,\n hkeys: Array,\n hlen: Int64,\n hmget: Array,\n hmset: String,\n hrandfield: String | Array(Value),\n hscan: Array,\n hset: Int64,\n hsetnx: Int64,\n hstrlen: Int64,\n hvals: Array,\n\n \n# Sets\n\n sadd: Int64,\n scard: Int64,\n sdiff: Array,\n sdiffstore: Int64,\n sinter: Array,\n sintercard: Int64,\n sinterstore: Int64,\n sismember: Int64,\n smembers: Array,\n smismember: Array,\n smove: Int64,\n spop: String | Array(Value) | Nil,\n srandmember: String | Array(Value) | Nil,\n srem: Int64,\n sscan: Array,\n sunion: Array,\n sunionstore: Int64,\n\n \n# Streams\n\n xack: Int64,\n xadd: String?,\n xautoclaim: Array,\n xclaim: Array,\n xdel: Int64,\n xgroup: String | Int64,\n xinfo: Array,\n xlen: Int64,\n xpending: Array,\n xrange: Array,\n xreadgroup: Array(Value)?,\n xrevrange: Array,\n xtrim: Int64,\n })\n \n"}}]},{"html_id":"redis/Redis/Error","path":"Redis/Error.html","kind":"class","full_name":"Redis::Error","name":"Error","abstract":false,"superclass":{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},"ancestors":[{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/errors.cr","line_number":4,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/errors.cr#L4"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"subclasses":[{"html_id":"redis/Redis/BusyGroup","kind":"class","full_name":"Redis::BusyGroup","name":"BusyGroup"},{"html_id":"redis/Redis/Cluster/Error","kind":"class","full_name":"Redis::Cluster::Error","name":"Error"},{"html_id":"redis/Redis/Graph/Error","kind":"class","full_name":"Redis::Graph::Error","name":"Error"},{"html_id":"redis/Redis/Graph/Indices/IndexAlreadyExists","kind":"class","full_name":"Redis::Graph::Indices::IndexAlreadyExists","name":"IndexAlreadyExists"},{"html_id":"redis/Redis/Graph/Serializable/Node/PropertyMissing","kind":"class","full_name":"Redis::Graph::Serializable::Node::PropertyMissing","name":"PropertyMissing"},{"html_id":"redis/Redis/NoGroup","kind":"class","full_name":"Redis::NoGroup","name":"NoGroup"},{"html_id":"redis/Redis/Subscription/InvalidMessage","kind":"class","full_name":"Redis::Subscription::InvalidMessage","name":"InvalidMessage"}],"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"instance_methods":[{"html_id":"==(other:self)-instance-method","name":"==","doc":"Returns `true` if this reference is the same as *other*. Invokes `same?`.","summary":"

    Returns true if this reference is the same as other.

    ","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"self"}],"args_string":"(other : self)","args_html":"(other : self)","def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"self"}],"visibility":"Public","body":"if same?(other)\n return true\nend\ntrue\n"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"

    See Object#hash(hasher)

    ","abstract":false,"args":[{"name":"hasher","external_name":"hasher","restriction":""}],"args_string":"(hasher)","args_html":"(hasher)","def":{"name":"hash","args":[{"name":"hasher","external_name":"hasher","restriction":""}],"visibility":"Public","body":"hasher"}}],"macros":[{"html_id":"define(type,code=(name.gsub(/\\A.*::/,\"\")).upcase)-macro","name":"define","abstract":false,"args":[{"name":"type","external_name":"type","restriction":""},{"name":"code","default_value":"(name.gsub(/\\A.*::/, \"\")).upcase","external_name":"code","restriction":""}],"args_string":"(type, code = (name.gsub(/\\A.*::/, \"\")).upcase)","args_html":"(type, code = (name.gsub(/\\A.*::/, "")).upcase)","location":{"filename":"src/errors.cr","line_number":5,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/errors.cr#L5"},"def":{"name":"define","args":[{"name":"type","external_name":"type","restriction":""},{"name":"code","default_value":"(name.gsub(/\\A.*::/, \"\")).upcase","external_name":"code","restriction":""}],"visibility":"Public","body":" class \n{{ type }}\n < \n{{ @type }}\n\n \n{% if code != nil %}\n ERROR_MAP[{{ code }}] = self\n {% end %}\n\n \nend\n \n"}}]},{"html_id":"redis/Redis/FullText","path":"Redis/FullText.html","kind":"struct","full_name":"Redis::FullText(Runnable)","name":"FullText","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/search.cr","line_number":23,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L23"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"doc":"`Redis::FullText` wraps a `Redis::Client` or `Redis::Cluster` to execute\ncommands against a fulltext search index located on a given server.\n\n```\nredis = Redis::Client.new\nredis.ft.create <<-INDEX\n people-index ON HASH\n PREFIX 1 person:\n SCHEMA\n name TEXT NOSTEM SORTABLE\n email TEXT NOSTEM SORTABLE\n location GEO\nINDEX\n```\n\nIf your Redis server is running in Cluster mode, you can\n`require \"redis/cluster/search\"` to send read-only `FullText` commands to\nshard replicas.","summary":"

    Redis::FullText wraps a Redis::Client or Redis::Cluster to execute commands against a fulltext search index located on a given server.

    \n

    EXPERIMENTAL RediSearch support is still under development. Some APIs may change while details are discovered.

    ","instance_methods":[{"html_id":"create(string:String)-instance-method","name":"create","doc":"Create a search index using the syntax specified in the [RediSearch\n`FT.CREATE` docs](https://oss.redis.com/redisearch/Commands/#ftcreate).\n\n```\nredis = Redis::Client.new\nredis.ft.create <<-INDEX\n people-index ON HASH\n PREFIX 1 person:\n SCHEMA\n name TEXT NOSTEM SORTABLE\n email TEXT NOSTEM SORTABLE\n location GEO\nINDEX\n```\n\nNOTE: This method returns immediately, before the index is complete. You can run searches against an incomplete index, but you will also have incomplete results. To find how far along the index is, you can use the `info` method.\nTODO: Add a method that generates the string passed into this overload.","summary":"

    Create a search index using the syntax specified in the RediSearch FT.CREATE docs.

    ","abstract":false,"args":[{"name":"string","external_name":"string","restriction":"String"}],"args_string":"(string : String)","args_html":"(string : String)","location":{"filename":"src/search.cr","line_number":75,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L75"},"def":{"name":"create","args":[{"name":"string","external_name":"string","restriction":"String"}],"visibility":"Public","body":"command = [] of String\nstart = 0\nin_quotes = false\nstart.upto(string.size - 1) do |index|\n if string[index] == '\"'\n if in_quotes\n part = string[start...index].strip\n if part.empty?\n else\n command << part\n end\n in_quotes = false\n else\n in_quotes = true\n end\n start = index + 1\n else\n if (string[index].whitespace? && (!string[index - 1].whitespace?)) && (!in_quotes)\n part = part = string[start...index].strip\n if part.empty?\n else\n command << part\n end\n start = index + 1\n end\n end\nend\ncommand << string[start..-1]\n@redis.run([\"ft.create\"] + command)\n"}},{"html_id":"drop(index:String,keepdocs=false)-instance-method","name":"drop","doc":"Drop the specified `index`.","summary":"

    Drop the specified index.

    ","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"String"},{"name":"keepdocs","default_value":"false","external_name":"keepdocs","restriction":""}],"args_string":"(index : String, keepdocs = false)","args_html":"(index : String, keepdocs = false)","location":{"filename":"src/search.cr","line_number":308,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L308"},"def":{"name":"drop","args":[{"name":"index","external_name":"index","restriction":"String"},{"name":"keepdocs","default_value":"false","external_name":"keepdocs","restriction":""}],"visibility":"Public","body":"dropindex(index, keepdocs)"}},{"html_id":"dropindex(key:String,keepdocs=false)-instance-method","name":"dropindex","doc":"Drop the specified `index`.","summary":"

    Drop the specified index.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"keepdocs","default_value":"false","external_name":"keepdocs","restriction":""}],"args_string":"(key : String, keepdocs = false)","args_html":"(key : String, keepdocs = false)","location":{"filename":"src/search.cr","line_number":313,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L313"},"def":{"name":"dropindex","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"keepdocs","default_value":"false","external_name":"keepdocs","restriction":""}],"visibility":"Public","body":"command = [\"ft.dropindex\", key]\nif keepdocs\n command << \"keepdocs\"\nend\n@redis.run(command)\n"}},{"html_id":"info(index:String)-instance-method","name":"info","doc":"Get information about the search index contained in `index`. For more\ndetails, see [the `FT.INFO` documentation](https://oss.redis.com/redisearch/Commands/#ftinfo).","summary":"

    Get information about the search index contained in index.

    ","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"String"}],"args_string":"(index : String)","args_html":"(index : String)","location":{"filename":"src/search.cr","line_number":104,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L104"},"def":{"name":"info","args":[{"name":"index","external_name":"index","restriction":"String"}],"visibility":"Public","body":"@redis.run({\"ft.info\", index})"}},{"html_id":"profile(index:String,query:String)-instance-method","name":"profile","doc":"Profile the given search. For further details, see [the `FT.PROFILE`\ndocumentation](https://oss.redis.com/redisearch/Commands/#ftprofile).","summary":"

    Profile the given search.

    ","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"String"},{"name":"query","external_name":"query","restriction":"String"}],"args_string":"(index : String, query : String)","args_html":"(index : String, query : String)","location":{"filename":"src/search.cr","line_number":303,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L303"},"def":{"name":"profile","args":[{"name":"index","external_name":"index","restriction":"String"},{"name":"query","external_name":"query","restriction":"String"}],"visibility":"Public","body":"@redis.run({\"ft.profile\", index, \"search\", \"query\", query})"}},{"html_id":"search(index:String,query:String,nocontent=false,verbatim=false,nostopwords=false,withscores=false,withpayloads=false,withsortkeys=false,filter:Array(Filter)|Nil=nil,geofilter:GeoFilter|Nil=nil,inkeys:Array(String)|Nil=nil,infields:Array(String)|Nil=nil,returnreturn_value:Array(String)|Nil=nil,summarize:Summarize|Nil=nil,highlight:Highlight|Nil=nil,slop:Int|Nil=nil,timeout:Time::Span|Nil=nil,inorder:Bool|Nil=nil,language:String|Nil=nil,expander:String|Nil=nil,scorer:String|Nil=nil,explainscore:Bool|Nil=nil,payload:String|Bytes|Nil=nil,sortby:SortBy|Nil=nil,limit:Tuple(Int,Int)|Nil=nil,params:NamedTuple|Hash(String,String)|Nil=nil,dialect:Int|Nil=nil)-instance-method","name":"search","doc":"Run the specified `query` against `index`. Customize the search with various other arguments. For details about what each one does and the return value, see [the `FT.SEARCH`\ndocumentation](https://oss.redis.com/redisearch/Commands/#ftsearch).\n\n```\nresult = redis.ft.search \"people-index\", \"@name:Jamie\",\n return: %w[name email],\n sortby: Redis::FullText::SortBy.new(\"name\", :asc)\n```","summary":"

    Run the specified query against index.

    ","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"String"},{"name":"query","external_name":"query","restriction":"String"},{"name":"nocontent","default_value":"false","external_name":"nocontent","restriction":""},{"name":"verbatim","default_value":"false","external_name":"verbatim","restriction":""},{"name":"nostopwords","default_value":"false","external_name":"nostopwords","restriction":""},{"name":"withscores","default_value":"false","external_name":"withscores","restriction":""},{"name":"withpayloads","default_value":"false","external_name":"withpayloads","restriction":""},{"name":"withsortkeys","default_value":"false","external_name":"withsortkeys","restriction":""},{"name":"filter","default_value":"nil","external_name":"filter","restriction":"Array(Filter) | ::Nil"},{"name":"geofilter","default_value":"nil","external_name":"geofilter","restriction":"GeoFilter | ::Nil"},{"name":"inkeys","default_value":"nil","external_name":"inkeys","restriction":"Array(String) | ::Nil"},{"name":"infields","default_value":"nil","external_name":"infields","restriction":"Array(String) | ::Nil"},{"name":"return_value","default_value":"nil","external_name":"return","restriction":"Array(String) | ::Nil"},{"name":"summarize","default_value":"nil","external_name":"summarize","restriction":"Summarize | ::Nil"},{"name":"highlight","default_value":"nil","external_name":"highlight","restriction":"Highlight | ::Nil"},{"name":"slop","default_value":"nil","external_name":"slop","restriction":"Int | ::Nil"},{"name":"timeout","default_value":"nil","external_name":"timeout","restriction":"Time::Span | ::Nil"},{"name":"inorder","default_value":"nil","external_name":"inorder","restriction":"Bool | ::Nil"},{"name":"language","default_value":"nil","external_name":"language","restriction":"String | ::Nil"},{"name":"expander","default_value":"nil","external_name":"expander","restriction":"String | ::Nil"},{"name":"scorer","default_value":"nil","external_name":"scorer","restriction":"String | ::Nil"},{"name":"explainscore","default_value":"nil","external_name":"explainscore","restriction":"Bool | ::Nil"},{"name":"payload","default_value":"nil","external_name":"payload","restriction":"String | Bytes | Nil"},{"name":"sortby","default_value":"nil","external_name":"sortby","restriction":"SortBy | ::Nil"},{"name":"limit","default_value":"nil","external_name":"limit","restriction":"::Tuple(Int, Int) | ::Nil"},{"name":"params","default_value":"nil","external_name":"params","restriction":"NamedTuple | Hash(String, String) | Nil"},{"name":"dialect","default_value":"nil","external_name":"dialect","restriction":"Int | ::Nil"}],"args_string":"(index : String, query : String, nocontent = false, verbatim = false, nostopwords = false, withscores = false, withpayloads = false, withsortkeys = false, filter : Array(Filter) | Nil = nil, geofilter : GeoFilter | Nil = nil, inkeys : Array(String) | Nil = nil, infields : Array(String) | Nil = nil, return return_value : Array(String) | Nil = nil, summarize : Summarize | Nil = nil, highlight : Highlight | Nil = nil, slop : Int | Nil = nil, timeout : Time::Span | Nil = nil, inorder : Bool | Nil = nil, language : String | Nil = nil, expander : String | Nil = nil, scorer : String | Nil = nil, explainscore : Bool | Nil = nil, payload : String | Bytes | Nil = nil, sortby : SortBy | Nil = nil, limit : Tuple(Int, Int) | Nil = nil, params : NamedTuple | Hash(String, String) | Nil = nil, dialect : Int | Nil = nil)","args_html":"(index : String, query : String, nocontent = false, verbatim = false, nostopwords = false, withscores = false, withpayloads = false, withsortkeys = false, filter : Array(Filter) | Nil = nil, geofilter : GeoFilter | Nil = nil, inkeys : Array(String) | Nil = nil, infields : Array(String) | Nil = nil, return return_value : Array(String) | Nil = nil, summarize : Summarize | Nil = nil, highlight : Highlight | Nil = nil, slop : Int | Nil = nil, timeout : Time::Span | Nil = nil, inorder : Bool | Nil = nil, language : String | Nil = nil, expander : String | Nil = nil, scorer : String | Nil = nil, explainscore : Bool | Nil = nil, payload : String | Bytes | Nil = nil, sortby : SortBy | Nil = nil, limit : Tuple(Int, Int) | Nil = nil, params : NamedTuple | Hash(String, String) | Nil = nil, dialect : Int | Nil = nil)","location":{"filename":"src/search.cr","line_number":120,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L120"},"def":{"name":"search","args":[{"name":"index","external_name":"index","restriction":"String"},{"name":"query","external_name":"query","restriction":"String"},{"name":"nocontent","default_value":"false","external_name":"nocontent","restriction":""},{"name":"verbatim","default_value":"false","external_name":"verbatim","restriction":""},{"name":"nostopwords","default_value":"false","external_name":"nostopwords","restriction":""},{"name":"withscores","default_value":"false","external_name":"withscores","restriction":""},{"name":"withpayloads","default_value":"false","external_name":"withpayloads","restriction":""},{"name":"withsortkeys","default_value":"false","external_name":"withsortkeys","restriction":""},{"name":"filter","default_value":"nil","external_name":"filter","restriction":"Array(Filter) | ::Nil"},{"name":"geofilter","default_value":"nil","external_name":"geofilter","restriction":"GeoFilter | ::Nil"},{"name":"inkeys","default_value":"nil","external_name":"inkeys","restriction":"Array(String) | ::Nil"},{"name":"infields","default_value":"nil","external_name":"infields","restriction":"Array(String) | ::Nil"},{"name":"return_value","default_value":"nil","external_name":"return","restriction":"Array(String) | ::Nil"},{"name":"summarize","default_value":"nil","external_name":"summarize","restriction":"Summarize | ::Nil"},{"name":"highlight","default_value":"nil","external_name":"highlight","restriction":"Highlight | ::Nil"},{"name":"slop","default_value":"nil","external_name":"slop","restriction":"Int | ::Nil"},{"name":"timeout","default_value":"nil","external_name":"timeout","restriction":"Time::Span | ::Nil"},{"name":"inorder","default_value":"nil","external_name":"inorder","restriction":"Bool | ::Nil"},{"name":"language","default_value":"nil","external_name":"language","restriction":"String | ::Nil"},{"name":"expander","default_value":"nil","external_name":"expander","restriction":"String | ::Nil"},{"name":"scorer","default_value":"nil","external_name":"scorer","restriction":"String | ::Nil"},{"name":"explainscore","default_value":"nil","external_name":"explainscore","restriction":"Bool | ::Nil"},{"name":"payload","default_value":"nil","external_name":"payload","restriction":"String | Bytes | Nil"},{"name":"sortby","default_value":"nil","external_name":"sortby","restriction":"SortBy | ::Nil"},{"name":"limit","default_value":"nil","external_name":"limit","restriction":"::Tuple(Int, Int) | ::Nil"},{"name":"params","default_value":"nil","external_name":"params","restriction":"NamedTuple | Hash(String, String) | Nil"},{"name":"dialect","default_value":"nil","external_name":"dialect","restriction":"Int | ::Nil"}],"visibility":"Public","body":"command = Array(String).new((((((((((((((((((((((((((((((((1 + 1) + 1) + 1) + 1) + 1) + 1) + 4) + 6) + (inkeys.try(&.size) || 0)) + 1) + (infields.try(&.size) || 0)) + 1) + (return_value.try(&.size) || 0)) + 1) + (summarize.try(&.fields).try(&.size) || 0)) + 8) + (highlight.try(&.fields).try(&.size) || 0)) + 6) + 2) + 2) + 1) + 2) + 2) + 2) + 1) + 2) + 3) + 3) + 1) + (params.try do |params|\n params.size * 2\nend || 0)) + 2) + 0)\n((command << \"ft.search\") << index) << query\nif nocontent\n command << \"nocontent\"\nend\nif verbatim\n command << \"verbatim\"\nend\nif nostopwords\n command << \"nostopwords\"\nend\nif withscores\n command << \"withscores\"\nend\nif withpayloads\n command << \"withpayloads\"\nend\nif withsortkeys\n command << \"withsortkeys\"\nend\nif filter\n filter.each do |f|\n (((command << \"filter\") << f.field) << f.min) << f.max\n end\nend\nif geofilter\n (((((command << \"geofilter\") << geofilter.field) << geofilter.longitude.to_s) << geofilter.latitude.to_s) << geofilter.radius.to_s) << geofilter.unit.to_s.downcase\nend\nif inkeys\n command << \"inkeys\"\n command.concat(inkeys)\nend\nif infields\n command << \"infields\"\n command.concat(infields)\nend\nif return_value\n (command << \"return\") << return_value.size.to_s\n command.concat(return_value)\nend\nif summarize\n command << \"summarize\"\n if fields = summarize.fields\n (command << \"fields\") << fields.size.to_s\n command.concat(fields)\n end\n if frags = summarize.frags\n (command << \"frags\") << frags.to_s\n end\n if len = summarize.len\n (command << \"len\") << len.to_s\n end\n if separator = summarize.separator\n (command << \"separator\") << separator\n end\nend\nif highlight\n command << \"highlight\"\n if fields = highlight.fields\n field_names = fields\n (command << \"fields\") << fields.size.to_s\n if field_names\n command.concat(field_names)\n end\n end\n if tags = highlight.tags\n command << \"tags\"\n command.concat(tags)\n end\nend\nif slop\n (command << \"slop\") << slop.to_s\nend\nif inorder\n command << \"inorder\"\nend\nif language\n (command << \"language\") << language\nend\nif expander\n (command << \"expander\") << expander\nend\nif scorer\n (command << \"scorer\") << scorer\nend\nif explainscore\n command << \"explainscore\"\nend\ncase payload\nwhen String\n command << payload\nwhen Bytes\n command << (String.new(payload))\nend\nif sortby\n ((command << \"sortby\") << sortby.attribute) << sortby.direction.to_s\nend\nif limit\n command << \"limit\"\n command.concat(limit.map(&.to_s).to_a)\nend\nif params\n (command << \"params\") << (params.size * 2).to_s\n case params\n in NamedTuple\n params.each do |key, value|\n (command << key.to_s) << value.to_s\n end\n in Hash\n params.each do |__temp_69|\n key, value = __temp_69\n (command << key) << value\n end\n in Nil\n end\n dialect || (dialect = 2)\nend\nif dialect\n (command << \"dialect\") << dialect.to_s\nend\n(@redis.run(command)).as(Array)\n"}},{"html_id":"tagvals(index:String,field:String)-instance-method","name":"tagvals","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"String"},{"name":"field","external_name":"field","restriction":"String"}],"args_string":"(index : String, field : String)","args_html":"(index : String, field : String)","location":{"filename":"src/search.cr","line_number":108,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L108"},"def":{"name":"tagvals","args":[{"name":"index","external_name":"index","restriction":"String"},{"name":"field","external_name":"field","restriction":"String"}],"visibility":"Public","body":"@redis.run({\"ft.tagvals\", index, field})"}}],"types":[{"html_id":"redis/Redis/FullText/Filter","path":"Redis/FullText/Filter.html","kind":"struct","full_name":"Redis::FullText::Filter","name":"Filter","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/search.cr","line_number":320,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L320"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/FullText","kind":"struct","full_name":"Redis::FullText(Runnable)","name":"FullText"},"constructors":[{"html_id":"new(field:String,min:String,max:String)-class-method","name":"new","abstract":false,"args":[{"name":"field","external_name":"field","restriction":"String"},{"name":"min","external_name":"min","restriction":"String"},{"name":"max","external_name":"max","restriction":"String"}],"args_string":"(field : String, min : String, max : String)","args_html":"(field : String, min : String, max : String)","location":{"filename":"src/search.cr","line_number":320,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L320"},"def":{"name":"new","args":[{"name":"field","external_name":"field","restriction":"String"},{"name":"min","external_name":"min","restriction":"String"},{"name":"max","external_name":"max","restriction":"String"}],"visibility":"Public","body":"_ = allocate\n_.initialize(field, min, max)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}},{"html_id":"new(field:String,range:Range(B,E))forallB,E-class-method","name":"new","abstract":false,"args":[{"name":"field","external_name":"field","restriction":"String"},{"name":"range","external_name":"range","restriction":"Range(B, E)"}],"args_string":"(field : String, range : Range(B, E)) forall B, E","args_html":"(field : String, range : Range(B, E)) forall B, E","location":{"filename":"src/search.cr","line_number":321,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L321"},"def":{"name":"new","args":[{"name":"field","external_name":"field","restriction":"String"},{"name":"range","external_name":"range","restriction":"Range(B, E)"}],"visibility":"Public","body":"new(field, min: (range.begin || \"-inf\").to_s, max: (range.end || \"+inf\").to_s)"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/search.cr","line_number":320,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L320"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@field.clone, @min.clone, @max.clone)"}},{"html_id":"copy_with(field_field=@field,min_min=@min,max_max=@max)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_field","default_value":"@field","external_name":"field","restriction":""},{"name":"_min","default_value":"@min","external_name":"min","restriction":""},{"name":"_max","default_value":"@max","external_name":"max","restriction":""}],"args_string":"(field _field = @field, min _min = @min, max _max = @max)","args_html":"(field _field = @field, min _min = @min, max _max = @max)","location":{"filename":"src/search.cr","line_number":320,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L320"},"def":{"name":"copy_with","args":[{"name":"_field","default_value":"@field","external_name":"field","restriction":""},{"name":"_min","default_value":"@min","external_name":"min","restriction":""},{"name":"_max","default_value":"@max","external_name":"max","restriction":""}],"visibility":"Public","body":"self.class.new(_field, _min, _max)"}},{"html_id":"field:String-instance-method","name":"field","abstract":false,"def":{"name":"field","return_type":"String","visibility":"Public","body":"@field"}},{"html_id":"max:String-instance-method","name":"max","abstract":false,"def":{"name":"max","return_type":"String","visibility":"Public","body":"@max"}},{"html_id":"min:String-instance-method","name":"min","abstract":false,"def":{"name":"min","return_type":"String","visibility":"Public","body":"@min"}}]},{"html_id":"redis/Redis/FullText/GeoFilter","path":"Redis/FullText/GeoFilter.html","kind":"struct","full_name":"Redis::FullText::GeoFilter","name":"GeoFilter","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/search.cr","line_number":327,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L327"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/FullText","kind":"struct","full_name":"Redis::FullText(Runnable)","name":"FullText"},"constructors":[{"html_id":"new(field:String,longitude:Float64,latitude:Float64,radius:Int64|Float64,unit:GeoUnit)-class-method","name":"new","abstract":false,"args":[{"name":"field","external_name":"field","restriction":"String"},{"name":"longitude","external_name":"longitude","restriction":"Float64"},{"name":"latitude","external_name":"latitude","restriction":"Float64"},{"name":"radius","external_name":"radius","restriction":"Int64 | Float64"},{"name":"unit","external_name":"unit","restriction":"GeoUnit"}],"args_string":"(field : String, longitude : Float64, latitude : Float64, radius : Int64 | Float64, unit : GeoUnit)","args_html":"(field : String, longitude : Float64, latitude : Float64, radius : Int64 | Float64, unit : GeoUnit)","location":{"filename":"src/search.cr","line_number":327,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L327"},"def":{"name":"new","args":[{"name":"field","external_name":"field","restriction":"String"},{"name":"longitude","external_name":"longitude","restriction":"Float64"},{"name":"latitude","external_name":"latitude","restriction":"Float64"},{"name":"radius","external_name":"radius","restriction":"Int64 | Float64"},{"name":"unit","external_name":"unit","restriction":"GeoUnit"}],"visibility":"Public","body":"_ = allocate\n_.initialize(field, longitude, latitude, radius, unit)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/search.cr","line_number":327,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L327"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@field.clone, @longitude.clone, @latitude.clone, @radius.clone, @unit.clone)"}},{"html_id":"copy_with(field_field=@field,longitude_longitude=@longitude,latitude_latitude=@latitude,radius_radius=@radius,unit_unit=@unit)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_field","default_value":"@field","external_name":"field","restriction":""},{"name":"_longitude","default_value":"@longitude","external_name":"longitude","restriction":""},{"name":"_latitude","default_value":"@latitude","external_name":"latitude","restriction":""},{"name":"_radius","default_value":"@radius","external_name":"radius","restriction":""},{"name":"_unit","default_value":"@unit","external_name":"unit","restriction":""}],"args_string":"(field _field = @field, longitude _longitude = @longitude, latitude _latitude = @latitude, radius _radius = @radius, unit _unit = @unit)","args_html":"(field _field = @field, longitude _longitude = @longitude, latitude _latitude = @latitude, radius _radius = @radius, unit _unit = @unit)","location":{"filename":"src/search.cr","line_number":327,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L327"},"def":{"name":"copy_with","args":[{"name":"_field","default_value":"@field","external_name":"field","restriction":""},{"name":"_longitude","default_value":"@longitude","external_name":"longitude","restriction":""},{"name":"_latitude","default_value":"@latitude","external_name":"latitude","restriction":""},{"name":"_radius","default_value":"@radius","external_name":"radius","restriction":""},{"name":"_unit","default_value":"@unit","external_name":"unit","restriction":""}],"visibility":"Public","body":"self.class.new(_field, _longitude, _latitude, _radius, _unit)"}},{"html_id":"field:String-instance-method","name":"field","abstract":false,"def":{"name":"field","return_type":"String","visibility":"Public","body":"@field"}},{"html_id":"latitude:Float64-instance-method","name":"latitude","abstract":false,"def":{"name":"latitude","return_type":"Float64","visibility":"Public","body":"@latitude"}},{"html_id":"longitude:Float64-instance-method","name":"longitude","abstract":false,"def":{"name":"longitude","return_type":"Float64","visibility":"Public","body":"@longitude"}},{"html_id":"radius:Int64|Float64-instance-method","name":"radius","abstract":false,"def":{"name":"radius","return_type":"Int64 | Float64","visibility":"Public","body":"@radius"}},{"html_id":"unit:GeoUnit-instance-method","name":"unit","abstract":false,"def":{"name":"unit","return_type":"GeoUnit","visibility":"Public","body":"@unit"}}]},{"html_id":"redis/Redis/FullText/GeoUnit","path":"Redis/FullText/GeoUnit.html","kind":"enum","full_name":"Redis::FullText::GeoUnit","name":"GeoUnit","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/search.cr","line_number":45,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L45"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"M","name":"M","value":"0"},{"id":"KM","name":"KM","value":"1"},{"id":"MI","name":"MI","value":"2"},{"id":"FT","name":"FT","value":"3"}],"namespace":{"html_id":"redis/Redis/FullText","kind":"struct","full_name":"Redis::FullText(Runnable)","name":"FullText"},"doc":"Pass to the `search` method's `geofilter` argument to filter within the\nspecified range. For example, to search for pizza places within 25 miles\nof the Baltimore Ravens stadium:\n\n```\nredis.ft.search \"places-index\", \"pizza\",\n geofilter: {\"location\", -76.622400, 39.277751, 25, :mi}\n```","summary":"

    Pass to the search method's geofilter argument to filter within the specified range.

    ","instance_methods":[{"html_id":"ft?-instance-method","name":"ft?","abstract":false,"location":{"filename":"src/search.cr","line_number":49,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L49"},"def":{"name":"ft?","visibility":"Public","body":"self == FT"}},{"html_id":"km?-instance-method","name":"km?","abstract":false,"location":{"filename":"src/search.cr","line_number":47,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L47"},"def":{"name":"km?","visibility":"Public","body":"self == KM"}},{"html_id":"m?-instance-method","name":"m?","abstract":false,"location":{"filename":"src/search.cr","line_number":46,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L46"},"def":{"name":"m?","visibility":"Public","body":"self == M"}},{"html_id":"mi?-instance-method","name":"mi?","abstract":false,"location":{"filename":"src/search.cr","line_number":48,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L48"},"def":{"name":"mi?","visibility":"Public","body":"self == MI"}}]},{"html_id":"redis/Redis/FullText/Highlight","path":"Redis/FullText/Highlight.html","kind":"struct","full_name":"Redis::FullText::Highlight","name":"Highlight","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/search.cr","line_number":296,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L296"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/FullText","kind":"struct","full_name":"Redis::FullText(Runnable)","name":"FullText"},"constructors":[{"html_id":"new(fields:Array(String)|Nil=nil,tags:Tuple(String,String)|Nil=nil)-class-method","name":"new","abstract":false,"args":[{"name":"fields","default_value":"nil","external_name":"fields","restriction":"Array(String) | ::Nil"},{"name":"tags","default_value":"nil","external_name":"tags","restriction":"::Tuple(String, String) | ::Nil"}],"args_string":"(fields : Array(String) | Nil = nil, tags : Tuple(String, String) | Nil = nil)","args_html":"(fields : Array(String) | Nil = nil, tags : Tuple(String, String) | Nil = nil)","location":{"filename":"src/search.cr","line_number":296,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L296"},"def":{"name":"new","args":[{"name":"fields","default_value":"nil","external_name":"fields","restriction":"Array(String) | ::Nil"},{"name":"tags","default_value":"nil","external_name":"tags","restriction":"::Tuple(String, String) | ::Nil"}],"visibility":"Public","body":"_ = allocate\n_.initialize(fields, tags)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/search.cr","line_number":296,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L296"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@fields.clone, @tags.clone)"}},{"html_id":"copy_with(fields_fields=@fields,tags_tags=@tags)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_fields","default_value":"@fields","external_name":"fields","restriction":""},{"name":"_tags","default_value":"@tags","external_name":"tags","restriction":""}],"args_string":"(fields _fields = @fields, tags _tags = @tags)","args_html":"(fields _fields = @fields, tags _tags = @tags)","location":{"filename":"src/search.cr","line_number":296,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L296"},"def":{"name":"copy_with","args":[{"name":"_fields","default_value":"@fields","external_name":"fields","restriction":""},{"name":"_tags","default_value":"@tags","external_name":"tags","restriction":""}],"visibility":"Public","body":"self.class.new(_fields, _tags)"}},{"html_id":"fields:Array(String)|Nil-instance-method","name":"fields","abstract":false,"def":{"name":"fields","return_type":"Array(String) | ::Nil","visibility":"Public","body":"@fields"}},{"html_id":"tags:Tuple(String,String)|Nil-instance-method","name":"tags","abstract":false,"def":{"name":"tags","return_type":"::Tuple(String, String) | ::Nil","visibility":"Public","body":"@tags"}}]},{"html_id":"redis/Redis/FullText/SortBy","path":"Redis/FullText/SortBy.html","kind":"struct","full_name":"Redis::FullText::SortBy","name":"SortBy","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/search.cr","line_number":35,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L35"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/FullText","kind":"struct","full_name":"Redis::FullText(Runnable)","name":"FullText"},"doc":"Pass to the `search` method's `sortby` argument to sort the results on the\ngiven attribute.\n\n```\nredis.ft.search \"people-index\", \"@name:Jamie\",\n sortby: Redis::FullText::SortBy.new(\"name\", :asc)\n```","summary":"

    Pass to the search method's sortby argument to sort the results on the given attribute.

    ","constructors":[{"html_id":"new(attribute:String,direction:SortDirection=:asc)-class-method","name":"new","abstract":false,"args":[{"name":"attribute","external_name":"attribute","restriction":"String"},{"name":"direction","default_value":":asc","external_name":"direction","restriction":"SortDirection"}],"args_string":"(attribute : String, direction : SortDirection = :asc)","args_html":"(attribute : String, direction : SortDirection = :asc)","location":{"filename":"src/search.cr","line_number":35,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L35"},"def":{"name":"new","args":[{"name":"attribute","external_name":"attribute","restriction":"String"},{"name":"direction","default_value":":asc","external_name":"direction","restriction":"SortDirection"}],"visibility":"Public","body":"_ = allocate\n_.initialize(attribute, direction)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"attribute:String-instance-method","name":"attribute","abstract":false,"def":{"name":"attribute","return_type":"String","visibility":"Public","body":"@attribute"}},{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/search.cr","line_number":35,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L35"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@attribute.clone, @direction.clone)"}},{"html_id":"copy_with(attribute_attribute=@attribute,direction_direction=@direction)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_attribute","default_value":"@attribute","external_name":"attribute","restriction":""},{"name":"_direction","default_value":"@direction","external_name":"direction","restriction":""}],"args_string":"(attribute _attribute = @attribute, direction _direction = @direction)","args_html":"(attribute _attribute = @attribute, direction _direction = @direction)","location":{"filename":"src/search.cr","line_number":35,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L35"},"def":{"name":"copy_with","args":[{"name":"_attribute","default_value":"@attribute","external_name":"attribute","restriction":""},{"name":"_direction","default_value":"@direction","external_name":"direction","restriction":""}],"visibility":"Public","body":"self.class.new(_attribute, _direction)"}},{"html_id":"direction:SortDirection-instance-method","name":"direction","abstract":false,"def":{"name":"direction","return_type":"SortDirection","visibility":"Public","body":"@direction"}}]},{"html_id":"redis/Redis/FullText/SortDirection","path":"Redis/FullText/SortDirection.html","kind":"enum","full_name":"Redis::FullText::SortDirection","name":"SortDirection","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/search.cr","line_number":53,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L53"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"ASC","name":"ASC","value":"0"},{"id":"DESC","name":"DESC","value":"1"}],"namespace":{"html_id":"redis/Redis/FullText","kind":"struct","full_name":"Redis::FullText(Runnable)","name":"FullText"},"doc":"Pass to a `SortBy` constructor to specify a fulltext search sort direction.","summary":"

    Pass to a SortBy constructor to specify a fulltext search sort direction.

    ","instance_methods":[{"html_id":"asc?-instance-method","name":"asc?","abstract":false,"location":{"filename":"src/search.cr","line_number":54,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L54"},"def":{"name":"asc?","visibility":"Public","body":"self == ASC"}},{"html_id":"desc?-instance-method","name":"desc?","abstract":false,"location":{"filename":"src/search.cr","line_number":55,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L55"},"def":{"name":"desc?","visibility":"Public","body":"self == DESC"}}]},{"html_id":"redis/Redis/FullText/Summarize","path":"Redis/FullText/Summarize.html","kind":"struct","full_name":"Redis::FullText::Summarize","name":"Summarize","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/search.cr","line_number":289,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L289"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/FullText","kind":"struct","full_name":"Redis::FullText(Runnable)","name":"FullText"},"constructors":[{"html_id":"new(fields:Array(String)|Nil=nil,frags:Int32|Nil=nil,len:Int32|Nil=nil,separator:String|Nil=nil)-class-method","name":"new","abstract":false,"args":[{"name":"fields","default_value":"nil","external_name":"fields","restriction":"Array(String) | ::Nil"},{"name":"frags","default_value":"nil","external_name":"frags","restriction":"Int32 | ::Nil"},{"name":"len","default_value":"nil","external_name":"len","restriction":"Int32 | ::Nil"},{"name":"separator","default_value":"nil","external_name":"separator","restriction":"String | ::Nil"}],"args_string":"(fields : Array(String) | Nil = nil, frags : Int32 | Nil = nil, len : Int32 | Nil = nil, separator : String | Nil = nil)","args_html":"(fields : Array(String) | Nil = nil, frags : Int32 | Nil = nil, len : Int32 | Nil = nil, separator : String | Nil = nil)","location":{"filename":"src/search.cr","line_number":289,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L289"},"def":{"name":"new","args":[{"name":"fields","default_value":"nil","external_name":"fields","restriction":"Array(String) | ::Nil"},{"name":"frags","default_value":"nil","external_name":"frags","restriction":"Int32 | ::Nil"},{"name":"len","default_value":"nil","external_name":"len","restriction":"Int32 | ::Nil"},{"name":"separator","default_value":"nil","external_name":"separator","restriction":"String | ::Nil"}],"visibility":"Public","body":"_ = allocate\n_.initialize(fields, frags, len, separator)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/search.cr","line_number":289,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L289"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@fields.clone, @frags.clone, @len.clone, @separator.clone)"}},{"html_id":"copy_with(fields_fields=@fields,frags_frags=@frags,len_len=@len,separator_separator=@separator)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_fields","default_value":"@fields","external_name":"fields","restriction":""},{"name":"_frags","default_value":"@frags","external_name":"frags","restriction":""},{"name":"_len","default_value":"@len","external_name":"len","restriction":""},{"name":"_separator","default_value":"@separator","external_name":"separator","restriction":""}],"args_string":"(fields _fields = @fields, frags _frags = @frags, len _len = @len, separator _separator = @separator)","args_html":"(fields _fields = @fields, frags _frags = @frags, len _len = @len, separator _separator = @separator)","location":{"filename":"src/search.cr","line_number":289,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/search.cr#L289"},"def":{"name":"copy_with","args":[{"name":"_fields","default_value":"@fields","external_name":"fields","restriction":""},{"name":"_frags","default_value":"@frags","external_name":"frags","restriction":""},{"name":"_len","default_value":"@len","external_name":"len","restriction":""},{"name":"_separator","default_value":"@separator","external_name":"separator","restriction":""}],"visibility":"Public","body":"self.class.new(_fields, _frags, _len, _separator)"}},{"html_id":"fields:Array(String)|Nil-instance-method","name":"fields","abstract":false,"def":{"name":"fields","return_type":"Array(String) | ::Nil","visibility":"Public","body":"@fields"}},{"html_id":"frags:Int32|Nil-instance-method","name":"frags","abstract":false,"def":{"name":"frags","return_type":"Int32 | ::Nil","visibility":"Public","body":"@frags"}},{"html_id":"len:Int32|Nil-instance-method","name":"len","abstract":false,"def":{"name":"len","return_type":"Int32 | ::Nil","visibility":"Public","body":"@len"}},{"html_id":"separator:String|Nil-instance-method","name":"separator","abstract":false,"def":{"name":"separator","return_type":"String | ::Nil","visibility":"Public","body":"@separator"}}]}]},{"html_id":"redis/Redis/Future","path":"Redis/Future.html","kind":"class","full_name":"Redis::Future","name":"Future","abstract":false,"superclass":{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/pipeline.cr","line_number":33,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/pipeline.cr#L33"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"doc":"A `Redis::Future` is what pipelined commands return. They will be resolved\nwith the value of the command that spawned them.","summary":"

    A Redis::Future is what pipelined commands return.

    ","instance_methods":[{"html_id":"resolve(value:Value)-instance-method","name":"resolve","doc":"Resolves a Future with the supplied Redis::Value","summary":"

    Resolves a Future with the supplied Redis::Value

    ","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"Value"}],"args_string":"(value : Value)","args_html":"(value : Value)","location":{"filename":"src/pipeline.cr","line_number":38,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/pipeline.cr#L38"},"def":{"name":"resolve","args":[{"name":"value","external_name":"value","restriction":"Value"}],"visibility":"Public","body":"@resolved = true\n@value = value\n"}},{"html_id":"resolved?:Bool-instance-method","name":"resolved?","abstract":false,"location":{"filename":"src/pipeline.cr","line_number":35,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/pipeline.cr#L35"},"def":{"name":"resolved?","visibility":"Public","body":"@resolved"}},{"html_id":"value-instance-method","name":"value","doc":"Read the value contained in this Future after it is resolved. If this\nmethod is called before the Future is resolved, it will raise a\n`Redis::Future::NotResolved` exception.","summary":"

    Read the value contained in this Future after it is resolved.

    ","abstract":false,"location":{"filename":"src/pipeline.cr","line_number":46,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/pipeline.cr#L46"},"def":{"name":"value","visibility":"Public","body":"if resolved?\n @value\nelse\n raise(NotResolved.new(\"Attempted to get the value of an unresolved Redis::Future\"))\nend"}}],"types":[{"html_id":"redis/Redis/Future/NotResolved","path":"Redis/Future/NotResolved.html","kind":"class","full_name":"Redis::Future::NotResolved","name":"NotResolved","abstract":false,"superclass":{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},"ancestors":[{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/pipeline.cr","line_number":57,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/pipeline.cr#L57"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Future","kind":"class","full_name":"Redis::Future","name":"Future"},"doc":"A `Redis::Future::NotResolved` is raised when attempting to access the\nvalue of a `Future` that has not been resolved yet. For example, calling\n`pipeline.get(\"my-key\").value`.","summary":"

    A Redis::Future::NotResolved is raised when attempting to access the value of a Future that has not been resolved yet.

    "}]},{"html_id":"redis/Redis/Graph","path":"Redis/Graph.html","kind":"module","full_name":"Redis::Graph","name":"Graph","abstract":false,"locations":[{"filename":"src/graph.cr","line_number":57,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L57"},{"filename":"src/graph/cache.cr","line_number":3,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/cache.cr#L3"},{"filename":"src/graph/node.cr","line_number":5,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/node.cr#L5"},{"filename":"src/graph/relationship.cr","line_number":4,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/relationship.cr#L4"},{"filename":"src/graph/serializable.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/serializable.cr#L1"},{"filename":"src/graph/value.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/value.cr#L1"},{"filename":"src/graph/value_type.cr","line_number":6,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/value_type.cr#L6"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"doc":"[RedisGraph](https://redis.io/docs/stack/graph/) is a graph database built\non top of Redis that you query using the [Cypher](https://opencypher.org)\nquery language.\n\nIf your Redis server is running RedisGraph (for example, using [Redis\nStack](https://redis.io/docs/stack/)), you can branch off of your existing\n`Redis::Client` using the `Redis::Client#graph` method:\n\n```\nrequire \"redis/graph\"\n\nstruct Person\n include Redis::Graph::Serializable::Node\n\n getter id : Int64\n getter name : String\nend\n\nredis = Redis::Client.new\n\n# Store the graph data in the Redis key \"my-graph\"\ngraph = redis.graph(key: \"my-graph\")\n\n# Create some data in our graph\ngraph.write_query <<-CYPHER, id: 123, name: \"Jamie\"\n CREATE (person:Person{id: $id, name: $name})\nCYPHER\n\n# The `return` argument specifies the return types of the results in your\n# Cypher query's `RETURN` clause\npp graph.read_query(<<-CYPHER, {id: 123}, return: {Person})\n MATCH (person:Person{id: $id})\n RETURN person\nCYPHER\n# => [{Person(\n# @id=123,\n# @name=\"Jamie\",\n# @node=\n# Redis::Graph::Serializable::Node::Metadata(@id=0, @labels=[\"Person\"]))}]\n```\n\nIn addition to basic Redis property types, `Redis::Graph::Serializable` types\nalso support `Bool`, `UUID`, and `Time`.","summary":"

    RedisGraph is a graph database built on top of Redis that you query using the Cypher query language.

    \n

    EXPERIMENTAL The Redis::Graph API is experimental and may be subject to change.

    ","types":[{"html_id":"redis/Redis/Graph/Cache","path":"Redis/Graph/Cache.html","kind":"class","full_name":"Redis::Graph::Cache","name":"Cache","abstract":false,"superclass":{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph/cache.cr","line_number":4,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/cache.cr#L4"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"},"constructors":[{"html_id":"new(redis:Redis::Commands,key:String)-class-method","name":"new","abstract":false,"args":[{"name":"redis","external_name":"redis","restriction":"::Redis::Commands"},{"name":"key","external_name":"key","restriction":"::String"}],"args_string":"(redis : Redis::Commands, key : String)","args_html":"(redis : Redis::Commands, key : String)","location":{"filename":"src/graph/cache.cr","line_number":11,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/cache.cr#L11"},"def":{"name":"new","args":[{"name":"redis","external_name":"redis","restriction":"::Redis::Commands"},{"name":"key","external_name":"key","restriction":"::String"}],"visibility":"Public","body":"_ = allocate\n_.initialize(redis, key)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clear-instance-method","name":"clear","abstract":false,"location":{"filename":"src/graph/cache.cr","line_number":77,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/cache.cr#L77"},"def":{"name":"clear","visibility":"Public","body":"initialize(@redis, @key)"}},{"html_id":"key:String-instance-method","name":"key","abstract":false,"location":{"filename":"src/graph/cache.cr","line_number":6,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/cache.cr#L6"},"def":{"name":"key","return_type":"String","visibility":"Public","body":"@key"}},{"html_id":"label(label_id:Int64):String-instance-method","name":"label","abstract":false,"args":[{"name":"label_id","external_name":"label_id","restriction":"Int64"}],"args_string":"(label_id : Int64) : String","args_html":"(label_id : Int64) : String","location":{"filename":"src/graph/cache.cr","line_number":17,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/cache.cr#L17"},"def":{"name":"label","args":[{"name":"label_id","external_name":"label_id","restriction":"Int64"}],"return_type":"String","visibility":"Public","body":"@label_mutex.synchronize do\n @labels.fetch(label_id) do\n fetch_new(\"labels\", \"label\", @labels.size) do |row|\n @labels << (((row.as(Array))[0].as(Array))[1].as(String))\n end\n @labels[label_id]\n end\nend"}},{"html_id":"labels-instance-method","name":"labels","abstract":false,"location":{"filename":"src/graph/cache.cr","line_number":29,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/cache.cr#L29"},"def":{"name":"labels","visibility":"Public","body":"@label_mutex.synchronize do\n if @labels.empty?\n fetch_new(\"labels\", \"label\", @labels.size) do |row|\n @labels << (((row.as(Array))[0].as(Array))[1].as(String))\n end\n end\n @labels\nend"}},{"html_id":"properties-instance-method","name":"properties","abstract":false,"location":{"filename":"src/graph/cache.cr","line_number":53,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/cache.cr#L53"},"def":{"name":"properties","visibility":"Public","body":"@property_mutex.synchronize do\n if @properties.empty?\n refresh_properties\n end\n @properties\nend"}},{"html_id":"property(property_id:Int64):String-instance-method","name":"property","abstract":false,"args":[{"name":"property_id","external_name":"property_id","restriction":"Int64"}],"args_string":"(property_id : Int64) : String","args_html":"(property_id : Int64) : String","location":{"filename":"src/graph/cache.cr","line_number":61,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/cache.cr#L61"},"def":{"name":"property","args":[{"name":"property_id","external_name":"property_id","restriction":"Int64"}],"return_type":"String","visibility":"Public","body":"@property_mutex.synchronize do\n @properties.fetch(property_id) do\n refresh_properties\n @properties[property_id]\n end\nend"}},{"html_id":"redis:Commands-instance-method","name":"redis","abstract":false,"location":{"filename":"src/graph/cache.cr","line_number":5,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/cache.cr#L5"},"def":{"name":"redis","return_type":"Commands","visibility":"Public","body":"@redis"}},{"html_id":"refresh_properties:Nil-instance-method","name":"refresh_properties","abstract":false,"location":{"filename":"src/graph/cache.cr","line_number":71,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/cache.cr#L71"},"def":{"name":"refresh_properties","return_type":"Nil","visibility":"Public","body":"fetch_new(\"propertyKeys\", \"propertyKey\", @properties.size) do |row|\n @properties << (((row.as(Array))[0].as(Array))[1].as(String))\nend"}},{"html_id":"relationship_types-instance-method","name":"relationship_types","abstract":false,"location":{"filename":"src/graph/cache.cr","line_number":41,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/cache.cr#L41"},"def":{"name":"relationship_types","visibility":"Public","body":"@relationship_mutex.synchronize do\n if @relationship_types.empty?\n fetch_new(\"relationshipTypes\", \"relationshipType\", @relationship_types.size) do |row|\n @relationship_types << (((row.as(Array))[0].as(Array))[1].as(String))\n end\n end\n @relationship_types\nend"}}]},{"html_id":"redis/Redis/Graph/Client","path":"Redis/Graph/Client.html","kind":"struct","full_name":"Redis::Graph::Client(Runnable)","name":"Client","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph.cr","line_number":61,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L61"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"},"constructors":[{"html_id":"new(redis:Runnable,key:String,cache:Redis::Graph::Cache=Cache.new(redis,key))-class-method","name":"new","abstract":false,"args":[{"name":"redis","external_name":"redis","restriction":"Runnable"},{"name":"key","external_name":"key","restriction":"String"},{"name":"cache","default_value":"Cache.new(redis, key)","external_name":"cache","restriction":"::Redis::Graph::Cache"}],"args_string":"(redis : Runnable, key : String, cache : Redis::Graph::Cache = Cache.new(redis, key))","args_html":"(redis : Runnable, key : String, cache : Redis::Graph::Cache = Cache.new(redis, key))","location":{"filename":"src/graph.cr","line_number":64,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L64"},"def":{"name":"new","args":[{"name":"redis","external_name":"redis","restriction":"Runnable"},{"name":"key","external_name":"key","restriction":"String"},{"name":"cache","default_value":"Cache.new(redis, key)","external_name":"cache","restriction":"::Redis::Graph::Cache"}],"visibility":"Public","body":"_ = Client(Runnable).allocate\n_.initialize(redis, key, cache)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"cache:Cache-instance-method","name":"cache","abstract":false,"location":{"filename":"src/graph.cr","line_number":62,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L62"},"def":{"name":"cache","return_type":"Cache","visibility":"Public","body":"@cache"}},{"html_id":"constraints-instance-method","name":"constraints","abstract":false,"location":{"filename":"src/graph.cr","line_number":217,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L217"},"def":{"name":"constraints","visibility":"Public","body":"Constraints.new(self, @redis, @key, cache)"}},{"html_id":"delete!-instance-method","name":"delete!","abstract":false,"location":{"filename":"src/graph.cr","line_number":221,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L221"},"def":{"name":"delete!","visibility":"Public","body":"@redis.run({\"GRAPH.DELETE\", @key})"}},{"html_id":"execute(query:String)-instance-method","name":"execute","abstract":false,"args":[{"name":"query","external_name":"query","restriction":"String"}],"args_string":"(query : String)","args_html":"(query : String)","location":{"filename":"src/graph.cr","line_number":249,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L249"},"def":{"name":"execute","args":[{"name":"query","external_name":"query","restriction":"String"}],"visibility":"Public","body":"begin\n (@redis.run({\"GRAPH.QUERY\", @key, query, \"--compact\"})).as(Array)\nrescue ex : Redis::Error\n if (message = ex.message) && (match = message.match(/unique constraint violation on (node|edge) of type (\\w+)/))\n raise(ConstraintViolation.new(\"property set on #{match[1]} with type #{match[2]} violates a constraint\", cause: ex))\n else\n raise(ex)\n end\nend"}},{"html_id":"explain(cypher:String,params)-instance-method","name":"explain","abstract":false,"args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"params","external_name":"params","restriction":""}],"args_string":"(cypher : String, params)","args_html":"(cypher : String, params)","location":{"filename":"src/graph.cr","line_number":205,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L205"},"def":{"name":"explain","args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"params","external_name":"params","restriction":""}],"visibility":"Public","body":"explain(build_query(cypher, params))"}},{"html_id":"explain(cypher:String)-instance-method","name":"explain","abstract":false,"args":[{"name":"cypher","external_name":"cypher","restriction":"String"}],"args_string":"(cypher : String)","args_html":"(cypher : String)","location":{"filename":"src/graph.cr","line_number":209,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L209"},"def":{"name":"explain","args":[{"name":"cypher","external_name":"cypher","restriction":"String"}],"visibility":"Public","body":"(@redis.run({\"GRAPH.EXPLAIN\", @key, cypher, \"--compact\"})).as(Array)"}},{"html_id":"indices-instance-method","name":"indices","abstract":false,"location":{"filename":"src/graph.cr","line_number":213,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L213"},"def":{"name":"indices","visibility":"Public","body":"Indices.new(self)"}},{"html_id":"multi(&)-instance-method","name":"multi","doc":"Execute a transaction within the given graph\n\n```\ngraph.multi do |txn|\n txn.write_query <<-CYPHER, team_id: 123\n MATCH (\n CYPHER\nend\n```","summary":"

    Execute a transaction within the given graph

    \n

    EXPERIMENTAL This method may be difficult to use, since it relies primarily on Redis::Client#multi, which is not graph-aware. It is currently intended primarily to roll back previous writes if others do not succeed when a single query is not feasible. This may be iterated on in the future.

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":235,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L235"},"def":{"name":"multi","yields":1,"block_arity":1,"visibility":"Public","body":"@redis.multi do |txn|\n yield Client.new(txn.@connection, @key)\nend"}},{"html_id":"read_query(cypher:String,params:NamedTuple|Hash,returntypes:Tuple(*T))forallT-instance-method","name":"read_query","doc":"Query the graph with the given Cypher query, passing in the given\nparams, and returning the given types corresponding to the values in\nyour Cypher `RETURN` clause.\n\n```\ngraph.read_query <<-CYPHER, {team_id: 123}, return: {Person}\n MATCH (team:Team{id: $team_id})\n MATCH (person)-[:MEMBER_OF]->(team)\n RETURN person\nCYPHER\n```","summary":"

    Query the graph with the given Cypher query, passing in the given params, and returning the given types corresponding to the values in your Cypher RETURN clause.

    ","abstract":false,"args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"params","external_name":"params","restriction":"NamedTuple | Hash"},{"name":"types","external_name":"return","restriction":"Tuple(*T)"}],"args_string":"(cypher : String, params : NamedTuple | Hash, return types : Tuple(*T)) forall T","args_html":"(cypher : String, params : NamedTuple | Hash, return types : Tuple(*T)) forall T","location":{"filename":"src/graph.cr","line_number":189,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L189"},"def":{"name":"read_query","args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"params","external_name":"params","restriction":"NamedTuple | Hash"},{"name":"types","external_name":"return","restriction":"Tuple(*T)"}],"visibility":"Public","body":"{% if true %}\n ResultSet({ {{ (T.type_vars.map(&.instance).join(\", \")).id }} }).new(\n run(cypher, params),\n cache: cache,\n )\n {% end %}"}},{"html_id":"read_query(cypher:String,params:NamedTuple|Hash,returntype:T.class)forallT-instance-method","name":"read_query","abstract":false,"args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"params","external_name":"params","restriction":"NamedTuple | Hash"},{"name":"type","external_name":"return","restriction":"T.class"}],"args_string":"(cypher : String, params : NamedTuple | Hash, return type : T.class) forall T","args_html":"(cypher : String, params : NamedTuple | Hash, return type : T.class) forall T","location":{"filename":"src/graph.cr","line_number":198,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L198"},"def":{"name":"read_query","args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"params","external_name":"params","restriction":"NamedTuple | Hash"},{"name":"type","external_name":"return","restriction":"T.class"}],"visibility":"Public","body":"ResultSet(T).new(run(cypher, params), cache: cache)"}},{"html_id":"read_query(cypher:String,returntypes:T)forallT-instance-method","name":"read_query","abstract":false,"args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"types","external_name":"return","restriction":"T"}],"args_string":"(cypher : String, return types : T) forall T","args_html":"(cypher : String, return types : T) forall T","location":{"filename":"src/graph.cr","line_number":174,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L174"},"def":{"name":"read_query","args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"types","external_name":"return","restriction":"T"}],"visibility":"Public","body":"read_query(cypher, params: NamedTuple.new, return: types)"}},{"html_id":"read_query(cypher:String)-instance-method","name":"read_query","doc":"Query the graph with the given Cypher query.\n\n```\ngraph.read_query <<-CYPHER\n MATCH (person:Person)\n RETURN person\nCYPHER\n```","summary":"

    Query the graph with the given Cypher query.

    ","abstract":false,"args":[{"name":"cypher","external_name":"cypher","restriction":"String"}],"args_string":"(cypher : String)","args_html":"(cypher : String)","location":{"filename":"src/graph.cr","line_number":153,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L153"},"def":{"name":"read_query","args":[{"name":"cypher","external_name":"cypher","restriction":"String"}],"visibility":"Public","body":"ResultSet(List).new(run(cypher), cache: cache)"}},{"html_id":"read_query(cypher:String,**params)-instance-method","name":"read_query","doc":"Query the graph with the given Cypher query, passing in the given\nparams.\n\n```\ngraph.read_query <<-CYPHER, team_id: 123\n MATCH (team:Team{id: $team_id})\n MATCH (person)-[membership:MEMBER_OF]->(team)\n RETURN person, membership, team\nCYPHER\n```","summary":"

    Query the graph with the given Cypher query, passing in the given params.

    ","abstract":false,"args":[{"name":"cypher","external_name":"cypher","restriction":"String"}],"args_string":"(cypher : String, **params)","args_html":"(cypher : String, **params)","location":{"filename":"src/graph.cr","line_number":170,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L170"},"def":{"name":"read_query","args":[{"name":"cypher","external_name":"cypher","restriction":"String"}],"double_splat":{"name":"params","external_name":"params","restriction":""},"visibility":"Public","body":"read_query(cypher, params: params, return: List)"}},{"html_id":"run(cypher:String,params)-instance-method","name":"run","abstract":false,"args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"params","external_name":"params","restriction":""}],"args_string":"(cypher : String, params)","args_html":"(cypher : String, params)","location":{"filename":"src/graph.cr","line_number":245,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L245"},"def":{"name":"run","args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"params","external_name":"params","restriction":""}],"visibility":"Public","body":"execute(build_query(cypher, params))"}},{"html_id":"run(cypher:String)-instance-method","name":"run","abstract":false,"args":[{"name":"cypher","external_name":"cypher","restriction":"String"}],"args_string":"(cypher : String)","args_html":"(cypher : String)","location":{"filename":"src/graph.cr","line_number":241,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L241"},"def":{"name":"run","args":[{"name":"cypher","external_name":"cypher","restriction":"String"}],"visibility":"Public","body":"execute(cypher)"}},{"html_id":"write_query(cypher:String,params:NamedTuple|Hash,returntypes:Tuple(*T))forallT-instance-method","name":"write_query","doc":"Write data to the graph using the given cypher query, passing in the\ngiven params and returning the given types for the values in your\nquery's `RETURN` clause.\n\n```\ngraph.write_query <<-CYPHER, {id: 123, now: Time.utc.to_unix_ms}, return: {Person}\n MATCH (person:Person{id: $id})\n SET person.confirmed_at = $now\n RETURN person\nCYPHER\n```","summary":"

    Write data to the graph using the given cypher query, passing in the given params and returning the given types for the values in your query's RETURN clause.

    ","abstract":false,"args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"params","external_name":"params","restriction":"NamedTuple | Hash"},{"name":"types","external_name":"return","restriction":"Tuple(*T)"}],"args_string":"(cypher : String, params : NamedTuple | Hash, return types : Tuple(*T)) forall T","args_html":"(cypher : String, params : NamedTuple | Hash, return types : Tuple(*T)) forall T","location":{"filename":"src/graph.cr","line_number":129,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L129"},"def":{"name":"write_query","args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"params","external_name":"params","restriction":"NamedTuple | Hash"},{"name":"types","external_name":"return","restriction":"Tuple(*T)"}],"visibility":"Public","body":"{% if true %}\n ResultSet({ {{ (T.type_vars.map(&.instance).join(\", \")).id }} }).new(\n run(cypher, params),\n cache: cache\n )\n {% end %}"}},{"html_id":"write_query(cypher:String,params:NamedTuple|Hash,returntype:T.class)forallT-instance-method","name":"write_query","abstract":false,"args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"params","external_name":"params","restriction":"NamedTuple | Hash"},{"name":"type","external_name":"return","restriction":"T.class"}],"args_string":"(cypher : String, params : NamedTuple | Hash, return type : T.class) forall T","args_html":"(cypher : String, params : NamedTuple | Hash, return type : T.class) forall T","location":{"filename":"src/graph.cr","line_number":138,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L138"},"def":{"name":"write_query","args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"params","external_name":"params","restriction":"NamedTuple | Hash"},{"name":"type","external_name":"return","restriction":"T.class"}],"visibility":"Public","body":"ResultSet(T).new(run(cypher, params), cache: cache)"}},{"html_id":"write_query(cypher:String,returntypes:Tuple(*T))forallT-instance-method","name":"write_query","doc":"Write data to the graph using the given cypher query, passing in the\ngiven params and returning the given types for the values in your\nquery's `RETURN` clause.\n\n```\ngraph.write_query <<-CYPHER, {id: 123, now: Time.utc.to_unix_ms}, return: {Person}\n MATCH (person:Person{id: $id})\n SET person.confirmed_at = $now\n RETURN person\nCYPHER\n```","summary":"

    Write data to the graph using the given cypher query, passing in the given params and returning the given types for the values in your query's RETURN clause.

    ","abstract":false,"args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"types","external_name":"return","restriction":"Tuple(*T)"}],"args_string":"(cypher : String, return types : Tuple(*T)) forall T","args_html":"(cypher : String, return types : Tuple(*T)) forall T","location":{"filename":"src/graph.cr","line_number":102,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L102"},"def":{"name":"write_query","args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"types","external_name":"return","restriction":"Tuple(*T)"}],"visibility":"Public","body":"{% if true %}\n ResultSet({ {{ (T.type_vars.map(&.instance).join(\", \")).id }} }).new(\n run(cypher),\n cache: cache\n )\n {% end %}"}},{"html_id":"write_query(cypher:String,returntypes:T.class)forallT-instance-method","name":"write_query","abstract":false,"args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"types","external_name":"return","restriction":"T.class"}],"args_string":"(cypher : String, return types : T.class) forall T","args_html":"(cypher : String, return types : T.class) forall T","location":{"filename":"src/graph.cr","line_number":111,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L111"},"def":{"name":"write_query","args":[{"name":"cypher","external_name":"cypher","restriction":"String"},{"name":"types","external_name":"return","restriction":"T.class"}],"visibility":"Public","body":"ResultSet(T).new(run(cypher), cache: cache)"}},{"html_id":"write_query(cypher:String)-instance-method","name":"write_query","doc":"Write data to this graph using the given Cypher query.\n\n```\ngraph.write_query \"MATCH (u:User{active: true}) SET u:ActiveUser, u.active = null\"\n```","summary":"

    Write data to this graph using the given Cypher query.

    ","abstract":false,"args":[{"name":"cypher","external_name":"cypher","restriction":"String"}],"args_string":"(cypher : String)","args_html":"(cypher : String)","location":{"filename":"src/graph.cr","line_number":72,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L72"},"def":{"name":"write_query","args":[{"name":"cypher","external_name":"cypher","restriction":"String"}],"visibility":"Public","body":"ResultSet(List).new(run(cypher), cache: cache)"}},{"html_id":"write_query(cypher:String,**params)-instance-method","name":"write_query","doc":"Write data to this graph using the given Cypher query.\n\n```\ngraph.write_query \"MATCH (u:User{active: $active}) SET u:ActiveUser, u.active = null\", active: active\n```","summary":"

    Write data to this graph using the given Cypher query.

    ","abstract":false,"args":[{"name":"cypher","external_name":"cypher","restriction":"String"}],"args_string":"(cypher : String, **params)","args_html":"(cypher : String, **params)","location":{"filename":"src/graph.cr","line_number":84,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L84"},"def":{"name":"write_query","args":[{"name":"cypher","external_name":"cypher","restriction":"String"}],"double_splat":{"name":"params","external_name":"params","restriction":""},"visibility":"Public","body":"ResultSet(List).new(run(cypher, params), cache: cache)"}}]},{"html_id":"redis/Redis/Graph/Constraints","path":"Redis/Graph/Constraints.html","kind":"struct","full_name":"Redis::Graph::Constraints(T)","name":"Constraints","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph/constraints.cr","line_number":3,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/constraints.cr#L3"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"},"constructors":[{"html_id":"new(graph:Graph::Client(T),redis:T,key:String,cache:Cache)-class-method","name":"new","abstract":false,"args":[{"name":"graph","external_name":"graph","restriction":"Graph::Client(T)"},{"name":"redis","external_name":"redis","restriction":"T"},{"name":"key","external_name":"key","restriction":"String"},{"name":"cache","external_name":"cache","restriction":"Cache"}],"args_string":"(graph : Graph::Client(T), redis : T, key : String, cache : Cache)","args_html":"(graph : Graph::Client(T), redis : T, key : String, cache : Cache)","location":{"filename":"src/graph/constraints.cr","line_number":3,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/constraints.cr#L3"},"def":{"name":"new","args":[{"name":"graph","external_name":"graph","restriction":"Graph::Client(T)"},{"name":"redis","external_name":"redis","restriction":"T"},{"name":"key","external_name":"key","restriction":"String"},{"name":"cache","external_name":"cache","restriction":"Cache"}],"visibility":"Public","body":"_ = Constraints(T).allocate\n_.initialize(graph, redis, key, cache)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"cache:Cache-instance-method","name":"cache","abstract":false,"def":{"name":"cache","return_type":"Cache","visibility":"Public","body":"@cache"}},{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/graph/constraints.cr","line_number":3,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/constraints.cr#L3"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@graph.clone, @redis.clone, @key.clone, @cache.clone)"}},{"html_id":"copy_with(graph_graph=@graph,redis_redis=@redis,key_key=@key,cache_cache=@cache)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_graph","default_value":"@graph","external_name":"graph","restriction":""},{"name":"_redis","default_value":"@redis","external_name":"redis","restriction":""},{"name":"_key","default_value":"@key","external_name":"key","restriction":""},{"name":"_cache","default_value":"@cache","external_name":"cache","restriction":""}],"args_string":"(graph _graph = @graph, redis _redis = @redis, key _key = @key, cache _cache = @cache)","args_html":"(graph _graph = @graph, redis _redis = @redis, key _key = @key, cache _cache = @cache)","location":{"filename":"src/graph/constraints.cr","line_number":3,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/constraints.cr#L3"},"def":{"name":"copy_with","args":[{"name":"_graph","default_value":"@graph","external_name":"graph","restriction":""},{"name":"_redis","default_value":"@redis","external_name":"redis","restriction":""},{"name":"_key","default_value":"@key","external_name":"key","restriction":""},{"name":"_cache","default_value":"@cache","external_name":"cache","restriction":""}],"visibility":"Public","body":"self.class.new(_graph, _redis, _key, _cache)"}},{"html_id":"create(label_or_relationship_type,constraint_type:Type,entity_type:EntityType,property:String)-instance-method","name":"create","abstract":false,"args":[{"name":"label_or_relationship_type","external_name":"label_or_relationship_type","restriction":""},{"name":"constraint_type","external_name":"constraint_type","restriction":"Type"},{"name":"entity_type","external_name":"entity_type","restriction":"EntityType"},{"name":"property","external_name":"property","restriction":"String"}],"args_string":"(label_or_relationship_type, constraint_type : Type, entity_type : EntityType, property : String)","args_html":"(label_or_relationship_type, constraint_type : Type, entity_type : EntityType, property : String)","location":{"filename":"src/graph/constraints.cr","line_number":4,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/constraints.cr#L4"},"def":{"name":"create","args":[{"name":"label_or_relationship_type","external_name":"label_or_relationship_type","restriction":""},{"name":"constraint_type","external_name":"constraint_type","restriction":"Type"},{"name":"entity_type","external_name":"entity_type","restriction":"EntityType"},{"name":"property","external_name":"property","restriction":"String"}],"visibility":"Public","body":"create(label_or_relationship_type, constraint_type, entity_type, [property])"}},{"html_id":"create(label_or_relationship_type,constraint_type:Type,entity_type:EntityType,properties:Array(String))-instance-method","name":"create","abstract":false,"args":[{"name":"label_or_relationship_type","external_name":"label_or_relationship_type","restriction":""},{"name":"constraint_type","external_name":"constraint_type","restriction":"Type"},{"name":"entity_type","external_name":"entity_type","restriction":"EntityType"},{"name":"properties","external_name":"properties","restriction":"Array(String)"}],"args_string":"(label_or_relationship_type, constraint_type : Type, entity_type : EntityType, properties : Array(String))","args_html":"(label_or_relationship_type, constraint_type : Type, entity_type : EntityType, properties : Array(String))","location":{"filename":"src/graph/constraints.cr","line_number":8,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/constraints.cr#L8"},"def":{"name":"create","args":[{"name":"label_or_relationship_type","external_name":"label_or_relationship_type","restriction":""},{"name":"constraint_type","external_name":"constraint_type","restriction":"Type"},{"name":"entity_type","external_name":"entity_type","restriction":"EntityType"},{"name":"properties","external_name":"properties","restriction":"Array(String)"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 8 + properties.size)\n((command << \"graph.constraint\") << \"create\") << @key\n((command << constraint_type.to_s) << entity_type.to_s) << label_or_relationship_type\n(command << \"properties\") << properties.size.to_s\ncommand.concat(properties)\nresult = redis.run(command)\n"}},{"html_id":"graph:Graph::Client(T)-instance-method","name":"graph","abstract":false,"def":{"name":"graph","return_type":"Graph::Client(T)","visibility":"Public","body":"@graph"}},{"html_id":"key:String-instance-method","name":"key","abstract":false,"def":{"name":"key","return_type":"String","visibility":"Public","body":"@key"}},{"html_id":"list-instance-method","name":"list","abstract":false,"location":{"filename":"src/graph/constraints.cr","line_number":18,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/constraints.cr#L18"},"def":{"name":"list","visibility":"Public","body":"list_results(graph.write_query(\"CALL db.constraints() YIELD type, label, properties, entitytype, status\\nRETURN type, label, properties, entitytype, status\", return: {String, String, Array(String), String, String}))"}},{"html_id":"list(*,nodelabel:String)-instance-method","name":"list","abstract":false,"args":[{"name":"","external_name":"","restriction":""},{"name":"label","external_name":"node","restriction":"String"}],"args_string":"(*, node label : String)","args_html":"(*, node label : String)","location":{"filename":"src/graph/constraints.cr","line_number":25,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/constraints.cr#L25"},"def":{"name":"list","args":[{"name":"","external_name":"","restriction":""},{"name":"label","external_name":"node","restriction":"String"}],"splat_index":0,"visibility":"Public","body":"list_results(graph.write_query(\"CALL db.constraints() YIELD type, label, properties, entitytype, status\\nWHERE label = $label\\nAND entitytype = 'NODE'\\nRETURN type, label, properties, entitytype, status\", {label: label}, return: {String, String, Array(String), String, String}))"}},{"html_id":"list(*,relationshiptype:String)-instance-method","name":"list","abstract":false,"args":[{"name":"","external_name":"","restriction":""},{"name":"type","external_name":"relationship","restriction":"String"}],"args_string":"(*, relationship type : String)","args_html":"(*, relationship type : String)","location":{"filename":"src/graph/constraints.cr","line_number":34,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/constraints.cr#L34"},"def":{"name":"list","args":[{"name":"","external_name":"","restriction":""},{"name":"type","external_name":"relationship","restriction":"String"}],"splat_index":0,"visibility":"Public","body":"list_results(graph.write_query(\"CALL db.constraints() YIELD type, label, properties, entitytype, status\\nWHERE label = $label\\nAND entitytype = 'NODE'\\nRETURN type, label, properties, entitytype, status\", {label: label}, return: {String, String, Array(String), String, String}))"}},{"html_id":"redis:T-instance-method","name":"redis","abstract":false,"def":{"name":"redis","return_type":"T","visibility":"Public","body":"@redis"}}],"types":[{"html_id":"redis/Redis/Graph/Constraints/Constraint","path":"Redis/Graph/Constraints/Constraint.html","kind":"struct","full_name":"Redis::Graph::Constraints::Constraint","name":"Constraint","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph/constraints.cr","line_number":77,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/constraints.cr#L77"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph/Constraints","kind":"struct","full_name":"Redis::Graph::Constraints(T)","name":"Constraints"},"constructors":[{"html_id":"new(type:Type,label:String,properties:Array(String),entity_type:EntityType,status:Status)-class-method","name":"new","abstract":false,"args":[{"name":"type","external_name":"type","restriction":"Type"},{"name":"label","external_name":"label","restriction":"String"},{"name":"properties","external_name":"properties","restriction":"Array(String)"},{"name":"entity_type","external_name":"entity_type","restriction":"EntityType"},{"name":"status","external_name":"status","restriction":"Status"}],"args_string":"(type : Type, label : String, properties : Array(String), entity_type : EntityType, status : Status)","args_html":"(type : Type, label : String, properties : Array(String), entity_type : EntityType, status : Status)","location":{"filename":"src/graph/constraints.cr","line_number":77,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/constraints.cr#L77"},"def":{"name":"new","args":[{"name":"type","external_name":"type","restriction":"Type"},{"name":"label","external_name":"label","restriction":"String"},{"name":"properties","external_name":"properties","restriction":"Array(String)"},{"name":"entity_type","external_name":"entity_type","restriction":"EntityType"},{"name":"status","external_name":"status","restriction":"Status"}],"visibility":"Public","body":"_ = allocate\n_.initialize(type, label, properties, entity_type, status)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/graph/constraints.cr","line_number":77,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/constraints.cr#L77"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@type.clone, @label.clone, @properties.clone, @entity_type.clone, @status.clone)"}},{"html_id":"copy_with(type_type=@type,label_label=@label,properties_properties=@properties,entity_type_entity_type=@entity_type,status_status=@status)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_type","default_value":"@type","external_name":"type","restriction":""},{"name":"_label","default_value":"@label","external_name":"label","restriction":""},{"name":"_properties","default_value":"@properties","external_name":"properties","restriction":""},{"name":"_entity_type","default_value":"@entity_type","external_name":"entity_type","restriction":""},{"name":"_status","default_value":"@status","external_name":"status","restriction":""}],"args_string":"(type _type = @type, label _label = @label, properties _properties = @properties, entity_type _entity_type = @entity_type, status _status = @status)","args_html":"(type _type = @type, label _label = @label, properties _properties = @properties, entity_type _entity_type = @entity_type, status _status = @status)","location":{"filename":"src/graph/constraints.cr","line_number":77,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/constraints.cr#L77"},"def":{"name":"copy_with","args":[{"name":"_type","default_value":"@type","external_name":"type","restriction":""},{"name":"_label","default_value":"@label","external_name":"label","restriction":""},{"name":"_properties","default_value":"@properties","external_name":"properties","restriction":""},{"name":"_entity_type","default_value":"@entity_type","external_name":"entity_type","restriction":""},{"name":"_status","default_value":"@status","external_name":"status","restriction":""}],"visibility":"Public","body":"self.class.new(_type, _label, _properties, _entity_type, _status)"}},{"html_id":"entity_type:EntityType-instance-method","name":"entity_type","abstract":false,"def":{"name":"entity_type","return_type":"EntityType","visibility":"Public","body":"@entity_type"}},{"html_id":"label:String-instance-method","name":"label","abstract":false,"def":{"name":"label","return_type":"String","visibility":"Public","body":"@label"}},{"html_id":"properties:Array(String)-instance-method","name":"properties","abstract":false,"def":{"name":"properties","return_type":"Array(String)","visibility":"Public","body":"@properties"}},{"html_id":"status:Status-instance-method","name":"status","abstract":false,"def":{"name":"status","return_type":"Status","visibility":"Public","body":"@status"}},{"html_id":"type:Type-instance-method","name":"type","abstract":false,"def":{"name":"type","return_type":"Type","visibility":"Public","body":"@type"}}]},{"html_id":"redis/Redis/Graph/Constraints/EntityType","path":"Redis/Graph/Constraints/EntityType.html","kind":"enum","full_name":"Redis::Graph::Constraints::EntityType","name":"EntityType","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph/constraints.cr","line_number":66,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/constraints.cr#L66"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"NODE","name":"NODE","value":"0"},{"id":"RELATIONSHIP","name":"RELATIONSHIP","value":"1"}],"namespace":{"html_id":"redis/Redis/Graph/Constraints","kind":"struct","full_name":"Redis::Graph::Constraints(T)","name":"Constraints"},"instance_methods":[{"html_id":"node?-instance-method","name":"node?","abstract":false,"location":{"filename":"src/graph/constraints.cr","line_number":67,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/constraints.cr#L67"},"def":{"name":"node?","visibility":"Public","body":"self == NODE"}},{"html_id":"relationship?-instance-method","name":"relationship?","abstract":false,"location":{"filename":"src/graph/constraints.cr","line_number":68,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/constraints.cr#L68"},"def":{"name":"relationship?","visibility":"Public","body":"self == RELATIONSHIP"}}]},{"html_id":"redis/Redis/Graph/Constraints/Status","path":"Redis/Graph/Constraints/Status.html","kind":"enum","full_name":"Redis::Graph::Constraints::Status","name":"Status","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph/constraints.cr","line_number":71,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/constraints.cr#L71"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"UNDER_CONSTRUCTION","name":"UNDER_CONSTRUCTION","value":"0"},{"id":"OPERATIONAL","name":"OPERATIONAL","value":"1"},{"id":"FAILED","name":"FAILED","value":"2"}],"namespace":{"html_id":"redis/Redis/Graph/Constraints","kind":"struct","full_name":"Redis::Graph::Constraints(T)","name":"Constraints"},"instance_methods":[{"html_id":"failed?-instance-method","name":"failed?","abstract":false,"location":{"filename":"src/graph/constraints.cr","line_number":74,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/constraints.cr#L74"},"def":{"name":"failed?","visibility":"Public","body":"self == FAILED"}},{"html_id":"operational?-instance-method","name":"operational?","abstract":false,"location":{"filename":"src/graph/constraints.cr","line_number":73,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/constraints.cr#L73"},"def":{"name":"operational?","visibility":"Public","body":"self == OPERATIONAL"}},{"html_id":"under_construction?-instance-method","name":"under_construction?","abstract":false,"location":{"filename":"src/graph/constraints.cr","line_number":72,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/constraints.cr#L72"},"def":{"name":"under_construction?","visibility":"Public","body":"self == UNDER_CONSTRUCTION"}}]},{"html_id":"redis/Redis/Graph/Constraints/Type","path":"Redis/Graph/Constraints/Type.html","kind":"enum","full_name":"Redis::Graph::Constraints::Type","name":"Type","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph/constraints.cr","line_number":59,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/constraints.cr#L59"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"UNIQUE","name":"UNIQUE","value":"0"},{"id":"MANDATORY","name":"MANDATORY","value":"1"}],"namespace":{"html_id":"redis/Redis/Graph/Constraints","kind":"struct","full_name":"Redis::Graph::Constraints(T)","name":"Constraints"},"instance_methods":[{"html_id":"mandatory?-instance-method","name":"mandatory?","abstract":false,"location":{"filename":"src/graph/constraints.cr","line_number":63,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/constraints.cr#L63"},"def":{"name":"mandatory?","visibility":"Public","body":"self == MANDATORY"}},{"html_id":"unique?-instance-method","name":"unique?","abstract":false,"location":{"filename":"src/graph/constraints.cr","line_number":62,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/constraints.cr#L62"},"def":{"name":"unique?","visibility":"Public","body":"self == UNIQUE"}}]}]},{"html_id":"redis/Redis/Graph/ConstraintViolation","path":"Redis/Graph/ConstraintViolation.html","kind":"class","full_name":"Redis::Graph::ConstraintViolation","name":"ConstraintViolation","abstract":false,"superclass":{"html_id":"redis/Redis/Graph/Error","kind":"class","full_name":"Redis::Graph::Error","name":"Error"},"ancestors":[{"html_id":"redis/Redis/Graph/Error","kind":"class","full_name":"Redis::Graph::Error","name":"Error"},{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph.cr","line_number":501,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L501"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"}},{"html_id":"redis/Redis/Graph/Error","path":"Redis/Graph/Error.html","kind":"class","full_name":"Redis::Graph::Error","name":"Error","abstract":false,"superclass":{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},"ancestors":[{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph.cr","line_number":58,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L58"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"subclasses":[{"html_id":"redis/Redis/Graph/ConstraintViolation","kind":"class","full_name":"Redis::Graph::ConstraintViolation","name":"ConstraintViolation"},{"html_id":"redis/Redis/Graph/UnexpectedValue","kind":"class","full_name":"Redis::Graph::UnexpectedValue","name":"UnexpectedValue"}],"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"}},{"html_id":"redis/Redis/Graph/Field","path":"Redis/Graph/Field.html","kind":"annotation","full_name":"Redis::Graph::Field","name":"Field","abstract":false,"locations":[{"filename":"src/graph/serializable.cr","line_number":2,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/serializable.cr#L2"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"}},{"html_id":"redis/Redis/Graph/Indices","path":"Redis/Graph/Indices.html","kind":"struct","full_name":"Redis::Graph::Indices(T)","name":"Indices","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph/indices.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/indices.cr#L1"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"},"constructors":[{"html_id":"new(graph:Graph::Client(T))-class-method","name":"new","abstract":false,"args":[{"name":"graph","external_name":"graph","restriction":"Graph::Client(T)"}],"args_string":"(graph : Graph::Client(T))","args_html":"(graph : Graph::Client(T))","location":{"filename":"src/graph/indices.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/indices.cr#L1"},"def":{"name":"new","args":[{"name":"graph","external_name":"graph","restriction":"Graph::Client(T)"}],"visibility":"Public","body":"_ = Indices(T).allocate\n_.initialize(graph)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/graph/indices.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/indices.cr#L1"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@graph.clone)"}},{"html_id":"copy_with(graph_graph=@graph)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_graph","default_value":"@graph","external_name":"graph","restriction":""}],"args_string":"(graph _graph = @graph)","args_html":"(graph _graph = @graph)","location":{"filename":"src/graph/indices.cr","line_number":1,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/indices.cr#L1"},"def":{"name":"copy_with","args":[{"name":"_graph","default_value":"@graph","external_name":"graph","restriction":""}],"visibility":"Public","body":"self.class.new(_graph)"}},{"html_id":"create(label:String,property:String)-instance-method","name":"create","abstract":false,"args":[{"name":"label","external_name":"label","restriction":"String"},{"name":"property","external_name":"property","restriction":"String"}],"args_string":"(label : String, property : String)","args_html":"(label : String, property : String)","location":{"filename":"src/graph/indices.cr","line_number":2,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/indices.cr#L2"},"def":{"name":"create","args":[{"name":"label","external_name":"label","restriction":"String"},{"name":"property","external_name":"property","restriction":"String"}],"visibility":"Public","body":"create(label, {property})"}},{"html_id":"create(label:String,properties:Enumerable(String))-instance-method","name":"create","abstract":false,"args":[{"name":"label","external_name":"label","restriction":"String"},{"name":"properties","external_name":"properties","restriction":"Enumerable(String)"}],"args_string":"(label : String, properties : Enumerable(String))","args_html":"(label : String, properties : Enumerable(String))","location":{"filename":"src/graph/indices.cr","line_number":6,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/indices.cr#L6"},"def":{"name":"create","args":[{"name":"label","external_name":"label","restriction":"String"},{"name":"properties","external_name":"properties","restriction":"Enumerable(String)"}],"visibility":"Public","body":"cypher = String.build do |str|\n ((str << \"CREATE INDEX FOR (n:\") << label) << \") ON (\"\n properties.each_with_index(1) do |property, index|\n (str << \"n.\") << property\n if index < properties.size\n str << \", \"\n end\n end\n str << ')'\nend\nbegin\n graph.write_query(cypher)\nrescue ex : Redis::Error\n if (msg = ex.message) && (match = msg.match(/Attribute '(.*)' is already indexed/))\n raise(IndexAlreadyExists.new(\"Index on #{label.inspect} already indexes #{match[1].inspect}\"))\n else\n raise(ex)\n end\nend\n"}},{"html_id":"graph:Graph::Client(T)-instance-method","name":"graph","abstract":false,"def":{"name":"graph","return_type":"Graph::Client(T)","visibility":"Public","body":"@graph"}}],"types":[{"html_id":"redis/Redis/Graph/Indices/IndexAlreadyExists","path":"Redis/Graph/Indices/IndexAlreadyExists.html","kind":"class","full_name":"Redis::Graph::Indices::IndexAlreadyExists","name":"IndexAlreadyExists","abstract":false,"superclass":{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},"ancestors":[{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph/indices.cr","line_number":30,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/indices.cr#L30"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph/Indices","kind":"struct","full_name":"Redis::Graph::Indices(T)","name":"Indices"}}]},{"html_id":"redis/Redis/Graph/List","path":"Redis/Graph/List.html","kind":"alias","full_name":"Redis::Graph::List","name":"List","abstract":false,"locations":[{"filename":"src/graph/value.cr","line_number":11,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/value.cr#L11"}],"repository_name":"redis","program":false,"enum":false,"alias":true,"aliased":"Array(Redis::Graph::Value)","aliased_html":"Array(Redis::Graph::Value)","const":false,"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"}},{"html_id":"redis/Redis/Graph/Map","path":"Redis/Graph/Map.html","kind":"alias","full_name":"Redis::Graph::Map","name":"Map","abstract":false,"locations":[{"filename":"src/graph/value.cr","line_number":12,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/value.cr#L12"}],"repository_name":"redis","program":false,"enum":false,"alias":true,"aliased":"Hash(String, Redis::Graph::Value)","aliased_html":"Hash(String, Redis::Graph::Value)","const":false,"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"}},{"html_id":"redis/Redis/Graph/Node","path":"Redis/Graph/Node.html","kind":"struct","full_name":"Redis::Graph::Node","name":"Node","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph/node.cr","line_number":19,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/node.cr#L19"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"},"doc":"Represents a node in the graph.\n\n```\nresult = graph.read_query(<<-CYPHER)\n MATCH (u:User)\n RETURN u\nCYPHER\n\nresult.each do |(user)|\n user = user.as(Redis::Graph::Node)\n # ...\nend\n```","summary":"

    Represents a node in the graph.

    ","class_methods":[{"html_id":"from_redis_graph_value(type:ValueType,value,cache:Cache)-class-method","name":"from_redis_graph_value","abstract":false,"args":[{"name":"type","external_name":"type","restriction":"ValueType"},{"name":"value","external_name":"value","restriction":""},{"name":"cache","external_name":"cache","restriction":"Cache"}],"args_string":"(type : ValueType, value, cache : Cache)","args_html":"(type : ValueType, value, cache : Cache)","location":{"filename":"src/graph/node.cr","line_number":24,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/node.cr#L24"},"def":{"name":"from_redis_graph_value","args":[{"name":"type","external_name":"type","restriction":"ValueType"},{"name":"value","external_name":"value","restriction":""},{"name":"cache","external_name":"cache","restriction":"Cache"}],"visibility":"Public","body":"if type.node?\nelse\n raise(ArgumentError.new(\"Expected Node, got: #{value.inspect}\"))\nend\nfrom(value.as(Array), cache)\n"}},{"html_id":"matches_redis_graph_type?(type:Redis::Graph::ValueType):Bool-class-method","name":"matches_redis_graph_type?","abstract":false,"args":[{"name":"type","external_name":"type","restriction":"Redis::Graph::ValueType"}],"args_string":"(type : Redis::Graph::ValueType) : Bool","args_html":"(type : Redis::Graph::ValueType) : Bool","location":{"filename":"src/graph.cr","line_number":642,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L642"},"def":{"name":"matches_redis_graph_type?","args":[{"name":"type","external_name":"type","restriction":"Redis::Graph::ValueType"}],"return_type":"Bool","visibility":"Public","body":"type.node?"}}],"instance_methods":[{"html_id":"id:Int64-instance-method","name":"id","abstract":false,"location":{"filename":"src/graph/node.cr","line_number":20,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/node.cr#L20"},"def":{"name":"id","return_type":"Int64","visibility":"Public","body":"@id"}},{"html_id":"labels:Array(String)-instance-method","name":"labels","abstract":false,"location":{"filename":"src/graph/node.cr","line_number":21,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/node.cr#L21"},"def":{"name":"labels","return_type":"Array(String)","visibility":"Public","body":"@labels"}},{"html_id":"properties:Hash(String,Value)-instance-method","name":"properties","abstract":false,"location":{"filename":"src/graph/node.cr","line_number":22,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/node.cr#L22"},"def":{"name":"properties","return_type":"Hash(String, Value)","visibility":"Public","body":"@properties"}}]},{"html_id":"redis/Redis/Graph/Relationship","path":"Redis/Graph/Relationship.html","kind":"struct","full_name":"Redis::Graph::Relationship","name":"Relationship","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph/relationship.cr","line_number":18,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/relationship.cr#L18"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"},"doc":"Represents a relationship in your graph\n\n```\nresult = graph.read_query(<<-CYPHER)\n MATCH (:User)-[membership:MEMBER_OF]->(:Team)\n RETURN membership\nCYPHER\n\nresult.each do |(membership)|\n membership = membership.as(Redis::Graph::Relationship)\n # ...\nend\n```","summary":"

    Represents a relationship in your graph

    ","class_methods":[{"html_id":"matches_redis_graph_type?(type:Redis::Graph::ValueType):Bool-class-method","name":"matches_redis_graph_type?","abstract":false,"args":[{"name":"type","external_name":"type","restriction":"Redis::Graph::ValueType"}],"args_string":"(type : Redis::Graph::ValueType) : Bool","args_html":"(type : Redis::Graph::ValueType) : Bool","location":{"filename":"src/graph.cr","line_number":646,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L646"},"def":{"name":"matches_redis_graph_type?","args":[{"name":"type","external_name":"type","restriction":"Redis::Graph::ValueType"}],"return_type":"Bool","visibility":"Public","body":"type.edge?"}}],"constructors":[{"html_id":"new(id:Int64,type:String,src_node:Int64,dest_node:Int64,properties:Hash(String,Redis::Graph::Value))-class-method","name":"new","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"::Int64"},{"name":"type","external_name":"type","restriction":"::String"},{"name":"src_node","external_name":"src_node","restriction":"::Int64"},{"name":"dest_node","external_name":"dest_node","restriction":"::Int64"},{"name":"properties","external_name":"properties","restriction":"::Hash(::String, ::Redis::Graph::Value)"}],"args_string":"(id : Int64, type : String, src_node : Int64, dest_node : Int64, properties : Hash(String, Redis::Graph::Value))","args_html":"(id : Int64, type : String, src_node : Int64, dest_node : Int64, properties : Hash(String, Redis::Graph::Value))","location":{"filename":"src/graph/relationship.cr","line_number":84,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/relationship.cr#L84"},"def":{"name":"new","args":[{"name":"id","external_name":"id","restriction":"::Int64"},{"name":"type","external_name":"type","restriction":"::String"},{"name":"src_node","external_name":"src_node","restriction":"::Int64"},{"name":"dest_node","external_name":"dest_node","restriction":"::Int64"},{"name":"properties","external_name":"properties","restriction":"::Hash(::String, ::Redis::Graph::Value)"}],"visibility":"Public","body":"_ = allocate\n_.initialize(id, type, src_node, dest_node, properties)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"dest_node:Int64-instance-method","name":"dest_node","doc":"The node that this relationship points to, for example with\n`(person)-[membership]->(team)`, it will be the node id of `team`.\n\nWARNING: This will not match an `id` *property* of the destination node.","summary":"

    The node that this relationship points to, for example with (person)-[membership]->(team), it will be the node id of team.

    ","abstract":false,"location":{"filename":"src/graph/relationship.cr","line_number":41,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/relationship.cr#L41"},"def":{"name":"dest_node","return_type":"Int64","visibility":"Public","body":"@dest_node"}},{"html_id":"id:Int64-instance-method","name":"id","doc":"The identifier of the relationship.\n\nNOTE: If this relationship has an `id` property, this is *not* that.\nWARNING: Do not try to query against this. RedisGraph provides no\nguarantees that this relationship will be at the same offset it was at\nthe last time you queried it.","summary":"

    The identifier of the relationship.

    ","abstract":false,"location":{"filename":"src/graph/relationship.cr","line_number":25,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/relationship.cr#L25"},"def":{"name":"id","return_type":"Int64","visibility":"Public","body":"@id"}},{"html_id":"properties:Hash(String,Value)-instance-method","name":"properties","doc":"The hash of properties for this relationship.\n\n```\nresult = graph.write_query <<-CYPHER, now: Time.utc.to_unix_ms\n CREATE (person)-[membership{since: $now}]->(team)\n RETURN membership\nCYPHER\nresult.first.properties # => {\"since\" => 2022-05-15T05:48:23 UTC}\n```","summary":"

    The hash of properties for this relationship.

    ","abstract":false,"location":{"filename":"src/graph/relationship.cr","line_number":52,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/relationship.cr#L52"},"def":{"name":"properties","return_type":"Hash(String, Value)","visibility":"Public","body":"@properties"}},{"html_id":"src_node:Int64-instance-method","name":"src_node","doc":"The node that this relationship originates from, for example with\n`(person)-[membership]->(team)`, it will be the node id of `person`.\n\nWARNING: This will not match an `id` *property* of the source node.","summary":"

    The node that this relationship originates from, for example with (person)-[membership]->(team), it will be the node id of person.

    ","abstract":false,"location":{"filename":"src/graph/relationship.cr","line_number":35,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/relationship.cr#L35"},"def":{"name":"src_node","return_type":"Int64","visibility":"Public","body":"@src_node"}},{"html_id":"type:String-instance-method","name":"type","doc":"The type of relationship, for example with `[:MEMBER_OF]`, the `type`\nwill be `\"MEMBER_OF\"`.","summary":"

    The type of relationship, for example with [:MEMBER_OF], the #type will be "MEMBER_OF".

    ","abstract":false,"location":{"filename":"src/graph/relationship.cr","line_number":29,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/relationship.cr#L29"},"def":{"name":"type","return_type":"String","visibility":"Public","body":"@type"}}]},{"html_id":"redis/Redis/Graph/ResultSet","path":"Redis/Graph/ResultSet.html","kind":"struct","full_name":"Redis::Graph::ResultSet(T)","name":"ResultSet","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph.cr","line_number":308,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L308"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"redis/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"}],"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"},"constructors":[{"html_id":"new(*,fields:Array(String),rows:Array(T),cached_execution:Bool,duration:Time::Span,labels_added:Int64,labels_removed:Int64,nodes_created:Int64,nodes_deleted:Int64,relationships_created:Int64,relationships_deleted:Int64,properties_set:Int64,properties_removed:Int64,indices_created:Int64,indices_deleted:Int64)-class-method","name":"new","abstract":false,"args":[{"name":"","external_name":"","restriction":""},{"name":"fields","external_name":"fields","restriction":"::Array(::String)"},{"name":"rows","external_name":"rows","restriction":"::Array(T)"},{"name":"cached_execution","external_name":"cached_execution","restriction":"::Bool"},{"name":"duration","external_name":"duration","restriction":"::Time::Span"},{"name":"labels_added","external_name":"labels_added","restriction":"::Int64"},{"name":"labels_removed","external_name":"labels_removed","restriction":"::Int64"},{"name":"nodes_created","external_name":"nodes_created","restriction":"::Int64"},{"name":"nodes_deleted","external_name":"nodes_deleted","restriction":"::Int64"},{"name":"relationships_created","external_name":"relationships_created","restriction":"::Int64"},{"name":"relationships_deleted","external_name":"relationships_deleted","restriction":"::Int64"},{"name":"properties_set","external_name":"properties_set","restriction":"::Int64"},{"name":"properties_removed","external_name":"properties_removed","restriction":"::Int64"},{"name":"indices_created","external_name":"indices_created","restriction":"::Int64"},{"name":"indices_deleted","external_name":"indices_deleted","restriction":"::Int64"}],"args_string":"(*, fields : Array(String), rows : Array(T), cached_execution : Bool, duration : Time::Span, labels_added : Int64, labels_removed : Int64, nodes_created : Int64, nodes_deleted : Int64, relationships_created : Int64, relationships_deleted : Int64, properties_set : Int64, properties_removed : Int64, indices_created : Int64, indices_deleted : Int64)","args_html":"(*, fields : Array(String), rows : Array(T), cached_execution : Bool, duration : Time::Span, labels_added : Int64, labels_removed : Int64, nodes_created : Int64, nodes_deleted : Int64, relationships_created : Int64, relationships_deleted : Int64, properties_set : Int64, properties_removed : Int64, indices_created : Int64, indices_deleted : Int64)","location":{"filename":"src/graph.cr","line_number":433,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L433"},"def":{"name":"new","args":[{"name":"","external_name":"","restriction":""},{"name":"fields","external_name":"fields","restriction":"::Array(::String)"},{"name":"rows","external_name":"rows","restriction":"::Array(T)"},{"name":"cached_execution","external_name":"cached_execution","restriction":"::Bool"},{"name":"duration","external_name":"duration","restriction":"::Time::Span"},{"name":"labels_added","external_name":"labels_added","restriction":"::Int64"},{"name":"labels_removed","external_name":"labels_removed","restriction":"::Int64"},{"name":"nodes_created","external_name":"nodes_created","restriction":"::Int64"},{"name":"nodes_deleted","external_name":"nodes_deleted","restriction":"::Int64"},{"name":"relationships_created","external_name":"relationships_created","restriction":"::Int64"},{"name":"relationships_deleted","external_name":"relationships_deleted","restriction":"::Int64"},{"name":"properties_set","external_name":"properties_set","restriction":"::Int64"},{"name":"properties_removed","external_name":"properties_removed","restriction":"::Int64"},{"name":"indices_created","external_name":"indices_created","restriction":"::Int64"},{"name":"indices_deleted","external_name":"indices_deleted","restriction":"::Int64"}],"splat_index":0,"visibility":"Public","body":"_ = ResultSet(T).allocate\n_.initialize(fields: fields, rows: rows, cached_execution: cached_execution, duration: duration, labels_added: labels_added, labels_removed: labels_removed, nodes_created: nodes_created, nodes_deleted: nodes_deleted, relationships_created: relationships_created, relationships_deleted: relationships_deleted, properties_set: properties_set, properties_removed: properties_removed, indices_created: indices_created, indices_deleted: indices_deleted)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"cached_execution?:Bool-instance-method","name":"cached_execution?","doc":"Indicates whether the query was cached by RedisGraph","summary":"

    Indicates whether the query was cached by RedisGraph

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":316,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L316"},"def":{"name":"cached_execution?","return_type":"Bool","visibility":"Public","body":"@cached_execution"}},{"html_id":"duration:Time::Span-instance-method","name":"duration","doc":"How long it took RedisGraph to execute the query on the server side.","summary":"

    How long it took RedisGraph to execute the query on the server side.

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":318,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L318"},"def":{"name":"duration","return_type":"Time::Span","visibility":"Public","body":"@duration"}},{"html_id":"each(&)-instance-method","name":"each","doc":"Must yield this collection's elements to the block.","summary":"

    Must yield this collection's elements to the block.

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":467,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L467"},"def":{"name":"each","yields":1,"block_arity":1,"visibility":"Public","body":"@rows.each do |row|\n yield row\nend"}},{"html_id":"each_row(&)-instance-method","name":"each_row","doc":"Iterate over each of the results, yielding a tuple containing instances\nof the types in `T`.","summary":"

    Iterate over each of the results, yielding a tuple containing instances of the types in T.

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":454,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L454"},"def":{"name":"each_row","yields":1,"block_arity":1,"visibility":"Public","body":"field_map = Hash(String, Int32).new(initial_capacity: @fields.size)\n@fields.each_with_index do |field, index|\n field_map[field] = index\nend\n@rows.each do |row|\n yield Row.new(data: row, field_map: field_map)\nend\n"}},{"html_id":"fields:Array(String)-instance-method","name":"fields","doc":"The names of the fields in a query's `RETURN` clause","summary":"

    The names of the fields in a query's RETURN clause

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":312,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L312"},"def":{"name":"fields","return_type":"Array(String)","visibility":"Public","body":"@fields"}},{"html_id":"indices_created:Int64-instance-method","name":"indices_created","abstract":false,"location":{"filename":"src/graph.cr","line_number":335,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L335"},"def":{"name":"indices_created","return_type":"Int64","visibility":"Public","body":"@indices_created"}},{"html_id":"indices_deleted:Int64-instance-method","name":"indices_deleted","abstract":false,"location":{"filename":"src/graph.cr","line_number":336,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L336"},"def":{"name":"indices_deleted","return_type":"Int64","visibility":"Public","body":"@indices_deleted"}},{"html_id":"labels_added:Int64-instance-method","name":"labels_added","doc":"How many labels were added in this query","summary":"

    How many labels were added in this query

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":320,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L320"},"def":{"name":"labels_added","return_type":"Int64","visibility":"Public","body":"@labels_added"}},{"html_id":"labels_removed:Int64-instance-method","name":"labels_removed","doc":"How many labels were removed in this query","summary":"

    How many labels were removed in this query

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":322,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L322"},"def":{"name":"labels_removed","return_type":"Int64","visibility":"Public","body":"@labels_removed"}},{"html_id":"nodes_created:Int64-instance-method","name":"nodes_created","doc":"How many nodes were created in this query","summary":"

    How many nodes were created in this query

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":324,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L324"},"def":{"name":"nodes_created","return_type":"Int64","visibility":"Public","body":"@nodes_created"}},{"html_id":"nodes_deleted:Int64-instance-method","name":"nodes_deleted","doc":"How many nodes were deleted in this query","summary":"

    How many nodes were deleted in this query

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":326,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L326"},"def":{"name":"nodes_deleted","return_type":"Int64","visibility":"Public","body":"@nodes_deleted"}},{"html_id":"properties_removed:Int64-instance-method","name":"properties_removed","doc":"How many properties were removed in this query","summary":"

    How many properties were removed in this query

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":334,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L334"},"def":{"name":"properties_removed","return_type":"Int64","visibility":"Public","body":"@properties_removed"}},{"html_id":"properties_set:Int64-instance-method","name":"properties_set","doc":"How many properties were set in this query","summary":"

    How many properties were set in this query

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":332,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L332"},"def":{"name":"properties_set","return_type":"Int64","visibility":"Public","body":"@properties_set"}},{"html_id":"relationships_created:Int64-instance-method","name":"relationships_created","doc":"How many relationships were created in this query","summary":"

    How many relationships were created in this query

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":328,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L328"},"def":{"name":"relationships_created","return_type":"Int64","visibility":"Public","body":"@relationships_created"}},{"html_id":"relationships_deleted:Int64-instance-method","name":"relationships_deleted","doc":"How many relationships were deleted in this query","summary":"

    How many relationships were deleted in this query

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":330,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L330"},"def":{"name":"relationships_deleted","return_type":"Int64","visibility":"Public","body":"@relationships_deleted"}},{"html_id":"rows:Array(T)-instance-method","name":"rows","doc":"The values of the fields in a query's `RETURN` clause","summary":"

    The values of the fields in a query's RETURN clause

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":314,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L314"},"def":{"name":"rows","return_type":"Array(T)","visibility":"Public","body":"@rows"}},{"html_id":"size-instance-method","name":"size","doc":"Returns the number of elements in the collection.\n\n```\n[1, 2, 3, 4].size # => 4\n```","summary":"

    Returns the number of elements in the collection.

    ","abstract":false,"location":{"filename":"src/graph.cr","line_number":473,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L473"},"def":{"name":"size","visibility":"Public","body":"@rows.size"}}],"types":[{"html_id":"redis/Redis/Graph/ResultSet/Row","path":"Redis/Graph/ResultSet/Row.html","kind":"struct","full_name":"Redis::Graph::ResultSet::Row(T)","name":"Row","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph.cr","line_number":477,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L477"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph/ResultSet","kind":"struct","full_name":"Redis::Graph::ResultSet(T)","name":"ResultSet"},"constructors":[{"html_id":"new(data:T,field_map:Hash(String,Int32))-class-method","name":"new","abstract":false,"args":[{"name":"data","external_name":"data","restriction":"T"},{"name":"field_map","external_name":"field_map","restriction":"::Hash(::String, ::Int32)"}],"args_string":"(data : T, field_map : Hash(String, Int32))","args_html":"(data : T, field_map : Hash(String, Int32))","location":{"filename":"src/graph.cr","line_number":481,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L481"},"def":{"name":"new","args":[{"name":"data","external_name":"data","restriction":"T"},{"name":"field_map","external_name":"field_map","restriction":"::Hash(::String, ::Int32)"}],"visibility":"Public","body":"_ = Row(T).allocate\n_.initialize(data, field_map)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"[](key:Int)-instance-method","name":"[]","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"Int"}],"args_string":"(key : Int)","args_html":"(key : Int)","location":{"filename":"src/graph.cr","line_number":488,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L488"},"def":{"name":"[]","args":[{"name":"key","external_name":"key","restriction":"Int"}],"visibility":"Public","body":"@data[key]"}},{"html_id":"[](key:String)-instance-method","name":"[]","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/graph.cr","line_number":492,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L492"},"def":{"name":"[]","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"@data[@field_map[key]]"}},{"html_id":"data:T-instance-method","name":"data","abstract":false,"location":{"filename":"src/graph.cr","line_number":479,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L479"},"def":{"name":"data","return_type":"T","visibility":"Public","body":"@data"}},{"html_id":"first-instance-method","name":"first","abstract":false,"location":{"filename":"src/graph.cr","line_number":484,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L484"},"def":{"name":"first","visibility":"Public","body":"self[0]"}}]}]},{"html_id":"redis/Redis/Graph/Serializable","path":"Redis/Graph/Serializable.html","kind":"module","full_name":"Redis::Graph::Serializable","name":"Serializable","abstract":false,"locations":[{"filename":"src/graph/serializable.cr","line_number":52,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/serializable.cr#L52"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"},"doc":"The `Redis::Graph::Serializable::*` mixins tell `Redis::Graph::Client` how\nto deserialize nodes and relationships as your own Crystal object types,\nsimilar to [`DB::Serializable`](http://crystal-lang.github.io/crystal-db/api/0.11.0/DB/Serializable.html).\n\n```\nrequire \"redis/graph\"\n\nstruct Person\n include Redis::Graph::Serializable::Node\n\n getter id : UUID\n getter name : String\n getter created_at : Time\nend\n\nstruct Team\n include Redis::Graph::Serializable::Node\n\n getter name : String\nend\n\nstruct Membership\n include Redis::Graph::Serializable::Relationship\n\n getter since : Time\nend\n\nredis = Redis::Client.new\nredis.del \"my-graph\"\n\n# Store the graph data in the Redis key \"my-graph\"\ngraph = redis.graph(key: \"my-graph\")\n\nid = UUID.random\n\n# Create some data in our graph\npp graph.write_query <<-CYPHER, id: id, name: \"Jamie\", now: Time.utc.to_unix_ms, team_name: \"My Team\"\n CREATE (:Person{id: $id, name: $name, created_at: $now})-[:MEMBER_OF{since: $now}]->(team:Team{name: $team_name})\nCYPHER\n\n# The `return` argument specifies the return types of the results in your\n# Cypher query's `RETURN` clause\npp graph.read_query(<<-CYPHER, {id: id}, return: {Person, Membership, Team})\n MATCH (person:Person{id: $id})-[membership:MEMBER_OF]->(team:Team)\n RETURN person, membership, team\nCYPHER\n```","summary":"

    The Redis::Graph::Serializable::* mixins tell Redis::Graph::Client how to deserialize nodes and relationships as your own Crystal object types, similar to DB::Serializable.

    ","types":[{"html_id":"redis/Redis/Graph/Serializable/Node","path":"Redis/Graph/Serializable/Node.html","kind":"module","full_name":"Redis::Graph::Serializable::Node","name":"Node","abstract":false,"locations":[{"filename":"src/graph/serializable.cr","line_number":56,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/serializable.cr#L56"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph/Serializable","kind":"module","full_name":"Redis::Graph::Serializable","name":"Serializable"},"class_methods":[{"html_id":"from_redis_graph_value(node_type:T.class,value_type:Redis::Graph::ValueType,value,cache):TforallT-class-method","name":"from_redis_graph_value","abstract":false,"args":[{"name":"node_type","external_name":"node_type","restriction":"T.class"},{"name":"value_type","external_name":"value_type","restriction":"Redis::Graph::ValueType"},{"name":"value","external_name":"value","restriction":""},{"name":"cache","external_name":"cache","restriction":""}],"args_string":"(node_type : T.class, value_type : Redis::Graph::ValueType, value, cache) : T forall T","args_html":"(node_type : T.class, value_type : Redis::Graph::ValueType, value, cache) : T forall T","location":{"filename":"src/graph/serializable.cr","line_number":59,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/serializable.cr#L59"},"def":{"name":"from_redis_graph_value","args":[{"name":"node_type","external_name":"node_type","restriction":"T.class"},{"name":"value_type","external_name":"value_type","restriction":"Redis::Graph::ValueType"},{"name":"value","external_name":"value","restriction":""},{"name":"cache","external_name":"cache","restriction":""}],"return_type":"T","visibility":"Public","body":"id, label_ids, properties = value.as(Array)\nid = id.as(Int64)\nlabels = (label_ids.as(Array)).map do |label_id|\n cache.label(label_id.as(Int64))\nend\nmetadata = Metadata.new(id: id, labels: labels)\nT.new(metadata, properties.as(Array), cache)\n"}}],"constructors":[{"html_id":"new(metadata:Redis::Graph::Serializable::Node::Metadata,properties:Array,cache)-class-method","name":"new","abstract":false,"args":[{"name":"metadata","external_name":"metadata","restriction":"::Redis::Graph::Serializable::Node::Metadata"},{"name":"properties","external_name":"properties","restriction":"Array"},{"name":"cache","external_name":"cache","restriction":""}],"args_string":"(metadata : Redis::Graph::Serializable::Node::Metadata, properties : Array, cache)","args_html":"(metadata : Redis::Graph::Serializable::Node::Metadata, properties : Array, cache)","location":{"filename":"src/graph/serializable.cr","line_number":81,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/serializable.cr#L81"},"def":{"name":"new","args":[{"name":"metadata","external_name":"metadata","restriction":"::Redis::Graph::Serializable::Node::Metadata"},{"name":"properties","external_name":"properties","restriction":"Array"},{"name":"cache","external_name":"cache","restriction":""}],"visibility":"Public","body":"_ = allocate\n_.initialize(metadata, properties, cache)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"unknown_redis_graph_node_property(key,value)-instance-method","name":"unknown_redis_graph_node_property","abstract":false,"args":[{"name":"key","external_name":"key","restriction":""},{"name":"value","external_name":"value","restriction":""}],"args_string":"(key, value)","args_html":"(key, value)","location":{"filename":"src/graph/serializable.cr","line_number":121,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/serializable.cr#L121"},"def":{"name":"unknown_redis_graph_node_property","args":[{"name":"key","external_name":"key","restriction":""},{"name":"value","external_name":"value","restriction":""}],"visibility":"Public","body":""}}],"types":[{"html_id":"redis/Redis/Graph/Serializable/Node/Metadata","path":"Redis/Graph/Serializable/Node/Metadata.html","kind":"struct","full_name":"Redis::Graph::Serializable::Node::Metadata","name":"Metadata","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph/serializable.cr","line_number":57,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/serializable.cr#L57"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph/Serializable/Node","kind":"module","full_name":"Redis::Graph::Serializable::Node","name":"Node"},"constructors":[{"html_id":"new(id:Int64,labels:Array(String))-class-method","name":"new","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"Int64"},{"name":"labels","external_name":"labels","restriction":"Array(String)"}],"args_string":"(id : Int64, labels : Array(String))","args_html":"(id : Int64, labels : Array(String))","location":{"filename":"src/graph/serializable.cr","line_number":57,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/serializable.cr#L57"},"def":{"name":"new","args":[{"name":"id","external_name":"id","restriction":"Int64"},{"name":"labels","external_name":"labels","restriction":"Array(String)"}],"visibility":"Public","body":"_ = allocate\n_.initialize(id, labels)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/graph/serializable.cr","line_number":57,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/serializable.cr#L57"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@id.clone, @labels.clone)"}},{"html_id":"copy_with(id_id=@id,labels_labels=@labels)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_id","default_value":"@id","external_name":"id","restriction":""},{"name":"_labels","default_value":"@labels","external_name":"labels","restriction":""}],"args_string":"(id _id = @id, labels _labels = @labels)","args_html":"(id _id = @id, labels _labels = @labels)","location":{"filename":"src/graph/serializable.cr","line_number":57,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/serializable.cr#L57"},"def":{"name":"copy_with","args":[{"name":"_id","default_value":"@id","external_name":"id","restriction":""},{"name":"_labels","default_value":"@labels","external_name":"labels","restriction":""}],"visibility":"Public","body":"self.class.new(_id, _labels)"}},{"html_id":"id:Int64-instance-method","name":"id","abstract":false,"def":{"name":"id","return_type":"Int64","visibility":"Public","body":"@id"}},{"html_id":"labels:Array(String)-instance-method","name":"labels","abstract":false,"def":{"name":"labels","return_type":"Array(String)","visibility":"Public","body":"@labels"}}]},{"html_id":"redis/Redis/Graph/Serializable/Node/PropertyMissing","path":"Redis/Graph/Serializable/Node/PropertyMissing.html","kind":"class","full_name":"Redis::Graph::Serializable::Node::PropertyMissing","name":"PropertyMissing","abstract":false,"superclass":{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},"ancestors":[{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph/serializable.cr","line_number":124,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/serializable.cr#L124"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph/Serializable/Node","kind":"module","full_name":"Redis::Graph::Serializable::Node","name":"Node"}}]},{"html_id":"redis/Redis/Graph/Serializable/Property","path":"Redis/Graph/Serializable/Property.html","kind":"annotation","full_name":"Redis::Graph::Serializable::Property","name":"Property","abstract":false,"locations":[{"filename":"src/graph/serializable.cr","line_number":53,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/serializable.cr#L53"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph/Serializable","kind":"module","full_name":"Redis::Graph::Serializable","name":"Serializable"}}]},{"html_id":"redis/Redis/Graph/UnexpectedValue","path":"Redis/Graph/UnexpectedValue.html","kind":"class","full_name":"Redis::Graph::UnexpectedValue","name":"UnexpectedValue","abstract":false,"superclass":{"html_id":"redis/Redis/Graph/Error","kind":"class","full_name":"Redis::Graph::Error","name":"Error"},"ancestors":[{"html_id":"redis/Redis/Graph/Error","kind":"class","full_name":"Redis::Graph::Error","name":"Error"},{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph.cr","line_number":498,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L498"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"}},{"html_id":"redis/Redis/Graph/Value","path":"Redis/Graph/Value.html","kind":"alias","full_name":"Redis::Graph::Value","name":"Value","abstract":false,"locations":[{"filename":"src/graph/value.cr","line_number":2,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/value.cr#L2"}],"repository_name":"redis","program":false,"enum":false,"alias":true,"aliased":"(Array(Redis::Graph::Value) | Bool | Float64 | Hash(String, Redis::Graph::Value) | Int64 | Redis::Graph::Node | Redis::Graph::Relationship | String | Nil)","aliased_html":"Array(Redis::Graph::Value) | Bool | Float64 | Hash(String, Redis::Graph::Value) | Int64 | Redis::Graph::Node | Redis::Graph::Relationship | String | Nil","const":false,"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"},"class_methods":[{"html_id":"from_redis_graph_value(type:Redis::Graph::ValueType,value,cache):Redis::Graph::Value-class-method","name":"from_redis_graph_value","abstract":false,"args":[{"name":"type","external_name":"type","restriction":"Redis::Graph::ValueType"},{"name":"value","external_name":"value","restriction":""},{"name":"cache","external_name":"cache","restriction":""}],"args_string":"(type : Redis::Graph::ValueType, value, cache) : Redis::Graph::Value","args_html":"(type : Redis::Graph::ValueType, value, cache) : Redis::Graph::Value","location":{"filename":"src/graph.cr","line_number":600,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph.cr#L600"},"def":{"name":"from_redis_graph_value","args":[{"name":"type","external_name":"type","restriction":"Redis::Graph::ValueType"},{"name":"value","external_name":"value","restriction":""},{"name":"cache","external_name":"cache","restriction":""}],"return_type":"Redis::Graph::Value","visibility":"Public","body":"Union(*T).from_redis_graph_value(type, value, cache)"}}]},{"html_id":"redis/Redis/Graph/ValueType","path":"Redis/Graph/ValueType.html","kind":"enum","full_name":"Redis::Graph::ValueType","name":"ValueType","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/graph/value_type.cr","line_number":7,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/value_type.cr#L7"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"UNKNOWN","name":"UNKNOWN","value":"0"},{"id":"NULL","name":"NULL","value":"1"},{"id":"STRING","name":"STRING","value":"2"},{"id":"INTEGER","name":"INTEGER","value":"3"},{"id":"BOOLEAN","name":"BOOLEAN","value":"4"},{"id":"DOUBLE","name":"DOUBLE","value":"5"},{"id":"ARRAY","name":"ARRAY","value":"6"},{"id":"EDGE","name":"EDGE","value":"7"},{"id":"NODE","name":"NODE","value":"8"},{"id":"PATH","name":"PATH","value":"9"},{"id":"MAP","name":"MAP","value":"10"},{"id":"POINT","name":"POINT","value":"11"}],"namespace":{"html_id":"redis/Redis/Graph","kind":"module","full_name":"Redis::Graph","name":"Graph"},"class_methods":[{"html_id":"value_for(type,value,cache):Value-class-method","name":"value_for","abstract":false,"args":[{"name":"type","external_name":"type","restriction":""},{"name":"value","external_name":"value","restriction":""},{"name":"cache","external_name":"cache","restriction":""}],"args_string":"(type, value, cache) : Value","args_html":"(type, value, cache) : Value","location":{"filename":"src/graph/value_type.cr","line_number":21,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/value_type.cr#L21"},"def":{"name":"value_for","args":[{"name":"type","external_name":"type","restriction":""},{"name":"value","external_name":"value","restriction":""},{"name":"cache","external_name":"cache","restriction":""}],"return_type":"Value","visibility":"Public","body":"type = ValueType.new((type.as(Int64)).to_i)\n(case type\nin .string?\n value.as(String)\nin .integer?\n value.as(Int64)\nin .null?\n nil\nin .boolean?\n value == 1\nin .double?\n (value.as(String)).to_f\nin .edge?\n Relationship.from(value.as(Array), cache)\nin .node?\n Node.from(value.as(Array), cache)\nin .array?\n (value.as(Array)).map do |item|\n t, v = item.as(Array)\n value_for(t, v, cache)\n end\nin .path?\n raise(ArgumentError.new(\"Paths not supported yet\"))\nin .map?\n hash = Map.new(initial_capacity: (value.as(Array)).size // 2)\n (value.as(Array)).each_slice(2, reuse: true) do |__temp_67|\n key, value = __temp_67\n t, v = value.as(Array)\n t = Redis::Graph::ValueType.new((t.as(Int)).to_i)\n parsed_value = Value.from_redis_graph_value(t, v, cache)\n hash[key.as(String)] = parsed_value\n end\n hash\nin .point?\n raise(ArgumentError.new(\"Points not supported yet\"))\nin .unknown?\n raise(ArgumentError.new(\"Unknown value type #{type}. Value: #{value.inspect}\"))\nend).as(Value)\n"}}],"instance_methods":[{"html_id":"array?-instance-method","name":"array?","abstract":false,"location":{"filename":"src/graph/value_type.cr","line_number":14,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/value_type.cr#L14"},"def":{"name":"array?","visibility":"Public","body":"self == ARRAY"}},{"html_id":"boolean?-instance-method","name":"boolean?","abstract":false,"location":{"filename":"src/graph/value_type.cr","line_number":12,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/value_type.cr#L12"},"def":{"name":"boolean?","visibility":"Public","body":"self == BOOLEAN"}},{"html_id":"double?-instance-method","name":"double?","abstract":false,"location":{"filename":"src/graph/value_type.cr","line_number":13,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/value_type.cr#L13"},"def":{"name":"double?","visibility":"Public","body":"self == DOUBLE"}},{"html_id":"edge?-instance-method","name":"edge?","abstract":false,"location":{"filename":"src/graph/value_type.cr","line_number":15,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/value_type.cr#L15"},"def":{"name":"edge?","visibility":"Public","body":"self == EDGE"}},{"html_id":"integer?-instance-method","name":"integer?","abstract":false,"location":{"filename":"src/graph/value_type.cr","line_number":11,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/value_type.cr#L11"},"def":{"name":"integer?","visibility":"Public","body":"self == INTEGER"}},{"html_id":"map?-instance-method","name":"map?","abstract":false,"location":{"filename":"src/graph/value_type.cr","line_number":18,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/value_type.cr#L18"},"def":{"name":"map?","visibility":"Public","body":"self == MAP"}},{"html_id":"node?-instance-method","name":"node?","abstract":false,"location":{"filename":"src/graph/value_type.cr","line_number":16,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/value_type.cr#L16"},"def":{"name":"node?","visibility":"Public","body":"self == NODE"}},{"html_id":"null?-instance-method","name":"null?","abstract":false,"location":{"filename":"src/graph/value_type.cr","line_number":9,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/value_type.cr#L9"},"def":{"name":"null?","visibility":"Public","body":"self == NULL"}},{"html_id":"path?-instance-method","name":"path?","abstract":false,"location":{"filename":"src/graph/value_type.cr","line_number":17,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/value_type.cr#L17"},"def":{"name":"path?","visibility":"Public","body":"self == PATH"}},{"html_id":"point?-instance-method","name":"point?","abstract":false,"location":{"filename":"src/graph/value_type.cr","line_number":19,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/value_type.cr#L19"},"def":{"name":"point?","visibility":"Public","body":"self == POINT"}},{"html_id":"string?-instance-method","name":"string?","abstract":false,"location":{"filename":"src/graph/value_type.cr","line_number":10,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/value_type.cr#L10"},"def":{"name":"string?","visibility":"Public","body":"self == STRING"}},{"html_id":"unknown?-instance-method","name":"unknown?","abstract":false,"location":{"filename":"src/graph/value_type.cr","line_number":8,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/graph/value_type.cr#L8"},"def":{"name":"unknown?","visibility":"Public","body":"self == UNKNOWN"}}]}]},{"html_id":"redis/Redis/JSON","path":"Redis/JSON.html","kind":"struct","full_name":"Redis::JSON(Runnable)","name":"JSON","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/json.cr","line_number":36,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L36"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"doc":"`Redis::JSON` wraps a `Redis::Client` or `Redis::Cluster` to execute\ncommands against keys storing JSON data using the\n[RedisJSON](https://oss.redis.com/redisjson/) plugin for Redis.\n\n```\nrequire \"redis\"\nrequire \"redis/json\"\nrequire \"uuid/json\"\n\nstruct Person\n include JSON::Serializable\n\n getter id : UUID\n getter name : String\n getter email : String\n\n def initialize(@id, @name, @email)\n end\nend\n\nredis = Redis::Client.new\n\nid = UUID.random\n\nredis.json.set \"person:#{id}\", \".\", Person.new(id, \"Jamie\", \"jamie@example.com\")\nredis.json.get(\"person:#{id}\", \".\", as: Person)\n# => Person(@email=\"jamie@example.com\", @id=UUID(081af617-6b50-48d3-b53f-dbc17a1072f5), @name=\"Jamie\")\nredis.json.get(\"person:#{id}\", \".name\", as: String)\n# => \"Jamie\"\n```","summary":"

    Redis::JSON wraps a Redis::Client or Redis::Cluster to execute commands against keys storing JSON data using the RedisJSON plugin for Redis.

    ","constructors":[{"html_id":"new(redis:Runnable)-class-method","name":"new","abstract":false,"args":[{"name":"redis","external_name":"redis","restriction":"Runnable"}],"args_string":"(redis : Runnable)","args_html":"(redis : Runnable)","location":{"filename":"src/json.cr","line_number":37,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L37"},"def":{"name":"new","args":[{"name":"redis","external_name":"redis","restriction":"Runnable"}],"visibility":"Public","body":"_ = JSON(Runnable).allocate\n_.initialize(redis)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"arrappend(key:String,path:String,value)-instance-method","name":"arrappend","doc":"Append `value` as JSON to the array located at the JSONPath in `key`\n\n```\nredis.json.arrappend \"posts:#{id}\", \".tags\", \"redis\"\n```","summary":"

    Append value as JSON to the array located at the JSONPath in key

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"value","external_name":"value","restriction":""}],"args_string":"(key : String, path : String, value)","args_html":"(key : String, path : String, value)","location":{"filename":"src/json.cr","line_number":219,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L219"},"def":{"name":"arrappend","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"value","external_name":"value","restriction":""}],"visibility":"Public","body":"@redis.run({\"json.arrappend\", key, path, value.to_json})"}},{"html_id":"arrappend(key:String,path:String,*,values:Array)-instance-method","name":"arrappend","doc":"Append `values` as JSON to the array located at the JSONPath in `key`\n\n```\nredis.json.arrappend \"posts:#{id}\", \".tags\", %w[redis crystal]\n```","summary":"

    Append values as JSON to the array located at the JSONPath in key

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"","external_name":"","restriction":""},{"name":"values","external_name":"values","restriction":"Array"}],"args_string":"(key : String, path : String, *, values : Array)","args_html":"(key : String, path : String, *, values : Array)","location":{"filename":"src/json.cr","line_number":228,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L228"},"def":{"name":"arrappend","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"","external_name":"","restriction":""},{"name":"values","external_name":"values","restriction":"Array"}],"splat_index":2,"visibility":"Public","body":"command = Array(String).new(initial_capacity: 3 + values.size)\n((command << \"json.arrappend\") << key) << path\nvalues.each do |value|\n command << value.to_json\nend\n@redis.run(command)\n"}},{"html_id":"arrindex(key:String,path:String,value,betweenrange:Range(Int,Int|Nil))-instance-method","name":"arrindex","doc":"Get the index of `value` in the array located at the JSONPath in `key` if\nand only if it falls in the specified `range`\n\n```\nredis.json.arrindex \"posts:#{id}\", \".tags\", \"redis\", between: 1..3\n# => 2\n```","summary":"

    Get the index of value in the array located at the JSONPath in key if and only if it falls in the specified range

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"value","external_name":"value","restriction":""},{"name":"range","external_name":"between","restriction":"Range(Int, Int | ::Nil)"}],"args_string":"(key : String, path : String, value, between range : Range(Int, Int | Nil))","args_html":"(key : String, path : String, value, between range : Range(Int, Int | Nil))","location":{"filename":"src/json.cr","line_number":254,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L254"},"def":{"name":"arrindex","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"value","external_name":"value","restriction":""},{"name":"range","external_name":"between","restriction":"Range(Int, Int | ::Nil)"}],"visibility":"Public","body":"command = {\"json.arrindex\", key, path, value.to_json, range.begin.to_s}\nif last = range.end\n if range.excludes_end?\n command = command + {last.to_s}\n else\n command = command + {(last + 1).to_s}\n end\nend\n@redis.run(command)\n"}},{"html_id":"arrindex(key:String,path:String,value)-instance-method","name":"arrindex","doc":"Get the index of `value` in the array located at the JSONPath in `key`\n\n```\nredis.json.arrindex \"posts:#{id}\", \".tags\", \"redis\" # => 2\n```","summary":"

    Get the index of value in the array located at the JSONPath in key

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"value","external_name":"value","restriction":""}],"args_string":"(key : String, path : String, value)","args_html":"(key : String, path : String, value)","location":{"filename":"src/json.cr","line_number":243,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L243"},"def":{"name":"arrindex","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"value","external_name":"value","restriction":""}],"visibility":"Public","body":"@redis.run({\"json.arrindex\", key, path, value.to_json})"}},{"html_id":"arrinsert(key:String,path:String,index:Int,value)-instance-method","name":"arrinsert","doc":"Insert `value` into the array located at the JSONPath in `key` at `index`\n\n```\nredis.json.arrinsert \"posts:#{id}\", \".tags\", index: 1, value: \"redis\"\n# => 3\n```","summary":"

    Insert value into the array located at the JSONPath in key at index

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"index","external_name":"index","restriction":"Int"},{"name":"value","external_name":"value","restriction":""}],"args_string":"(key : String, path : String, index : Int, value)","args_html":"(key : String, path : String, index : Int, value)","location":{"filename":"src/json.cr","line_number":273,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L273"},"def":{"name":"arrinsert","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"index","external_name":"index","restriction":"Int"},{"name":"value","external_name":"value","restriction":""}],"visibility":"Public","body":"@redis.run({\"json.arrinsert\", key, path, index.to_s, value.to_json})"}},{"html_id":"arrinsert(key:String,path:String,index:Int,*,values:Array)-instance-method","name":"arrinsert","doc":"Insert the elements of `values` into the array located at the JSONPath in\n`key` at `index`\n\n```\nredis.json.arrinsert \"posts:#{id}\", \".tags\", index: 1, values: %w[\n redis\n crystal\n]\n# => 4\n```","summary":"

    Insert the elements of values into the array located at the JSONPath in key at index

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"index","external_name":"index","restriction":"Int"},{"name":"","external_name":"","restriction":""},{"name":"values","external_name":"values","restriction":"Array"}],"args_string":"(key : String, path : String, index : Int, *, values : Array)","args_html":"(key : String, path : String, index : Int, *, values : Array)","location":{"filename":"src/json.cr","line_number":287,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L287"},"def":{"name":"arrinsert","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"index","external_name":"index","restriction":"Int"},{"name":"","external_name":"","restriction":""},{"name":"values","external_name":"values","restriction":"Array"}],"splat_index":3,"visibility":"Public","body":"command = Array(String).new(initial_capacity: 4 + values.size)\n(((command << \"json.arrinsert\") << key) << path) << index.to_s\nvalues.each do |value|\n command << value.to_json\nend\n@redis.run(command)\n"}},{"html_id":"arrlen(key:String,path:String)-instance-method","name":"arrlen","doc":"Get the number of elements in the array located at the JSONPath in `key`\n\n```\nredis.json.arrlen \"posts:#{id}\", \".tags\"\n# => 4\n```","summary":"

    Get the number of elements in the array located at the JSONPath in key

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"}],"args_string":"(key : String, path : String)","args_html":"(key : String, path : String)","location":{"filename":"src/json.cr","line_number":303,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L303"},"def":{"name":"arrlen","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"}],"visibility":"Public","body":"@redis.run({\"json.arrlen\", key, path})"}},{"html_id":"arrpop(key:String,path:String|Nil=nil,*,index:Int=-1)-instance-method","name":"arrpop","doc":"Remove and return the value located at `index` (defaulting to the last\nelement) in the array located at the JSONPath in `key`\n\n```\nredis.json.arrlen \"posts:#{id}\", \".tags\"\n# => 4\n```","summary":"

    Remove and return the value located at index (defaulting to the last element) in the array located at the JSONPath in key

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","default_value":"nil","external_name":"path","restriction":"String | ::Nil"},{"name":"","external_name":"","restriction":""},{"name":"index","default_value":"-1","external_name":"index","restriction":"Int"}],"args_string":"(key : String, path : String | Nil = nil, *, index : Int = -1)","args_html":"(key : String, path : String | Nil = nil, *, index : Int = -1)","location":{"filename":"src/json.cr","line_number":314,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L314"},"def":{"name":"arrpop","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","default_value":"nil","external_name":"path","restriction":"String | ::Nil"},{"name":"","external_name":"","restriction":""},{"name":"index","default_value":"-1","external_name":"index","restriction":"Int"}],"splat_index":2,"visibility":"Public","body":"command = {\"json.arrpop\", key}\nif path\n command = command + {path}\n if index != -1\n command = command + {index.to_s}\n end\nend\n@redis.run(command)\n"}},{"html_id":"arrpop(key:String,path:String,*,index:Int=-1,as:T.class):T|NilforallT-instance-method","name":"arrpop","doc":"Remove and return the value located at `index` (defaulting to the last\nelement) in the array located at the JSONPath in `key`\n\n```\nredis.json.arrlen \"posts:#{id}\", \".tags\"\n# => 4\n```\n\nNOTE: This method cannot be invoked on a pipeline or the transaction\nyielded to a `Redis::Connection#multi` block.","summary":"

    Remove and return the value located at index (defaulting to the last element) in the array located at the JSONPath in key

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"","external_name":"","restriction":""},{"name":"index","default_value":"-1","external_name":"index","restriction":"Int"},{"name":"as","external_name":"as","restriction":"T.class"}],"args_string":"(key : String, path : String, *, index : Int = -1, as : T.class) : T | Nil forall T","args_html":"(key : String, path : String, *, index : Int = -1, as : T.class) : T | Nil forall T","location":{"filename":"src/json.cr","line_number":334,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L334"},"def":{"name":"arrpop","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"","external_name":"","restriction":""},{"name":"index","default_value":"-1","external_name":"index","restriction":"Int"},{"name":"as","external_name":"as","restriction":"T.class"}],"splat_index":2,"return_type":"T | ::Nil","visibility":"Public","body":"if result = arrpop(key, path, index: index)\n T.from_json(result.as(String))\nend"}},{"html_id":"clear(key:String,path:String|Nil=nil)-instance-method","name":"clear","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","default_value":"nil","external_name":"path","restriction":"String | ::Nil"}],"args_string":"(key : String, path : String | Nil = nil)","args_html":"(key : String, path : String | Nil = nil)","location":{"filename":"src/json.cr","line_number":166,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L166"},"def":{"name":"clear","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","default_value":"nil","external_name":"path","restriction":"String | ::Nil"}],"visibility":"Public","body":"command = {\"json.clear\", key}\nif path\n command = command + {path}\nend\n@redis.run(command)\n"}},{"html_id":"del(key:String,path:String|Nil=nil)-instance-method","name":"del","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","default_value":"nil","external_name":"path","restriction":"String | ::Nil"}],"args_string":"(key : String, path : String | Nil = nil)","args_html":"(key : String, path : String | Nil = nil)","location":{"filename":"src/json.cr","line_number":173,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L173"},"def":{"name":"del","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","default_value":"nil","external_name":"path","restriction":"String | ::Nil"}],"visibility":"Public","body":"command = {\"json.del\", key}\nif path\n command = command + {path}\nend\n@redis.run(command)\n"}},{"html_id":"get(key:String,path:String,astype:T.class):T|NilforallT-instance-method","name":"get","doc":"Get the value stored at the given JSONPath inside the given `key`,\ndeserializing the value into the type `T`. You can use this to deserialize\nyour custom `JSON::Serializable` objects.\n\n```\nstruct Order\n include JSON::Serializable\n getter id : UUID\n getter customer_id : UUID\n getter line_items : Array(LineItem)\nend\n\nstruct LineItem\n include JSON::Serializable\n getter product_id : UUID\n getter quantity : Int32\n getter unit_price_cents : Int32\nend\n\n# Get the Order at the root\nredis.json.get(\"order:#{id}\", \".\", as: Order)\n# Get the LineItems at the `.line_items` JSONPath\n# Note the `$` at the beginning to make it an array\nredis.json.get(\"order:#{id}\", \"$.line_items\", as: Array(LineItem))\n# Get only the `product_id` properties of all the `line_items`\nredis.json.get(\"order:#{id}\", \"$.line_items..product_id\", as: Array(UUID))\n```\n\nNOTE: This method _cannot_ be used in a pipeline or `Redis::Connection#multi`\nblock because it operates on the value returned from the Redis server\ninside the method, which isn't possible when using pipelines or `multi`.","summary":"

    Get the value stored at the given JSONPath inside the given key, deserializing the value into the type T.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"type","external_name":"as","restriction":"T.class"}],"args_string":"(key : String, path : String, as type : T.class) : T | Nil forall T","args_html":"(key : String, path : String, as type : T.class) : T | Nil forall T","location":{"filename":"src/json.cr","line_number":138,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L138"},"def":{"name":"get","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"type","external_name":"as","restriction":"T.class"}],"return_type":"T | ::Nil","visibility":"Public","body":"if result = @redis.run({\"json.get\", key, path})\n T.from_json(result.as(String))\nend"}},{"html_id":"get(key:String,path:String)-instance-method","name":"get","doc":"Get the raw JSON string representation at the given `key` nested at the\ngiven JSONPath.\n\n```\nemail = redis.json.get(\"user:#{id}\", \".email\").as(String)\n# => \"me@example.com\"\n```","summary":"

    Get the raw JSON string representation at the given key nested at the given JSONPath.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"}],"args_string":"(key : String, path : String)","args_html":"(key : String, path : String)","location":{"filename":"src/json.cr","line_number":84,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L84"},"def":{"name":"get","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"}],"visibility":"Public","body":"@redis.run({\"json.get\", key, path})"}},{"html_id":"get(key:String,paths:Array(String),astype:T.class=::JSON::Any)forallT-instance-method","name":"get","doc":"Get the values stored at the specifed JSONPaths, deserializing them into\nthe specified type as values in a `Hash`.\n\n```\nif result = redis.json.get(\"posts:#{id}\", %w[title tags], as: String | Array(String))\n result # => {\"title\" => \"JSON with Redis\", tags: [\"redis\", \"json\", \"crystal\"]}\n typeof(result) # => Hash(String, String | Array(String))\nend\n```\n\nNOTE: This method _cannot_ be used in a pipeline or `Redis::Connection#multi`\nblock because it operates on the value returned from the Redis server,\nwhich isn't a thing when using pipelines or `multi`.","summary":"

    Get the values stored at the specifed JSONPaths, deserializing them into the specified type as values in a Hash.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"paths","external_name":"paths","restriction":"Array(String)"},{"name":"type","default_value":"::JSON::Any","external_name":"as","restriction":"T.class"}],"args_string":"(key : String, paths : Array(String), as type : T.class = ::JSON::Any) forall T","args_html":"(key : String, paths : Array(String), as type : T.class = ::JSON::Any) forall T","location":{"filename":"src/json.cr","line_number":101,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L101"},"def":{"name":"get","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"paths","external_name":"paths","restriction":"Array(String)"},{"name":"type","default_value":"::JSON::Any","external_name":"as","restriction":"T.class"}],"visibility":"Public","body":"if result = @redis.run([\"json.get\", key] + paths)\n Hash(String, T).from_json(result.as(String))\nend"}},{"html_id":"get(key:String)-instance-method","name":"get","doc":"Get the raw JSON string at the specified `key`","summary":"

    Get the raw JSON string at the specified key

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/json.cr","line_number":73,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L73"},"def":{"name":"get","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"@redis.run({\"json.get\", key})"}},{"html_id":"mget(keys:Array(String),path:String,astype:T.class):Array(T|Nil)forallT-instance-method","name":"mget","doc":"Get the values for all `keys` at the specified JSONPaths.\n\nNOTE: This method _cannot_ be used in a pipeline or `Redis::Connection#multi`\nblock because it operates on the value returned from the Redis server\ninside the method, which isn't possible when using pipelines or `multi`.\nNOTE: If you are using a cluster, the `keys` _must_ all be on the same\nshard, or you may only get some of them back with this method. When using\n`mget` in a cluster, you'll most likely want to use subhashed keys (with\n`{}` around the same part of the name) to ensure all keys are on the same\nshard.","summary":"

    Get the values for all keys at the specified JSONPaths.

    ","abstract":false,"args":[{"name":"keys","external_name":"keys","restriction":"Array(String)"},{"name":"path","external_name":"path","restriction":"String"},{"name":"type","external_name":"as","restriction":"T.class"}],"args_string":"(keys : Array(String), path : String, as type : T.class) : Array(T | Nil) forall T","args_html":"(keys : Array(String), path : String, as type : T.class) : Array(T | Nil) forall T","location":{"filename":"src/json.cr","line_number":154,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L154"},"def":{"name":"mget","args":[{"name":"keys","external_name":"keys","restriction":"Array(String)"},{"name":"path","external_name":"path","restriction":"String"},{"name":"type","external_name":"as","restriction":"T.class"}],"return_type":"Array(T | ::Nil)","visibility":"Public","body":"if result = @redis.run(([\"json.mget\"] + keys) + [path])\n (result.as(Array)).map do |value|\n if value\n T.from_json(value.as(String))\n end\n end\nelse\n raise(\"lolwut?\")\nend"}},{"html_id":"numincrby(key:String,path:String,count:String|Int,astype:T.class):TforallT-instance-method","name":"numincrby","doc":"Increment the number at the specified JSONPath\n\n```\nredis.json.numincrby \"product:#{id}\", \".purchase_count\", 1, as: Int64\n# => 2\n```\n\nIf `key` exists and an incrementable number exists at the specified\nJSONPath (including the possibility of incrementing multiple numbers if\nthe JSONPath resolves to multiple numeric values), then this method\nreturns a value of type `T`. If the JSONPath resolves to multiple values\n(for example, it begins with \"$\" or is recursive), you will need to\nspecify that it can be an `Array` of that type.\n\nNOTE: This method cannot be used on deferred command runners like\n`Redis::Pipeline` or `Redis::Transaction`. It eagerly consumes the\nresult from the server, so the result must not be deferred.","summary":"

    Increment the number at the specified JSONPath

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"count","external_name":"count","restriction":"String | Int"},{"name":"type","external_name":"as","restriction":"T.class"}],"args_string":"(key : String, path : String, count : String | Int, as type : T.class) : T forall T","args_html":"(key : String, path : String, count : String | Int, as type : T.class) : T forall T","location":{"filename":"src/json.cr","line_number":206,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L206"},"def":{"name":"numincrby","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"count","external_name":"count","restriction":"String | Int"},{"name":"type","external_name":"as","restriction":"T.class"}],"return_type":"T","visibility":"Public","body":"T.from_json((numincrby(key, path, count)).as(String))"}},{"html_id":"numincrby(key:String,path:String,count:String|Int)-instance-method","name":"numincrby","doc":"Increment the number at the specified JSONPath\n\n```\nredis.json.numincrby \"product:#{id}\", \".purchase_count\", 1\n```","summary":"

    Increment the number at the specified JSONPath

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"count","external_name":"count","restriction":"String | Int"}],"args_string":"(key : String, path : String, count : String | Int)","args_html":"(key : String, path : String, count : String | Int)","location":{"filename":"src/json.cr","line_number":185,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L185"},"def":{"name":"numincrby","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"count","external_name":"count","restriction":"String | Int"}],"visibility":"Public","body":"@redis.run({\"json.numincrby\", key, path, count.to_s})"}},{"html_id":"set(key:String,path:String,value,*,nx=false,xx=false)-instance-method","name":"set","doc":"Set the given key to the given JSON `value`. The `value` will have\n`to_json` called on it automatically. The `nx` and `xx` arguments are\nidentical to `Redis::Commands#set`.\n\nStore a user at the root JSONPath (`.`) of the specified key:\n\n```\nstruct User\n include JSON::Serializable\n\n getter id : UUID\n getter name : String\n getter email : String\nend\n\nredis.json.set \"user:#{user.id}\", \".\", user\n```\n\nUpdate (with `xx` so we ensure the key exists) a user's email by setting\nthe new email value at the `.email` JSONPath:\n\n```\nredis.json.set \"user:#{id}\", \".email\", new_email, xx: true\n```","summary":"

    Set the given key to the given JSON value.

    ","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"value","external_name":"value","restriction":""},{"name":"","external_name":"","restriction":""},{"name":"nx","default_value":"false","external_name":"nx","restriction":""},{"name":"xx","default_value":"false","external_name":"xx","restriction":""}],"args_string":"(key : String, path : String, value, *, nx = false, xx = false)","args_html":"(key : String, path : String, value, *, nx = false, xx = false)","location":{"filename":"src/json.cr","line_number":64,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L64"},"def":{"name":"set","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"},{"name":"value","external_name":"value","restriction":""},{"name":"","external_name":"","restriction":""},{"name":"nx","default_value":"false","external_name":"nx","restriction":""},{"name":"xx","default_value":"false","external_name":"xx","restriction":""}],"splat_index":3,"visibility":"Public","body":"command = {\"json.set\", key, path, value.to_json}\nif nx\n command = command + {\"nx\"}\nend\nif xx\n command = command + {\"xx\"}\nend\n@redis.run(command)\n"}},{"html_id":"toggle(key:String,path:String)-instance-method","name":"toggle","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"}],"args_string":"(key : String, path : String)","args_html":"(key : String, path : String)","location":{"filename":"src/json.cr","line_number":210,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/json.cr#L210"},"def":{"name":"toggle","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"path","external_name":"path","restriction":"String"}],"visibility":"Public","body":"@redis.run({\"json.toggle\", key, path})"}}]},{"html_id":"redis/Redis/NoGroup","path":"Redis/NoGroup.html","kind":"class","full_name":"Redis::NoGroup","name":"NoGroup","abstract":false,"superclass":{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},"ancestors":[{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/errors.cr","line_number":16,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/errors.cr#L16"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"}},{"html_id":"redis/Redis/Parser","path":"Redis/Parser.html","kind":"struct","full_name":"Redis::Parser","name":"Parser","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/parser.cr","line_number":5,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/parser.cr#L5"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"constructors":[{"html_id":"new(io:IO)-class-method","name":"new","doc":"Initialize a parser to read from the given IO","summary":"

    Initialize a parser to read from the given IO

    ","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/parser.cr","line_number":7,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/parser.cr#L7"},"def":{"name":"new","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"_ = allocate\n_.initialize(io)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"read:Value-instance-method","name":"read","doc":"Read a `Redis::Value` from the parser's `IO`\n\nExample:\n\n```\nio = IO::Memory.new\nio << \"$3\\r\\n\"\nio << \"foo\\r\\n\"\nio.rewind\n\nParser.new(io).read # => \"foo\"\n```","summary":"

    Read a Redis::Value from the parser's IO

    ","abstract":false,"location":{"filename":"src/parser.cr","line_number":22,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/parser.cr#L22"},"def":{"name":"read","return_type":"Value","visibility":"Public","body":"read do\n raise(IO::Error.new(\"Connection closed\"))\nend"}},{"html_id":"read?-instance-method","name":"read?","doc":"Reads a value from the `IO`, returning `nil` on EOF.","summary":"

    Reads a value from the IO, returning nil on EOF.

    ","abstract":false,"location":{"filename":"src/parser.cr","line_number":27,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/parser.cr#L27"},"def":{"name":"read?","visibility":"Public","body":"if @io.closed?\n return\nend\nread do\n nil\nend\n"}}]},{"html_id":"redis/Redis/Pipeline","path":"Redis/Pipeline.html","kind":"class","full_name":"Redis::Pipeline","name":"Pipeline","abstract":false,"superclass":{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},{"html_id":"redis/Redis/Commands/Stream","kind":"module","full_name":"Redis::Commands::Stream","name":"Stream"},{"html_id":"redis/Redis/Commands/SortedSet","kind":"module","full_name":"Redis::Commands::SortedSet","name":"SortedSet"},{"html_id":"redis/Redis/Commands/Set","kind":"module","full_name":"Redis::Commands::Set","name":"Set"},{"html_id":"redis/Redis/Commands/List","kind":"module","full_name":"Redis::Commands::List","name":"List"},{"html_id":"redis/Redis/Commands/Hash","kind":"module","full_name":"Redis::Commands::Hash","name":"Hash"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/pipeline.cr","line_number":6,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/pipeline.cr#L6"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"constructors":[{"html_id":"new(connection:Connection)-class-method","name":"new","doc":"Wraps a connection so that our `run` and `commit` methods can execute against it.","summary":"

    Wraps a connection so that our #run and #commit methods can execute against it.

    ","abstract":false,"args":[{"name":"connection","external_name":"connection","restriction":"Connection"}],"args_string":"(connection : Connection)","args_html":"(connection : Connection)","location":{"filename":"src/pipeline.cr","line_number":12,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/pipeline.cr#L12"},"def":{"name":"new","args":[{"name":"connection","external_name":"connection","restriction":"Connection"}],"visibility":"Public","body":"_ = allocate\n_.initialize(connection)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"commit-instance-method","name":"commit","doc":"Read all of the return values from all of the commands we've sent to Redis\nand resolve all `Redis::Future`s with them in the order they were sent.","summary":"

    Read all of the return values from all of the commands we've sent to Redis and resolve all Redis::Futures with them in the order they were sent.

    ","abstract":false,"location":{"filename":"src/pipeline.cr","line_number":26,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/pipeline.cr#L26"},"def":{"name":"commit","visibility":"Public","body":"@futures.map(&.resolve(@connection.read))"}},{"html_id":"run(command)-instance-method","name":"run","doc":"The `run` method is required by the `Commands` mixin. When you run a Redis\ncommand, it gets pushed to the server via this method.","summary":"

    The #run method is required by the Commands mixin.

    ","abstract":false,"args":[{"name":"command","external_name":"command","restriction":""}],"args_string":"(command)","args_html":"(command)","location":{"filename":"src/pipeline.cr","line_number":17,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/pipeline.cr#L17"},"def":{"name":"run","args":[{"name":"command","external_name":"command","restriction":""}],"visibility":"Public","body":"@connection.encode(command)\nfuture = Future.new\n@futures << future\nfuture\n"}}]},{"html_id":"redis/Redis/ReplicationClient","path":"Redis/ReplicationClient.html","kind":"class","full_name":"Redis::ReplicationClient","name":"ReplicationClient","abstract":false,"superclass":{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},{"html_id":"redis/Redis/Commands/Stream","kind":"module","full_name":"Redis::Commands::Stream","name":"Stream"},{"html_id":"redis/Redis/Commands/SortedSet","kind":"module","full_name":"Redis::Commands::SortedSet","name":"SortedSet"},{"html_id":"redis/Redis/Commands/Set","kind":"module","full_name":"Redis::Commands::Set","name":"Set"},{"html_id":"redis/Redis/Commands/List","kind":"module","full_name":"Redis::Commands::List","name":"List"},{"html_id":"redis/Redis/Commands/Hash","kind":"module","full_name":"Redis::Commands::Hash","name":"Hash"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/replication_client.cr","line_number":51,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L51"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"Log","name":"Log","value":"::Log.for(self)"}],"included_modules":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"doc":"If you're using Redis replication, you can use `ReplicationClient` to send\nread commands to replicas and reduce load on the primary. This can be important\nwhen your Redis primary is CPU-bound.\n\nThe commands that will be routed to replicas are listed in\n`Redis::READ_ONLY_COMMANDS`.\n\nNOTE: Redis replication does not provide consistency guarantees. Every\nmechanism in Redis to improve consistency, such as\n[WAIT](https://redis.io/commands/wait/#consistency-and-wait), is best-effort,\nbut not guaranteed. If you require strong consistency from Redis, stick to\nusing `Redis::Client`. if you require strong consistency but your Redis primary\nis CPU-bound, you may need to either choose between consistency and performance\nor move that workload out of Redis.\n\nThis client is useful for operations where strong consistency isn't typically\nneeded, such as caching, full-text search with `Redis::FullText#search`,\nquerying time-series data with `Redis::TimeSeries#mrange`, checking the current\nstate of larger data structures without blocking the primary, etc.\n\n## Explicitly routing commands to a primary or replica\n\nThis class provides `on_primary` and `on_replica` methods to ensure your\ncommand is routed to the server type you want. This is useful in several\nscenarios:\n\n- you want to ensure you retrieve a value that is consistent with the state of\n the primary server — for example a value that changes frequently and you\n need the canonical state for observability purposes\n- a read-only command is routed to a primary because this client does not yet\n know about it\n - You can add commands to `Redis::READ_ONLY_COMMANDS` in one-off cases\n - Feel free to [open an issue](https://github.com/jgaskins/redis/issues) or\n [pull request](https://github.com/jgaskins/redis/pulls) to add it, as well\n\n## Topology changes\n\nIf the replication topology changes (for example, new replicas are added,\nexisting ones removed, or the primary failed over), `ReplicationClient` will\nautomatically pick up the changes. You can set how often it checks for these\nchanges with the `topology_ttl` argument to the constructor or leave it at its\ndefault of 10 seconds.","summary":"

    If you're using Redis replication, you can use ReplicationClient to send read commands to replicas and reduce load on the primary.

    \n

    EXPERIMENTAL ReplicationClient is currently in alpha testing. There may be rough edges.

    ","constructors":[{"html_id":"new(entrypoint:URI,topology_ttl:Time::Span=10.seconds)-class-method","name":"new","doc":"Have the `ReplicationClient` discover the master and replicas on its own\nwhen given the URI of a single entrypoint. The cluster topology will be\nrefreshed with a max staleness of `topology_ttl`.\n\n```\nredis = Redis::ReplicationClient.new(\n```","summary":"

    Have the ReplicationClient discover the master and replicas on its own when given the URI of a single entrypoint.

    ","abstract":false,"args":[{"name":"entrypoint","external_name":"entrypoint","restriction":"URI"},{"name":"topology_ttl","default_value":"10.seconds","external_name":"topology_ttl","restriction":"Time::Span"}],"args_string":"(entrypoint : URI, topology_ttl : Time::Span = 10.seconds)","args_html":"(entrypoint : URI, topology_ttl : Time::Span = 10.seconds)","location":{"filename":"src/replication_client.cr","line_number":73,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L73"},"def":{"name":"new","args":[{"name":"entrypoint","external_name":"entrypoint","restriction":"URI"},{"name":"topology_ttl","default_value":"10.seconds","external_name":"topology_ttl","restriction":"Time::Span"}],"visibility":"Public","body":"_ = allocate\n_.initialize(entrypoint, topology_ttl)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}},{"html_id":"new(master_uri:URI,replica_uris:Array(URI),topology_ttl:Time::Span=10.seconds)-class-method","name":"new","doc":"Initialize the client with known master and replica URIs, keeping the\ntoplogy up to date with at most `topology_ttl` staleness. If you don't wish\nto keep the replication topology up to date, you can simply set\n`topology_ttl` to `0.seconds`.","summary":"

    Initialize the client with known master and replica URIs, keeping the toplogy up to date with at most #topology_ttl staleness.

    ","abstract":false,"args":[{"name":"master_uri","external_name":"master_uri","restriction":"::URI"},{"name":"replica_uris","external_name":"replica_uris","restriction":"::Array(::URI)"},{"name":"topology_ttl","default_value":"10.seconds","external_name":"topology_ttl","restriction":"::Time::Span"}],"args_string":"(master_uri : URI, replica_uris : Array(URI), topology_ttl : Time::Span = 10.seconds)","args_html":"(master_uri : URI, replica_uris : Array(URI), topology_ttl : Time::Span = 10.seconds)","location":{"filename":"src/replication_client.cr","line_number":117,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L117"},"def":{"name":"new","args":[{"name":"master_uri","external_name":"master_uri","restriction":"::URI"},{"name":"replica_uris","external_name":"replica_uris","restriction":"::Array(::URI)"},{"name":"topology_ttl","default_value":"10.seconds","external_name":"topology_ttl","restriction":"::Time::Span"}],"visibility":"Public","body":"_ = allocate\n_.initialize(master_uri, replica_uris, topology_ttl)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}},{"html_id":"new-class-method","name":"new","abstract":false,"location":{"filename":"src/replication_client.cr","line_number":62,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L62"},"def":{"name":"new","visibility":"Public","body":"new(entrypoint: URI.parse(\"redis:///\"))"}}],"instance_methods":[{"html_id":"close-instance-method","name":"close","doc":"Close all connections to both the primary and all replicas.","summary":"

    Close all connections to both the primary and all replicas.

    ","abstract":false,"location":{"filename":"src/replication_client.cr","line_number":153,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L153"},"def":{"name":"close","visibility":"Public","body":"begin\n @master.close\nrescue\n nil\nend\n@replicas.each do |replica|\n begin\n replica.close\n rescue\n nil\n end\nend\n@closed = true\n"}},{"html_id":"closed?:Bool-instance-method","name":"closed?","doc":"Returns `true` if this `ReplicationClient` has been explicitly closed,\n`false` otherwise.","summary":"

    Returns true if this ReplicationClient has been explicitly closed, false otherwise.

    ","abstract":false,"location":{"filename":"src/replication_client.cr","line_number":164,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L164"},"def":{"name":"closed?","visibility":"Public","body":"@closed"}},{"html_id":"on_master(&)-instance-method","name":"on_master","doc":"Alias of `on_primary`.","summary":"

    Alias of #on_primary.

    ","abstract":false,"location":{"filename":"src/replication_client.cr","line_number":405,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L405"},"def":{"name":"on_master","yields":1,"block_arity":1,"visibility":"Public","body":"yield @master"}},{"html_id":"on_primary(&)-instance-method","name":"on_primary","doc":"Route one or more commands to the primary to avoid consistency issues arising\nfrom replication latency.\n\n```\nrequire \"redis/replication_client\"\n\nredis = Redis::ReplicationClient.new\n\nredis.incr \"counter\"\nvalue = redis.on_primary &.get(\"counter\")\n```\n\nThis is useful for pipelining commands or executing transactions:\n\n```\nredis.on_primary &.transaction do |txn|\n txn.incr \"counter:#{queue}\"\n txn.sadd \"queues\", queue\n txn.lpush \"queue:#{queue}\", job_data\nend\n```\n\n… which is shorthand for this and removes the need for nesting blocks:\n\n```\nredis.on_primary do |primary|\n primary.transaction do |txn|\n txn.incr \"counter:#{queue}\"\n txn.sadd \"queues\", queue\n txn.lpush \"queue:#{queue}\", job_data\n end\nend\n```\n\nIf you need to route many commands to the primary without necessarily\npipelining or opening transactions, you can omit the `&.transaction` and\ncall methods directly on the primary's `Redis::Client` in the block:\n\n```\nredis.on_primary do |primary|\n counter = primary.incr \"counter:#{queue}\"\n primary.sadd \"queues\", queue\nend\n```\n\nNOTE: The object yielded to the block is a `Redis::Client`, but if you try\nto use it outside the block you may run into errors because the replication\ntopology could change, in which case this `Redis::Client` might not be the\nprimary anymore.","summary":"

    Route one or more commands to the primary to avoid consistency issues arising from replication latency.

    ","abstract":false,"location":{"filename":"src/replication_client.cr","line_number":400,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L400"},"def":{"name":"on_primary","yields":1,"block_arity":1,"visibility":"Public","body":"on_master do |redis|\n yield redis\nend"}},{"html_id":"on_replica(&)-instance-method","name":"on_replica","doc":"Route one or more commands to replicas. This should rarely be necessary since\nread-only commands (which can only be executed on replicas) are automatically\nrouted to replicas, but if it's a command this shard does not know about (see\n`Redis::READ_ONLY_COMMANDS`) this may be necessary. Alternatively, you can\nshovel additional commands into `Redis::READ_ONLY_COMMANDS` to avoid having to\nperform this explicit routing.","summary":"

    Route one or more commands to replicas.

    ","abstract":false,"location":{"filename":"src/replication_client.cr","line_number":343,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L343"},"def":{"name":"on_replica","yields":1,"block_arity":1,"visibility":"Public","body":"if @replicas.empty?\n yield @master\nelse\n yield @replicas.sample\nend"}},{"html_id":"run(commandfull_command)-instance-method","name":"run","doc":"Execute the given command and return the result from the server. Commands\nmust be an `Enumerable` and its `size` method must be re-entrant.\n\n```\nrun({\"set\", \"foo\", \"bar\"})\n```","summary":"

    Execute the given command and return the result from the server.

    ","abstract":false,"args":[{"name":"full_command","external_name":"command","restriction":""}],"args_string":"(command full_command)","args_html":"(command full_command)","location":{"filename":"src/replication_client.cr","line_number":325,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L325"},"def":{"name":"run","args":[{"name":"full_command","external_name":"command","restriction":""}],"visibility":"Public","body":"if full_command.empty?\n raise(ArgumentError.new(\"Redis commands must have at least one component\"))\nend\nif READ_ONLY_COMMANDS.includes?(full_command[0].downcase)\n on_replica(&.run(full_command))\nelse\n @master.run(full_command)\nend\n"}},{"html_id":"topology_ttl:Time::Span-instance-method","name":"topology_ttl","abstract":false,"location":{"filename":"src/replication_client.cr","line_number":60,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L60"},"def":{"name":"topology_ttl","return_type":"Time::Span","visibility":"Public","body":"@topology_ttl"}}],"types":[{"html_id":"redis/Redis/ReplicationClient/Info","path":"Redis/ReplicationClient/Info.html","kind":"module","full_name":"Redis::ReplicationClient::Info","name":"Info","abstract":false,"locations":[{"filename":"src/replication_client.cr","line_number":170,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L170"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/ReplicationClient","kind":"class","full_name":"Redis::ReplicationClient","name":"ReplicationClient"},"types":[{"html_id":"redis/Redis/ReplicationClient/Info/Replica","path":"Redis/ReplicationClient/Info/Replica.html","kind":"struct","full_name":"Redis::ReplicationClient::Info::Replica","name":"Replica","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/replication_client.cr","line_number":234,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L234"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/ReplicationClient/Info","kind":"module","full_name":"Redis::ReplicationClient::Info","name":"Info"},"constructors":[{"html_id":"new(ip:String,port:Int32,state:Redis::ReplicationClient::Info::Replica::State,lag:Time::Span)-class-method","name":"new","abstract":false,"args":[{"name":"ip","external_name":"ip","restriction":"::String"},{"name":"port","external_name":"port","restriction":"::Int32"},{"name":"state","external_name":"state","restriction":"::Redis::ReplicationClient::Info::Replica::State"},{"name":"lag","external_name":"lag","restriction":"::Time::Span"}],"args_string":"(ip : String, port : Int32, state : Redis::ReplicationClient::Info::Replica::State, lag : Time::Span)","args_html":"(ip : String, port : Int32, state : Redis::ReplicationClient::Info::Replica::State, lag : Time::Span)","location":{"filename":"src/replication_client.cr","line_number":304,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L304"},"def":{"name":"new","args":[{"name":"ip","external_name":"ip","restriction":"::String"},{"name":"port","external_name":"port","restriction":"::Int32"},{"name":"state","external_name":"state","restriction":"::Redis::ReplicationClient::Info::Replica::State"},{"name":"lag","external_name":"lag","restriction":"::Time::Span"}],"visibility":"Public","body":"_ = allocate\n_.initialize(ip, port, state, lag)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}},{"html_id":"new(text:String)-class-method","name":"new","abstract":false,"args":[{"name":"text","external_name":"text","restriction":"String"}],"args_string":"(text : String)","args_html":"(text : String)","location":{"filename":"src/replication_client.cr","line_number":240,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L240"},"def":{"name":"new","args":[{"name":"text","external_name":"text","restriction":"String"}],"visibility":"Public","body":"_ = allocate\n_.initialize(text)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"==(other:self)-instance-method","name":"==","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"self"}],"args_string":"(other : self)","args_html":"(other : self)","location":{"filename":"src/replication_client.cr","line_number":307,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L307"},"def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"self"}],"visibility":"Public","body":"(ip == other.ip) && (port == other.port)"}},{"html_id":"ip:String-instance-method","name":"ip","abstract":false,"location":{"filename":"src/replication_client.cr","line_number":235,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L235"},"def":{"name":"ip","return_type":"String","visibility":"Public","body":"@ip"}},{"html_id":"lag:Time::Span-instance-method","name":"lag","abstract":false,"location":{"filename":"src/replication_client.cr","line_number":238,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L238"},"def":{"name":"lag","return_type":"Time::Span","visibility":"Public","body":"@lag"}},{"html_id":"port:Int32-instance-method","name":"port","abstract":false,"location":{"filename":"src/replication_client.cr","line_number":236,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L236"},"def":{"name":"port","return_type":"Int32","visibility":"Public","body":"@port"}},{"html_id":"state:State-instance-method","name":"state","abstract":false,"location":{"filename":"src/replication_client.cr","line_number":237,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L237"},"def":{"name":"state","return_type":"State","visibility":"Public","body":"@state"}}],"types":[{"html_id":"redis/Redis/ReplicationClient/Info/Replica/State","path":"Redis/ReplicationClient/Info/Replica/State.html","kind":"enum","full_name":"Redis::ReplicationClient::Info::Replica::State","name":"State","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/replication_client.cr","line_number":311,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L311"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"StableSync","name":"StableSync","value":"0"}],"namespace":{"html_id":"redis/Redis/ReplicationClient/Info/Replica","kind":"struct","full_name":"Redis::ReplicationClient::Info::Replica","name":"Replica"},"instance_methods":[{"html_id":"stable_sync?-instance-method","name":"stable_sync?","abstract":false,"location":{"filename":"src/replication_client.cr","line_number":312,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L312"},"def":{"name":"stable_sync?","visibility":"Public","body":"self == StableSync"}}]}]},{"html_id":"redis/Redis/ReplicationClient/Info/Replication","path":"Redis/ReplicationClient/Info/Replication.html","kind":"struct","full_name":"Redis::ReplicationClient::Info::Replication","name":"Replication","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/replication_client.cr","line_number":171,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L171"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/ReplicationClient/Info","kind":"module","full_name":"Redis::ReplicationClient::Info","name":"Info"},"constructors":[{"html_id":"new(text:String)-class-method","name":"new","abstract":false,"args":[{"name":"text","external_name":"text","restriction":"String"}],"args_string":"(text : String)","args_html":"(text : String)","location":{"filename":"src/replication_client.cr","line_number":182,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L182"},"def":{"name":"new","args":[{"name":"text","external_name":"text","restriction":"String"}],"visibility":"Public","body":"_ = allocate\n_.initialize(text)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"connected_replicas:Int32-instance-method","name":"connected_replicas","abstract":false,"location":{"filename":"src/replication_client.cr","line_number":173,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L173"},"def":{"name":"connected_replicas","visibility":"Public","body":"@connected_replicas"}},{"html_id":"master_host:String|Nil-instance-method","name":"master_host","abstract":false,"location":{"filename":"src/replication_client.cr","line_number":176,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L176"},"def":{"name":"master_host","return_type":"String | ::Nil","visibility":"Public","body":"@master_host"}},{"html_id":"master_last_io:Time|Nil-instance-method","name":"master_last_io","abstract":false,"location":{"filename":"src/replication_client.cr","line_number":179,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L179"},"def":{"name":"master_last_io","return_type":"Time | ::Nil","visibility":"Public","body":"@master_last_io"}},{"html_id":"master_link_status:String|Nil-instance-method","name":"master_link_status","abstract":false,"location":{"filename":"src/replication_client.cr","line_number":178,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L178"},"def":{"name":"master_link_status","return_type":"String | ::Nil","visibility":"Public","body":"@master_link_status"}},{"html_id":"master_port:Int32|Nil-instance-method","name":"master_port","abstract":false,"location":{"filename":"src/replication_client.cr","line_number":177,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L177"},"def":{"name":"master_port","return_type":"Int32 | ::Nil","visibility":"Public","body":"@master_port"}},{"html_id":"master_replid:String|Nil-instance-method","name":"master_replid","abstract":false,"location":{"filename":"src/replication_client.cr","line_number":175,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L175"},"def":{"name":"master_replid","return_type":"String | ::Nil","visibility":"Public","body":"@master_replid"}},{"html_id":"master_sync_in_progress?:Bool|Nil-instance-method","name":"master_sync_in_progress?","abstract":false,"location":{"filename":"src/replication_client.cr","line_number":180,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L180"},"def":{"name":"master_sync_in_progress?","return_type":"Bool | ::Nil","visibility":"Public","body":"@master_sync_in_progress"}},{"html_id":"replicas:Array(Info::Replica)-instance-method","name":"replicas","abstract":false,"location":{"filename":"src/replication_client.cr","line_number":174,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L174"},"def":{"name":"replicas","return_type":"Array(Info::Replica)","visibility":"Public","body":"if (value = @replicas).nil?\n @replicas = ([] of Info::Replica)\nelse\n value\nend"}},{"html_id":"role:Role-instance-method","name":"role","abstract":false,"location":{"filename":"src/replication_client.cr","line_number":172,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L172"},"def":{"name":"role","return_type":"Role","visibility":"Public","body":"@role"}}],"types":[{"html_id":"redis/Redis/ReplicationClient/Info/Replication/Role","path":"Redis/ReplicationClient/Info/Replication/Role.html","kind":"enum","full_name":"Redis::ReplicationClient::Info::Replication::Role","name":"Role","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/replication_client.cr","line_number":228,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L228"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"Master","name":"Master","value":"0"},{"id":"Replica","name":"Replica","value":"1"}],"namespace":{"html_id":"redis/Redis/ReplicationClient/Info/Replication","kind":"struct","full_name":"Redis::ReplicationClient::Info::Replication","name":"Replication"},"instance_methods":[{"html_id":"master?-instance-method","name":"master?","abstract":false,"location":{"filename":"src/replication_client.cr","line_number":229,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L229"},"def":{"name":"master?","visibility":"Public","body":"self == Master"}},{"html_id":"replica?-instance-method","name":"replica?","abstract":false,"location":{"filename":"src/replication_client.cr","line_number":230,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/replication_client.cr#L230"},"def":{"name":"replica?","visibility":"Public","body":"self == Replica"}}]}]}]}]},{"html_id":"redis/Redis/Streaming","path":"Redis/Streaming.html","kind":"module","full_name":"Redis::Streaming","name":"Streaming","abstract":false,"locations":[{"filename":"src/streaming.cr","line_number":4,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L4"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"types":[{"html_id":"redis/Redis/Streaming/Message","path":"Redis/Streaming/Message.html","kind":"struct","full_name":"Redis::Streaming::Message","name":"Message","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/streaming.cr","line_number":92,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L92"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Streaming","kind":"module","full_name":"Redis::Streaming","name":"Streaming"},"constructors":[{"html_id":"new(message:Array)-class-method","name":"new","abstract":false,"args":[{"name":"message","external_name":"message","restriction":"Array"}],"args_string":"(message : Array)","args_html":"(message : Array)","location":{"filename":"src/streaming.cr","line_number":95,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L95"},"def":{"name":"new","args":[{"name":"message","external_name":"message","restriction":"Array"}],"visibility":"Public","body":"_ = allocate\n_.initialize(message)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"id:String-instance-method","name":"id","abstract":false,"location":{"filename":"src/streaming.cr","line_number":93,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L93"},"def":{"name":"id","visibility":"Public","body":"@id"}},{"html_id":"values:Hash(String,String)-instance-method","name":"values","abstract":false,"location":{"filename":"src/streaming.cr","line_number":93,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L93"},"def":{"name":"values","visibility":"Public","body":"@values"}}]},{"html_id":"redis/Redis/Streaming/XAutoClaimResponse","path":"Redis/Streaming/XAutoClaimResponse.html","kind":"struct","full_name":"Redis::Streaming::XAutoClaimResponse","name":"XAutoClaimResponse","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/streaming.cr","line_number":77,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L77"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Streaming","kind":"module","full_name":"Redis::Streaming","name":"Streaming"},"constructors":[{"html_id":"new(response:Array)-class-method","name":"new","abstract":false,"args":[{"name":"response","external_name":"response","restriction":"Array"}],"args_string":"(response : Array)","args_html":"(response : Array)","location":{"filename":"src/streaming.cr","line_number":81,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L81"},"def":{"name":"new","args":[{"name":"response","external_name":"response","restriction":"Array"}],"visibility":"Public","body":"_ = allocate\n_.initialize(response)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"id:String-instance-method","name":"id","abstract":false,"location":{"filename":"src/streaming.cr","line_number":78,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L78"},"def":{"name":"id","return_type":"String","visibility":"Public","body":"@id"}},{"html_id":"messages:Array(Message)-instance-method","name":"messages","abstract":false,"location":{"filename":"src/streaming.cr","line_number":79,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L79"},"def":{"name":"messages","return_type":"Array(Message)","visibility":"Public","body":"@messages"}}]},{"html_id":"redis/Redis/Streaming/XPendingBaseResponse","path":"Redis/Streaming/XPendingBaseResponse.html","kind":"struct","full_name":"Redis::Streaming::XPendingBaseResponse","name":"XPendingBaseResponse","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/streaming.cr","line_number":5,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L5"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Streaming","kind":"module","full_name":"Redis::Streaming","name":"Streaming"},"constructors":[{"html_id":"new(response:Array)-class-method","name":"new","abstract":false,"args":[{"name":"response","external_name":"response","restriction":"Array"}],"args_string":"(response : Array)","args_html":"(response : Array)","location":{"filename":"src/streaming.cr","line_number":8,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L8"},"def":{"name":"new","args":[{"name":"response","external_name":"response","restriction":"Array"}],"visibility":"Public","body":"_ = allocate\n_.initialize(response)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"count:Int64-instance-method","name":"count","abstract":false,"location":{"filename":"src/streaming.cr","line_number":6,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L6"},"def":{"name":"count","visibility":"Public","body":"@count"}},{"html_id":"data:Array(Data)-instance-method","name":"data","abstract":false,"location":{"filename":"src/streaming.cr","line_number":6,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L6"},"def":{"name":"data","return_type":"Array(Data)","visibility":"Public","body":"@data"}},{"html_id":"earliest:String-instance-method","name":"earliest","abstract":false,"location":{"filename":"src/streaming.cr","line_number":6,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L6"},"def":{"name":"earliest","visibility":"Public","body":"@earliest"}},{"html_id":"latest:String-instance-method","name":"latest","abstract":false,"location":{"filename":"src/streaming.cr","line_number":6,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L6"},"def":{"name":"latest","visibility":"Public","body":"@latest"}}],"types":[{"html_id":"redis/Redis/Streaming/XPendingBaseResponse/Data","path":"Redis/Streaming/XPendingBaseResponse/Data.html","kind":"struct","full_name":"Redis::Streaming::XPendingBaseResponse::Data","name":"Data","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/streaming.cr","line_number":21,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L21"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Streaming/XPendingBaseResponse","kind":"struct","full_name":"Redis::Streaming::XPendingBaseResponse","name":"XPendingBaseResponse"},"constructors":[{"html_id":"new(consumer:String,pending_count:Int64)-class-method","name":"new","abstract":false,"args":[{"name":"consumer","external_name":"consumer","restriction":"String"},{"name":"pending_count","external_name":"pending_count","restriction":"Int64"}],"args_string":"(consumer : String, pending_count : Int64)","args_html":"(consumer : String, pending_count : Int64)","location":{"filename":"src/streaming.cr","line_number":21,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L21"},"def":{"name":"new","args":[{"name":"consumer","external_name":"consumer","restriction":"String"},{"name":"pending_count","external_name":"pending_count","restriction":"Int64"}],"visibility":"Public","body":"_ = allocate\n_.initialize(consumer, pending_count)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/streaming.cr","line_number":21,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L21"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@consumer.clone, @pending_count.clone)"}},{"html_id":"consumer:String-instance-method","name":"consumer","abstract":false,"def":{"name":"consumer","return_type":"String","visibility":"Public","body":"@consumer"}},{"html_id":"copy_with(consumer_consumer=@consumer,pending_count_pending_count=@pending_count)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_consumer","default_value":"@consumer","external_name":"consumer","restriction":""},{"name":"_pending_count","default_value":"@pending_count","external_name":"pending_count","restriction":""}],"args_string":"(consumer _consumer = @consumer, pending_count _pending_count = @pending_count)","args_html":"(consumer _consumer = @consumer, pending_count _pending_count = @pending_count)","location":{"filename":"src/streaming.cr","line_number":21,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L21"},"def":{"name":"copy_with","args":[{"name":"_consumer","default_value":"@consumer","external_name":"consumer","restriction":""},{"name":"_pending_count","default_value":"@pending_count","external_name":"pending_count","restriction":""}],"visibility":"Public","body":"self.class.new(_consumer, _pending_count)"}},{"html_id":"pending_count:Int64-instance-method","name":"pending_count","abstract":false,"def":{"name":"pending_count","return_type":"Int64","visibility":"Public","body":"@pending_count"}}]}]},{"html_id":"redis/Redis/Streaming/XPendingExtendedResponse","path":"Redis/Streaming/XPendingExtendedResponse.html","kind":"struct","full_name":"Redis::Streaming::XPendingExtendedResponse","name":"XPendingExtendedResponse","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/streaming.cr","line_number":24,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L24"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Streaming","kind":"module","full_name":"Redis::Streaming","name":"Streaming"},"constructors":[{"html_id":"new(data:Array,now:Time=Time.utc)-class-method","name":"new","abstract":false,"args":[{"name":"data","external_name":"data","restriction":"Array"},{"name":"now","default_value":"Time.utc","external_name":"now","restriction":"Time"}],"args_string":"(data : Array, now : Time = Time.utc)","args_html":"(data : Array, now : Time = Time.utc)","location":{"filename":"src/streaming.cr","line_number":27,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L27"},"def":{"name":"new","args":[{"name":"data","external_name":"data","restriction":"Array"},{"name":"now","default_value":"Time.utc","external_name":"now","restriction":"Time"}],"visibility":"Public","body":"_ = allocate\n_.initialize(data, now)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"messages:Array(MessageData)-instance-method","name":"messages","abstract":false,"location":{"filename":"src/streaming.cr","line_number":25,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L25"},"def":{"name":"messages","return_type":"Array(MessageData)","visibility":"Public","body":"@messages"}}],"types":[{"html_id":"redis/Redis/Streaming/XPendingExtendedResponse/MessageData","path":"Redis/Streaming/XPendingExtendedResponse/MessageData.html","kind":"struct","full_name":"Redis::Streaming::XPendingExtendedResponse::MessageData","name":"MessageData","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/streaming.cr","line_number":40,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L40"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Streaming/XPendingExtendedResponse","kind":"struct","full_name":"Redis::Streaming::XPendingExtendedResponse","name":"XPendingExtendedResponse"},"constructors":[{"html_id":"new(id:String,consumer:String,last_delivered_at:Time,delivery_count:Int64)-class-method","name":"new","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"::String"},{"name":"consumer","external_name":"consumer","restriction":"::String"},{"name":"last_delivered_at","external_name":"last_delivered_at","restriction":"::Time"},{"name":"delivery_count","external_name":"delivery_count","restriction":"::Int64"}],"args_string":"(id : String, consumer : String, last_delivered_at : Time, delivery_count : Int64)","args_html":"(id : String, consumer : String, last_delivered_at : Time, delivery_count : Int64)","location":{"filename":"src/streaming.cr","line_number":46,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L46"},"def":{"name":"new","args":[{"name":"id","external_name":"id","restriction":"::String"},{"name":"consumer","external_name":"consumer","restriction":"::String"},{"name":"last_delivered_at","external_name":"last_delivered_at","restriction":"::Time"},{"name":"delivery_count","external_name":"delivery_count","restriction":"::Int64"}],"visibility":"Public","body":"_ = allocate\n_.initialize(id, consumer, last_delivered_at, delivery_count)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"age-instance-method","name":"age","abstract":false,"location":{"filename":"src/streaming.cr","line_number":49,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L49"},"def":{"name":"age","visibility":"Public","body":"Time.utc - last_delivered_at"}},{"html_id":"consumer:String-instance-method","name":"consumer","abstract":false,"location":{"filename":"src/streaming.cr","line_number":42,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L42"},"def":{"name":"consumer","return_type":"String","visibility":"Public","body":"@consumer"}},{"html_id":"delivery_count:Int64-instance-method","name":"delivery_count","abstract":false,"location":{"filename":"src/streaming.cr","line_number":44,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L44"},"def":{"name":"delivery_count","return_type":"Int64","visibility":"Public","body":"@delivery_count"}},{"html_id":"id:String-instance-method","name":"id","abstract":false,"location":{"filename":"src/streaming.cr","line_number":41,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L41"},"def":{"name":"id","return_type":"String","visibility":"Public","body":"@id"}},{"html_id":"last_delivered_at:Time-instance-method","name":"last_delivered_at","abstract":false,"location":{"filename":"src/streaming.cr","line_number":43,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L43"},"def":{"name":"last_delivered_at","return_type":"Time","visibility":"Public","body":"@last_delivered_at"}}]}]},{"html_id":"redis/Redis/Streaming/XReadGroupResponse","path":"Redis/Streaming/XReadGroupResponse.html","kind":"struct","full_name":"Redis::Streaming::XReadGroupResponse","name":"XReadGroupResponse","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/streaming.cr","line_number":55,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L55"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Streaming","kind":"module","full_name":"Redis::Streaming","name":"Streaming"},"constructors":[{"html_id":"new(response:Array(Redis::Value))-class-method","name":"new","abstract":false,"args":[{"name":"response","external_name":"response","restriction":"Array(Redis::Value)"}],"args_string":"(response : Array(Redis::Value))","args_html":"(response : Array(Redis::Value))","location":{"filename":"src/streaming.cr","line_number":58,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L58"},"def":{"name":"new","args":[{"name":"response","external_name":"response","restriction":"Array(Redis::Value)"}],"visibility":"Public","body":"_ = allocate\n_.initialize(response)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"results:Array(Redis::Streaming::XReadGroupResponse::Result)-instance-method","name":"results","abstract":false,"location":{"filename":"src/streaming.cr","line_number":56,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L56"},"def":{"name":"results","visibility":"Public","body":"@results"}}],"types":[{"html_id":"redis/Redis/Streaming/XReadGroupResponse/Result","path":"Redis/Streaming/XReadGroupResponse/Result.html","kind":"struct","full_name":"Redis::Streaming::XReadGroupResponse::Result","name":"Result","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/streaming.cr","line_number":67,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L67"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Streaming/XReadGroupResponse","kind":"struct","full_name":"Redis::Streaming::XReadGroupResponse","name":"XReadGroupResponse"},"constructors":[{"html_id":"new(key:String,messages:Array)-class-method","name":"new","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"messages","external_name":"messages","restriction":"Array"}],"args_string":"(key : String, messages : Array)","args_html":"(key : String, messages : Array)","location":{"filename":"src/streaming.cr","line_number":71,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L71"},"def":{"name":"new","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"messages","external_name":"messages","restriction":"Array"}],"visibility":"Public","body":"_ = allocate\n_.initialize(key, messages)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"key:String-instance-method","name":"key","abstract":false,"location":{"filename":"src/streaming.cr","line_number":69,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L69"},"def":{"name":"key","return_type":"String","visibility":"Public","body":"@key"}},{"html_id":"messages:Array(Message)-instance-method","name":"messages","abstract":false,"location":{"filename":"src/streaming.cr","line_number":68,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/streaming.cr#L68"},"def":{"name":"messages","return_type":"Array(Message)","visibility":"Public","body":"@messages"}}]}]}]},{"html_id":"redis/Redis/Subscription","path":"Redis/Subscription.html","kind":"class","full_name":"Redis::Subscription","name":"Subscription","abstract":false,"superclass":{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/connection.cr","line_number":484,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L484"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"doc":"The `Subscription` is what is yielded to a `Connection#subscribe` block. It\nis used to setup callbacks when messages come in, the connection is\nsubscribed to other channels or patterns, or unsubscribed from any channels\nor patterns.\n\n```\nredis.subscribe \"channel1\", \"channel2\" do |subscription, connection|\n subscription.on_message do |channel, message|\n if message == \"unsubscribe\"\n connection.unsubscribe channel\n end\n\n # ...\n end\n\n # Respond to new subscribers\n subscription.on_subscribe do |channel, sub_count|\n connection.incr \"sub_count:#{channel}\"\n end\n\n # Respond to losing subscribers\n subscription.on_unsubscribe do |channel, sub_count|\n connection.incr \"sub_count:#{channel}\"\n end\nend\n```\n\nFor more information, see the documentation for:\n- [`SUBSCRIBE`](https://redis.io/commands/subscribe/)\n- [`PSUBSCRIBE`](https://redis.io/commands/psubscribe/)","summary":"

    The Subscription is what is yielded to a Connection#subscribe block.

    ","instance_methods":[{"html_id":"close-instance-method","name":"close","abstract":false,"location":{"filename":"src/connection.cr","line_number":571,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L571"},"def":{"name":"close","visibility":"Public","body":"@channels.each do |channel|\n @connection.unsubscribe(channel)\nend"}},{"html_id":"on_message(&on_message:String,String,String->)-instance-method","name":"on_message","doc":"Define a callback for when a new message is received.\n\n```\nsubscription.on_message do |channel, message|\n pp channel: channel, message: message\nend\n```","summary":"

    Define a callback for when a new message is received.

    ","abstract":false,"location":{"filename":"src/connection.cr","line_number":501,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L501"},"def":{"name":"on_message","yields":3,"block_arity":3,"block_arg":{"name":"on_message","external_name":"on_message","restriction":"(String, String, String ->)"},"visibility":"Public","body":"@on_message = on_message\nself\n"}},{"html_id":"on_subscribe(&on_subscribe:String,Int64->)-instance-method","name":"on_subscribe","doc":"Define a callback to execute when the connection is subscribed to another\nchannel.","summary":"

    Define a callback to execute when the connection is subscribed to another channel.

    ","abstract":false,"location":{"filename":"src/connection.cr","line_number":507,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L507"},"def":{"name":"on_subscribe","yields":2,"block_arity":2,"block_arg":{"name":"on_subscribe","external_name":"on_subscribe","restriction":"(String, Int64 ->)"},"visibility":"Public","body":"@on_subscribe = on_subscribe\nself\n"}},{"html_id":"on_unsubscribe(&on_unsubscribe:String,Int64->)-instance-method","name":"on_unsubscribe","doc":"Define a callback to execute when the connection is unsubscribed from\nanother channel.","summary":"

    Define a callback to execute when the connection is unsubscribed from another channel.

    ","abstract":false,"location":{"filename":"src/connection.cr","line_number":513,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L513"},"def":{"name":"on_unsubscribe","yields":2,"block_arity":2,"block_arg":{"name":"on_unsubscribe","external_name":"on_unsubscribe","restriction":"(String, Int64 ->)"},"visibility":"Public","body":"@on_unsubscribe = on_unsubscribe\nself\n"}}],"types":[{"html_id":"redis/Redis/Subscription/InvalidMessage","path":"Redis/Subscription/InvalidMessage.html","kind":"class","full_name":"Redis::Subscription::InvalidMessage","name":"InvalidMessage","abstract":false,"superclass":{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},"ancestors":[{"html_id":"redis/Redis/Error","kind":"class","full_name":"Redis::Error","name":"Error"},{"html_id":"redis/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/connection.cr","line_number":577,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/connection.cr#L577"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/Subscription","kind":"class","full_name":"Redis::Subscription","name":"Subscription"}}]},{"html_id":"redis/Redis/TimeSeries","path":"Redis/TimeSeries.html","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":13,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L13"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"doc":"Time-series support for Redis using the\n[RedisTimeSeries module](https://oss.redis.com/redistimeseries/).\n\n```\nrequire \"redis\"\nrequire \"redis/time_series\"\n```","summary":"

    Time-series support for Redis using the RedisTimeSeries module.

    \n

    EXPERIMENTAL Support for the Redis TimeSeries module is subject to change.

    ","instance_methods":[{"html_id":"add(key:String,value:Float64|Int64,retention:Time::Span|Nil=nil,encoding:Encoding|Nil=nil,chunk_size:Int64|Nil=nil,on_duplicateduplicate_policy:DuplicatePolicy|Nil=nil,labels:Hash(String,String|Int32|Int64)|Nil=nil)-instance-method","name":"add","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"value","external_name":"value","restriction":"Float64 | Int64"},{"name":"retention","default_value":"nil","external_name":"retention","restriction":"Time::Span | ::Nil"},{"name":"encoding","default_value":"nil","external_name":"encoding","restriction":"Encoding | ::Nil"},{"name":"chunk_size","default_value":"nil","external_name":"chunk_size","restriction":"Int64 | ::Nil"},{"name":"duplicate_policy","default_value":"nil","external_name":"on_duplicate","restriction":"DuplicatePolicy | ::Nil"},{"name":"labels","default_value":"nil","external_name":"labels","restriction":"Hash(String, String | Int32 | Int64) | ::Nil"}],"args_string":"(key : String, value : Float64 | Int64, retention : Time::Span | Nil = nil, encoding : Encoding | Nil = nil, chunk_size : Int64 | Nil = nil, on_duplicate duplicate_policy : DuplicatePolicy | Nil = nil, labels : Hash(String, String | Int32 | Int64) | Nil = nil)","args_html":"(key : String, value : Float64 | Int64, retention : Time::Span | Nil = nil, encoding : Encoding | Nil = nil, chunk_size : Int64 | Nil = nil, on_duplicate duplicate_policy : DuplicatePolicy | Nil = nil, labels : Hash(String, String | Int32 | Int64) | Nil = nil)","location":{"filename":"src/time_series.cr","line_number":54,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L54"},"def":{"name":"add","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"value","external_name":"value","restriction":"Float64 | Int64"},{"name":"retention","default_value":"nil","external_name":"retention","restriction":"Time::Span | ::Nil"},{"name":"encoding","default_value":"nil","external_name":"encoding","restriction":"Encoding | ::Nil"},{"name":"chunk_size","default_value":"nil","external_name":"chunk_size","restriction":"Int64 | ::Nil"},{"name":"duplicate_policy","default_value":"nil","external_name":"on_duplicate","restriction":"DuplicatePolicy | ::Nil"},{"name":"labels","default_value":"nil","external_name":"labels","restriction":"Hash(String, String | Int32 | Int64) | ::Nil"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 12 + ((labels.try(&.size) || 0) * 2))\n(((command << \"ts.add\") << key) << \"*\") << value.to_s\nif retention\n (command << \"retention\") << retention.total_milliseconds.to_i64.to_s\nend\nif encoding\n (command << \"encoding\") << encoding.to_s\nend\nif chunk_size\n (command << \"chunk_size\") << chunk_size.to_s\nend\nif duplicate_policy\n (command << \"on_duplicate\") << duplicate_policy.to_s\nend\nif labels && labels.any?\n command << \"labels\"\n labels.each do |key, value|\n (command << key) << value.to_s\n end\nend\n@redis.run(command)\n"}},{"html_id":"add(key:String,timestamp:Time,value:Float64|Int64,retention:Time::Span|Nil=nil,encoding:Encoding|Nil=nil,chunk_size:Int64|Nil=nil,on_duplicateduplicate_policy:DuplicatePolicy|Nil=nil,labels:Hash(String,String|Int32|Int64)|Nil=nil)-instance-method","name":"add","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"timestamp","external_name":"timestamp","restriction":"Time"},{"name":"value","external_name":"value","restriction":"Float64 | Int64"},{"name":"retention","default_value":"nil","external_name":"retention","restriction":"Time::Span | ::Nil"},{"name":"encoding","default_value":"nil","external_name":"encoding","restriction":"Encoding | ::Nil"},{"name":"chunk_size","default_value":"nil","external_name":"chunk_size","restriction":"Int64 | ::Nil"},{"name":"duplicate_policy","default_value":"nil","external_name":"on_duplicate","restriction":"DuplicatePolicy | ::Nil"},{"name":"labels","default_value":"nil","external_name":"labels","restriction":"Hash(String, String | Int32 | Int64) | ::Nil"}],"args_string":"(key : String, timestamp : Time, value : Float64 | Int64, retention : Time::Span | Nil = nil, encoding : Encoding | Nil = nil, chunk_size : Int64 | Nil = nil, on_duplicate duplicate_policy : DuplicatePolicy | Nil = nil, labels : Hash(String, String | Int32 | Int64) | Nil = nil)","args_html":"(key : String, timestamp : Time, value : Float64 | Int64, retention : Time::Span | Nil = nil, encoding : Encoding | Nil = nil, chunk_size : Int64 | Nil = nil, on_duplicate duplicate_policy : DuplicatePolicy | Nil = nil, labels : Hash(String, String | Int32 | Int64) | Nil = nil)","location":{"filename":"src/time_series.cr","line_number":91,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L91"},"def":{"name":"add","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"timestamp","external_name":"timestamp","restriction":"Time"},{"name":"value","external_name":"value","restriction":"Float64 | Int64"},{"name":"retention","default_value":"nil","external_name":"retention","restriction":"Time::Span | ::Nil"},{"name":"encoding","default_value":"nil","external_name":"encoding","restriction":"Encoding | ::Nil"},{"name":"chunk_size","default_value":"nil","external_name":"chunk_size","restriction":"Int64 | ::Nil"},{"name":"duplicate_policy","default_value":"nil","external_name":"on_duplicate","restriction":"DuplicatePolicy | ::Nil"},{"name":"labels","default_value":"nil","external_name":"labels","restriction":"Hash(String, String | Int32 | Int64) | ::Nil"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 13 + ((labels.try(&.size) || 0) * 2))\n(((command << \"ts.add\") << key) << timestamp.to_unix_ms.to_s) << value.to_s\nif retention\n (command << \"retention\") << retention.total_milliseconds.to_i64.to_s\nend\nif encoding\n (command << \"encoding\") << encoding.to_s\nend\nif chunk_size\n (command << \"chunk_size\") << chunk_size.to_s\nend\nif duplicate_policy\n (command << \"on_duplicate\") << duplicate_policy.to_s\nend\nif labels && labels.any?\n command << \"labels\"\n labels.each do |key, value|\n (command << key) << value.to_s\n end\nend\n@redis.run(command)\n"}},{"html_id":"aggregation(aggregator:AggregationType,bucket_duration:Time::Span,align:Alignment|Time|Nil=nil,buckettimestamp:BucketTimestamp|Nil=nil,empty:Bool|Nil=nil)-instance-method","name":"aggregation","abstract":false,"args":[{"name":"aggregator","external_name":"aggregator","restriction":"AggregationType"},{"name":"bucket_duration","external_name":"bucket_duration","restriction":"Time::Span"},{"name":"align","default_value":"nil","external_name":"align","restriction":"Alignment | Time | Nil"},{"name":"buckettimestamp","default_value":"nil","external_name":"buckettimestamp","restriction":"BucketTimestamp | ::Nil"},{"name":"empty","default_value":"nil","external_name":"empty","restriction":"Bool | ::Nil"}],"args_string":"(aggregator : AggregationType, bucket_duration : Time::Span, align : Alignment | Time | Nil = nil, buckettimestamp : BucketTimestamp | Nil = nil, empty : Bool | Nil = nil)","args_html":"(aggregator : AggregationType, bucket_duration : Time::Span, align : Alignment | Time | Nil = nil, buckettimestamp : BucketTimestamp | Nil = nil, empty : Bool | Nil = nil)","location":{"filename":"src/time_series.cr","line_number":153,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L153"},"def":{"name":"aggregation","args":[{"name":"aggregator","external_name":"aggregator","restriction":"AggregationType"},{"name":"bucket_duration","external_name":"bucket_duration","restriction":"Time::Span"},{"name":"align","default_value":"nil","external_name":"align","restriction":"Alignment | Time | Nil"},{"name":"buckettimestamp","default_value":"nil","external_name":"buckettimestamp","restriction":"BucketTimestamp | ::Nil"},{"name":"empty","default_value":"nil","external_name":"empty","restriction":"Bool | ::Nil"}],"visibility":"Public","body":"Aggregation.new(aggregator: aggregator, bucket_duration: bucket_duration, alignment: align, buckettimestamp: buckettimestamp, empty: empty)"}},{"html_id":"create(key:String,retention:Time::Span|Nil=nil,encoding:Encoding|Nil=nil,chunk_size:Int64|Nil=nil,duplicate_policy:DuplicatePolicy|Nil=nil,labels:Hash(String,String|Int32|Int64)|Nil=nil)-instance-method","name":"create","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"retention","default_value":"nil","external_name":"retention","restriction":"Time::Span | ::Nil"},{"name":"encoding","default_value":"nil","external_name":"encoding","restriction":"Encoding | ::Nil"},{"name":"chunk_size","default_value":"nil","external_name":"chunk_size","restriction":"Int64 | ::Nil"},{"name":"duplicate_policy","default_value":"nil","external_name":"duplicate_policy","restriction":"DuplicatePolicy | ::Nil"},{"name":"labels","default_value":"nil","external_name":"labels","restriction":"Hash(String, String | Int32 | Int64) | ::Nil"}],"args_string":"(key : String, retention : Time::Span | Nil = nil, encoding : Encoding | Nil = nil, chunk_size : Int64 | Nil = nil, duplicate_policy : DuplicatePolicy | Nil = nil, labels : Hash(String, String | Int32 | Int64) | Nil = nil)","args_html":"(key : String, retention : Time::Span | Nil = nil, encoding : Encoding | Nil = nil, chunk_size : Int64 | Nil = nil, duplicate_policy : DuplicatePolicy | Nil = nil, labels : Hash(String, String | Int32 | Int64) | Nil = nil)","location":{"filename":"src/time_series.cr","line_number":18,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L18"},"def":{"name":"create","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"retention","default_value":"nil","external_name":"retention","restriction":"Time::Span | ::Nil"},{"name":"encoding","default_value":"nil","external_name":"encoding","restriction":"Encoding | ::Nil"},{"name":"chunk_size","default_value":"nil","external_name":"chunk_size","restriction":"Int64 | ::Nil"},{"name":"duplicate_policy","default_value":"nil","external_name":"duplicate_policy","restriction":"DuplicatePolicy | ::Nil"},{"name":"labels","default_value":"nil","external_name":"labels","restriction":"Hash(String, String | Int32 | Int64) | ::Nil"}],"visibility":"Public","body":"command = Array(String).new(initial_capacity: 11 + ((labels.try(&.size) || 0) * 2))\n(command << \"ts.create\") << key\nif retention\n (command << \"retention\") << retention.total_milliseconds.to_i64.to_s\nend\nif encoding\n (command << \"encoding\") << encoding.to_s\nend\nif chunk_size\n (command << \"chunk_size\") << chunk_size.to_s\nend\nif duplicate_policy\n (command << \"duplicate_policy\") << duplicate_policy.to_s\nend\nif labels && labels.any?\n command << \"labels\"\n labels.each do |key, value|\n (command << key) << value.to_s\n end\nend\n@redis.run(command)\n"}},{"html_id":"get(key:String)-instance-method","name":"get","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/time_series.cr","line_number":126,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L126"},"def":{"name":"get","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"@redis.run({\"ts.get\", key})"}},{"html_id":"info(key:String)-instance-method","name":"info","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/time_series.cr","line_number":145,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L145"},"def":{"name":"info","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"@redis.run({\"ts.info\", key})"}},{"html_id":"mrange(time_range:::Range(Time,Time|Nil),filter:String,filter_by_ts:Enumerable(Time)|Nil=nil,filter_by_value:::Range(Float64,Float64)|Nil=nil,withlabels:Bool|Nil=nil,selected_labels:Enumerable(String)|Nil=nil,count:Int|Nil=nil,aggregation:Aggregation|Nil=nil,groupby:String|Nil=nil,reduce:String|Nil=nil)-instance-method","name":"mrange","abstract":false,"args":[{"name":"time_range","external_name":"time_range","restriction":"::Range(Time, Time | ::Nil)"},{"name":"filter","external_name":"filter","restriction":"String"},{"name":"filter_by_ts","default_value":"nil","external_name":"filter_by_ts","restriction":"Enumerable(Time) | ::Nil"},{"name":"filter_by_value","default_value":"nil","external_name":"filter_by_value","restriction":"::Range(Float64, Float64) | ::Nil"},{"name":"withlabels","default_value":"nil","external_name":"withlabels","restriction":"Bool | ::Nil"},{"name":"selected_labels","default_value":"nil","external_name":"selected_labels","restriction":"Enumerable(String) | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"Int | ::Nil"},{"name":"aggregation","default_value":"nil","external_name":"aggregation","restriction":"Aggregation | ::Nil"},{"name":"groupby","default_value":"nil","external_name":"groupby","restriction":"String | ::Nil"},{"name":"reduce","default_value":"nil","external_name":"reduce","restriction":"String | ::Nil"}],"args_string":"(time_range : ::Range(Time, Time | Nil), filter : String, filter_by_ts : Enumerable(Time) | Nil = nil, filter_by_value : ::Range(Float64, Float64) | Nil = nil, withlabels : Bool | Nil = nil, selected_labels : Enumerable(String) | Nil = nil, count : Int | Nil = nil, aggregation : Aggregation | Nil = nil, groupby : String | Nil = nil, reduce : String | Nil = nil)","args_html":"(time_range : ::Range(Time, Time | Nil), filter : String, filter_by_ts : Enumerable(Time) | Nil = nil, filter_by_value : ::Range(Float64, Float64) | Nil = nil, withlabels : Bool | Nil = nil, selected_labels : Enumerable(String) | Nil = nil, count : Int | Nil = nil, aggregation : Aggregation | Nil = nil, groupby : String | Nil = nil, reduce : String | Nil = nil)","location":{"filename":"src/time_series.cr","line_number":181,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L181"},"def":{"name":"mrange","args":[{"name":"time_range","external_name":"time_range","restriction":"::Range(Time, Time | ::Nil)"},{"name":"filter","external_name":"filter","restriction":"String"},{"name":"filter_by_ts","default_value":"nil","external_name":"filter_by_ts","restriction":"Enumerable(Time) | ::Nil"},{"name":"filter_by_value","default_value":"nil","external_name":"filter_by_value","restriction":"::Range(Float64, Float64) | ::Nil"},{"name":"withlabels","default_value":"nil","external_name":"withlabels","restriction":"Bool | ::Nil"},{"name":"selected_labels","default_value":"nil","external_name":"selected_labels","restriction":"Enumerable(String) | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"Int | ::Nil"},{"name":"aggregation","default_value":"nil","external_name":"aggregation","restriction":"Aggregation | ::Nil"},{"name":"groupby","default_value":"nil","external_name":"groupby","restriction":"String | ::Nil"},{"name":"reduce","default_value":"nil","external_name":"reduce","restriction":"String | ::Nil"}],"visibility":"Public","body":"mrange(time_range: time_range, filter: [filter], filter_by_ts: filter_by_ts, filter_by_value: filter_by_value, withlabels: withlabels, selected_labels: selected_labels, count: count, aggregation: aggregation, groupby: groupby, reduce: reduce)"}},{"html_id":"mrange(time_range:::Range(Time,Time|Nil),filter:Array(String),filter_by_ts:Enumerable(Time)|Nil=nil,filter_by_value:::Range(Float64,Float64)|Nil=nil,withlabels:Bool|Nil=nil,selected_labels:Enumerable(String)|Nil=nil,count:Int|Nil=nil,aggregation:Aggregation|Nil=nil,groupby:String|Nil=nil,reduce:String|Nil=nil)-instance-method","name":"mrange","abstract":false,"args":[{"name":"time_range","external_name":"time_range","restriction":"::Range(Time, Time | ::Nil)"},{"name":"filter","external_name":"filter","restriction":"Array(String)"},{"name":"filter_by_ts","default_value":"nil","external_name":"filter_by_ts","restriction":"Enumerable(Time) | ::Nil"},{"name":"filter_by_value","default_value":"nil","external_name":"filter_by_value","restriction":"::Range(Float64, Float64) | ::Nil"},{"name":"withlabels","default_value":"nil","external_name":"withlabels","restriction":"Bool | ::Nil"},{"name":"selected_labels","default_value":"nil","external_name":"selected_labels","restriction":"Enumerable(String) | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"Int | ::Nil"},{"name":"aggregation","default_value":"nil","external_name":"aggregation","restriction":"Aggregation | ::Nil"},{"name":"groupby","default_value":"nil","external_name":"groupby","restriction":"String | ::Nil"},{"name":"reduce","default_value":"nil","external_name":"reduce","restriction":"String | ::Nil"}],"args_string":"(time_range : ::Range(Time, Time | Nil), filter : Array(String), filter_by_ts : Enumerable(Time) | Nil = nil, filter_by_value : ::Range(Float64, Float64) | Nil = nil, withlabels : Bool | Nil = nil, selected_labels : Enumerable(String) | Nil = nil, count : Int | Nil = nil, aggregation : Aggregation | Nil = nil, groupby : String | Nil = nil, reduce : String | Nil = nil)","args_html":"(time_range : ::Range(Time, Time | Nil), filter : Array(String), filter_by_ts : Enumerable(Time) | Nil = nil, filter_by_value : ::Range(Float64, Float64) | Nil = nil, withlabels : Bool | Nil = nil, selected_labels : Enumerable(String) | Nil = nil, count : Int | Nil = nil, aggregation : Aggregation | Nil = nil, groupby : String | Nil = nil, reduce : String | Nil = nil)","location":{"filename":"src/time_series.cr","line_number":207,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L207"},"def":{"name":"mrange","args":[{"name":"time_range","external_name":"time_range","restriction":"::Range(Time, Time | ::Nil)"},{"name":"filter","external_name":"filter","restriction":"Array(String)"},{"name":"filter_by_ts","default_value":"nil","external_name":"filter_by_ts","restriction":"Enumerable(Time) | ::Nil"},{"name":"filter_by_value","default_value":"nil","external_name":"filter_by_value","restriction":"::Range(Float64, Float64) | ::Nil"},{"name":"withlabels","default_value":"nil","external_name":"withlabels","restriction":"Bool | ::Nil"},{"name":"selected_labels","default_value":"nil","external_name":"selected_labels","restriction":"Enumerable(String) | ::Nil"},{"name":"count","default_value":"nil","external_name":"count","restriction":"Int | ::Nil"},{"name":"aggregation","default_value":"nil","external_name":"aggregation","restriction":"Aggregation | ::Nil"},{"name":"groupby","default_value":"nil","external_name":"groupby","restriction":"String | ::Nil"},{"name":"reduce","default_value":"nil","external_name":"reduce","restriction":"String | ::Nil"}],"visibility":"Public","body":"from = time_range.begin\nto = time_range.end || (Time::UNIX_EPOCH + Int32::MAX.seconds)\ncommand_size = (((((((((((1 + 2) + 1) + (filter_by_ts.try(&.size) || 0)) + 3) + 1) + 1) + (selected_labels.try(&.size) || 0)) + 2) + 8) + 1) + filter.size) + 4\ncommand = Array(String).new(initial_capacity: command_size)\n((command << \"ts.mrange\") << from.to_unix_ms.to_s) << to.to_unix_ms.to_s\nif filter_by_ts\n command << \"filter_by_ts\"\n filter_by_ts.each do |ts|\n command << ts.to_unix_ms.to_s\n end\nend\nif filter_by_value\n command << \"filter_by_value\"\n command << filter_by_value.begin.to_s\n command << filter_by_value.end.to_s\nend\nif withlabels\n command << \"withlabels\"\nend\nif selected_labels\n command << \"selected_labels\"\n selected_labels.each do |label|\n command << label\n end\nend\nif count\n (command << \"count\") << count.to_s\nend\nif aggregation\n case alignment = aggregation.alignment\n in Alignment\n (command << \"align\") << alignment.to_s.downcase\n in Time\n (command << \"align\") << alignment.to_unix_ms.to_s\n in Nil\n end\n ((command << \"aggregation\") << aggregation.aggregator.to_s) << aggregation.bucket_duration.total_milliseconds.to_i64.to_s\n if bucket_ts = aggregation.buckettimestamp\n (command << \"buckettimestamp\") << bucket_ts.to_s\n end\n if aggregation.empty\n command << \"empty\"\n end\nend\ncommand << \"filter\"\nfilter.each do |filter_expr|\n command << filter_expr\nend\nif groupby && reduce\n (((command << \"groupby\") << groupby) << \"reduce\") << reduce\nend\n@redis.run(command)\n"}},{"html_id":"queryindex(filter:String)-instance-method","name":"queryindex","abstract":false,"args":[{"name":"filter","external_name":"filter","restriction":"String"}],"args_string":"(filter : String)","args_html":"(filter : String)","location":{"filename":"src/time_series.cr","line_number":149,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L149"},"def":{"name":"queryindex","args":[{"name":"filter","external_name":"filter","restriction":"String"}],"visibility":"Public","body":"@redis.run({\"ts.queryindex\", filter})"}},{"html_id":"range(key:String,time_range:::Range(Time,Time),&:RangeOptions->)-instance-method","name":"range","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"time_range","external_name":"time_range","restriction":"::Range(Time, Time)"}],"args_string":"(key : String, time_range : ::Range(Time, Time), & : RangeOptions -> )","args_html":"(key : String, time_range : ::Range(Time, Time), & : RangeOptions -> )","location":{"filename":"src/time_series.cr","line_number":130,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L130"},"def":{"name":"range","args":[{"name":"key","external_name":"key","restriction":"String"},{"name":"time_range","external_name":"time_range","restriction":"::Range(Time, Time)"}],"yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(RangeOptions ->)"},"visibility":"Public","body":"command = Array(String).new(initial_capacity: 14)\noptions = RangeOptions.new\n(((command << \"ts.range\") << key) << time_range.begin.to_unix_ms.to_s) << time_range.end.to_unix_ms.to_s\nyield options\nif agg = options.aggregation\n ((command << \"aggregation\") << agg.type.to_s) << agg.time_bucket.total_milliseconds.to_i.to_s\nend\n@redis.run(command)\n"}}],"types":[{"html_id":"redis/Redis/TimeSeries/Aggregation","path":"Redis/TimeSeries/Aggregation.html","kind":"struct","full_name":"Redis::TimeSeries::Aggregation","name":"Aggregation","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":169,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L169"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/TimeSeries","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries"},"constructors":[{"html_id":"new(aggregator:AggregationType,bucket_duration:Time::Span,alignment:Alignment|Time|Nil=nil,buckettimestamp:BucketTimestamp|Nil=nil,empty:Bool|Nil=nil)-class-method","name":"new","abstract":false,"args":[{"name":"aggregator","external_name":"aggregator","restriction":"AggregationType"},{"name":"bucket_duration","external_name":"bucket_duration","restriction":"Time::Span"},{"name":"alignment","default_value":"nil","external_name":"alignment","restriction":"Alignment | Time | Nil"},{"name":"buckettimestamp","default_value":"nil","external_name":"buckettimestamp","restriction":"BucketTimestamp | ::Nil"},{"name":"empty","default_value":"nil","external_name":"empty","restriction":"Bool | ::Nil"}],"args_string":"(aggregator : AggregationType, bucket_duration : Time::Span, alignment : Alignment | Time | Nil = nil, buckettimestamp : BucketTimestamp | Nil = nil, empty : Bool | Nil = nil)","args_html":"(aggregator : AggregationType, bucket_duration : Time::Span, alignment : Alignment | Time | Nil = nil, buckettimestamp : BucketTimestamp | Nil = nil, empty : Bool | Nil = nil)","location":{"filename":"src/time_series.cr","line_number":169,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L169"},"def":{"name":"new","args":[{"name":"aggregator","external_name":"aggregator","restriction":"AggregationType"},{"name":"bucket_duration","external_name":"bucket_duration","restriction":"Time::Span"},{"name":"alignment","default_value":"nil","external_name":"alignment","restriction":"Alignment | Time | Nil"},{"name":"buckettimestamp","default_value":"nil","external_name":"buckettimestamp","restriction":"BucketTimestamp | ::Nil"},{"name":"empty","default_value":"nil","external_name":"empty","restriction":"Bool | ::Nil"}],"visibility":"Public","body":"_ = allocate\n_.initialize(aggregator, bucket_duration, alignment, buckettimestamp, empty)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"aggregator:AggregationType-instance-method","name":"aggregator","abstract":false,"def":{"name":"aggregator","return_type":"AggregationType","visibility":"Public","body":"@aggregator"}},{"html_id":"alignment:Alignment|Time|Nil-instance-method","name":"alignment","abstract":false,"def":{"name":"alignment","return_type":"Alignment | Time | Nil","visibility":"Public","body":"@alignment"}},{"html_id":"bucket_duration:Time::Span-instance-method","name":"bucket_duration","abstract":false,"def":{"name":"bucket_duration","return_type":"Time::Span","visibility":"Public","body":"@bucket_duration"}},{"html_id":"buckettimestamp:BucketTimestamp|Nil-instance-method","name":"buckettimestamp","abstract":false,"def":{"name":"buckettimestamp","return_type":"BucketTimestamp | ::Nil","visibility":"Public","body":"@buckettimestamp"}},{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/time_series.cr","line_number":169,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L169"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@aggregator.clone, @bucket_duration.clone, @alignment.clone, @buckettimestamp.clone, @empty.clone)"}},{"html_id":"copy_with(aggregator_aggregator=@aggregator,bucket_duration_bucket_duration=@bucket_duration,alignment_alignment=@alignment,buckettimestamp_buckettimestamp=@buckettimestamp,empty_empty=@empty)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_aggregator","default_value":"@aggregator","external_name":"aggregator","restriction":""},{"name":"_bucket_duration","default_value":"@bucket_duration","external_name":"bucket_duration","restriction":""},{"name":"_alignment","default_value":"@alignment","external_name":"alignment","restriction":""},{"name":"_buckettimestamp","default_value":"@buckettimestamp","external_name":"buckettimestamp","restriction":""},{"name":"_empty","default_value":"@empty","external_name":"empty","restriction":""}],"args_string":"(aggregator _aggregator = @aggregator, bucket_duration _bucket_duration = @bucket_duration, alignment _alignment = @alignment, buckettimestamp _buckettimestamp = @buckettimestamp, empty _empty = @empty)","args_html":"(aggregator _aggregator = @aggregator, bucket_duration _bucket_duration = @bucket_duration, alignment _alignment = @alignment, buckettimestamp _buckettimestamp = @buckettimestamp, empty _empty = @empty)","location":{"filename":"src/time_series.cr","line_number":169,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L169"},"def":{"name":"copy_with","args":[{"name":"_aggregator","default_value":"@aggregator","external_name":"aggregator","restriction":""},{"name":"_bucket_duration","default_value":"@bucket_duration","external_name":"bucket_duration","restriction":""},{"name":"_alignment","default_value":"@alignment","external_name":"alignment","restriction":""},{"name":"_buckettimestamp","default_value":"@buckettimestamp","external_name":"buckettimestamp","restriction":""},{"name":"_empty","default_value":"@empty","external_name":"empty","restriction":""}],"visibility":"Public","body":"self.class.new(_aggregator, _bucket_duration, _alignment, _buckettimestamp, _empty)"}},{"html_id":"empty:Bool|Nil-instance-method","name":"empty","abstract":false,"def":{"name":"empty","return_type":"Bool | ::Nil","visibility":"Public","body":"@empty"}}]},{"html_id":"redis/Redis/TimeSeries/AggregationType","path":"Redis/TimeSeries/AggregationType.html","kind":"enum","full_name":"Redis::TimeSeries::AggregationType","name":"AggregationType","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":392,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L392"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"AVG","name":"AVG","value":"0"},{"id":"SUM","name":"SUM","value":"1"},{"id":"MIN","name":"MIN","value":"2"},{"id":"MAX","name":"MAX","value":"3"},{"id":"RANGE","name":"RANGE","value":"4"},{"id":"COUNT","name":"COUNT","value":"5"},{"id":"FIRST","name":"FIRST","value":"6"},{"id":"LAST","name":"LAST","value":"7"},{"id":"STD_P","name":"STD_P","value":"8"},{"id":"STD_S","name":"STD_S","value":"9"},{"id":"VAR_P","name":"VAR_P","value":"10"},{"id":"VAR_S","name":"VAR_S","value":"11"}],"namespace":{"html_id":"redis/Redis/TimeSeries","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries"},"instance_methods":[{"html_id":"avg?-instance-method","name":"avg?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":393,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L393"},"def":{"name":"avg?","visibility":"Public","body":"self == AVG"}},{"html_id":"count?-instance-method","name":"count?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":398,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L398"},"def":{"name":"count?","visibility":"Public","body":"self == COUNT"}},{"html_id":"first?-instance-method","name":"first?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":399,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L399"},"def":{"name":"first?","visibility":"Public","body":"self == FIRST"}},{"html_id":"last?-instance-method","name":"last?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":400,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L400"},"def":{"name":"last?","visibility":"Public","body":"self == LAST"}},{"html_id":"max?-instance-method","name":"max?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":396,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L396"},"def":{"name":"max?","visibility":"Public","body":"self == MAX"}},{"html_id":"min?-instance-method","name":"min?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":395,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L395"},"def":{"name":"min?","visibility":"Public","body":"self == MIN"}},{"html_id":"range?-instance-method","name":"range?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":397,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L397"},"def":{"name":"range?","visibility":"Public","body":"self == RANGE"}},{"html_id":"std_p?-instance-method","name":"std_p?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":401,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L401"},"def":{"name":"std_p?","visibility":"Public","body":"self == STD_P"}},{"html_id":"std_s?-instance-method","name":"std_s?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":402,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L402"},"def":{"name":"std_s?","visibility":"Public","body":"self == STD_S"}},{"html_id":"sum?-instance-method","name":"sum?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":394,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L394"},"def":{"name":"sum?","visibility":"Public","body":"self == SUM"}},{"html_id":"var_p?-instance-method","name":"var_p?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":403,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L403"},"def":{"name":"var_p?","visibility":"Public","body":"self == VAR_P"}},{"html_id":"var_s?-instance-method","name":"var_s?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":404,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L404"},"def":{"name":"var_s?","visibility":"Public","body":"self == VAR_S"}}]},{"html_id":"redis/Redis/TimeSeries/Alignment","path":"Redis/TimeSeries/Alignment.html","kind":"enum","full_name":"Redis::TimeSeries::Alignment","name":"Alignment","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":176,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L176"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"Start","name":"Start","value":"0"},{"id":"End","name":"End","value":"1"}],"namespace":{"html_id":"redis/Redis/TimeSeries","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries"},"instance_methods":[{"html_id":"end?-instance-method","name":"end?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":178,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L178"},"def":{"name":"end?","visibility":"Public","body":"self == End"}},{"html_id":"start?-instance-method","name":"start?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":177,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L177"},"def":{"name":"start?","visibility":"Public","body":"self == Start"}}]},{"html_id":"redis/Redis/TimeSeries/BucketTimestamp","path":"Redis/TimeSeries/BucketTimestamp.html","kind":"enum","full_name":"Redis::TimeSeries::BucketTimestamp","name":"BucketTimestamp","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":407,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L407"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"START","name":"START","value":"0"},{"id":"MID","name":"MID","value":"1"},{"id":"END","name":"END","value":"2"}],"namespace":{"html_id":"redis/Redis/TimeSeries","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries"},"instance_methods":[{"html_id":"end?-instance-method","name":"end?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":410,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L410"},"def":{"name":"end?","visibility":"Public","body":"self == END"}},{"html_id":"mid?-instance-method","name":"mid?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":409,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L409"},"def":{"name":"mid?","visibility":"Public","body":"self == MID"}},{"html_id":"start?-instance-method","name":"start?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":408,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L408"},"def":{"name":"start?","visibility":"Public","body":"self == START"}}]},{"html_id":"redis/Redis/TimeSeries/Datapoint","path":"Redis/TimeSeries/Datapoint.html","kind":"struct","full_name":"Redis::TimeSeries::Datapoint","name":"Datapoint","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":307,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L307"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/TimeSeries","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries"},"constructors":[{"html_id":"new(timestamp:Time,value:Float64)-class-method","name":"new","abstract":false,"args":[{"name":"timestamp","external_name":"timestamp","restriction":"Time"},{"name":"value","external_name":"value","restriction":"Float64"}],"args_string":"(timestamp : Time, value : Float64)","args_html":"(timestamp : Time, value : Float64)","location":{"filename":"src/time_series.cr","line_number":307,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L307"},"def":{"name":"new","args":[{"name":"timestamp","external_name":"timestamp","restriction":"Time"},{"name":"value","external_name":"value","restriction":"Float64"}],"visibility":"Public","body":"_ = allocate\n_.initialize(timestamp, value)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/time_series.cr","line_number":307,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L307"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@timestamp.clone, @value.clone)"}},{"html_id":"copy_with(timestamp_timestamp=@timestamp,value_value=@value)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_timestamp","default_value":"@timestamp","external_name":"timestamp","restriction":""},{"name":"_value","default_value":"@value","external_name":"value","restriction":""}],"args_string":"(timestamp _timestamp = @timestamp, value _value = @value)","args_html":"(timestamp _timestamp = @timestamp, value _value = @value)","location":{"filename":"src/time_series.cr","line_number":307,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L307"},"def":{"name":"copy_with","args":[{"name":"_timestamp","default_value":"@timestamp","external_name":"timestamp","restriction":""},{"name":"_value","default_value":"@value","external_name":"value","restriction":""}],"visibility":"Public","body":"self.class.new(_timestamp, _value)"}},{"html_id":"timestamp:Time-instance-method","name":"timestamp","abstract":false,"def":{"name":"timestamp","return_type":"Time","visibility":"Public","body":"@timestamp"}},{"html_id":"value:Float64-instance-method","name":"value","abstract":false,"def":{"name":"value","return_type":"Float64","visibility":"Public","body":"@value"}}]},{"html_id":"redis/Redis/TimeSeries/Datapoints","path":"Redis/TimeSeries/Datapoints.html","kind":"struct","full_name":"Redis::TimeSeries::Datapoints","name":"Datapoints","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":310,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L310"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"redis/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"}],"namespace":{"html_id":"redis/Redis/TimeSeries","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries"},"constructors":[{"html_id":"new(labels:Labels,datapoints:Array(Datapoint))-class-method","name":"new","abstract":false,"args":[{"name":"labels","external_name":"labels","restriction":"Labels"},{"name":"datapoints","external_name":"datapoints","restriction":"Array(Datapoint)"}],"args_string":"(labels : Labels, datapoints : Array(Datapoint))","args_html":"(labels : Labels, datapoints : Array(Datapoint))","location":{"filename":"src/time_series.cr","line_number":310,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L310"},"def":{"name":"new","args":[{"name":"labels","external_name":"labels","restriction":"Labels"},{"name":"datapoints","external_name":"datapoints","restriction":"Array(Datapoint)"}],"visibility":"Public","body":"_ = allocate\n_.initialize(labels, datapoints)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"<<(datapoint:Datapoint)-instance-method","name":"<<","abstract":false,"args":[{"name":"datapoint","external_name":"datapoint","restriction":"Datapoint"}],"args_string":"(datapoint : Datapoint)","args_html":"(datapoint : Datapoint)","location":{"filename":"src/time_series.cr","line_number":317,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L317"},"def":{"name":"<<","args":[{"name":"datapoint","external_name":"datapoint","restriction":"Datapoint"}],"visibility":"Public","body":"datapoints << datapoint"}},{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/time_series.cr","line_number":310,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L310"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@labels.clone, @datapoints.clone)"}},{"html_id":"copy_with(labels_labels=@labels,datapoints_datapoints=@datapoints)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_labels","default_value":"@labels","external_name":"labels","restriction":""},{"name":"_datapoints","default_value":"@datapoints","external_name":"datapoints","restriction":""}],"args_string":"(labels _labels = @labels, datapoints _datapoints = @datapoints)","args_html":"(labels _labels = @labels, datapoints _datapoints = @datapoints)","location":{"filename":"src/time_series.cr","line_number":310,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L310"},"def":{"name":"copy_with","args":[{"name":"_labels","default_value":"@labels","external_name":"labels","restriction":""},{"name":"_datapoints","default_value":"@datapoints","external_name":"datapoints","restriction":""}],"visibility":"Public","body":"self.class.new(_labels, _datapoints)"}},{"html_id":"datapoints:Array(Datapoint)-instance-method","name":"datapoints","abstract":false,"def":{"name":"datapoints","return_type":"Array(Datapoint)","visibility":"Public","body":"@datapoints"}},{"html_id":"each(&)-instance-method","name":"each","doc":"Must yield this collection's elements to the block.","summary":"

    Must yield this collection's elements to the block.

    ","abstract":false,"location":{"filename":"src/time_series.cr","line_number":312,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L312"},"def":{"name":"each","yields":1,"block_arity":1,"visibility":"Public","body":"datapoints.each do |datapoint|\n yield datapoint\nend"}},{"html_id":"labels:Labels-instance-method","name":"labels","abstract":false,"def":{"name":"labels","return_type":"Labels","visibility":"Public","body":"@labels"}}]},{"html_id":"redis/Redis/TimeSeries/DuplicatePolicy","path":"Redis/TimeSeries/DuplicatePolicy.html","kind":"enum","full_name":"Redis::TimeSeries::DuplicatePolicy","name":"DuplicatePolicy","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":418,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L418"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"BLOCK","name":"BLOCK","value":"0","doc":"An error will occur for any out-of-order sample","summary":"

    An error will occur for any out-of-order sample

    "},{"id":"FIRST","name":"FIRST","value":"1","doc":"Ignore the new value","summary":"

    Ignore the new value

    "},{"id":"LAST","name":"LAST","value":"2","doc":"Override with the latest value","summary":"

    Override with the latest value

    "},{"id":"MIN","name":"MIN","value":"3","doc":"Only override if the new value is lower than the existing value","summary":"

    Only override if the new value is lower than the existing value

    "},{"id":"MAX","name":"MAX","value":"4","doc":"Only override if the new value is higher than the existing value","summary":"

    Only override if the new value is higher than the existing value

    "},{"id":"SUM","name":"SUM","value":"5","doc":"If a previous sample exists, add the new sample to it so that the\nupdated value is equal to `previous + new`. If no previous sample\nexists, set the updated value equal to the new value.","summary":"

    If a previous sample exists, add the new sample to it so that the updated value is equal to previous + new.

    "}],"namespace":{"html_id":"redis/Redis/TimeSeries","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries"},"instance_methods":[{"html_id":"block?-instance-method","name":"block?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":420,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L420"},"def":{"name":"block?","visibility":"Public","body":"self == BLOCK"}},{"html_id":"first?-instance-method","name":"first?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":423,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L423"},"def":{"name":"first?","visibility":"Public","body":"self == FIRST"}},{"html_id":"last?-instance-method","name":"last?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":426,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L426"},"def":{"name":"last?","visibility":"Public","body":"self == LAST"}},{"html_id":"max?-instance-method","name":"max?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":432,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L432"},"def":{"name":"max?","visibility":"Public","body":"self == MAX"}},{"html_id":"min?-instance-method","name":"min?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":429,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L429"},"def":{"name":"min?","visibility":"Public","body":"self == MIN"}},{"html_id":"sum?-instance-method","name":"sum?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":437,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L437"},"def":{"name":"sum?","visibility":"Public","body":"self == SUM"}}]},{"html_id":"redis/Redis/TimeSeries/Encoding","path":"Redis/TimeSeries/Encoding.html","kind":"enum","full_name":"Redis::TimeSeries::Encoding","name":"Encoding","abstract":false,"ancestors":[{"html_id":"redis/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"redis/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":413,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L413"}],"repository_name":"redis","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"COMPRESSED","name":"COMPRESSED","value":"0"},{"id":"UNCOMPRESSED","name":"UNCOMPRESSED","value":"1"}],"namespace":{"html_id":"redis/Redis/TimeSeries","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries"},"instance_methods":[{"html_id":"compressed?-instance-method","name":"compressed?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":414,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L414"},"def":{"name":"compressed?","visibility":"Public","body":"self == COMPRESSED"}},{"html_id":"uncompressed?-instance-method","name":"uncompressed?","abstract":false,"location":{"filename":"src/time_series.cr","line_number":415,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L415"},"def":{"name":"uncompressed?","visibility":"Public","body":"self == UNCOMPRESSED"}}]},{"html_id":"redis/Redis/TimeSeries/Labels","path":"Redis/TimeSeries/Labels.html","kind":"alias","full_name":"Redis::TimeSeries::Labels","name":"Labels","abstract":false,"locations":[{"filename":"src/time_series.cr","line_number":306,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L306"}],"repository_name":"redis","program":false,"enum":false,"alias":true,"aliased":"Hash(String, String)","aliased_html":"Hash(String, String)","const":false,"namespace":{"html_id":"redis/Redis/TimeSeries","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries"}},{"html_id":"redis/Redis/TimeSeries/MRangeResponse","path":"Redis/TimeSeries/MRangeResponse.html","kind":"struct","full_name":"Redis::TimeSeries::MRangeResponse","name":"MRangeResponse","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":322,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L322"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"redis/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"}],"namespace":{"html_id":"redis/Redis/TimeSeries","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries"},"constructors":[{"html_id":"new(response)-class-method","name":"new","abstract":false,"args":[{"name":"response","external_name":"response","restriction":""}],"args_string":"(response)","args_html":"(response)","location":{"filename":"src/time_series.cr","line_number":329,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L329"},"def":{"name":"new","args":[{"name":"response","external_name":"response","restriction":""}],"visibility":"Public","body":"_ = allocate\n_.initialize(response)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"[](key:String)-instance-method","name":"[]","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/time_series.cr","line_number":363,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L363"},"def":{"name":"[]","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"@data[key]"}},{"html_id":"[]?(key:String)-instance-method","name":"[]?","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"String"}],"args_string":"(key : String)","args_html":"(key : String)","location":{"filename":"src/time_series.cr","line_number":367,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L367"},"def":{"name":"[]?","args":[{"name":"key","external_name":"key","restriction":"String"}],"visibility":"Public","body":"@data[key]?"}},{"html_id":"data:DatapointMap-instance-method","name":"data","abstract":false,"location":{"filename":"src/time_series.cr","line_number":327,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L327"},"def":{"name":"data","return_type":"DatapointMap","visibility":"Public","body":"@data"}},{"html_id":"each(&)-instance-method","name":"each","doc":"Must yield this collection's elements to the block.","summary":"

    Must yield this collection's elements to the block.

    ","abstract":false,"location":{"filename":"src/time_series.cr","line_number":359,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L359"},"def":{"name":"each","yields":1,"block_arity":1,"visibility":"Public","body":"data.each do |i|\n yield i\nend"}}],"types":[{"html_id":"redis/Redis/TimeSeries/MRangeResponse/DatapointMap","path":"Redis/TimeSeries/MRangeResponse/DatapointMap.html","kind":"alias","full_name":"Redis::TimeSeries::MRangeResponse::DatapointMap","name":"DatapointMap","abstract":false,"locations":[{"filename":"src/time_series.cr","line_number":325,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L325"}],"repository_name":"redis","program":false,"enum":false,"alias":true,"aliased":"Hash(String, Redis::TimeSeries::Datapoints)","aliased_html":"Hash(String, Redis::TimeSeries::Datapoints)","const":false,"namespace":{"html_id":"redis/Redis/TimeSeries/MRangeResponse","kind":"struct","full_name":"Redis::TimeSeries::MRangeResponse","name":"MRangeResponse"}}]},{"html_id":"redis/Redis/TimeSeries/Range","path":"Redis/TimeSeries/Range.html","kind":"struct","full_name":"Redis::TimeSeries::Range","name":"Range","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":372,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L372"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/TimeSeries","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries"},"constructors":[{"html_id":"new(raw_data:Array)-class-method","name":"new","abstract":false,"args":[{"name":"raw_data","external_name":"raw_data","restriction":"Array"}],"args_string":"(raw_data : Array)","args_html":"(raw_data : Array)","location":{"filename":"src/time_series.cr","line_number":373,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L373"},"def":{"name":"new","args":[{"name":"raw_data","external_name":"raw_data","restriction":"Array"}],"visibility":"Public","body":"_ = allocate\n_.initialize(raw_data)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}]},{"html_id":"redis/Redis/TimeSeries/RangeOptions","path":"Redis/TimeSeries/RangeOptions.html","kind":"class","full_name":"Redis::TimeSeries::RangeOptions","name":"RangeOptions","abstract":false,"superclass":{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":382,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L382"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/TimeSeries","kind":"struct","full_name":"Redis::TimeSeries(Runnable)","name":"TimeSeries"},"instance_methods":[{"html_id":"aggregation(type:AggregationType,bucket:Time::Span)-instance-method","name":"aggregation","abstract":false,"args":[{"name":"type","external_name":"type","restriction":"AggregationType"},{"name":"bucket","external_name":"bucket","restriction":"Time::Span"}],"args_string":"(type : AggregationType, bucket : Time::Span)","args_html":"(type : AggregationType, bucket : Time::Span)","location":{"filename":"src/time_series.cr","line_number":385,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L385"},"def":{"name":"aggregation","args":[{"name":"type","external_name":"type","restriction":"AggregationType"},{"name":"bucket","external_name":"bucket","restriction":"Time::Span"}],"visibility":"Public","body":"@aggregation = Aggregation.new(type, bucket)"}},{"html_id":"aggregation:Aggregation|Nil-instance-method","name":"aggregation","abstract":false,"location":{"filename":"src/time_series.cr","line_number":383,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L383"},"def":{"name":"aggregation","return_type":"Aggregation | ::Nil","visibility":"Public","body":"@aggregation"}}],"types":[{"html_id":"redis/Redis/TimeSeries/RangeOptions/Aggregation","path":"Redis/TimeSeries/RangeOptions/Aggregation.html","kind":"struct","full_name":"Redis::TimeSeries::RangeOptions::Aggregation","name":"Aggregation","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/time_series.cr","line_number":389,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L389"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"redis/Redis/TimeSeries/RangeOptions","kind":"class","full_name":"Redis::TimeSeries::RangeOptions","name":"RangeOptions"},"constructors":[{"html_id":"new(type:AggregationType,time_bucket:Time::Span)-class-method","name":"new","abstract":false,"args":[{"name":"type","external_name":"type","restriction":"AggregationType"},{"name":"time_bucket","external_name":"time_bucket","restriction":"Time::Span"}],"args_string":"(type : AggregationType, time_bucket : Time::Span)","args_html":"(type : AggregationType, time_bucket : Time::Span)","location":{"filename":"src/time_series.cr","line_number":389,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L389"},"def":{"name":"new","args":[{"name":"type","external_name":"type","restriction":"AggregationType"},{"name":"time_bucket","external_name":"time_bucket","restriction":"Time::Span"}],"visibility":"Public","body":"_ = allocate\n_.initialize(type, time_bucket)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/time_series.cr","line_number":389,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L389"},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@type.clone, @time_bucket.clone)"}},{"html_id":"copy_with(type_type=@type,time_bucket_time_bucket=@time_bucket)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_type","default_value":"@type","external_name":"type","restriction":""},{"name":"_time_bucket","default_value":"@time_bucket","external_name":"time_bucket","restriction":""}],"args_string":"(type _type = @type, time_bucket _time_bucket = @time_bucket)","args_html":"(type _type = @type, time_bucket _time_bucket = @time_bucket)","location":{"filename":"src/time_series.cr","line_number":389,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/time_series.cr#L389"},"def":{"name":"copy_with","args":[{"name":"_type","default_value":"@type","external_name":"type","restriction":""},{"name":"_time_bucket","default_value":"@time_bucket","external_name":"time_bucket","restriction":""}],"visibility":"Public","body":"self.class.new(_type, _time_bucket)"}},{"html_id":"time_bucket:Time::Span-instance-method","name":"time_bucket","abstract":false,"def":{"name":"time_bucket","return_type":"Time::Span","visibility":"Public","body":"@time_bucket"}},{"html_id":"type:AggregationType-instance-method","name":"type","abstract":false,"def":{"name":"type","return_type":"AggregationType","visibility":"Public","body":"@type"}}]}]}]},{"html_id":"redis/Redis/Transaction","path":"Redis/Transaction.html","kind":"class","full_name":"Redis::Transaction","name":"Transaction","abstract":false,"superclass":{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"},{"html_id":"redis/Redis/Commands/Stream","kind":"module","full_name":"Redis::Commands::Stream","name":"Stream"},{"html_id":"redis/Redis/Commands/SortedSet","kind":"module","full_name":"Redis::Commands::SortedSet","name":"SortedSet"},{"html_id":"redis/Redis/Commands/Set","kind":"module","full_name":"Redis::Commands::Set","name":"Set"},{"html_id":"redis/Redis/Commands/List","kind":"module","full_name":"Redis::Commands::List","name":"List"},{"html_id":"redis/Redis/Commands/Hash","kind":"module","full_name":"Redis::Commands::Hash","name":"Hash"},{"html_id":"redis/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/transaction.cr","line_number":5,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/transaction.cr#L5"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"redis/Redis/Commands","kind":"module","full_name":"Redis::Commands","name":"Commands"}],"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"constructors":[{"html_id":"new(connection:Connection)-class-method","name":"new","abstract":false,"args":[{"name":"connection","external_name":"connection","restriction":"Connection"}],"args_string":"(connection : Connection)","args_html":"(connection : Connection)","location":{"filename":"src/transaction.cr","line_number":10,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/transaction.cr#L10"},"def":{"name":"new","args":[{"name":"connection","external_name":"connection","restriction":"Connection"}],"visibility":"Public","body":"_ = allocate\n_.initialize(connection)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"discard:Nil-instance-method","name":"discard","abstract":false,"location":{"filename":"src/transaction.cr","line_number":14,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/transaction.cr#L14"},"def":{"name":"discard","return_type":"Nil","visibility":"Public","body":"@discarded = true\nfinish(\"discard\")\n"}},{"html_id":"discarded?:Bool?-instance-method","name":"discarded?","abstract":false,"location":{"filename":"src/transaction.cr","line_number":8,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/transaction.cr#L8"},"def":{"name":"discarded?","visibility":"Public","body":"@discarded"}},{"html_id":"exec-instance-method","name":"exec","abstract":false,"location":{"filename":"src/transaction.cr","line_number":25,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/transaction.cr#L25"},"def":{"name":"exec","visibility":"Public","body":"(finish(\"exec\")).as(Array)"}},{"html_id":"run(command):Nil-instance-method","name":"run","doc":"Execute the given command and return the result from the server. Commands\nmust be an `Enumerable` and its `size` method must be re-entrant.\n\n```\nrun({\"set\", \"foo\", \"bar\"})\n```","summary":"

    Execute the given command and return the result from the server.

    ","abstract":false,"args":[{"name":"command","external_name":"command","restriction":""}],"args_string":"(command) : Nil","args_html":"(command) : Nil","location":{"filename":"src/transaction.cr","line_number":19,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/transaction.cr#L19"},"def":{"name":"run","args":[{"name":"command","external_name":"command","restriction":""}],"return_type":"Nil","visibility":"Public","body":"if discarded?\n return\nend\n@connection.encode(command)\n@command_count = @command_count + 1\n"}},{"html_id":"start!-instance-method","name":"start!","abstract":false,"location":{"filename":"src/transaction.cr","line_number":29,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/transaction.cr#L29"},"def":{"name":"start!","visibility":"Public","body":"@connection.encode({\"multi\"})"}}]},{"html_id":"redis/Redis/Value","path":"Redis/Value.html","kind":"alias","full_name":"Redis::Value","name":"Value","abstract":false,"locations":[{"filename":"src/value.cr","line_number":6,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/value.cr#L6"}],"repository_name":"redis","program":false,"enum":false,"alias":true,"aliased":"(Array(Redis::Value) | Int64 | Redis::Error | String | Nil)","aliased_html":"Array(Redis::Value) | Int64 | Redis::Error | String | Nil","const":false,"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"doc":"Values consumed and emitted by Redis can be strings, 64-bit integers, `nil`,\nor an array of any of these types.","summary":"

    Values consumed and emitted by Redis can be strings, 64-bit integers, nil, or an array of any of these types.

    "},{"html_id":"redis/Redis/Writer","path":"Redis/Writer.html","kind":"struct","full_name":"Redis::Writer","name":"Writer","abstract":false,"superclass":{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"redis/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"redis/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"redis/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/writer.cr","line_number":2,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/writer.cr#L2"}],"repository_name":"redis","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"CRLF","name":"CRLF","value":"\"\\r\\n\""}],"namespace":{"html_id":"redis/Redis","kind":"module","full_name":"Redis","name":"Redis"},"constructors":[{"html_id":"new(io:IO)-class-method","name":"new","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/writer.cr","line_number":7,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/writer.cr#L7"},"def":{"name":"new","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"_ = allocate\n_.initialize(io)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"io:IO-instance-method","name":"io","abstract":false,"location":{"filename":"src/writer.cr","line_number":5,"url":"https://github.com/jgaskins/redis/blob/v0.10.0/src/writer.cr#L5"},"def":{"name":"io","visibility":"Public","body":"@io"}}]}]}]}}) \ No newline at end of file diff --git a/shard.yml b/shard.yml index 968eeb4..032cfdb 100644 --- a/shard.yml +++ b/shard.yml @@ -1,5 +1,5 @@ name: redis -version: 0.9.0 +version: 0.10.0 authors: - Jamie Gaskins diff --git a/src/version.cr b/src/version.cr index 2740170..9deb699 100644 --- a/src/version.cr +++ b/src/version.cr @@ -1,3 +1,3 @@ module Redis - VERSION = "0.9.0" + VERSION = "0.10.0" end