Redix LogoDocumentation
API ReferenceSets

SUnion

Get the union of multiple sets

Syntax

Redix.SUnion(key1, key2, ..., callback)

Parameters

Prop

Type

Returns

Prop

Type

Examples

-- Get all players in any team
Redix.SUnion('team:red', 'team:blue', function(err, allPlayers)
    if not err then
        print('Total players:', #allPlayers)
    end
end)

-- Get all permissions from multiple roles
Redix.SUnion('role:admin:perms', 'role:moderator:perms', function(err, allPerms)
    for _, perm in ipairs(allPerms) do
        print('Permission:', perm)
    end
end)