Alias RedisSetCollection
Models a strongly typed numbered set of values.
alias RedisSetCollection(T, RedisCollectionOptions OPTIONS = RedisCollectionOptions .defaults, ulong ID_LENGTH = 1)
= RedisCollection!(RedisSet!T,OPTIONS,ID_LENGTH);
Example
void test()
{
auto db = connectRedis("127.0.0.1") .getDatabase(0);
auto user_groups = RedisSetCollection!(string, RedisCollectionOptions .none)(db, "user_groups");
// add some groups for user with ID 0
user_groups[0] .insert("cooking");
user_groups[0] .insert("hiking");
// add some groups for user with ID 1
user_groups[1] .insert("coding");
assert(user_groups[0] .contains("hiking"));
assert(!user_groups[0] .contains("coding"));
assert(user_groups[1] .contains("coding"));
user_groups[0] .remove("hiking");
assert(!user_groups[0] .contains("hiking"));
}