Mapping JS Objects between Node.js and Redis

preview_player
Показать описание
In this video, you'll learn how to efficiently map JavaScript objects to and from Redis Streams using the argument and reply transformer features of ioredis.

Links:

Рекомендации по теме
Комментарии
Автор

Always I use multi command only, as we need to update multiple keys atomically.
How can we accomplish this command level reply transformation with multi.exec ?

ajaychoudary
Автор

They seem like such standard features, I was so surprised that I had to implement it myself. Surely everyone who does a HGET in nodejs would want an object returned rather than an array of strings? Why isn't that just built into the client? Maybe I'm missing something, but it seems like such a basic feature, why does it make sense for every individual developer to copy/paste the same implementation into a transformer?

brianevans
Автор

just the fact that redis commands are exposed as methods on a redis instance is something I spent way too long looking for. I've been searching for something like a runCommand method since yesterday...

Mitsunee_