tencent cloud

Performance Testing Service

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

Client.lPop

Modo Foco
Tamanho da Fonte
Última atualização: 2025-03-10 17:15:06
The lPop method is used to remove and obtain the first element of the list.
lPop(key: string): string

Parameters

Parameter
Type
Description
key
string
Key name.

Return

Type
Description
string
On success, the first element in the list is returned.

Samples

import redis from "pts/redis";

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

export default function main() {
let lPushResp = client.lPush("list", "foo");
console.log(redis lPush ${lPushResp}); // 1
let lPopResp = client.lPop("list");
console.log(redis lPop ${lPopResp}); // foo
}


Ajuda e Suporte

Esta página foi útil?

comentários