tencent cloud

Performance Testing Service

Related Agreements
Service Level Agreement
Use Limits
Privacy Policy
Data Processing And Security Agreement
DocumentaçãoPerformance Testing Service

Client.sAdd

Modo Foco
Tamanho da Fonte
Última atualização: 2025-03-10 17:15:11
The sAdd method is used to add one or more members to the set.
sAdd(key: string, ...members: (string | number)[]): number

Parameters

Parameter
Type
Description
key
string
Key name.
...members
(string | number)[]
The members to be added.

Return

Type
Description
number
On success, the number of members successfully added is returned.

Samples

import redis from "pts/redis";

let client = new redis.Client("redis://:<password>@<host>:6379/0");

export default function main() {
let sAddResp = client.sAdd("set", "hello");
console.log(redis sAdd ${sAddResp}); // 1
}


Ajuda e Suporte

Esta página foi útil?

comentários