mirror of https://gitee.com/bigwinds/arangodb
added VPack version number
This commit is contained in:
parent
6f0be080fa
commit
79d57bf74e
|
@ -37,8 +37,6 @@
|
||||||
|
|
||||||
using namespace arangodb::rest;
|
using namespace arangodb::rest;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief initialize
|
/// @brief initialize
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -55,6 +53,7 @@ void Version::initialize() {
|
||||||
Values["openssl-version"] = getOpenSSLVersion();
|
Values["openssl-version"] = getOpenSSLVersion();
|
||||||
Values["v8-version"] = getV8Version();
|
Values["v8-version"] = getV8Version();
|
||||||
Values["libev-version"] = getLibevVersion();
|
Values["libev-version"] = getLibevVersion();
|
||||||
|
Values["vpack-version"] = getVPackVersion();
|
||||||
Values["zlib-version"] = getZLibVersion();
|
Values["zlib-version"] = getZLibVersion();
|
||||||
Values["configure"] = getConfigure();
|
Values["configure"] = getConfigure();
|
||||||
Values["env"] = getConfigureEnvironment();
|
Values["env"] = getConfigureEnvironment();
|
||||||
|
@ -80,6 +79,10 @@ void Version::initialize() {
|
||||||
#else
|
#else
|
||||||
Values["fd-client-event-handler"] = "select";
|
Values["fd-client-event-handler"] = "select";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
for (auto& it : Values) {
|
||||||
|
arangodb::basics::StringUtils::trimInPlace(it.second);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -153,6 +156,14 @@ std::string Version::getLibevVersion() {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
/// @brief get vpack version
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
std::string Version::getVPackVersion() {
|
||||||
|
return arangodb::velocypack::Version::BuildVersion.toString();
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief get zlib version
|
/// @brief get zlib version
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -223,7 +234,7 @@ std::string Version::getRepositoryVersion() {
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
std::string Version::getBuildDate() {
|
std::string Version::getBuildDate() {
|
||||||
// the OpenSuSE build system does not liked it, if __DATE__ is used
|
// the OpenSuSE build system does not like it, if __DATE__ is used
|
||||||
#ifdef TRI_BUILD_DATE
|
#ifdef TRI_BUILD_DATE
|
||||||
return std::string(TRI_BUILD_DATE).append(" ").append(__TIME__);
|
return std::string(TRI_BUILD_DATE).append(" ").append(__TIME__);
|
||||||
#else
|
#else
|
||||||
|
@ -247,6 +258,7 @@ std::string Version::getVerboseVersionString() {
|
||||||
#ifdef TRI_HAVE_TCMALLOC
|
#ifdef TRI_HAVE_TCMALLOC
|
||||||
<< "tcmalloc, "
|
<< "tcmalloc, "
|
||||||
#endif
|
#endif
|
||||||
|
<< "VPack " << getVPackVersion() << ", "
|
||||||
<< "ICU " << getICUVersion() << ", "
|
<< "ICU " << getICUVersion() << ", "
|
||||||
<< "V8 " << getV8Version() << ", " << getOpenSSLVersion();
|
<< "V8 " << getV8Version() << ", " << getOpenSSLVersion();
|
||||||
|
|
||||||
|
@ -261,8 +273,7 @@ std::string Version::getDetailed() {
|
||||||
std::string result;
|
std::string result;
|
||||||
|
|
||||||
for (auto& it : Values) {
|
for (auto& it : Values) {
|
||||||
std::string value = it.second;
|
std::string const& value = it.second;
|
||||||
arangodb::basics::StringUtils::trimInPlace(value);
|
|
||||||
|
|
||||||
if (!value.empty()) {
|
if (!value.empty()) {
|
||||||
result.append(it.first);
|
result.append(it.first);
|
||||||
|
@ -284,9 +295,8 @@ std::string Version::getDetailed() {
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
void Version::getJson(TRI_memory_zone_t* zone, TRI_json_t* dst) {
|
void Version::getJson(TRI_memory_zone_t* zone, TRI_json_t* dst) {
|
||||||
for (auto& it : Values) {
|
for (auto const& it : Values) {
|
||||||
std::string value = it.second;
|
std::string const& value = it.second;
|
||||||
arangodb::basics::StringUtils::trimInPlace(value);
|
|
||||||
|
|
||||||
if (!value.empty()) {
|
if (!value.empty()) {
|
||||||
std::string const& key = it.first;
|
std::string const& key = it.first;
|
||||||
|
@ -303,9 +313,8 @@ void Version::getJson(TRI_memory_zone_t* zone, TRI_json_t* dst) {
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
void Version::getVPack(VPackBuilder& dst) {
|
void Version::getVPack(VPackBuilder& dst) {
|
||||||
for (auto& it : Values) {
|
for (auto const& it : Values) {
|
||||||
std::string value = it.second;
|
std::string const& value = it.second;
|
||||||
arangodb::basics::StringUtils::trimInPlace(value);
|
|
||||||
|
|
||||||
if (!value.empty()) {
|
if (!value.empty()) {
|
||||||
dst.add(it.first, VPackValue(value));
|
dst.add(it.first, VPackValue(value));
|
||||||
|
|
|
@ -27,16 +27,15 @@
|
||||||
#include "Basics/Common.h"
|
#include "Basics/Common.h"
|
||||||
|
|
||||||
#include <velocypack/Builder.h>
|
#include <velocypack/Builder.h>
|
||||||
|
#include <velocypack/Version.h>
|
||||||
#include <velocypack/velocypack-aliases.h>
|
#include <velocypack/velocypack-aliases.h>
|
||||||
|
|
||||||
|
|
||||||
struct TRI_json_t;
|
struct TRI_json_t;
|
||||||
struct TRI_memory_zone_s;
|
struct TRI_memory_zone_s;
|
||||||
|
|
||||||
namespace arangodb {
|
namespace arangodb {
|
||||||
namespace rest {
|
namespace rest {
|
||||||
|
|
||||||
|
|
||||||
class Version {
|
class Version {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -86,6 +85,12 @@ class Version {
|
||||||
|
|
||||||
static std::string getLibevVersion();
|
static std::string getLibevVersion();
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
/// @brief get vpack version
|
||||||
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
static std::string getVPackVersion();
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief get zlib version
|
/// @brief get zlib version
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -145,7 +150,6 @@ class Version {
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
static void getVPack(VPackBuilder&);
|
static void getVPack(VPackBuilder&);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static std::map<std::string, std::string> Values;
|
static std::map<std::string, std::string> Values;
|
||||||
|
|
Loading…
Reference in New Issue