MCPcopy Create free account
hub / github.com/dbProjectRED/redimo.go / ZUNIONSTORE

Method ZUNIONSTORE

sorted_sets.go:492–499  ·  view source on GitHub ↗
(destinationKey string, sourceKeys []string, aggregation ZAggregation, weights map[string]float64)

Source from the content-addressed store, hash-verified

490}
491
492func (c Client) ZUNIONSTORE(destinationKey string, sourceKeys []string, aggregation ZAggregation, weights map[string]float64) (membersWithScores map[string]float64, err error) {
493 set, err := c.ZUNION(sourceKeys, aggregation, weights)
494 if err == nil {
495 _, err = c.ZADD(destinationKey, set, Flags{})
496 }
497
498 return set, err
499}
500
501func zGetWeight(weights map[string]float64, key string) float64 {
502 if weights == nil {

Callers 1

TestZAggregationsFunction · 0.80

Calls 2

ZUNIONMethod · 0.95
ZADDMethod · 0.95

Tested by 1

TestZAggregationsFunction · 0.64