chore(hset): Get rid of helper functions in header file. (#341)

Move them to cc.
This commit is contained in:
Roman Gershman 2022-10-02 14:33:11 +03:00 committed by GitHub
parent 08779b154b
commit 21feebe47b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 498 additions and 526 deletions

File diff suppressed because it is too large Load Diff

View File

@ -22,7 +22,6 @@ class HSetFamily {
static uint32_t MaxListPackLen();
private:
enum GetAllMode : uint8_t { FIELDS = 1, VALUES = 2 };
static void HDel(CmdArgList args, ConnectionContext* cntx);
static void HLen(CmdArgList args, ConnectionContext* cntx);
@ -41,30 +40,6 @@ class HSetFamily {
static void HRandField(CmdArgList args, ConnectionContext* cntx);
static void HGetGeneric(CmdArgList args, ConnectionContext* cntx, uint8_t getall_mask);
static OpResult<uint32_t> OpSet(const OpArgs& op_args, std::string_view key, CmdArgList values,
bool skip_if_exists);
static OpResult<uint32_t> OpDel(const OpArgs& op_args, std::string_view key, CmdArgList values);
using OptStr = std::optional<std::string>;
static OpResult<std::vector<OptStr>> OpMGet(const OpArgs& op_args, std::string_view key,
CmdArgList fields);
static OpResult<uint32_t> OpLen(const OpArgs& op_args, std::string_view key);
static OpResult<std::string> OpGet(const OpArgs& op_args, std::string_view key,
std::string_view field);
static OpResult<std::vector<std::string>> OpGetAll(const OpArgs& op_args, std::string_view key,
uint8_t getall_mask);
static OpResult<size_t> OpStrLen(const OpArgs& op_args, std::string_view key,
std::string_view field);
using IncrByParam = std::variant<double, int64_t>;
static OpStatus OpIncrBy(const OpArgs& op_args, std::string_view key, std::string_view field,
IncrByParam* param);
static OpResult<StringVec> OpScan(const OpArgs& op_args, std::string_view key, uint64_t* cursor);
};
} // namespace dfly