• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

arangodb / velocypack / 3998645281

pending completion
3998645281

Pull #148

github

GitHub
Merge b1e3c924b into 5a28b6413
Pull Request #148: use separate namespace for xxh functions

0 of 5107 relevant lines covered (0.0%)

0.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/ValueType.cpp
1
////////////////////////////////////////////////////////////////////////////////
2
/// DISCLAIMER
3
///
4
/// Copyright 2014-2020 ArangoDB GmbH, Cologne, Germany
5
/// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany
6
///
7
/// Licensed under the Apache License, Version 2.0 (the "License");
8
/// you may not use this file except in compliance with the License.
9
/// You may obtain a copy of the License at
10
///
11
///     http://www.apache.org/licenses/LICENSE-2.0
12
///
13
/// Unless required by applicable law or agreed to in writing, software
14
/// distributed under the License is distributed on an "AS IS" BASIS,
15
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
/// See the License for the specific language governing permissions and
17
/// limitations under the License.
18
///
19
/// Copyright holder is ArangoDB GmbH, Cologne, Germany
20
///
21
/// @author Max Neunhoeffer
22
/// @author Jan Steemann
23
////////////////////////////////////////////////////////////////////////////////
24

25
#include <ostream>
26

27
#include "velocypack/ValueType.h"
28

29
using namespace arangodb::velocypack;
30

31
char const* arangodb::velocypack::valueTypeName(ValueType type) {
×
32
  switch (type) {
×
33
    case ValueType::None:
×
34
      return "none";
×
35
    case ValueType::Illegal:
×
36
      return "illegal";
×
37
    case ValueType::Null:
×
38
      return "null";
×
39
    case ValueType::Bool:
×
40
      return "bool";
×
41
    case ValueType::Array:
×
42
      return "array";
×
43
    case ValueType::Object:
×
44
      return "object";
×
45
    case ValueType::Double:
×
46
      return "double";
×
47
    case ValueType::UTCDate:
×
48
      return "utc-date";
×
49
    case ValueType::External:
×
50
      return "external";
×
51
    case ValueType::MinKey:
×
52
      return "min-key";
×
53
    case ValueType::MaxKey:
×
54
      return "max-key";
×
55
    case ValueType::Int:
×
56
      return "int";
×
57
    case ValueType::UInt:
×
58
      return "uint";
×
59
    case ValueType::SmallInt:
×
60
      return "smallint";
×
61
    case ValueType::String:
×
62
      return "string";
×
63
    case ValueType::Binary:
×
64
      return "binary";
×
65
    case ValueType::BCD:
×
66
      return "bcd";
×
67
    case ValueType::Tagged:
×
68
      return "tagged";
×
69
    case ValueType::Custom:
×
70
      return "custom";
×
71
  }
72

73
  return "unknown";
×
74
}
75

76
ValueType arangodb::velocypack::valueTypeGroup(ValueType type) {
×
77
  // numbers are all the same, upcast them to double
78
  if (type == ValueType::Double || type == ValueType::Int ||
×
79
      type == ValueType::UInt || type == ValueType::SmallInt) {
×
80
    return ValueType::Double;
×
81
  }
82
  return type;
×
83
}
84

85
std::ostream& operator<<(std::ostream& stream, ValueType type) {
×
86
  stream << valueTypeName(type);
×
87
  return stream;
×
88
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc