mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 02:15:45 +02:00
Fix redis linker dependencies. Bring more redis (BSD-3) code. Fix bugs related to multi-database redis. Introduce multiple types for redis values.
30 lines
616 B
C++
30 lines
616 B
C++
// Copyright 2021, Roman Gershman. All rights reserved.
|
|
// See LICENSE for licensing terms.
|
|
//
|
|
|
|
#pragma once
|
|
|
|
#include <atomic>
|
|
|
|
namespace dfly {
|
|
|
|
std::string WrongNumArgsError(std::string_view cmd);
|
|
|
|
extern const char kSyntaxErr[];
|
|
extern const char kWrongTypeErr[];
|
|
extern const char kInvalidIntErr[];
|
|
extern const char kUintErr[];
|
|
extern const char kDbIndOutOfRangeErr[];
|
|
extern const char kInvalidDbIndErr[];
|
|
|
|
#ifndef RETURN_ON_ERR
|
|
|
|
#define RETURN_ON_ERR(x) \
|
|
do { \
|
|
auto ec = (x); \
|
|
if (ec) \
|
|
return ec; \
|
|
} while (0)
|
|
#endif
|
|
|
|
} // namespace dfly
|