module Redis::Commands::Connection
def auth(*args)
- See: https://redis.io/commands/auth - AUTH command
Returns:
-
(String)
- `OK`
Parameters:
-
args
(Array
) -- includes both username and password
def auth(*args) send_command([:auth, *args]) end
def echo(value)
-
(String)
-
Parameters:
-
value
(String
) --
def echo(value) send_command([:echo, value]) end
def ping(message = nil)
-
(String)
- `PONG`
Parameters:
-
message
(optional, String
) --
def ping(message = nil) send_command([:ping, message].compact) end
def quit
-
(String)
- `OK`
def quit synchronize do |client| client.call_v([:quit]) rescue ConnectionError ensure client.close end end
def select(db)
-
(String)
- `OK`
Parameters:
-
db
(Integer
) -- zero-based index of the DB to use (0 to 15)
def select(db) send_command([:select, db]) end