-Redis-om客户端没有任何“incrby”方法来实现记录更新的原子性。
agyaoht71#
您可以通过Redis客户端www.example.com来实现这一点https://github.com/redis/redis-om-node#-connect-to-redis-with-a-client
import { Client } from 'redis-om';const client = new Client();await client.open('redis://localhost:6379');const value = 1;const aString = await client.execute(['INCRBY', 'key', value]);
import { Client } from 'redis-om';
const client = new Client();
await client.open('redis://localhost:6379');
const value = 1;
const aString = await client.execute(['INCRBY', 'key', value]);
1条答案
按热度按时间agyaoht71#
您可以通过Redis客户端www.example.com来实现这一点https://github.com/redis/redis-om-node#-connect-to-redis-with-a-client