Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

HSET redis, HINCRBYFLOAT redis

const redis = require('redis');

const client = redis.createClient();

client.on('error', (err) => console.log('Redis Client Error', err));
client.on('connect', () => console.log('Redis Client Connected'));

client.connect();

client.HSET('id', 'floatkey', 9.1).then((res) => {
  console.log('set floatkey', res);
});

client.HINCRBYFLOAT('id', 'floatkey', 1.1).then((res) => {
  console.log(res);
  client.quit();
});
Source by itsvinayak.hashnode.dev #
 
PREVIOUS NEXT
Tagged: #HSET #HINCRBYFLOAT #redis
ADD COMMENT
Topic
Name
4+3 =