7de3f31fd0
* feat: support c++ targets * fix: compile all protos under ./proto * chore: Apply suggestions from code review --------- Co-authored-by: Yingwen <realevenyag@gmail.com>
2183 lines
78 KiB
C++
2183 lines
78 KiB
C++
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
// source: greptime/v1/database.proto
|
|
|
|
#include "greptime/v1/database.pb.h"
|
|
|
|
#include <algorithm>
|
|
|
|
#include <google/protobuf/io/coded_stream.h>
|
|
#include <google/protobuf/extension_set.h>
|
|
#include <google/protobuf/wire_format_lite.h>
|
|
#include <google/protobuf/descriptor.h>
|
|
#include <google/protobuf/generated_message_reflection.h>
|
|
#include <google/protobuf/reflection_ops.h>
|
|
#include <google/protobuf/wire_format.h>
|
|
// @@protoc_insertion_point(includes)
|
|
#include <google/protobuf/port_def.inc>
|
|
|
|
PROTOBUF_PRAGMA_INIT_SEG
|
|
|
|
namespace _pb = ::PROTOBUF_NAMESPACE_ID;
|
|
namespace _pbi = _pb::internal;
|
|
|
|
namespace greptime {
|
|
namespace v1 {
|
|
PROTOBUF_CONSTEXPR GreptimeRequest::GreptimeRequest(
|
|
::_pbi::ConstantInitialized): _impl_{
|
|
/*decltype(_impl_.header_)*/nullptr
|
|
, /*decltype(_impl_.request_)*/{}
|
|
, /*decltype(_impl_._cached_size_)*/{}
|
|
, /*decltype(_impl_._oneof_case_)*/{}} {}
|
|
struct GreptimeRequestDefaultTypeInternal {
|
|
PROTOBUF_CONSTEXPR GreptimeRequestDefaultTypeInternal()
|
|
: _instance(::_pbi::ConstantInitialized{}) {}
|
|
~GreptimeRequestDefaultTypeInternal() {}
|
|
union {
|
|
GreptimeRequest _instance;
|
|
};
|
|
};
|
|
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GreptimeRequestDefaultTypeInternal _GreptimeRequest_default_instance_;
|
|
PROTOBUF_CONSTEXPR GreptimeResponse::GreptimeResponse(
|
|
::_pbi::ConstantInitialized): _impl_{
|
|
/*decltype(_impl_.header_)*/nullptr
|
|
, /*decltype(_impl_.response_)*/{}
|
|
, /*decltype(_impl_._cached_size_)*/{}
|
|
, /*decltype(_impl_._oneof_case_)*/{}} {}
|
|
struct GreptimeResponseDefaultTypeInternal {
|
|
PROTOBUF_CONSTEXPR GreptimeResponseDefaultTypeInternal()
|
|
: _instance(::_pbi::ConstantInitialized{}) {}
|
|
~GreptimeResponseDefaultTypeInternal() {}
|
|
union {
|
|
GreptimeResponse _instance;
|
|
};
|
|
};
|
|
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GreptimeResponseDefaultTypeInternal _GreptimeResponse_default_instance_;
|
|
PROTOBUF_CONSTEXPR QueryRequest::QueryRequest(
|
|
::_pbi::ConstantInitialized): _impl_{
|
|
/*decltype(_impl_.query_)*/{}
|
|
, /*decltype(_impl_._cached_size_)*/{}
|
|
, /*decltype(_impl_._oneof_case_)*/{}} {}
|
|
struct QueryRequestDefaultTypeInternal {
|
|
PROTOBUF_CONSTEXPR QueryRequestDefaultTypeInternal()
|
|
: _instance(::_pbi::ConstantInitialized{}) {}
|
|
~QueryRequestDefaultTypeInternal() {}
|
|
union {
|
|
QueryRequest _instance;
|
|
};
|
|
};
|
|
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 QueryRequestDefaultTypeInternal _QueryRequest_default_instance_;
|
|
PROTOBUF_CONSTEXPR InsertRequests::InsertRequests(
|
|
::_pbi::ConstantInitialized): _impl_{
|
|
/*decltype(_impl_.inserts_)*/{}
|
|
, /*decltype(_impl_._cached_size_)*/{}} {}
|
|
struct InsertRequestsDefaultTypeInternal {
|
|
PROTOBUF_CONSTEXPR InsertRequestsDefaultTypeInternal()
|
|
: _instance(::_pbi::ConstantInitialized{}) {}
|
|
~InsertRequestsDefaultTypeInternal() {}
|
|
union {
|
|
InsertRequests _instance;
|
|
};
|
|
};
|
|
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InsertRequestsDefaultTypeInternal _InsertRequests_default_instance_;
|
|
PROTOBUF_CONSTEXPR InsertRequest::InsertRequest(
|
|
::_pbi::ConstantInitialized): _impl_{
|
|
/*decltype(_impl_.columns_)*/{}
|
|
, /*decltype(_impl_.table_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
|
, /*decltype(_impl_.row_count_)*/0u
|
|
, /*decltype(_impl_.region_number_)*/0u
|
|
, /*decltype(_impl_._cached_size_)*/{}} {}
|
|
struct InsertRequestDefaultTypeInternal {
|
|
PROTOBUF_CONSTEXPR InsertRequestDefaultTypeInternal()
|
|
: _instance(::_pbi::ConstantInitialized{}) {}
|
|
~InsertRequestDefaultTypeInternal() {}
|
|
union {
|
|
InsertRequest _instance;
|
|
};
|
|
};
|
|
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InsertRequestDefaultTypeInternal _InsertRequest_default_instance_;
|
|
PROTOBUF_CONSTEXPR DeleteRequest::DeleteRequest(
|
|
::_pbi::ConstantInitialized): _impl_{
|
|
/*decltype(_impl_.key_columns_)*/{}
|
|
, /*decltype(_impl_.table_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
|
, /*decltype(_impl_.region_number_)*/0u
|
|
, /*decltype(_impl_.row_count_)*/0u
|
|
, /*decltype(_impl_._cached_size_)*/{}} {}
|
|
struct DeleteRequestDefaultTypeInternal {
|
|
PROTOBUF_CONSTEXPR DeleteRequestDefaultTypeInternal()
|
|
: _instance(::_pbi::ConstantInitialized{}) {}
|
|
~DeleteRequestDefaultTypeInternal() {}
|
|
union {
|
|
DeleteRequest _instance;
|
|
};
|
|
};
|
|
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeleteRequestDefaultTypeInternal _DeleteRequest_default_instance_;
|
|
} // namespace v1
|
|
} // namespace greptime
|
|
static ::_pb::Metadata file_level_metadata_greptime_2fv1_2fdatabase_2eproto[6];
|
|
static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_greptime_2fv1_2fdatabase_2eproto = nullptr;
|
|
static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_greptime_2fv1_2fdatabase_2eproto = nullptr;
|
|
|
|
const uint32_t TableStruct_greptime_2fv1_2fdatabase_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
|
~0u, // no _has_bits_
|
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::GreptimeRequest, _internal_metadata_),
|
|
~0u, // no _extensions_
|
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::GreptimeRequest, _impl_._oneof_case_[0]),
|
|
~0u, // no _weak_field_map_
|
|
~0u, // no _inlined_string_donated_
|
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::GreptimeRequest, _impl_.header_),
|
|
::_pbi::kInvalidFieldOffsetTag,
|
|
::_pbi::kInvalidFieldOffsetTag,
|
|
::_pbi::kInvalidFieldOffsetTag,
|
|
::_pbi::kInvalidFieldOffsetTag,
|
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::GreptimeRequest, _impl_.request_),
|
|
~0u, // no _has_bits_
|
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::GreptimeResponse, _internal_metadata_),
|
|
~0u, // no _extensions_
|
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::GreptimeResponse, _impl_._oneof_case_[0]),
|
|
~0u, // no _weak_field_map_
|
|
~0u, // no _inlined_string_donated_
|
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::GreptimeResponse, _impl_.header_),
|
|
::_pbi::kInvalidFieldOffsetTag,
|
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::GreptimeResponse, _impl_.response_),
|
|
~0u, // no _has_bits_
|
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::QueryRequest, _internal_metadata_),
|
|
~0u, // no _extensions_
|
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::QueryRequest, _impl_._oneof_case_[0]),
|
|
~0u, // no _weak_field_map_
|
|
~0u, // no _inlined_string_donated_
|
|
::_pbi::kInvalidFieldOffsetTag,
|
|
::_pbi::kInvalidFieldOffsetTag,
|
|
::_pbi::kInvalidFieldOffsetTag,
|
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::QueryRequest, _impl_.query_),
|
|
~0u, // no _has_bits_
|
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::InsertRequests, _internal_metadata_),
|
|
~0u, // no _extensions_
|
|
~0u, // no _oneof_case_
|
|
~0u, // no _weak_field_map_
|
|
~0u, // no _inlined_string_donated_
|
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::InsertRequests, _impl_.inserts_),
|
|
~0u, // no _has_bits_
|
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::InsertRequest, _internal_metadata_),
|
|
~0u, // no _extensions_
|
|
~0u, // no _oneof_case_
|
|
~0u, // no _weak_field_map_
|
|
~0u, // no _inlined_string_donated_
|
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::InsertRequest, _impl_.table_name_),
|
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::InsertRequest, _impl_.columns_),
|
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::InsertRequest, _impl_.row_count_),
|
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::InsertRequest, _impl_.region_number_),
|
|
~0u, // no _has_bits_
|
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::DeleteRequest, _internal_metadata_),
|
|
~0u, // no _extensions_
|
|
~0u, // no _oneof_case_
|
|
~0u, // no _weak_field_map_
|
|
~0u, // no _inlined_string_donated_
|
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::DeleteRequest, _impl_.table_name_),
|
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::DeleteRequest, _impl_.region_number_),
|
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::DeleteRequest, _impl_.key_columns_),
|
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::DeleteRequest, _impl_.row_count_),
|
|
};
|
|
static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
|
{ 0, -1, -1, sizeof(::greptime::v1::GreptimeRequest)},
|
|
{ 12, -1, -1, sizeof(::greptime::v1::GreptimeResponse)},
|
|
{ 21, -1, -1, sizeof(::greptime::v1::QueryRequest)},
|
|
{ 31, -1, -1, sizeof(::greptime::v1::InsertRequests)},
|
|
{ 38, -1, -1, sizeof(::greptime::v1::InsertRequest)},
|
|
{ 48, -1, -1, sizeof(::greptime::v1::DeleteRequest)},
|
|
};
|
|
|
|
static const ::_pb::Message* const file_default_instances[] = {
|
|
&::greptime::v1::_GreptimeRequest_default_instance_._instance,
|
|
&::greptime::v1::_GreptimeResponse_default_instance_._instance,
|
|
&::greptime::v1::_QueryRequest_default_instance_._instance,
|
|
&::greptime::v1::_InsertRequests_default_instance_._instance,
|
|
&::greptime::v1::_InsertRequest_default_instance_._instance,
|
|
&::greptime::v1::_DeleteRequest_default_instance_._instance,
|
|
};
|
|
|
|
const char descriptor_table_protodef_greptime_2fv1_2fdatabase_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
|
|
"\n\032greptime/v1/database.proto\022\013greptime.v"
|
|
"1\032\025greptime/v1/ddl.proto\032\030greptime/v1/co"
|
|
"lumn.proto\032\026greptime/v1/prom.proto\032\030grep"
|
|
"time/v1/common.proto\"\372\001\n\017GreptimeRequest"
|
|
"\022*\n\006header\030\001 \001(\0132\032.greptime.v1.RequestHe"
|
|
"ader\022.\n\007inserts\030\002 \001(\0132\033.greptime.v1.Inse"
|
|
"rtRequestsH\000\022*\n\005query\030\003 \001(\0132\031.greptime.v"
|
|
"1.QueryRequestH\000\022&\n\003ddl\030\004 \001(\0132\027.greptime"
|
|
".v1.DdlRequestH\000\022,\n\006delete\030\005 \001(\0132\032.grept"
|
|
"ime.v1.DeleteRequestH\000B\t\n\007request\"\177\n\020Gre"
|
|
"ptimeResponse\022+\n\006header\030\001 \001(\0132\033.greptime"
|
|
".v1.ResponseHeader\0222\n\raffected_rows\030\002 \001("
|
|
"\0132\031.greptime.v1.AffectedRowsH\000B\n\n\010respon"
|
|
"se\"w\n\014QueryRequest\022\r\n\003sql\030\001 \001(\tH\000\022\026\n\014log"
|
|
"ical_plan\030\002 \001(\014H\000\0227\n\020prom_range_query\030\003 "
|
|
"\001(\0132\033.greptime.v1.PromRangeQueryH\000B\007\n\005qu"
|
|
"ery\"=\n\016InsertRequests\022+\n\007inserts\030\001 \003(\0132\032"
|
|
".greptime.v1.InsertRequest\"s\n\rInsertRequ"
|
|
"est\022\022\n\ntable_name\030\001 \001(\t\022$\n\007columns\030\003 \003(\013"
|
|
"2\023.greptime.v1.Column\022\021\n\trow_count\030\004 \001(\r"
|
|
"\022\025\n\rregion_number\030\005 \001(\r\"w\n\rDeleteRequest"
|
|
"\022\022\n\ntable_name\030\001 \001(\t\022\025\n\rregion_number\030\002 "
|
|
"\001(\r\022(\n\013key_columns\030\003 \003(\0132\023.greptime.v1.C"
|
|
"olumn\022\021\n\trow_count\030\004 \001(\r2\252\001\n\020GreptimeDat"
|
|
"abase\022E\n\006Handle\022\034.greptime.v1.GreptimeRe"
|
|
"quest\032\035.greptime.v1.GreptimeResponse\022O\n\016"
|
|
"HandleRequests\022\034.greptime.v1.GreptimeReq"
|
|
"uest\032\035.greptime.v1.GreptimeResponse(\001BQ\n"
|
|
"\016io.greptime.v1B\010DatabaseZ5github.com/Gr"
|
|
"eptimeTeam/greptime-proto/go/greptime/v1"
|
|
"b\006proto3"
|
|
;
|
|
static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2fdatabase_2eproto_deps[4] = {
|
|
&::descriptor_table_greptime_2fv1_2fcolumn_2eproto,
|
|
&::descriptor_table_greptime_2fv1_2fcommon_2eproto,
|
|
&::descriptor_table_greptime_2fv1_2fddl_2eproto,
|
|
&::descriptor_table_greptime_2fv1_2fprom_2eproto,
|
|
};
|
|
static ::_pbi::once_flag descriptor_table_greptime_2fv1_2fdatabase_2eproto_once;
|
|
const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2fdatabase_2eproto = {
|
|
false, false, 1208, descriptor_table_protodef_greptime_2fv1_2fdatabase_2eproto,
|
|
"greptime/v1/database.proto",
|
|
&descriptor_table_greptime_2fv1_2fdatabase_2eproto_once, descriptor_table_greptime_2fv1_2fdatabase_2eproto_deps, 4, 6,
|
|
schemas, file_default_instances, TableStruct_greptime_2fv1_2fdatabase_2eproto::offsets,
|
|
file_level_metadata_greptime_2fv1_2fdatabase_2eproto, file_level_enum_descriptors_greptime_2fv1_2fdatabase_2eproto,
|
|
file_level_service_descriptors_greptime_2fv1_2fdatabase_2eproto,
|
|
};
|
|
PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_greptime_2fv1_2fdatabase_2eproto_getter() {
|
|
return &descriptor_table_greptime_2fv1_2fdatabase_2eproto;
|
|
}
|
|
|
|
// Force running AddDescriptors() at dynamic initialization time.
|
|
PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_greptime_2fv1_2fdatabase_2eproto(&descriptor_table_greptime_2fv1_2fdatabase_2eproto);
|
|
namespace greptime {
|
|
namespace v1 {
|
|
|
|
// ===================================================================
|
|
|
|
class GreptimeRequest::_Internal {
|
|
public:
|
|
static const ::greptime::v1::RequestHeader& header(const GreptimeRequest* msg);
|
|
static const ::greptime::v1::InsertRequests& inserts(const GreptimeRequest* msg);
|
|
static const ::greptime::v1::QueryRequest& query(const GreptimeRequest* msg);
|
|
static const ::greptime::v1::DdlRequest& ddl(const GreptimeRequest* msg);
|
|
static const ::greptime::v1::DeleteRequest& delete_(const GreptimeRequest* msg);
|
|
};
|
|
|
|
const ::greptime::v1::RequestHeader&
|
|
GreptimeRequest::_Internal::header(const GreptimeRequest* msg) {
|
|
return *msg->_impl_.header_;
|
|
}
|
|
const ::greptime::v1::InsertRequests&
|
|
GreptimeRequest::_Internal::inserts(const GreptimeRequest* msg) {
|
|
return *msg->_impl_.request_.inserts_;
|
|
}
|
|
const ::greptime::v1::QueryRequest&
|
|
GreptimeRequest::_Internal::query(const GreptimeRequest* msg) {
|
|
return *msg->_impl_.request_.query_;
|
|
}
|
|
const ::greptime::v1::DdlRequest&
|
|
GreptimeRequest::_Internal::ddl(const GreptimeRequest* msg) {
|
|
return *msg->_impl_.request_.ddl_;
|
|
}
|
|
const ::greptime::v1::DeleteRequest&
|
|
GreptimeRequest::_Internal::delete_(const GreptimeRequest* msg) {
|
|
return *msg->_impl_.request_.delete__;
|
|
}
|
|
void GreptimeRequest::clear_header() {
|
|
if (GetArenaForAllocation() == nullptr && _impl_.header_ != nullptr) {
|
|
delete _impl_.header_;
|
|
}
|
|
_impl_.header_ = nullptr;
|
|
}
|
|
void GreptimeRequest::set_allocated_inserts(::greptime::v1::InsertRequests* inserts) {
|
|
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
|
|
clear_request();
|
|
if (inserts) {
|
|
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
|
|
::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(inserts);
|
|
if (message_arena != submessage_arena) {
|
|
inserts = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
|
|
message_arena, inserts, submessage_arena);
|
|
}
|
|
set_has_inserts();
|
|
_impl_.request_.inserts_ = inserts;
|
|
}
|
|
// @@protoc_insertion_point(field_set_allocated:greptime.v1.GreptimeRequest.inserts)
|
|
}
|
|
void GreptimeRequest::set_allocated_query(::greptime::v1::QueryRequest* query) {
|
|
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
|
|
clear_request();
|
|
if (query) {
|
|
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
|
|
::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(query);
|
|
if (message_arena != submessage_arena) {
|
|
query = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
|
|
message_arena, query, submessage_arena);
|
|
}
|
|
set_has_query();
|
|
_impl_.request_.query_ = query;
|
|
}
|
|
// @@protoc_insertion_point(field_set_allocated:greptime.v1.GreptimeRequest.query)
|
|
}
|
|
void GreptimeRequest::set_allocated_ddl(::greptime::v1::DdlRequest* ddl) {
|
|
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
|
|
clear_request();
|
|
if (ddl) {
|
|
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
|
|
::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(
|
|
reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(ddl));
|
|
if (message_arena != submessage_arena) {
|
|
ddl = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
|
|
message_arena, ddl, submessage_arena);
|
|
}
|
|
set_has_ddl();
|
|
_impl_.request_.ddl_ = ddl;
|
|
}
|
|
// @@protoc_insertion_point(field_set_allocated:greptime.v1.GreptimeRequest.ddl)
|
|
}
|
|
void GreptimeRequest::clear_ddl() {
|
|
if (_internal_has_ddl()) {
|
|
if (GetArenaForAllocation() == nullptr) {
|
|
delete _impl_.request_.ddl_;
|
|
}
|
|
clear_has_request();
|
|
}
|
|
}
|
|
void GreptimeRequest::set_allocated_delete_(::greptime::v1::DeleteRequest* delete_) {
|
|
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
|
|
clear_request();
|
|
if (delete_) {
|
|
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
|
|
::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(delete_);
|
|
if (message_arena != submessage_arena) {
|
|
delete_ = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
|
|
message_arena, delete_, submessage_arena);
|
|
}
|
|
set_has_delete_();
|
|
_impl_.request_.delete__ = delete_;
|
|
}
|
|
// @@protoc_insertion_point(field_set_allocated:greptime.v1.GreptimeRequest.delete)
|
|
}
|
|
GreptimeRequest::GreptimeRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena,
|
|
bool is_message_owned)
|
|
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
|
|
SharedCtor(arena, is_message_owned);
|
|
// @@protoc_insertion_point(arena_constructor:greptime.v1.GreptimeRequest)
|
|
}
|
|
GreptimeRequest::GreptimeRequest(const GreptimeRequest& from)
|
|
: ::PROTOBUF_NAMESPACE_ID::Message() {
|
|
GreptimeRequest* const _this = this; (void)_this;
|
|
new (&_impl_) Impl_{
|
|
decltype(_impl_.header_){nullptr}
|
|
, decltype(_impl_.request_){}
|
|
, /*decltype(_impl_._cached_size_)*/{}
|
|
, /*decltype(_impl_._oneof_case_)*/{}};
|
|
|
|
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
if (from._internal_has_header()) {
|
|
_this->_impl_.header_ = new ::greptime::v1::RequestHeader(*from._impl_.header_);
|
|
}
|
|
clear_has_request();
|
|
switch (from.request_case()) {
|
|
case kInserts: {
|
|
_this->_internal_mutable_inserts()->::greptime::v1::InsertRequests::MergeFrom(
|
|
from._internal_inserts());
|
|
break;
|
|
}
|
|
case kQuery: {
|
|
_this->_internal_mutable_query()->::greptime::v1::QueryRequest::MergeFrom(
|
|
from._internal_query());
|
|
break;
|
|
}
|
|
case kDdl: {
|
|
_this->_internal_mutable_ddl()->::greptime::v1::DdlRequest::MergeFrom(
|
|
from._internal_ddl());
|
|
break;
|
|
}
|
|
case kDelete: {
|
|
_this->_internal_mutable_delete_()->::greptime::v1::DeleteRequest::MergeFrom(
|
|
from._internal_delete_());
|
|
break;
|
|
}
|
|
case REQUEST_NOT_SET: {
|
|
break;
|
|
}
|
|
}
|
|
// @@protoc_insertion_point(copy_constructor:greptime.v1.GreptimeRequest)
|
|
}
|
|
|
|
inline void GreptimeRequest::SharedCtor(
|
|
::_pb::Arena* arena, bool is_message_owned) {
|
|
(void)arena;
|
|
(void)is_message_owned;
|
|
new (&_impl_) Impl_{
|
|
decltype(_impl_.header_){nullptr}
|
|
, decltype(_impl_.request_){}
|
|
, /*decltype(_impl_._cached_size_)*/{}
|
|
, /*decltype(_impl_._oneof_case_)*/{}
|
|
};
|
|
clear_has_request();
|
|
}
|
|
|
|
GreptimeRequest::~GreptimeRequest() {
|
|
// @@protoc_insertion_point(destructor:greptime.v1.GreptimeRequest)
|
|
if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
|
|
(void)arena;
|
|
return;
|
|
}
|
|
SharedDtor();
|
|
}
|
|
|
|
inline void GreptimeRequest::SharedDtor() {
|
|
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
|
|
if (this != internal_default_instance()) delete _impl_.header_;
|
|
if (has_request()) {
|
|
clear_request();
|
|
}
|
|
}
|
|
|
|
void GreptimeRequest::SetCachedSize(int size) const {
|
|
_impl_._cached_size_.Set(size);
|
|
}
|
|
|
|
void GreptimeRequest::clear_request() {
|
|
// @@protoc_insertion_point(one_of_clear_start:greptime.v1.GreptimeRequest)
|
|
switch (request_case()) {
|
|
case kInserts: {
|
|
if (GetArenaForAllocation() == nullptr) {
|
|
delete _impl_.request_.inserts_;
|
|
}
|
|
break;
|
|
}
|
|
case kQuery: {
|
|
if (GetArenaForAllocation() == nullptr) {
|
|
delete _impl_.request_.query_;
|
|
}
|
|
break;
|
|
}
|
|
case kDdl: {
|
|
if (GetArenaForAllocation() == nullptr) {
|
|
delete _impl_.request_.ddl_;
|
|
}
|
|
break;
|
|
}
|
|
case kDelete: {
|
|
if (GetArenaForAllocation() == nullptr) {
|
|
delete _impl_.request_.delete__;
|
|
}
|
|
break;
|
|
}
|
|
case REQUEST_NOT_SET: {
|
|
break;
|
|
}
|
|
}
|
|
_impl_._oneof_case_[0] = REQUEST_NOT_SET;
|
|
}
|
|
|
|
|
|
void GreptimeRequest::Clear() {
|
|
// @@protoc_insertion_point(message_clear_start:greptime.v1.GreptimeRequest)
|
|
uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
if (GetArenaForAllocation() == nullptr && _impl_.header_ != nullptr) {
|
|
delete _impl_.header_;
|
|
}
|
|
_impl_.header_ = nullptr;
|
|
clear_request();
|
|
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
|
}
|
|
|
|
const char* GreptimeRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
|
|
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
|
|
while (!ctx->Done(&ptr)) {
|
|
uint32_t tag;
|
|
ptr = ::_pbi::ReadTag(ptr, &tag);
|
|
switch (tag >> 3) {
|
|
// .greptime.v1.RequestHeader header = 1;
|
|
case 1:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
|
|
ptr = ctx->ParseMessage(_internal_mutable_header(), ptr);
|
|
CHK_(ptr);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// .greptime.v1.InsertRequests inserts = 2;
|
|
case 2:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
|
|
ptr = ctx->ParseMessage(_internal_mutable_inserts(), ptr);
|
|
CHK_(ptr);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// .greptime.v1.QueryRequest query = 3;
|
|
case 3:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
|
|
ptr = ctx->ParseMessage(_internal_mutable_query(), ptr);
|
|
CHK_(ptr);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// .greptime.v1.DdlRequest ddl = 4;
|
|
case 4:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
|
|
ptr = ctx->ParseMessage(_internal_mutable_ddl(), ptr);
|
|
CHK_(ptr);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// .greptime.v1.DeleteRequest delete = 5;
|
|
case 5:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
|
|
ptr = ctx->ParseMessage(_internal_mutable_delete_(), ptr);
|
|
CHK_(ptr);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
default:
|
|
goto handle_unusual;
|
|
} // switch
|
|
handle_unusual:
|
|
if ((tag == 0) || ((tag & 7) == 4)) {
|
|
CHK_(ptr);
|
|
ctx->SetLastTag(tag);
|
|
goto message_done;
|
|
}
|
|
ptr = UnknownFieldParse(
|
|
tag,
|
|
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
|
|
ptr, ctx);
|
|
CHK_(ptr != nullptr);
|
|
} // while
|
|
message_done:
|
|
return ptr;
|
|
failure:
|
|
ptr = nullptr;
|
|
goto message_done;
|
|
#undef CHK_
|
|
}
|
|
|
|
uint8_t* GreptimeRequest::_InternalSerialize(
|
|
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
|
|
// @@protoc_insertion_point(serialize_to_array_start:greptime.v1.GreptimeRequest)
|
|
uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
// .greptime.v1.RequestHeader header = 1;
|
|
if (this->_internal_has_header()) {
|
|
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
|
|
InternalWriteMessage(1, _Internal::header(this),
|
|
_Internal::header(this).GetCachedSize(), target, stream);
|
|
}
|
|
|
|
// .greptime.v1.InsertRequests inserts = 2;
|
|
if (_internal_has_inserts()) {
|
|
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
|
|
InternalWriteMessage(2, _Internal::inserts(this),
|
|
_Internal::inserts(this).GetCachedSize(), target, stream);
|
|
}
|
|
|
|
// .greptime.v1.QueryRequest query = 3;
|
|
if (_internal_has_query()) {
|
|
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
|
|
InternalWriteMessage(3, _Internal::query(this),
|
|
_Internal::query(this).GetCachedSize(), target, stream);
|
|
}
|
|
|
|
// .greptime.v1.DdlRequest ddl = 4;
|
|
if (_internal_has_ddl()) {
|
|
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
|
|
InternalWriteMessage(4, _Internal::ddl(this),
|
|
_Internal::ddl(this).GetCachedSize(), target, stream);
|
|
}
|
|
|
|
// .greptime.v1.DeleteRequest delete = 5;
|
|
if (_internal_has_delete_()) {
|
|
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
|
|
InternalWriteMessage(5, _Internal::delete_(this),
|
|
_Internal::delete_(this).GetCachedSize(), target, stream);
|
|
}
|
|
|
|
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);
|
|
}
|
|
// @@protoc_insertion_point(serialize_to_array_end:greptime.v1.GreptimeRequest)
|
|
return target;
|
|
}
|
|
|
|
size_t GreptimeRequest::ByteSizeLong() const {
|
|
// @@protoc_insertion_point(message_byte_size_start:greptime.v1.GreptimeRequest)
|
|
size_t total_size = 0;
|
|
|
|
uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
// .greptime.v1.RequestHeader header = 1;
|
|
if (this->_internal_has_header()) {
|
|
total_size += 1 +
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
|
|
*_impl_.header_);
|
|
}
|
|
|
|
switch (request_case()) {
|
|
// .greptime.v1.InsertRequests inserts = 2;
|
|
case kInserts: {
|
|
total_size += 1 +
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
|
|
*_impl_.request_.inserts_);
|
|
break;
|
|
}
|
|
// .greptime.v1.QueryRequest query = 3;
|
|
case kQuery: {
|
|
total_size += 1 +
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
|
|
*_impl_.request_.query_);
|
|
break;
|
|
}
|
|
// .greptime.v1.DdlRequest ddl = 4;
|
|
case kDdl: {
|
|
total_size += 1 +
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
|
|
*_impl_.request_.ddl_);
|
|
break;
|
|
}
|
|
// .greptime.v1.DeleteRequest delete = 5;
|
|
case kDelete: {
|
|
total_size += 1 +
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
|
|
*_impl_.request_.delete__);
|
|
break;
|
|
}
|
|
case REQUEST_NOT_SET: {
|
|
break;
|
|
}
|
|
}
|
|
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
|
|
}
|
|
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GreptimeRequest::_class_data_ = {
|
|
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
|
|
GreptimeRequest::MergeImpl
|
|
};
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GreptimeRequest::GetClassData() const { return &_class_data_; }
|
|
|
|
|
|
void GreptimeRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
|
|
auto* const _this = static_cast<GreptimeRequest*>(&to_msg);
|
|
auto& from = static_cast<const GreptimeRequest&>(from_msg);
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.GreptimeRequest)
|
|
GOOGLE_DCHECK_NE(&from, _this);
|
|
uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
if (from._internal_has_header()) {
|
|
_this->_internal_mutable_header()->::greptime::v1::RequestHeader::MergeFrom(
|
|
from._internal_header());
|
|
}
|
|
switch (from.request_case()) {
|
|
case kInserts: {
|
|
_this->_internal_mutable_inserts()->::greptime::v1::InsertRequests::MergeFrom(
|
|
from._internal_inserts());
|
|
break;
|
|
}
|
|
case kQuery: {
|
|
_this->_internal_mutable_query()->::greptime::v1::QueryRequest::MergeFrom(
|
|
from._internal_query());
|
|
break;
|
|
}
|
|
case kDdl: {
|
|
_this->_internal_mutable_ddl()->::greptime::v1::DdlRequest::MergeFrom(
|
|
from._internal_ddl());
|
|
break;
|
|
}
|
|
case kDelete: {
|
|
_this->_internal_mutable_delete_()->::greptime::v1::DeleteRequest::MergeFrom(
|
|
from._internal_delete_());
|
|
break;
|
|
}
|
|
case REQUEST_NOT_SET: {
|
|
break;
|
|
}
|
|
}
|
|
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
}
|
|
|
|
void GreptimeRequest::CopyFrom(const GreptimeRequest& from) {
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.GreptimeRequest)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
bool GreptimeRequest::IsInitialized() const {
|
|
return true;
|
|
}
|
|
|
|
void GreptimeRequest::InternalSwap(GreptimeRequest* other) {
|
|
using std::swap;
|
|
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
|
swap(_impl_.header_, other->_impl_.header_);
|
|
swap(_impl_.request_, other->_impl_.request_);
|
|
swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
|
|
}
|
|
|
|
::PROTOBUF_NAMESPACE_ID::Metadata GreptimeRequest::GetMetadata() const {
|
|
return ::_pbi::AssignDescriptors(
|
|
&descriptor_table_greptime_2fv1_2fdatabase_2eproto_getter, &descriptor_table_greptime_2fv1_2fdatabase_2eproto_once,
|
|
file_level_metadata_greptime_2fv1_2fdatabase_2eproto[0]);
|
|
}
|
|
|
|
// ===================================================================
|
|
|
|
class GreptimeResponse::_Internal {
|
|
public:
|
|
static const ::greptime::v1::ResponseHeader& header(const GreptimeResponse* msg);
|
|
static const ::greptime::v1::AffectedRows& affected_rows(const GreptimeResponse* msg);
|
|
};
|
|
|
|
const ::greptime::v1::ResponseHeader&
|
|
GreptimeResponse::_Internal::header(const GreptimeResponse* msg) {
|
|
return *msg->_impl_.header_;
|
|
}
|
|
const ::greptime::v1::AffectedRows&
|
|
GreptimeResponse::_Internal::affected_rows(const GreptimeResponse* msg) {
|
|
return *msg->_impl_.response_.affected_rows_;
|
|
}
|
|
void GreptimeResponse::clear_header() {
|
|
if (GetArenaForAllocation() == nullptr && _impl_.header_ != nullptr) {
|
|
delete _impl_.header_;
|
|
}
|
|
_impl_.header_ = nullptr;
|
|
}
|
|
void GreptimeResponse::set_allocated_affected_rows(::greptime::v1::AffectedRows* affected_rows) {
|
|
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
|
|
clear_response();
|
|
if (affected_rows) {
|
|
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
|
|
::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(
|
|
reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(affected_rows));
|
|
if (message_arena != submessage_arena) {
|
|
affected_rows = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
|
|
message_arena, affected_rows, submessage_arena);
|
|
}
|
|
set_has_affected_rows();
|
|
_impl_.response_.affected_rows_ = affected_rows;
|
|
}
|
|
// @@protoc_insertion_point(field_set_allocated:greptime.v1.GreptimeResponse.affected_rows)
|
|
}
|
|
void GreptimeResponse::clear_affected_rows() {
|
|
if (_internal_has_affected_rows()) {
|
|
if (GetArenaForAllocation() == nullptr) {
|
|
delete _impl_.response_.affected_rows_;
|
|
}
|
|
clear_has_response();
|
|
}
|
|
}
|
|
GreptimeResponse::GreptimeResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena,
|
|
bool is_message_owned)
|
|
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
|
|
SharedCtor(arena, is_message_owned);
|
|
// @@protoc_insertion_point(arena_constructor:greptime.v1.GreptimeResponse)
|
|
}
|
|
GreptimeResponse::GreptimeResponse(const GreptimeResponse& from)
|
|
: ::PROTOBUF_NAMESPACE_ID::Message() {
|
|
GreptimeResponse* const _this = this; (void)_this;
|
|
new (&_impl_) Impl_{
|
|
decltype(_impl_.header_){nullptr}
|
|
, decltype(_impl_.response_){}
|
|
, /*decltype(_impl_._cached_size_)*/{}
|
|
, /*decltype(_impl_._oneof_case_)*/{}};
|
|
|
|
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
if (from._internal_has_header()) {
|
|
_this->_impl_.header_ = new ::greptime::v1::ResponseHeader(*from._impl_.header_);
|
|
}
|
|
clear_has_response();
|
|
switch (from.response_case()) {
|
|
case kAffectedRows: {
|
|
_this->_internal_mutable_affected_rows()->::greptime::v1::AffectedRows::MergeFrom(
|
|
from._internal_affected_rows());
|
|
break;
|
|
}
|
|
case RESPONSE_NOT_SET: {
|
|
break;
|
|
}
|
|
}
|
|
// @@protoc_insertion_point(copy_constructor:greptime.v1.GreptimeResponse)
|
|
}
|
|
|
|
inline void GreptimeResponse::SharedCtor(
|
|
::_pb::Arena* arena, bool is_message_owned) {
|
|
(void)arena;
|
|
(void)is_message_owned;
|
|
new (&_impl_) Impl_{
|
|
decltype(_impl_.header_){nullptr}
|
|
, decltype(_impl_.response_){}
|
|
, /*decltype(_impl_._cached_size_)*/{}
|
|
, /*decltype(_impl_._oneof_case_)*/{}
|
|
};
|
|
clear_has_response();
|
|
}
|
|
|
|
GreptimeResponse::~GreptimeResponse() {
|
|
// @@protoc_insertion_point(destructor:greptime.v1.GreptimeResponse)
|
|
if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
|
|
(void)arena;
|
|
return;
|
|
}
|
|
SharedDtor();
|
|
}
|
|
|
|
inline void GreptimeResponse::SharedDtor() {
|
|
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
|
|
if (this != internal_default_instance()) delete _impl_.header_;
|
|
if (has_response()) {
|
|
clear_response();
|
|
}
|
|
}
|
|
|
|
void GreptimeResponse::SetCachedSize(int size) const {
|
|
_impl_._cached_size_.Set(size);
|
|
}
|
|
|
|
void GreptimeResponse::clear_response() {
|
|
// @@protoc_insertion_point(one_of_clear_start:greptime.v1.GreptimeResponse)
|
|
switch (response_case()) {
|
|
case kAffectedRows: {
|
|
if (GetArenaForAllocation() == nullptr) {
|
|
delete _impl_.response_.affected_rows_;
|
|
}
|
|
break;
|
|
}
|
|
case RESPONSE_NOT_SET: {
|
|
break;
|
|
}
|
|
}
|
|
_impl_._oneof_case_[0] = RESPONSE_NOT_SET;
|
|
}
|
|
|
|
|
|
void GreptimeResponse::Clear() {
|
|
// @@protoc_insertion_point(message_clear_start:greptime.v1.GreptimeResponse)
|
|
uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
if (GetArenaForAllocation() == nullptr && _impl_.header_ != nullptr) {
|
|
delete _impl_.header_;
|
|
}
|
|
_impl_.header_ = nullptr;
|
|
clear_response();
|
|
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
|
}
|
|
|
|
const char* GreptimeResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
|
|
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
|
|
while (!ctx->Done(&ptr)) {
|
|
uint32_t tag;
|
|
ptr = ::_pbi::ReadTag(ptr, &tag);
|
|
switch (tag >> 3) {
|
|
// .greptime.v1.ResponseHeader header = 1;
|
|
case 1:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
|
|
ptr = ctx->ParseMessage(_internal_mutable_header(), ptr);
|
|
CHK_(ptr);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// .greptime.v1.AffectedRows affected_rows = 2;
|
|
case 2:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
|
|
ptr = ctx->ParseMessage(_internal_mutable_affected_rows(), ptr);
|
|
CHK_(ptr);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
default:
|
|
goto handle_unusual;
|
|
} // switch
|
|
handle_unusual:
|
|
if ((tag == 0) || ((tag & 7) == 4)) {
|
|
CHK_(ptr);
|
|
ctx->SetLastTag(tag);
|
|
goto message_done;
|
|
}
|
|
ptr = UnknownFieldParse(
|
|
tag,
|
|
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
|
|
ptr, ctx);
|
|
CHK_(ptr != nullptr);
|
|
} // while
|
|
message_done:
|
|
return ptr;
|
|
failure:
|
|
ptr = nullptr;
|
|
goto message_done;
|
|
#undef CHK_
|
|
}
|
|
|
|
uint8_t* GreptimeResponse::_InternalSerialize(
|
|
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
|
|
// @@protoc_insertion_point(serialize_to_array_start:greptime.v1.GreptimeResponse)
|
|
uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
// .greptime.v1.ResponseHeader header = 1;
|
|
if (this->_internal_has_header()) {
|
|
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
|
|
InternalWriteMessage(1, _Internal::header(this),
|
|
_Internal::header(this).GetCachedSize(), target, stream);
|
|
}
|
|
|
|
// .greptime.v1.AffectedRows affected_rows = 2;
|
|
if (_internal_has_affected_rows()) {
|
|
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
|
|
InternalWriteMessage(2, _Internal::affected_rows(this),
|
|
_Internal::affected_rows(this).GetCachedSize(), target, stream);
|
|
}
|
|
|
|
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);
|
|
}
|
|
// @@protoc_insertion_point(serialize_to_array_end:greptime.v1.GreptimeResponse)
|
|
return target;
|
|
}
|
|
|
|
size_t GreptimeResponse::ByteSizeLong() const {
|
|
// @@protoc_insertion_point(message_byte_size_start:greptime.v1.GreptimeResponse)
|
|
size_t total_size = 0;
|
|
|
|
uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
// .greptime.v1.ResponseHeader header = 1;
|
|
if (this->_internal_has_header()) {
|
|
total_size += 1 +
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
|
|
*_impl_.header_);
|
|
}
|
|
|
|
switch (response_case()) {
|
|
// .greptime.v1.AffectedRows affected_rows = 2;
|
|
case kAffectedRows: {
|
|
total_size += 1 +
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
|
|
*_impl_.response_.affected_rows_);
|
|
break;
|
|
}
|
|
case RESPONSE_NOT_SET: {
|
|
break;
|
|
}
|
|
}
|
|
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
|
|
}
|
|
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GreptimeResponse::_class_data_ = {
|
|
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
|
|
GreptimeResponse::MergeImpl
|
|
};
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GreptimeResponse::GetClassData() const { return &_class_data_; }
|
|
|
|
|
|
void GreptimeResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
|
|
auto* const _this = static_cast<GreptimeResponse*>(&to_msg);
|
|
auto& from = static_cast<const GreptimeResponse&>(from_msg);
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.GreptimeResponse)
|
|
GOOGLE_DCHECK_NE(&from, _this);
|
|
uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
if (from._internal_has_header()) {
|
|
_this->_internal_mutable_header()->::greptime::v1::ResponseHeader::MergeFrom(
|
|
from._internal_header());
|
|
}
|
|
switch (from.response_case()) {
|
|
case kAffectedRows: {
|
|
_this->_internal_mutable_affected_rows()->::greptime::v1::AffectedRows::MergeFrom(
|
|
from._internal_affected_rows());
|
|
break;
|
|
}
|
|
case RESPONSE_NOT_SET: {
|
|
break;
|
|
}
|
|
}
|
|
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
}
|
|
|
|
void GreptimeResponse::CopyFrom(const GreptimeResponse& from) {
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.GreptimeResponse)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
bool GreptimeResponse::IsInitialized() const {
|
|
return true;
|
|
}
|
|
|
|
void GreptimeResponse::InternalSwap(GreptimeResponse* other) {
|
|
using std::swap;
|
|
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
|
swap(_impl_.header_, other->_impl_.header_);
|
|
swap(_impl_.response_, other->_impl_.response_);
|
|
swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
|
|
}
|
|
|
|
::PROTOBUF_NAMESPACE_ID::Metadata GreptimeResponse::GetMetadata() const {
|
|
return ::_pbi::AssignDescriptors(
|
|
&descriptor_table_greptime_2fv1_2fdatabase_2eproto_getter, &descriptor_table_greptime_2fv1_2fdatabase_2eproto_once,
|
|
file_level_metadata_greptime_2fv1_2fdatabase_2eproto[1]);
|
|
}
|
|
|
|
// ===================================================================
|
|
|
|
class QueryRequest::_Internal {
|
|
public:
|
|
static const ::greptime::v1::PromRangeQuery& prom_range_query(const QueryRequest* msg);
|
|
};
|
|
|
|
const ::greptime::v1::PromRangeQuery&
|
|
QueryRequest::_Internal::prom_range_query(const QueryRequest* msg) {
|
|
return *msg->_impl_.query_.prom_range_query_;
|
|
}
|
|
void QueryRequest::set_allocated_prom_range_query(::greptime::v1::PromRangeQuery* prom_range_query) {
|
|
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
|
|
clear_query();
|
|
if (prom_range_query) {
|
|
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
|
|
::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(
|
|
reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(prom_range_query));
|
|
if (message_arena != submessage_arena) {
|
|
prom_range_query = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
|
|
message_arena, prom_range_query, submessage_arena);
|
|
}
|
|
set_has_prom_range_query();
|
|
_impl_.query_.prom_range_query_ = prom_range_query;
|
|
}
|
|
// @@protoc_insertion_point(field_set_allocated:greptime.v1.QueryRequest.prom_range_query)
|
|
}
|
|
void QueryRequest::clear_prom_range_query() {
|
|
if (_internal_has_prom_range_query()) {
|
|
if (GetArenaForAllocation() == nullptr) {
|
|
delete _impl_.query_.prom_range_query_;
|
|
}
|
|
clear_has_query();
|
|
}
|
|
}
|
|
QueryRequest::QueryRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena,
|
|
bool is_message_owned)
|
|
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
|
|
SharedCtor(arena, is_message_owned);
|
|
// @@protoc_insertion_point(arena_constructor:greptime.v1.QueryRequest)
|
|
}
|
|
QueryRequest::QueryRequest(const QueryRequest& from)
|
|
: ::PROTOBUF_NAMESPACE_ID::Message() {
|
|
QueryRequest* const _this = this; (void)_this;
|
|
new (&_impl_) Impl_{
|
|
decltype(_impl_.query_){}
|
|
, /*decltype(_impl_._cached_size_)*/{}
|
|
, /*decltype(_impl_._oneof_case_)*/{}};
|
|
|
|
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
clear_has_query();
|
|
switch (from.query_case()) {
|
|
case kSql: {
|
|
_this->_internal_set_sql(from._internal_sql());
|
|
break;
|
|
}
|
|
case kLogicalPlan: {
|
|
_this->_internal_set_logical_plan(from._internal_logical_plan());
|
|
break;
|
|
}
|
|
case kPromRangeQuery: {
|
|
_this->_internal_mutable_prom_range_query()->::greptime::v1::PromRangeQuery::MergeFrom(
|
|
from._internal_prom_range_query());
|
|
break;
|
|
}
|
|
case QUERY_NOT_SET: {
|
|
break;
|
|
}
|
|
}
|
|
// @@protoc_insertion_point(copy_constructor:greptime.v1.QueryRequest)
|
|
}
|
|
|
|
inline void QueryRequest::SharedCtor(
|
|
::_pb::Arena* arena, bool is_message_owned) {
|
|
(void)arena;
|
|
(void)is_message_owned;
|
|
new (&_impl_) Impl_{
|
|
decltype(_impl_.query_){}
|
|
, /*decltype(_impl_._cached_size_)*/{}
|
|
, /*decltype(_impl_._oneof_case_)*/{}
|
|
};
|
|
clear_has_query();
|
|
}
|
|
|
|
QueryRequest::~QueryRequest() {
|
|
// @@protoc_insertion_point(destructor:greptime.v1.QueryRequest)
|
|
if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
|
|
(void)arena;
|
|
return;
|
|
}
|
|
SharedDtor();
|
|
}
|
|
|
|
inline void QueryRequest::SharedDtor() {
|
|
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
|
|
if (has_query()) {
|
|
clear_query();
|
|
}
|
|
}
|
|
|
|
void QueryRequest::SetCachedSize(int size) const {
|
|
_impl_._cached_size_.Set(size);
|
|
}
|
|
|
|
void QueryRequest::clear_query() {
|
|
// @@protoc_insertion_point(one_of_clear_start:greptime.v1.QueryRequest)
|
|
switch (query_case()) {
|
|
case kSql: {
|
|
_impl_.query_.sql_.Destroy();
|
|
break;
|
|
}
|
|
case kLogicalPlan: {
|
|
_impl_.query_.logical_plan_.Destroy();
|
|
break;
|
|
}
|
|
case kPromRangeQuery: {
|
|
if (GetArenaForAllocation() == nullptr) {
|
|
delete _impl_.query_.prom_range_query_;
|
|
}
|
|
break;
|
|
}
|
|
case QUERY_NOT_SET: {
|
|
break;
|
|
}
|
|
}
|
|
_impl_._oneof_case_[0] = QUERY_NOT_SET;
|
|
}
|
|
|
|
|
|
void QueryRequest::Clear() {
|
|
// @@protoc_insertion_point(message_clear_start:greptime.v1.QueryRequest)
|
|
uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
clear_query();
|
|
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
|
}
|
|
|
|
const char* QueryRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
|
|
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
|
|
while (!ctx->Done(&ptr)) {
|
|
uint32_t tag;
|
|
ptr = ::_pbi::ReadTag(ptr, &tag);
|
|
switch (tag >> 3) {
|
|
// string sql = 1;
|
|
case 1:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
|
|
auto str = _internal_mutable_sql();
|
|
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
|
|
CHK_(ptr);
|
|
CHK_(::_pbi::VerifyUTF8(str, "greptime.v1.QueryRequest.sql"));
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// bytes logical_plan = 2;
|
|
case 2:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
|
|
auto str = _internal_mutable_logical_plan();
|
|
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
|
|
CHK_(ptr);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// .greptime.v1.PromRangeQuery prom_range_query = 3;
|
|
case 3:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
|
|
ptr = ctx->ParseMessage(_internal_mutable_prom_range_query(), ptr);
|
|
CHK_(ptr);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
default:
|
|
goto handle_unusual;
|
|
} // switch
|
|
handle_unusual:
|
|
if ((tag == 0) || ((tag & 7) == 4)) {
|
|
CHK_(ptr);
|
|
ctx->SetLastTag(tag);
|
|
goto message_done;
|
|
}
|
|
ptr = UnknownFieldParse(
|
|
tag,
|
|
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
|
|
ptr, ctx);
|
|
CHK_(ptr != nullptr);
|
|
} // while
|
|
message_done:
|
|
return ptr;
|
|
failure:
|
|
ptr = nullptr;
|
|
goto message_done;
|
|
#undef CHK_
|
|
}
|
|
|
|
uint8_t* QueryRequest::_InternalSerialize(
|
|
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
|
|
// @@protoc_insertion_point(serialize_to_array_start:greptime.v1.QueryRequest)
|
|
uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
// string sql = 1;
|
|
if (_internal_has_sql()) {
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
|
this->_internal_sql().data(), static_cast<int>(this->_internal_sql().length()),
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
|
"greptime.v1.QueryRequest.sql");
|
|
target = stream->WriteStringMaybeAliased(
|
|
1, this->_internal_sql(), target);
|
|
}
|
|
|
|
// bytes logical_plan = 2;
|
|
if (_internal_has_logical_plan()) {
|
|
target = stream->WriteBytesMaybeAliased(
|
|
2, this->_internal_logical_plan(), target);
|
|
}
|
|
|
|
// .greptime.v1.PromRangeQuery prom_range_query = 3;
|
|
if (_internal_has_prom_range_query()) {
|
|
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
|
|
InternalWriteMessage(3, _Internal::prom_range_query(this),
|
|
_Internal::prom_range_query(this).GetCachedSize(), target, stream);
|
|
}
|
|
|
|
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);
|
|
}
|
|
// @@protoc_insertion_point(serialize_to_array_end:greptime.v1.QueryRequest)
|
|
return target;
|
|
}
|
|
|
|
size_t QueryRequest::ByteSizeLong() const {
|
|
// @@protoc_insertion_point(message_byte_size_start:greptime.v1.QueryRequest)
|
|
size_t total_size = 0;
|
|
|
|
uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
switch (query_case()) {
|
|
// string sql = 1;
|
|
case kSql: {
|
|
total_size += 1 +
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
|
this->_internal_sql());
|
|
break;
|
|
}
|
|
// bytes logical_plan = 2;
|
|
case kLogicalPlan: {
|
|
total_size += 1 +
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
|
|
this->_internal_logical_plan());
|
|
break;
|
|
}
|
|
// .greptime.v1.PromRangeQuery prom_range_query = 3;
|
|
case kPromRangeQuery: {
|
|
total_size += 1 +
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
|
|
*_impl_.query_.prom_range_query_);
|
|
break;
|
|
}
|
|
case QUERY_NOT_SET: {
|
|
break;
|
|
}
|
|
}
|
|
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
|
|
}
|
|
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData QueryRequest::_class_data_ = {
|
|
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
|
|
QueryRequest::MergeImpl
|
|
};
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*QueryRequest::GetClassData() const { return &_class_data_; }
|
|
|
|
|
|
void QueryRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
|
|
auto* const _this = static_cast<QueryRequest*>(&to_msg);
|
|
auto& from = static_cast<const QueryRequest&>(from_msg);
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.QueryRequest)
|
|
GOOGLE_DCHECK_NE(&from, _this);
|
|
uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
switch (from.query_case()) {
|
|
case kSql: {
|
|
_this->_internal_set_sql(from._internal_sql());
|
|
break;
|
|
}
|
|
case kLogicalPlan: {
|
|
_this->_internal_set_logical_plan(from._internal_logical_plan());
|
|
break;
|
|
}
|
|
case kPromRangeQuery: {
|
|
_this->_internal_mutable_prom_range_query()->::greptime::v1::PromRangeQuery::MergeFrom(
|
|
from._internal_prom_range_query());
|
|
break;
|
|
}
|
|
case QUERY_NOT_SET: {
|
|
break;
|
|
}
|
|
}
|
|
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
}
|
|
|
|
void QueryRequest::CopyFrom(const QueryRequest& from) {
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.QueryRequest)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
bool QueryRequest::IsInitialized() const {
|
|
return true;
|
|
}
|
|
|
|
void QueryRequest::InternalSwap(QueryRequest* other) {
|
|
using std::swap;
|
|
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
|
swap(_impl_.query_, other->_impl_.query_);
|
|
swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
|
|
}
|
|
|
|
::PROTOBUF_NAMESPACE_ID::Metadata QueryRequest::GetMetadata() const {
|
|
return ::_pbi::AssignDescriptors(
|
|
&descriptor_table_greptime_2fv1_2fdatabase_2eproto_getter, &descriptor_table_greptime_2fv1_2fdatabase_2eproto_once,
|
|
file_level_metadata_greptime_2fv1_2fdatabase_2eproto[2]);
|
|
}
|
|
|
|
// ===================================================================
|
|
|
|
class InsertRequests::_Internal {
|
|
public:
|
|
};
|
|
|
|
InsertRequests::InsertRequests(::PROTOBUF_NAMESPACE_ID::Arena* arena,
|
|
bool is_message_owned)
|
|
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
|
|
SharedCtor(arena, is_message_owned);
|
|
// @@protoc_insertion_point(arena_constructor:greptime.v1.InsertRequests)
|
|
}
|
|
InsertRequests::InsertRequests(const InsertRequests& from)
|
|
: ::PROTOBUF_NAMESPACE_ID::Message() {
|
|
InsertRequests* const _this = this; (void)_this;
|
|
new (&_impl_) Impl_{
|
|
decltype(_impl_.inserts_){from._impl_.inserts_}
|
|
, /*decltype(_impl_._cached_size_)*/{}};
|
|
|
|
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
// @@protoc_insertion_point(copy_constructor:greptime.v1.InsertRequests)
|
|
}
|
|
|
|
inline void InsertRequests::SharedCtor(
|
|
::_pb::Arena* arena, bool is_message_owned) {
|
|
(void)arena;
|
|
(void)is_message_owned;
|
|
new (&_impl_) Impl_{
|
|
decltype(_impl_.inserts_){arena}
|
|
, /*decltype(_impl_._cached_size_)*/{}
|
|
};
|
|
}
|
|
|
|
InsertRequests::~InsertRequests() {
|
|
// @@protoc_insertion_point(destructor:greptime.v1.InsertRequests)
|
|
if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
|
|
(void)arena;
|
|
return;
|
|
}
|
|
SharedDtor();
|
|
}
|
|
|
|
inline void InsertRequests::SharedDtor() {
|
|
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
|
|
_impl_.inserts_.~RepeatedPtrField();
|
|
}
|
|
|
|
void InsertRequests::SetCachedSize(int size) const {
|
|
_impl_._cached_size_.Set(size);
|
|
}
|
|
|
|
void InsertRequests::Clear() {
|
|
// @@protoc_insertion_point(message_clear_start:greptime.v1.InsertRequests)
|
|
uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
_impl_.inserts_.Clear();
|
|
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
|
}
|
|
|
|
const char* InsertRequests::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
|
|
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
|
|
while (!ctx->Done(&ptr)) {
|
|
uint32_t tag;
|
|
ptr = ::_pbi::ReadTag(ptr, &tag);
|
|
switch (tag >> 3) {
|
|
// repeated .greptime.v1.InsertRequest inserts = 1;
|
|
case 1:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
|
|
ptr -= 1;
|
|
do {
|
|
ptr += 1;
|
|
ptr = ctx->ParseMessage(_internal_add_inserts(), ptr);
|
|
CHK_(ptr);
|
|
if (!ctx->DataAvailable(ptr)) break;
|
|
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
default:
|
|
goto handle_unusual;
|
|
} // switch
|
|
handle_unusual:
|
|
if ((tag == 0) || ((tag & 7) == 4)) {
|
|
CHK_(ptr);
|
|
ctx->SetLastTag(tag);
|
|
goto message_done;
|
|
}
|
|
ptr = UnknownFieldParse(
|
|
tag,
|
|
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
|
|
ptr, ctx);
|
|
CHK_(ptr != nullptr);
|
|
} // while
|
|
message_done:
|
|
return ptr;
|
|
failure:
|
|
ptr = nullptr;
|
|
goto message_done;
|
|
#undef CHK_
|
|
}
|
|
|
|
uint8_t* InsertRequests::_InternalSerialize(
|
|
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
|
|
// @@protoc_insertion_point(serialize_to_array_start:greptime.v1.InsertRequests)
|
|
uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
// repeated .greptime.v1.InsertRequest inserts = 1;
|
|
for (unsigned i = 0,
|
|
n = static_cast<unsigned>(this->_internal_inserts_size()); i < n; i++) {
|
|
const auto& repfield = this->_internal_inserts(i);
|
|
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
|
|
InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
|
|
}
|
|
|
|
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);
|
|
}
|
|
// @@protoc_insertion_point(serialize_to_array_end:greptime.v1.InsertRequests)
|
|
return target;
|
|
}
|
|
|
|
size_t InsertRequests::ByteSizeLong() const {
|
|
// @@protoc_insertion_point(message_byte_size_start:greptime.v1.InsertRequests)
|
|
size_t total_size = 0;
|
|
|
|
uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
// repeated .greptime.v1.InsertRequest inserts = 1;
|
|
total_size += 1UL * this->_internal_inserts_size();
|
|
for (const auto& msg : this->_impl_.inserts_) {
|
|
total_size +=
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
|
|
}
|
|
|
|
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
|
|
}
|
|
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData InsertRequests::_class_data_ = {
|
|
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
|
|
InsertRequests::MergeImpl
|
|
};
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*InsertRequests::GetClassData() const { return &_class_data_; }
|
|
|
|
|
|
void InsertRequests::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
|
|
auto* const _this = static_cast<InsertRequests*>(&to_msg);
|
|
auto& from = static_cast<const InsertRequests&>(from_msg);
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.InsertRequests)
|
|
GOOGLE_DCHECK_NE(&from, _this);
|
|
uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
_this->_impl_.inserts_.MergeFrom(from._impl_.inserts_);
|
|
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
}
|
|
|
|
void InsertRequests::CopyFrom(const InsertRequests& from) {
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.InsertRequests)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
bool InsertRequests::IsInitialized() const {
|
|
return true;
|
|
}
|
|
|
|
void InsertRequests::InternalSwap(InsertRequests* other) {
|
|
using std::swap;
|
|
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
|
_impl_.inserts_.InternalSwap(&other->_impl_.inserts_);
|
|
}
|
|
|
|
::PROTOBUF_NAMESPACE_ID::Metadata InsertRequests::GetMetadata() const {
|
|
return ::_pbi::AssignDescriptors(
|
|
&descriptor_table_greptime_2fv1_2fdatabase_2eproto_getter, &descriptor_table_greptime_2fv1_2fdatabase_2eproto_once,
|
|
file_level_metadata_greptime_2fv1_2fdatabase_2eproto[3]);
|
|
}
|
|
|
|
// ===================================================================
|
|
|
|
class InsertRequest::_Internal {
|
|
public:
|
|
};
|
|
|
|
void InsertRequest::clear_columns() {
|
|
_impl_.columns_.Clear();
|
|
}
|
|
InsertRequest::InsertRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena,
|
|
bool is_message_owned)
|
|
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
|
|
SharedCtor(arena, is_message_owned);
|
|
// @@protoc_insertion_point(arena_constructor:greptime.v1.InsertRequest)
|
|
}
|
|
InsertRequest::InsertRequest(const InsertRequest& from)
|
|
: ::PROTOBUF_NAMESPACE_ID::Message() {
|
|
InsertRequest* const _this = this; (void)_this;
|
|
new (&_impl_) Impl_{
|
|
decltype(_impl_.columns_){from._impl_.columns_}
|
|
, decltype(_impl_.table_name_){}
|
|
, decltype(_impl_.row_count_){}
|
|
, decltype(_impl_.region_number_){}
|
|
, /*decltype(_impl_._cached_size_)*/{}};
|
|
|
|
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
_impl_.table_name_.InitDefault();
|
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
|
_impl_.table_name_.Set("", GetArenaForAllocation());
|
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
|
if (!from._internal_table_name().empty()) {
|
|
_this->_impl_.table_name_.Set(from._internal_table_name(),
|
|
_this->GetArenaForAllocation());
|
|
}
|
|
::memcpy(&_impl_.row_count_, &from._impl_.row_count_,
|
|
static_cast<size_t>(reinterpret_cast<char*>(&_impl_.region_number_) -
|
|
reinterpret_cast<char*>(&_impl_.row_count_)) + sizeof(_impl_.region_number_));
|
|
// @@protoc_insertion_point(copy_constructor:greptime.v1.InsertRequest)
|
|
}
|
|
|
|
inline void InsertRequest::SharedCtor(
|
|
::_pb::Arena* arena, bool is_message_owned) {
|
|
(void)arena;
|
|
(void)is_message_owned;
|
|
new (&_impl_) Impl_{
|
|
decltype(_impl_.columns_){arena}
|
|
, decltype(_impl_.table_name_){}
|
|
, decltype(_impl_.row_count_){0u}
|
|
, decltype(_impl_.region_number_){0u}
|
|
, /*decltype(_impl_._cached_size_)*/{}
|
|
};
|
|
_impl_.table_name_.InitDefault();
|
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
|
_impl_.table_name_.Set("", GetArenaForAllocation());
|
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
|
}
|
|
|
|
InsertRequest::~InsertRequest() {
|
|
// @@protoc_insertion_point(destructor:greptime.v1.InsertRequest)
|
|
if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
|
|
(void)arena;
|
|
return;
|
|
}
|
|
SharedDtor();
|
|
}
|
|
|
|
inline void InsertRequest::SharedDtor() {
|
|
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
|
|
_impl_.columns_.~RepeatedPtrField();
|
|
_impl_.table_name_.Destroy();
|
|
}
|
|
|
|
void InsertRequest::SetCachedSize(int size) const {
|
|
_impl_._cached_size_.Set(size);
|
|
}
|
|
|
|
void InsertRequest::Clear() {
|
|
// @@protoc_insertion_point(message_clear_start:greptime.v1.InsertRequest)
|
|
uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
_impl_.columns_.Clear();
|
|
_impl_.table_name_.ClearToEmpty();
|
|
::memset(&_impl_.row_count_, 0, static_cast<size_t>(
|
|
reinterpret_cast<char*>(&_impl_.region_number_) -
|
|
reinterpret_cast<char*>(&_impl_.row_count_)) + sizeof(_impl_.region_number_));
|
|
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
|
}
|
|
|
|
const char* InsertRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
|
|
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
|
|
while (!ctx->Done(&ptr)) {
|
|
uint32_t tag;
|
|
ptr = ::_pbi::ReadTag(ptr, &tag);
|
|
switch (tag >> 3) {
|
|
// string table_name = 1;
|
|
case 1:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
|
|
auto str = _internal_mutable_table_name();
|
|
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
|
|
CHK_(ptr);
|
|
CHK_(::_pbi::VerifyUTF8(str, "greptime.v1.InsertRequest.table_name"));
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// repeated .greptime.v1.Column columns = 3;
|
|
case 3:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
|
|
ptr -= 1;
|
|
do {
|
|
ptr += 1;
|
|
ptr = ctx->ParseMessage(_internal_add_columns(), ptr);
|
|
CHK_(ptr);
|
|
if (!ctx->DataAvailable(ptr)) break;
|
|
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// uint32 row_count = 4;
|
|
case 4:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
|
|
_impl_.row_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
|
|
CHK_(ptr);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// uint32 region_number = 5;
|
|
case 5:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
|
|
_impl_.region_number_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
|
|
CHK_(ptr);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
default:
|
|
goto handle_unusual;
|
|
} // switch
|
|
handle_unusual:
|
|
if ((tag == 0) || ((tag & 7) == 4)) {
|
|
CHK_(ptr);
|
|
ctx->SetLastTag(tag);
|
|
goto message_done;
|
|
}
|
|
ptr = UnknownFieldParse(
|
|
tag,
|
|
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
|
|
ptr, ctx);
|
|
CHK_(ptr != nullptr);
|
|
} // while
|
|
message_done:
|
|
return ptr;
|
|
failure:
|
|
ptr = nullptr;
|
|
goto message_done;
|
|
#undef CHK_
|
|
}
|
|
|
|
uint8_t* InsertRequest::_InternalSerialize(
|
|
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
|
|
// @@protoc_insertion_point(serialize_to_array_start:greptime.v1.InsertRequest)
|
|
uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
// string table_name = 1;
|
|
if (!this->_internal_table_name().empty()) {
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
|
this->_internal_table_name().data(), static_cast<int>(this->_internal_table_name().length()),
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
|
"greptime.v1.InsertRequest.table_name");
|
|
target = stream->WriteStringMaybeAliased(
|
|
1, this->_internal_table_name(), target);
|
|
}
|
|
|
|
// repeated .greptime.v1.Column columns = 3;
|
|
for (unsigned i = 0,
|
|
n = static_cast<unsigned>(this->_internal_columns_size()); i < n; i++) {
|
|
const auto& repfield = this->_internal_columns(i);
|
|
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
|
|
InternalWriteMessage(3, repfield, repfield.GetCachedSize(), target, stream);
|
|
}
|
|
|
|
// uint32 row_count = 4;
|
|
if (this->_internal_row_count() != 0) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteUInt32ToArray(4, this->_internal_row_count(), target);
|
|
}
|
|
|
|
// uint32 region_number = 5;
|
|
if (this->_internal_region_number() != 0) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteUInt32ToArray(5, this->_internal_region_number(), 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);
|
|
}
|
|
// @@protoc_insertion_point(serialize_to_array_end:greptime.v1.InsertRequest)
|
|
return target;
|
|
}
|
|
|
|
size_t InsertRequest::ByteSizeLong() const {
|
|
// @@protoc_insertion_point(message_byte_size_start:greptime.v1.InsertRequest)
|
|
size_t total_size = 0;
|
|
|
|
uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
// repeated .greptime.v1.Column columns = 3;
|
|
total_size += 1UL * this->_internal_columns_size();
|
|
for (const auto& msg : this->_impl_.columns_) {
|
|
total_size +=
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
|
|
}
|
|
|
|
// string table_name = 1;
|
|
if (!this->_internal_table_name().empty()) {
|
|
total_size += 1 +
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
|
this->_internal_table_name());
|
|
}
|
|
|
|
// uint32 row_count = 4;
|
|
if (this->_internal_row_count() != 0) {
|
|
total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_row_count());
|
|
}
|
|
|
|
// uint32 region_number = 5;
|
|
if (this->_internal_region_number() != 0) {
|
|
total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_region_number());
|
|
}
|
|
|
|
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
|
|
}
|
|
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData InsertRequest::_class_data_ = {
|
|
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
|
|
InsertRequest::MergeImpl
|
|
};
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*InsertRequest::GetClassData() const { return &_class_data_; }
|
|
|
|
|
|
void InsertRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
|
|
auto* const _this = static_cast<InsertRequest*>(&to_msg);
|
|
auto& from = static_cast<const InsertRequest&>(from_msg);
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.InsertRequest)
|
|
GOOGLE_DCHECK_NE(&from, _this);
|
|
uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
_this->_impl_.columns_.MergeFrom(from._impl_.columns_);
|
|
if (!from._internal_table_name().empty()) {
|
|
_this->_internal_set_table_name(from._internal_table_name());
|
|
}
|
|
if (from._internal_row_count() != 0) {
|
|
_this->_internal_set_row_count(from._internal_row_count());
|
|
}
|
|
if (from._internal_region_number() != 0) {
|
|
_this->_internal_set_region_number(from._internal_region_number());
|
|
}
|
|
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
}
|
|
|
|
void InsertRequest::CopyFrom(const InsertRequest& from) {
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.InsertRequest)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
bool InsertRequest::IsInitialized() const {
|
|
return true;
|
|
}
|
|
|
|
void InsertRequest::InternalSwap(InsertRequest* other) {
|
|
using std::swap;
|
|
auto* lhs_arena = GetArenaForAllocation();
|
|
auto* rhs_arena = other->GetArenaForAllocation();
|
|
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
|
_impl_.columns_.InternalSwap(&other->_impl_.columns_);
|
|
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
|
|
&_impl_.table_name_, lhs_arena,
|
|
&other->_impl_.table_name_, rhs_arena
|
|
);
|
|
::PROTOBUF_NAMESPACE_ID::internal::memswap<
|
|
PROTOBUF_FIELD_OFFSET(InsertRequest, _impl_.region_number_)
|
|
+ sizeof(InsertRequest::_impl_.region_number_)
|
|
- PROTOBUF_FIELD_OFFSET(InsertRequest, _impl_.row_count_)>(
|
|
reinterpret_cast<char*>(&_impl_.row_count_),
|
|
reinterpret_cast<char*>(&other->_impl_.row_count_));
|
|
}
|
|
|
|
::PROTOBUF_NAMESPACE_ID::Metadata InsertRequest::GetMetadata() const {
|
|
return ::_pbi::AssignDescriptors(
|
|
&descriptor_table_greptime_2fv1_2fdatabase_2eproto_getter, &descriptor_table_greptime_2fv1_2fdatabase_2eproto_once,
|
|
file_level_metadata_greptime_2fv1_2fdatabase_2eproto[4]);
|
|
}
|
|
|
|
// ===================================================================
|
|
|
|
class DeleteRequest::_Internal {
|
|
public:
|
|
};
|
|
|
|
void DeleteRequest::clear_key_columns() {
|
|
_impl_.key_columns_.Clear();
|
|
}
|
|
DeleteRequest::DeleteRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena,
|
|
bool is_message_owned)
|
|
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
|
|
SharedCtor(arena, is_message_owned);
|
|
// @@protoc_insertion_point(arena_constructor:greptime.v1.DeleteRequest)
|
|
}
|
|
DeleteRequest::DeleteRequest(const DeleteRequest& from)
|
|
: ::PROTOBUF_NAMESPACE_ID::Message() {
|
|
DeleteRequest* const _this = this; (void)_this;
|
|
new (&_impl_) Impl_{
|
|
decltype(_impl_.key_columns_){from._impl_.key_columns_}
|
|
, decltype(_impl_.table_name_){}
|
|
, decltype(_impl_.region_number_){}
|
|
, decltype(_impl_.row_count_){}
|
|
, /*decltype(_impl_._cached_size_)*/{}};
|
|
|
|
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
_impl_.table_name_.InitDefault();
|
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
|
_impl_.table_name_.Set("", GetArenaForAllocation());
|
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
|
if (!from._internal_table_name().empty()) {
|
|
_this->_impl_.table_name_.Set(from._internal_table_name(),
|
|
_this->GetArenaForAllocation());
|
|
}
|
|
::memcpy(&_impl_.region_number_, &from._impl_.region_number_,
|
|
static_cast<size_t>(reinterpret_cast<char*>(&_impl_.row_count_) -
|
|
reinterpret_cast<char*>(&_impl_.region_number_)) + sizeof(_impl_.row_count_));
|
|
// @@protoc_insertion_point(copy_constructor:greptime.v1.DeleteRequest)
|
|
}
|
|
|
|
inline void DeleteRequest::SharedCtor(
|
|
::_pb::Arena* arena, bool is_message_owned) {
|
|
(void)arena;
|
|
(void)is_message_owned;
|
|
new (&_impl_) Impl_{
|
|
decltype(_impl_.key_columns_){arena}
|
|
, decltype(_impl_.table_name_){}
|
|
, decltype(_impl_.region_number_){0u}
|
|
, decltype(_impl_.row_count_){0u}
|
|
, /*decltype(_impl_._cached_size_)*/{}
|
|
};
|
|
_impl_.table_name_.InitDefault();
|
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
|
_impl_.table_name_.Set("", GetArenaForAllocation());
|
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
|
}
|
|
|
|
DeleteRequest::~DeleteRequest() {
|
|
// @@protoc_insertion_point(destructor:greptime.v1.DeleteRequest)
|
|
if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
|
|
(void)arena;
|
|
return;
|
|
}
|
|
SharedDtor();
|
|
}
|
|
|
|
inline void DeleteRequest::SharedDtor() {
|
|
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
|
|
_impl_.key_columns_.~RepeatedPtrField();
|
|
_impl_.table_name_.Destroy();
|
|
}
|
|
|
|
void DeleteRequest::SetCachedSize(int size) const {
|
|
_impl_._cached_size_.Set(size);
|
|
}
|
|
|
|
void DeleteRequest::Clear() {
|
|
// @@protoc_insertion_point(message_clear_start:greptime.v1.DeleteRequest)
|
|
uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
_impl_.key_columns_.Clear();
|
|
_impl_.table_name_.ClearToEmpty();
|
|
::memset(&_impl_.region_number_, 0, static_cast<size_t>(
|
|
reinterpret_cast<char*>(&_impl_.row_count_) -
|
|
reinterpret_cast<char*>(&_impl_.region_number_)) + sizeof(_impl_.row_count_));
|
|
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
|
}
|
|
|
|
const char* DeleteRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
|
|
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
|
|
while (!ctx->Done(&ptr)) {
|
|
uint32_t tag;
|
|
ptr = ::_pbi::ReadTag(ptr, &tag);
|
|
switch (tag >> 3) {
|
|
// string table_name = 1;
|
|
case 1:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
|
|
auto str = _internal_mutable_table_name();
|
|
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
|
|
CHK_(ptr);
|
|
CHK_(::_pbi::VerifyUTF8(str, "greptime.v1.DeleteRequest.table_name"));
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// uint32 region_number = 2;
|
|
case 2:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
|
|
_impl_.region_number_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
|
|
CHK_(ptr);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// repeated .greptime.v1.Column key_columns = 3;
|
|
case 3:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
|
|
ptr -= 1;
|
|
do {
|
|
ptr += 1;
|
|
ptr = ctx->ParseMessage(_internal_add_key_columns(), ptr);
|
|
CHK_(ptr);
|
|
if (!ctx->DataAvailable(ptr)) break;
|
|
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// uint32 row_count = 4;
|
|
case 4:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
|
|
_impl_.row_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
|
|
CHK_(ptr);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
default:
|
|
goto handle_unusual;
|
|
} // switch
|
|
handle_unusual:
|
|
if ((tag == 0) || ((tag & 7) == 4)) {
|
|
CHK_(ptr);
|
|
ctx->SetLastTag(tag);
|
|
goto message_done;
|
|
}
|
|
ptr = UnknownFieldParse(
|
|
tag,
|
|
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
|
|
ptr, ctx);
|
|
CHK_(ptr != nullptr);
|
|
} // while
|
|
message_done:
|
|
return ptr;
|
|
failure:
|
|
ptr = nullptr;
|
|
goto message_done;
|
|
#undef CHK_
|
|
}
|
|
|
|
uint8_t* DeleteRequest::_InternalSerialize(
|
|
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
|
|
// @@protoc_insertion_point(serialize_to_array_start:greptime.v1.DeleteRequest)
|
|
uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
// string table_name = 1;
|
|
if (!this->_internal_table_name().empty()) {
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
|
this->_internal_table_name().data(), static_cast<int>(this->_internal_table_name().length()),
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
|
"greptime.v1.DeleteRequest.table_name");
|
|
target = stream->WriteStringMaybeAliased(
|
|
1, this->_internal_table_name(), target);
|
|
}
|
|
|
|
// uint32 region_number = 2;
|
|
if (this->_internal_region_number() != 0) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_region_number(), target);
|
|
}
|
|
|
|
// repeated .greptime.v1.Column key_columns = 3;
|
|
for (unsigned i = 0,
|
|
n = static_cast<unsigned>(this->_internal_key_columns_size()); i < n; i++) {
|
|
const auto& repfield = this->_internal_key_columns(i);
|
|
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
|
|
InternalWriteMessage(3, repfield, repfield.GetCachedSize(), target, stream);
|
|
}
|
|
|
|
// uint32 row_count = 4;
|
|
if (this->_internal_row_count() != 0) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteUInt32ToArray(4, this->_internal_row_count(), 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);
|
|
}
|
|
// @@protoc_insertion_point(serialize_to_array_end:greptime.v1.DeleteRequest)
|
|
return target;
|
|
}
|
|
|
|
size_t DeleteRequest::ByteSizeLong() const {
|
|
// @@protoc_insertion_point(message_byte_size_start:greptime.v1.DeleteRequest)
|
|
size_t total_size = 0;
|
|
|
|
uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
// repeated .greptime.v1.Column key_columns = 3;
|
|
total_size += 1UL * this->_internal_key_columns_size();
|
|
for (const auto& msg : this->_impl_.key_columns_) {
|
|
total_size +=
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
|
|
}
|
|
|
|
// string table_name = 1;
|
|
if (!this->_internal_table_name().empty()) {
|
|
total_size += 1 +
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
|
this->_internal_table_name());
|
|
}
|
|
|
|
// uint32 region_number = 2;
|
|
if (this->_internal_region_number() != 0) {
|
|
total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_region_number());
|
|
}
|
|
|
|
// uint32 row_count = 4;
|
|
if (this->_internal_row_count() != 0) {
|
|
total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_row_count());
|
|
}
|
|
|
|
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
|
|
}
|
|
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData DeleteRequest::_class_data_ = {
|
|
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
|
|
DeleteRequest::MergeImpl
|
|
};
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*DeleteRequest::GetClassData() const { return &_class_data_; }
|
|
|
|
|
|
void DeleteRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
|
|
auto* const _this = static_cast<DeleteRequest*>(&to_msg);
|
|
auto& from = static_cast<const DeleteRequest&>(from_msg);
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.DeleteRequest)
|
|
GOOGLE_DCHECK_NE(&from, _this);
|
|
uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
_this->_impl_.key_columns_.MergeFrom(from._impl_.key_columns_);
|
|
if (!from._internal_table_name().empty()) {
|
|
_this->_internal_set_table_name(from._internal_table_name());
|
|
}
|
|
if (from._internal_region_number() != 0) {
|
|
_this->_internal_set_region_number(from._internal_region_number());
|
|
}
|
|
if (from._internal_row_count() != 0) {
|
|
_this->_internal_set_row_count(from._internal_row_count());
|
|
}
|
|
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
}
|
|
|
|
void DeleteRequest::CopyFrom(const DeleteRequest& from) {
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.DeleteRequest)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
bool DeleteRequest::IsInitialized() const {
|
|
return true;
|
|
}
|
|
|
|
void DeleteRequest::InternalSwap(DeleteRequest* other) {
|
|
using std::swap;
|
|
auto* lhs_arena = GetArenaForAllocation();
|
|
auto* rhs_arena = other->GetArenaForAllocation();
|
|
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
|
_impl_.key_columns_.InternalSwap(&other->_impl_.key_columns_);
|
|
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
|
|
&_impl_.table_name_, lhs_arena,
|
|
&other->_impl_.table_name_, rhs_arena
|
|
);
|
|
::PROTOBUF_NAMESPACE_ID::internal::memswap<
|
|
PROTOBUF_FIELD_OFFSET(DeleteRequest, _impl_.row_count_)
|
|
+ sizeof(DeleteRequest::_impl_.row_count_)
|
|
- PROTOBUF_FIELD_OFFSET(DeleteRequest, _impl_.region_number_)>(
|
|
reinterpret_cast<char*>(&_impl_.region_number_),
|
|
reinterpret_cast<char*>(&other->_impl_.region_number_));
|
|
}
|
|
|
|
::PROTOBUF_NAMESPACE_ID::Metadata DeleteRequest::GetMetadata() const {
|
|
return ::_pbi::AssignDescriptors(
|
|
&descriptor_table_greptime_2fv1_2fdatabase_2eproto_getter, &descriptor_table_greptime_2fv1_2fdatabase_2eproto_once,
|
|
file_level_metadata_greptime_2fv1_2fdatabase_2eproto[5]);
|
|
}
|
|
|
|
// @@protoc_insertion_point(namespace_scope)
|
|
} // namespace v1
|
|
} // namespace greptime
|
|
PROTOBUF_NAMESPACE_OPEN
|
|
template<> PROTOBUF_NOINLINE ::greptime::v1::GreptimeRequest*
|
|
Arena::CreateMaybeMessage< ::greptime::v1::GreptimeRequest >(Arena* arena) {
|
|
return Arena::CreateMessageInternal< ::greptime::v1::GreptimeRequest >(arena);
|
|
}
|
|
template<> PROTOBUF_NOINLINE ::greptime::v1::GreptimeResponse*
|
|
Arena::CreateMaybeMessage< ::greptime::v1::GreptimeResponse >(Arena* arena) {
|
|
return Arena::CreateMessageInternal< ::greptime::v1::GreptimeResponse >(arena);
|
|
}
|
|
template<> PROTOBUF_NOINLINE ::greptime::v1::QueryRequest*
|
|
Arena::CreateMaybeMessage< ::greptime::v1::QueryRequest >(Arena* arena) {
|
|
return Arena::CreateMessageInternal< ::greptime::v1::QueryRequest >(arena);
|
|
}
|
|
template<> PROTOBUF_NOINLINE ::greptime::v1::InsertRequests*
|
|
Arena::CreateMaybeMessage< ::greptime::v1::InsertRequests >(Arena* arena) {
|
|
return Arena::CreateMessageInternal< ::greptime::v1::InsertRequests >(arena);
|
|
}
|
|
template<> PROTOBUF_NOINLINE ::greptime::v1::InsertRequest*
|
|
Arena::CreateMaybeMessage< ::greptime::v1::InsertRequest >(Arena* arena) {
|
|
return Arena::CreateMessageInternal< ::greptime::v1::InsertRequest >(arena);
|
|
}
|
|
template<> PROTOBUF_NOINLINE ::greptime::v1::DeleteRequest*
|
|
Arena::CreateMaybeMessage< ::greptime::v1::DeleteRequest >(Arena* arena) {
|
|
return Arena::CreateMessageInternal< ::greptime::v1::DeleteRequest >(arena);
|
|
}
|
|
PROTOBUF_NAMESPACE_CLOSE
|
|
|
|
// @@protoc_insertion_point(global_scope)
|
|
#include <google/protobuf/port_undef.inc>
|