// ============ 连接管理命令 ============
///|
pub async fn Client::auth(self : Client, password : String) -> RedisString {
self.send(["AUTH", password]).to_string()
}
///|
pub async fn Client::auth_username(
self : Client,
username : String,
password : String,
) -> RedisString {
self.send(["AUTH", username, password]).to_string()
}
///|
pub async fn Client::echo(self : Client, message : String) -> RedisString {
self.send(["ECHO", message]).to_string()
}
///|
pub async fn Client::hello(self : Client, protover : String) -> RedisArray {
self.send(["HELLO", protover]).to_array()
}
///|
pub async fn Client::quit(self : Client) -> RedisString {
self.send(["QUIT"]).to_string()
}
///|
pub async fn Client::reset(self : Client) -> RedisString {
self.send(["RESET"]).to_string()
}
///|
pub async fn Client::select(self : Client, index : String) -> RedisString {
self.send(["SELECT", index]).to_string()
}
///|
pub async fn Client::client_caching(
self : Client,
mode : String,
) -> RedisString {
self.send(["CLIENT", "CACHING", mode]).to_string()
}
///|
pub async fn Client::client_getname(self : Client) -> RedisBulkString {
self.send(["CLIENT", "GETNAME"]).to_bulk_string()
}
///|
pub async fn Client::client_getredir(self : Client) -> RedisInt {
self.send(["CLIENT", "GETREDIR"]).to_int()
}
///|
pub async fn Client::client_id(self : Client) -> RedisInt {
self.send(["CLIENT", "ID"]).to_int()
}
///|
pub async fn Client::client_info(self : Client) -> RedisString {
self.send(["CLIENT", "INFO"]).to_string()
}
///|
pub async fn Client::client_kill(self : Client, ip_port : String) -> RedisInt {
self.send(["CLIENT", "KILL", ip_port]).to_int()
}
///|
pub async fn Client::client_list(self : Client) -> RedisString {
self.send(["CLIENT", "LIST"]).to_string()
}
///|
pub async fn Client::client_no_evict(
self : Client,
mode : String,
) -> RedisString {
self.send(["CLIENT", "NO-EVICT", mode]).to_string()
}
///|
pub async fn Client::client_no_touch(
self : Client,
mode : String,
) -> RedisString {
self.send(["CLIENT", "NO-TOUCH", mode]).to_string()
}
///|
pub async fn Client::client_pause(
self : Client,
timeout : String,
) -> RedisString {
self.send(["CLIENT", "PAUSE", timeout]).to_string()
}
///|
pub async fn Client::client_reply(self : Client, mode : String) -> RedisString {
self.send(["CLIENT", "REPLY", mode]).to_string()
}
///|
pub async fn Client::client_setname(
self : Client,
connection_name : String,
) -> RedisString {
self.send(["CLIENT", "SETNAME", connection_name]).to_string()
}
///|
pub async fn Client::client_tracking(
self : Client,
mode : String,
) -> RedisString {
self.send(["CLIENT", "TRACKING", mode]).to_string()
}
///|
pub async fn Client::client_trackinginfo(self : Client) -> RedisArray {
self.send(["CLIENT", "TRACKINGINFO"]).to_array()
}
///|
pub async fn Client::client_unblock(
self : Client,
client_id : String,
) -> RedisInt {
self.send(["CLIENT", "UNBLOCK", client_id]).to_int()
}
///|
pub async fn Client::client_unpause(self : Client) -> RedisString {
self.send(["CLIENT", "UNPAUSE"]).to_string()
}