|
|
|
@ -3,18 +3,21 @@ |
|
|
|
|
#include <memory> |
|
|
|
|
|
|
|
|
|
#include "rocksdb/version.h" |
|
|
|
|
#include "util/string_util.h" |
|
|
|
|
#include "rocksdb/utilities/object_registry.h" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace ROCKSDB_NAMESPACE { |
|
|
|
|
std::unordered_map<std::string, RegistrarFunc> ObjectRegistry::builtins_ = {}; |
|
|
|
|
|
|
|
|
|
const std::unordered_map<std::string, std::string>& GetRocksBuildProperties() { |
|
|
|
|
static std::unique_ptr<std::unordered_map<std::string, std::string>> props(new std::unordered_map<std::string, std::string>()); |
|
|
|
|
return *props; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
std::string GetRocksVersionAsString(bool with_patch) { |
|
|
|
|
std::string version = ToString(ROCKSDB_MAJOR) + "." + ToString(ROCKSDB_MINOR); |
|
|
|
|
std::string version = std::to_string(ROCKSDB_MAJOR) + "." + std::to_string(ROCKSDB_MINOR); |
|
|
|
|
if (with_patch) { |
|
|
|
|
return version + "." + ToString(ROCKSDB_PATCH); |
|
|
|
|
return version + "." + std::to_string(ROCKSDB_PATCH); |
|
|
|
|
} else { |
|
|
|
|
return version; |
|
|
|
|
} |
|
|
|
@ -33,4 +36,3 @@ std::string GetRocksBuildInfoAsString(const std::string& program, bool verbose) |
|
|
|
|
return info; |
|
|
|
|
} |
|
|
|
|
} // namespace ROCKSDB_NAMESPACE
|
|
|
|
|
|
|
|
|
|