#pragma once #include "acl_cpp/acl_cpp_define.hpp" #include #include "acl_cpp/stdlib/string.hpp" #include "acl_cpp/redis/redis_command.hpp" namespace acl { class redis_client; class redis_result; class ACL_CPP_API redis_set : public redis_command { public: redis_set(redis_client* conn = NULL); ~redis_set(); ///////////////////////////////////////////////////////////////////// int sadd(const char* key, const char* first_member, ...); int sadd(const char* key, const std::vector& memsbers); int sadd(const char* key, const std::vector& members); int sadd(const char* key, const char* argv[], size_t argc); int sadd(const char* key, const char* argv[], const size_t lens[], size_t argc); bool spop(const char* key, string& buf); int scard(const char* key); int smembers(const char* key, std::vector& members); int smove(const char* src, const char* dst, const char* member); int smove(const char* src, const char* dst, const string& member); int smove(const char* src, const char* dst, const char* member, size_t len); int sdiff(std::vector& members, const char* first_key, ...); int sdiff(const std::vector& keys, std::vector& members); int sdiff(const std::vector& keys, std::vector& members); int sinter(std::vector& members, const char* first_key, ...); int sinter(const std::vector& keys, std::vector& members); int sinter(const std::vector& keys, std::vector& members); int sunion(std::vector& members, const char* first_key, ...); int sunion(const std::vector& keys, std::vector& members); int sunion(const std::vector& keys, std::vector& members); int sdiffstore(const char* dst, const char* first_key, ...); int sdiffstore(const char* dst, const std::vector& keys); int sdiffstore(const char* dst, const std::vector& keys); int sinterstore(const char* dst, const char* first_key, ...); int sinterstore(const char* dst, const std::vector& keys); int sinterstore(const char* dst, const std::vector& keys); int sunionstore(const char* dst, const char* first_key, ...); int sunionstore(const char* dst, const std::vector& keys); int sunionstore(const char* dst, const std::vector& keys); bool sismember(const char* key, const char* member); bool sismember(const char* key, const char* member, size_t len); int srandmember(const char* key, string& out); int srandmember(const char* key, size_t n, std::vector& out); int srem(const char* key, const char* member); int srem(const char* key, const char* member, size_t len); int srem(const char* key, const char* first_member, ...); int srem(const char* key, const std::vector& members); int srem(const char* key, const std::vector& members); int srem(const char* key, const char* members[], size_t lens[], size_t argc); }; } // namespace acl