Skip to content

Commit

Permalink
[REFACTOR] Remove export for Jedis.keys as it conflicts with `Bas…
Browse files Browse the repository at this point in the history
…e.keys`
  • Loading branch information
captchanjack committed Sep 19, 2021
1 parent 57e518c commit 8c5d817
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Jedis"
uuid = "b89ccfe0-2c5f-46f6-b89b-da3e1c2e286f"
authors = ["Jack Chan <[email protected]>"]
version = "0.2.3"
version = "0.2.4"

[deps]
MbedTLS = "739be429-bea8-5141-9913-cc70e7f3736d"
Expand Down
2 changes: 1 addition & 1 deletion docs/src/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Jedis.get
del
exists
hexists
keys
Jedis.keys
hkeys
setex
expire
Expand Down
4 changes: 2 additions & 2 deletions src/Jedis.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module Jedis
export Client, Pipeline, RedisError, get_global_client, set_global_client, get_ssl_config,
disconnect!, reconnect!, add!, copy, wait_until_subscribed, wait_until_unsubscribed,
wait_until_channel_unsubscribed, wait_until_pattern_unsubscribed, execute, auth, select,
ping, flushdb, flushall, quit, set, setnx, get, del, exists, hexists, keys, hkeys, setex,
ping, flushdb, flushall, quit, set, setnx, get, del, exists, hexists, hkeys, setex,
expire, ttl, multi, exec, multi_exec, pipeline, hset, hget, hgetall, hmget, hdel, rpush,
lpush, lpos, lrem, lpop, rpop, blpop, brpop, llen, lrange, publish, subscribe, unsubscribe,
psubscribe, punsubscribe, incr, incrby, incrbyfloat, hincrby, hincrbyfloat, zincrby,
Expand All @@ -12,7 +12,7 @@ export Client, Pipeline, RedisError, get_global_client, set_global_client, get_s
using Sockets
using MbedTLS
using UUIDs: uuid4
import Base: copy, showerror, get, keys, pipeline
import Base: copy, showerror, get, pipeline

include("exceptions.jl")
include("utilities.jl")
Expand Down
5 changes: 4 additions & 1 deletion src/commands.jl
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,11 @@ hexists(key, field; client=get_global_client()) = execute(["HEXISTS", key, field
keys(pattern)
Find all keys matching the pattern.
!!! compat "Julia 1.6"
`Jedis.keys` is not exported as the interface conflicts with `Base.keys`.
"""
Base.keys(pattern; client=get_global_client()) = execute(["KEYS", pattern], client)
keys(pattern; client=get_global_client()) = execute(["KEYS", pattern], client)

"""
hkeys(key)
Expand Down
1 change: 1 addition & 0 deletions test/test_commands.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ end
@test set("key", "value") == "OK"
@test setnx("key", "value") == 0
@test get("key") == "value"
@test Jedis.keys("k*") == ["key"]
@test del("key") == 1
@test setnx("key", "value") == 1
@test flushdb() == "OK" && isnothing(get("key"))
Expand Down

2 comments on commit 8c5d817

@captchanjack
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/45157

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.2.4 -m "<description of version>" 8c5d8172197dd0fd5888cf85d506bfe0cd228cd1
git push origin v0.2.4

Please sign in to comment.