+48
-12
@@ -257,6 +257,7 @@ const uint32_t TableStruct_greptime_2fv1_2frow_2eproto::offsets[] PROTOBUF_SECTI
|
||||
::_pbi::kInvalidFieldOffsetTag,
|
||||
::_pbi::kInvalidFieldOffsetTag,
|
||||
::_pbi::kInvalidFieldOffsetTag,
|
||||
::_pbi::kInvalidFieldOffsetTag,
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::JsonValue, _impl_.value_),
|
||||
~0u, // no _has_bits_
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::JsonList, _internal_metadata_),
|
||||
@@ -289,9 +290,9 @@ static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protode
|
||||
{ 63, -1, -1, sizeof(::greptime::v1::ListValue)},
|
||||
{ 70, -1, -1, sizeof(::greptime::v1::StructValue)},
|
||||
{ 77, -1, -1, sizeof(::greptime::v1::JsonValue)},
|
||||
{ 91, -1, -1, sizeof(::greptime::v1::JsonList)},
|
||||
{ 98, -1, -1, sizeof(::greptime::v1::JsonObject_Entry)},
|
||||
{ 106, -1, -1, sizeof(::greptime::v1::JsonObject)},
|
||||
{ 92, -1, -1, sizeof(::greptime::v1::JsonList)},
|
||||
{ 99, -1, -1, sizeof(::greptime::v1::JsonObject_Entry)},
|
||||
{ 107, -1, -1, sizeof(::greptime::v1::JsonObject)},
|
||||
};
|
||||
|
||||
static const ::_pb::Message* const file_default_instances[] = {
|
||||
@@ -345,25 +346,26 @@ const char descriptor_table_protodef_greptime_2fv1_2frow_2eproto[] PROTOBUF_SECT
|
||||
"e\030* \001(\0132\026.greptime.v1.JsonValueH\000B\014\n\nval"
|
||||
"ue_data\".\n\tListValue\022!\n\005items\030\001 \003(\0132\022.gr"
|
||||
"eptime.v1.Value\"0\n\013StructValue\022!\n\005items\030"
|
||||
"\002 \003(\0132\022.greptime.v1.Value\"\271\001\n\tJsonValue\022"
|
||||
"\002 \003(\0132\022.greptime.v1.Value\"\314\001\n\tJsonValue\022"
|
||||
"\021\n\007boolean\030\001 \001(\010H\000\022\r\n\003int\030\002 \001(\003H\000\022\016\n\004uin"
|
||||
"t\030\003 \001(\004H\000\022\017\n\005float\030\004 \001(\001H\000\022\r\n\003str\030\005 \001(\tH"
|
||||
"\000\022&\n\005array\030\006 \001(\0132\025.greptime.v1.JsonListH"
|
||||
"\000\022)\n\006object\030\007 \001(\0132\027.greptime.v1.JsonObje"
|
||||
"ctH\000B\007\n\005value\"1\n\010JsonList\022%\n\005items\030\001 \003(\013"
|
||||
"2\026.greptime.v1.JsonValue\"y\n\nJsonObject\022."
|
||||
"\n\007entries\030\001 \003(\0132\035.greptime.v1.JsonObject"
|
||||
".Entry\032;\n\005Entry\022\013\n\003key\030\001 \001(\t\022%\n\005value\030\002 "
|
||||
"\001(\0132\026.greptime.v1.JsonValueBP\n\016io.grepti"
|
||||
"me.v1B\007RowDataZ5github.com/GreptimeTeam/"
|
||||
"greptime-proto/go/greptime/v1b\006proto3"
|
||||
"ctH\000\022\021\n\007variant\030\010 \001(\014H\000B\007\n\005value\"1\n\010Json"
|
||||
"List\022%\n\005items\030\001 \003(\0132\026.greptime.v1.JsonVa"
|
||||
"lue\"y\n\nJsonObject\022.\n\007entries\030\001 \003(\0132\035.gre"
|
||||
"ptime.v1.JsonObject.Entry\032;\n\005Entry\022\013\n\003ke"
|
||||
"y\030\001 \001(\t\022%\n\005value\030\002 \001(\0132\026.greptime.v1.Jso"
|
||||
"nValueBP\n\016io.greptime.v1B\007RowDataZ5githu"
|
||||
"b.com/GreptimeTeam/greptime-proto/go/gre"
|
||||
"ptime/v1b\006proto3"
|
||||
;
|
||||
static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2frow_2eproto_deps[1] = {
|
||||
&::descriptor_table_greptime_2fv1_2fcommon_2eproto,
|
||||
};
|
||||
static ::_pbi::once_flag descriptor_table_greptime_2fv1_2frow_2eproto_once;
|
||||
const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2frow_2eproto = {
|
||||
false, false, 1957, descriptor_table_protodef_greptime_2fv1_2frow_2eproto,
|
||||
false, false, 1976, descriptor_table_protodef_greptime_2fv1_2frow_2eproto,
|
||||
"greptime/v1/row.proto",
|
||||
&descriptor_table_greptime_2fv1_2frow_2eproto_once, descriptor_table_greptime_2fv1_2frow_2eproto_deps, 1, 10,
|
||||
schemas, file_default_instances, TableStruct_greptime_2fv1_2frow_2eproto::offsets,
|
||||
@@ -2912,6 +2914,10 @@ JsonValue::JsonValue(const JsonValue& from)
|
||||
from._internal_object());
|
||||
break;
|
||||
}
|
||||
case kVariant: {
|
||||
_this->_internal_set_variant(from._internal_variant());
|
||||
break;
|
||||
}
|
||||
case VALUE_NOT_SET: {
|
||||
break;
|
||||
}
|
||||
@@ -2986,6 +2992,10 @@ void JsonValue::clear_value() {
|
||||
}
|
||||
break;
|
||||
}
|
||||
case kVariant: {
|
||||
_impl_.value_.variant_.Destroy();
|
||||
break;
|
||||
}
|
||||
case VALUE_NOT_SET: {
|
||||
break;
|
||||
}
|
||||
@@ -3068,6 +3078,15 @@ const char* JsonValue::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx
|
||||
} else
|
||||
goto handle_unusual;
|
||||
continue;
|
||||
// bytes variant = 8;
|
||||
case 8:
|
||||
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 66)) {
|
||||
auto str = _internal_mutable_variant();
|
||||
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
|
||||
CHK_(ptr);
|
||||
} else
|
||||
goto handle_unusual;
|
||||
continue;
|
||||
default:
|
||||
goto handle_unusual;
|
||||
} // switch
|
||||
@@ -3145,6 +3164,12 @@ uint8_t* JsonValue::_InternalSerialize(
|
||||
_Internal::object(this).GetCachedSize(), target, stream);
|
||||
}
|
||||
|
||||
// bytes variant = 8;
|
||||
if (_internal_has_variant()) {
|
||||
target = stream->WriteBytesMaybeAliased(
|
||||
8, this->_internal_variant(), target);
|
||||
}
|
||||
|
||||
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
|
||||
target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
|
||||
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
|
||||
@@ -3203,6 +3228,13 @@ size_t JsonValue::ByteSizeLong() const {
|
||||
*_impl_.value_.object_);
|
||||
break;
|
||||
}
|
||||
// bytes variant = 8;
|
||||
case kVariant: {
|
||||
total_size += 1 +
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
|
||||
this->_internal_variant());
|
||||
break;
|
||||
}
|
||||
case VALUE_NOT_SET: {
|
||||
break;
|
||||
}
|
||||
@@ -3256,6 +3288,10 @@ void JsonValue::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROT
|
||||
from._internal_object());
|
||||
break;
|
||||
}
|
||||
case kVariant: {
|
||||
_this->_internal_set_variant(from._internal_variant());
|
||||
break;
|
||||
}
|
||||
case VALUE_NOT_SET: {
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1707,6 +1707,7 @@ class JsonValue final :
|
||||
kStr = 5,
|
||||
kArray = 6,
|
||||
kObject = 7,
|
||||
kVariant = 8,
|
||||
VALUE_NOT_SET = 0,
|
||||
};
|
||||
|
||||
@@ -1795,6 +1796,7 @@ class JsonValue final :
|
||||
kStrFieldNumber = 5,
|
||||
kArrayFieldNumber = 6,
|
||||
kObjectFieldNumber = 7,
|
||||
kVariantFieldNumber = 8,
|
||||
};
|
||||
// bool boolean = 1;
|
||||
bool has_boolean() const;
|
||||
@@ -1902,6 +1904,24 @@ class JsonValue final :
|
||||
::greptime::v1::JsonObject* object);
|
||||
::greptime::v1::JsonObject* unsafe_arena_release_object();
|
||||
|
||||
// bytes variant = 8;
|
||||
bool has_variant() const;
|
||||
private:
|
||||
bool _internal_has_variant() const;
|
||||
public:
|
||||
void clear_variant();
|
||||
const std::string& variant() const;
|
||||
template <typename ArgT0 = const std::string&, typename... ArgT>
|
||||
void set_variant(ArgT0&& arg0, ArgT... args);
|
||||
std::string* mutable_variant();
|
||||
PROTOBUF_NODISCARD std::string* release_variant();
|
||||
void set_allocated_variant(std::string* variant);
|
||||
private:
|
||||
const std::string& _internal_variant() const;
|
||||
inline PROTOBUF_ALWAYS_INLINE void _internal_set_variant(const std::string& value);
|
||||
std::string* _internal_mutable_variant();
|
||||
public:
|
||||
|
||||
void clear_value();
|
||||
ValueCase value_case() const;
|
||||
// @@protoc_insertion_point(class_scope:greptime.v1.JsonValue)
|
||||
@@ -1914,6 +1934,7 @@ class JsonValue final :
|
||||
void set_has_str();
|
||||
void set_has_array();
|
||||
void set_has_object();
|
||||
void set_has_variant();
|
||||
|
||||
inline bool has_value() const;
|
||||
inline void clear_has_value();
|
||||
@@ -1932,6 +1953,7 @@ class JsonValue final :
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr str_;
|
||||
::greptime::v1::JsonList* array_;
|
||||
::greptime::v1::JsonObject* object_;
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr variant_;
|
||||
} value_;
|
||||
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
||||
uint32_t _oneof_case_[1];
|
||||
@@ -4692,6 +4714,83 @@ inline ::greptime::v1::JsonObject* JsonValue::mutable_object() {
|
||||
return _msg;
|
||||
}
|
||||
|
||||
// bytes variant = 8;
|
||||
inline bool JsonValue::_internal_has_variant() const {
|
||||
return value_case() == kVariant;
|
||||
}
|
||||
inline bool JsonValue::has_variant() const {
|
||||
return _internal_has_variant();
|
||||
}
|
||||
inline void JsonValue::set_has_variant() {
|
||||
_impl_._oneof_case_[0] = kVariant;
|
||||
}
|
||||
inline void JsonValue::clear_variant() {
|
||||
if (_internal_has_variant()) {
|
||||
_impl_.value_.variant_.Destroy();
|
||||
clear_has_value();
|
||||
}
|
||||
}
|
||||
inline const std::string& JsonValue::variant() const {
|
||||
// @@protoc_insertion_point(field_get:greptime.v1.JsonValue.variant)
|
||||
return _internal_variant();
|
||||
}
|
||||
template <typename ArgT0, typename... ArgT>
|
||||
inline void JsonValue::set_variant(ArgT0&& arg0, ArgT... args) {
|
||||
if (!_internal_has_variant()) {
|
||||
clear_value();
|
||||
set_has_variant();
|
||||
_impl_.value_.variant_.InitDefault();
|
||||
}
|
||||
_impl_.value_.variant_.SetBytes( static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
|
||||
// @@protoc_insertion_point(field_set:greptime.v1.JsonValue.variant)
|
||||
}
|
||||
inline std::string* JsonValue::mutable_variant() {
|
||||
std::string* _s = _internal_mutable_variant();
|
||||
// @@protoc_insertion_point(field_mutable:greptime.v1.JsonValue.variant)
|
||||
return _s;
|
||||
}
|
||||
inline const std::string& JsonValue::_internal_variant() const {
|
||||
if (_internal_has_variant()) {
|
||||
return _impl_.value_.variant_.Get();
|
||||
}
|
||||
return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited();
|
||||
}
|
||||
inline void JsonValue::_internal_set_variant(const std::string& value) {
|
||||
if (!_internal_has_variant()) {
|
||||
clear_value();
|
||||
set_has_variant();
|
||||
_impl_.value_.variant_.InitDefault();
|
||||
}
|
||||
_impl_.value_.variant_.Set(value, GetArenaForAllocation());
|
||||
}
|
||||
inline std::string* JsonValue::_internal_mutable_variant() {
|
||||
if (!_internal_has_variant()) {
|
||||
clear_value();
|
||||
set_has_variant();
|
||||
_impl_.value_.variant_.InitDefault();
|
||||
}
|
||||
return _impl_.value_.variant_.Mutable( GetArenaForAllocation());
|
||||
}
|
||||
inline std::string* JsonValue::release_variant() {
|
||||
// @@protoc_insertion_point(field_release:greptime.v1.JsonValue.variant)
|
||||
if (_internal_has_variant()) {
|
||||
clear_has_value();
|
||||
return _impl_.value_.variant_.Release();
|
||||
} else {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
inline void JsonValue::set_allocated_variant(std::string* variant) {
|
||||
if (has_value()) {
|
||||
clear_value();
|
||||
}
|
||||
if (variant != nullptr) {
|
||||
set_has_variant();
|
||||
_impl_.value_.variant_.InitAllocated(variant, GetArenaForAllocation());
|
||||
}
|
||||
// @@protoc_insertion_point(field_set_allocated:greptime.v1.JsonValue.variant)
|
||||
}
|
||||
|
||||
inline bool JsonValue::has_value() const {
|
||||
return value_case() != VALUE_NOT_SET;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user