RedisClient.zdiffstore method | Bun module | Bun
BuildDocsReferenceGuidesBlogDiscord/
Bun/
RedisClient/
zdiffstoreMzdiffstore
Search the reference...
/
BuildDocsReferenceGuidesBlogDiscord/
Bun/
RedisClient/
zdiffstoreMzdiffstore
method
RedisClient.zdiffstorezdiffstore(destination:
KeyLike,numkeys: number,...keys:
KeyLike[]): Promisenumber>;
Compute the difference between sorted sets and store the result
Computes the difference between the first and all successive sorted sets given by the specified keys and stores the result in destination. Keys that do not exist are considered to be empty sets.
@param destination
The destination key to store the result
@param numkeys
The number of input sorted set keys
@param keys
The sorted set keys to compare
@returns
Promise that resolves with the number of elements in the resulting sorted set
await redis.send("ZADD", ["zset1", "1", "one", "2", "two", "3", "three"]);
await redis.send("ZADD", ["zset2", "1", "one"]);
const count = await redis.zdiffstore("out", 2, "zset1", "zset2");
console.log(count); // 2 (two, three)
Referenced typestype
KeyLike = string |
ArrayBufferView |
BlobResources
ReferenceDocsGuidesDiscordMerch StoreGitHubBlog Toolkit
RuntimePackage managerTest runnerBundlerPackage runnerProject
Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicenseBaked with ❤️ in San Francisco
We're hiring →