module Redis::Commands::Connection

def auth(*args)

Other tags:
    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)

Returns:
  • (String) -

Parameters:
  • value (String) --
def echo(value)
  send_command([:echo, value])
end

def ping(message = nil)

Returns:
  • (String) - `PONG`

Parameters:
  • message (optional, String) --
def ping(message = nil)
  send_command([:ping, message].compact)
end

def quit

Returns:
  • (String) - `OK`
def quit
  synchronize do |client|
    begin
      client.call([:quit])
    rescue ConnectionError
    ensure
      client.disconnect
    end
  end
end

def select(db)

Returns:
  • (String) - `OK`

Parameters:
  • db (Integer) -- zero-based index of the DB to use (0 to 15)
def select(db)
  synchronize do |client|
    client.db = db
    client.call([:select, db])
  end
end