Comments (3)
@AlphaBs Thank you for your feedback, the version switch will be completed this month and the interface will be resolved and optimized by then
from tedis.
The current version does not support the kind of call method you said, you can refer to the documentation about the use of mget. tedis
later upgrades will add this overload method, you can use the new feature of es' Spread syntax to implement the requirements.
const keys = ["record1", "record2", "record3"]
const records = await tedis.mget(...keys)
from tedis.
The current version does not support the kind of call method you said, you can refer to the documentation about the use of mget.
tedis
later upgrades will add this overload method, you can use the new feature of es' Spread syntax to implement the requirements.const keys = ["record1", "record2", "record3"] const records = await tedis.mget(...keys)
This codes does not work in TypeScript:
const clientHashes: string[] = clientFiles.map(f => f.hash);
let serverPaths: string[];
// Error: ts(2556) A spread argument must either have a tuple type or be passed to a rest parameter
serverPaths = await db.hmget(filesKey, ...clientHashes);
// I should write code like this:
if (clientHashes.length == 1)
serverPaths = await db.hmget(filesKey, clientHashes[0]);
else if (clientHashes.length > 1)
serverPaths = await db.hmget(filesKey, clientHashes[0], ...clientHashes.slice(1));
Why hmget
function has field
parameter?
public hmget(key: string, field: string, ...fields: string[]) {
return this.command<Array<string | null>>("HMGET", key, field, ...fields);
}
=>
public hmget(key: string, ...fields: string[]) {
return this.command<Array<string | null>>("HMGET", key, ...fields);
}
I think above two codes is same. Is there any compatibility problem?
from tedis.
Related Issues (20)
- Transaction will never complete HOT 1
- Tedis fork HOT 1
- uncaught exception: protocol tries to read unavailable data HOT 2
- Connect with a function instead of immediately HOT 5
- EPIPE error HOT 7
- do we have support for modules?
- SET should accept more parameters
- [Question] How can i set de database number in my connection?
- [Question] How can i set de database number in my connection? HOT 1
- ERR_INVALID_ARG_TYPE The "string" argument must be of type string or an instance of Buffer or ArrayBuffer. Received undefined HOT 6
- Still maintained? HOT 1
- A note on refining tedis
- [QUESTION] PROJECT MAINTANENCE HOT 1
- pool best practices HOT 2
- tedis.get has invalid return type?
- GEOPOS Command returns inappropriate information
- Update to use UUID V4
- Why does `mget` has two parameters?
- 当redis断连,写入命令会永远卡住
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tedis.