feat: add insert into logical plan in request (#231)
* feat: insert into logical plan * chore: make all * feat: use TableName instead * chore: make all * chore: per review
This commit is contained in:
+380
-44
@@ -66,6 +66,20 @@ struct QueryRequestDefaultTypeInternal {
|
||||
};
|
||||
};
|
||||
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 QueryRequestDefaultTypeInternal _QueryRequest_default_instance_;
|
||||
PROTOBUF_CONSTEXPR InsertIntoPlan::InsertIntoPlan(
|
||||
::_pbi::ConstantInitialized): _impl_{
|
||||
/*decltype(_impl_.logical_plan_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
||||
, /*decltype(_impl_.table_name_)*/nullptr
|
||||
, /*decltype(_impl_._cached_size_)*/{}} {}
|
||||
struct InsertIntoPlanDefaultTypeInternal {
|
||||
PROTOBUF_CONSTEXPR InsertIntoPlanDefaultTypeInternal()
|
||||
: _instance(::_pbi::ConstantInitialized{}) {}
|
||||
~InsertIntoPlanDefaultTypeInternal() {}
|
||||
union {
|
||||
InsertIntoPlan _instance;
|
||||
};
|
||||
};
|
||||
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InsertIntoPlanDefaultTypeInternal _InsertIntoPlan_default_instance_;
|
||||
PROTOBUF_CONSTEXPR InsertRequests::InsertRequests(
|
||||
::_pbi::ConstantInitialized): _impl_{
|
||||
/*decltype(_impl_.inserts_)*/{}
|
||||
@@ -178,7 +192,7 @@ struct RowDeleteRequestDefaultTypeInternal {
|
||||
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RowDeleteRequestDefaultTypeInternal _RowDeleteRequest_default_instance_;
|
||||
} // namespace v1
|
||||
} // namespace greptime
|
||||
static ::_pb::Metadata file_level_metadata_greptime_2fv1_2fdatabase_2eproto[11];
|
||||
static ::_pb::Metadata file_level_metadata_greptime_2fv1_2fdatabase_2eproto[12];
|
||||
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;
|
||||
|
||||
@@ -215,8 +229,17 @@ const uint32_t TableStruct_greptime_2fv1_2fdatabase_2eproto::offsets[] PROTOBUF_
|
||||
::_pbi::kInvalidFieldOffsetTag,
|
||||
::_pbi::kInvalidFieldOffsetTag,
|
||||
::_pbi::kInvalidFieldOffsetTag,
|
||||
::_pbi::kInvalidFieldOffsetTag,
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::QueryRequest, _impl_.query_),
|
||||
~0u, // no _has_bits_
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::InsertIntoPlan, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
~0u, // no _oneof_case_
|
||||
~0u, // no _weak_field_map_
|
||||
~0u, // no _inlined_string_donated_
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::InsertIntoPlan, _impl_.table_name_),
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::InsertIntoPlan, _impl_.logical_plan_),
|
||||
~0u, // no _has_bits_
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::InsertRequests, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
~0u, // no _oneof_case_
|
||||
@@ -283,20 +306,22 @@ static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protode
|
||||
{ 0, -1, -1, sizeof(::greptime::v1::GreptimeRequest)},
|
||||
{ 14, -1, -1, sizeof(::greptime::v1::GreptimeResponse)},
|
||||
{ 23, -1, -1, sizeof(::greptime::v1::QueryRequest)},
|
||||
{ 33, -1, -1, sizeof(::greptime::v1::InsertRequests)},
|
||||
{ 40, -1, -1, sizeof(::greptime::v1::InsertRequest)},
|
||||
{ 49, -1, -1, sizeof(::greptime::v1::DeleteRequests)},
|
||||
{ 56, -1, -1, sizeof(::greptime::v1::DeleteRequest)},
|
||||
{ 65, -1, -1, sizeof(::greptime::v1::RowInsertRequests)},
|
||||
{ 72, -1, -1, sizeof(::greptime::v1::RowInsertRequest)},
|
||||
{ 80, -1, -1, sizeof(::greptime::v1::RowDeleteRequests)},
|
||||
{ 87, -1, -1, sizeof(::greptime::v1::RowDeleteRequest)},
|
||||
{ 34, -1, -1, sizeof(::greptime::v1::InsertIntoPlan)},
|
||||
{ 42, -1, -1, sizeof(::greptime::v1::InsertRequests)},
|
||||
{ 49, -1, -1, sizeof(::greptime::v1::InsertRequest)},
|
||||
{ 58, -1, -1, sizeof(::greptime::v1::DeleteRequests)},
|
||||
{ 65, -1, -1, sizeof(::greptime::v1::DeleteRequest)},
|
||||
{ 74, -1, -1, sizeof(::greptime::v1::RowInsertRequests)},
|
||||
{ 81, -1, -1, sizeof(::greptime::v1::RowInsertRequest)},
|
||||
{ 89, -1, -1, sizeof(::greptime::v1::RowDeleteRequests)},
|
||||
{ 96, -1, -1, sizeof(::greptime::v1::RowDeleteRequest)},
|
||||
};
|
||||
|
||||
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::_InsertIntoPlan_default_instance_._instance,
|
||||
&::greptime::v1::_InsertRequests_default_instance_._instance,
|
||||
&::greptime::v1::_InsertRequest_default_instance_._instance,
|
||||
&::greptime::v1::_DeleteRequests_default_instance_._instance,
|
||||
@@ -324,32 +349,35 @@ const char descriptor_table_protodef_greptime_2fv1_2fdatabase_2eproto[] PROTOBUF
|
||||
"\007request\"\177\n\020GreptimeResponse\022+\n\006header\030\001"
|
||||
" \001(\0132\033.greptime.v1.ResponseHeader\0222\n\raff"
|
||||
"ected_rows\030\002 \001(\0132\031.greptime.v1.AffectedR"
|
||||
"owsH\000B\n\n\010response\"w\n\014QueryRequest\022\r\n\003sql"
|
||||
"\030\001 \001(\tH\000\022\026\n\014logical_plan\030\002 \001(\014H\000\0227\n\020prom"
|
||||
"_range_query\030\003 \001(\0132\033.greptime.v1.PromRan"
|
||||
"geQueryH\000B\007\n\005query\"=\n\016InsertRequests\022+\n\007"
|
||||
"inserts\030\001 \003(\0132\032.greptime.v1.InsertReques"
|
||||
"t\"\\\n\rInsertRequest\022\022\n\ntable_name\030\001 \001(\t\022$"
|
||||
"\n\007columns\030\003 \003(\0132\023.greptime.v1.Column\022\021\n\t"
|
||||
"row_count\030\004 \001(\r\"=\n\016DeleteRequests\022+\n\007del"
|
||||
"etes\030\001 \003(\0132\032.greptime.v1.DeleteRequest\"`"
|
||||
"\n\rDeleteRequest\022\022\n\ntable_name\030\001 \001(\t\022(\n\013k"
|
||||
"ey_columns\030\003 \003(\0132\023.greptime.v1.Column\022\021\n"
|
||||
"\trow_count\030\004 \001(\r\"C\n\021RowInsertRequests\022.\n"
|
||||
"\007inserts\030\001 \003(\0132\035.greptime.v1.RowInsertRe"
|
||||
"quest\"G\n\020RowInsertRequest\022\022\n\ntable_name\030"
|
||||
"\001 \001(\t\022\037\n\004rows\030\002 \001(\0132\021.greptime.v1.Rows\"C"
|
||||
"\n\021RowDeleteRequests\022.\n\007deletes\030\001 \003(\0132\035.g"
|
||||
"reptime.v1.RowDeleteRequest\"G\n\020RowDelete"
|
||||
"owsH\000B\n\n\010response\"\260\001\n\014QueryRequest\022\r\n\003sq"
|
||||
"l\030\001 \001(\tH\000\022\026\n\014logical_plan\030\002 \001(\014H\000\0227\n\020pro"
|
||||
"m_range_query\030\003 \001(\0132\033.greptime.v1.PromRa"
|
||||
"ngeQueryH\000\0227\n\020insert_into_plan\030\004 \001(\0132\033.g"
|
||||
"reptime.v1.InsertIntoPlanH\000B\007\n\005query\"R\n\016"
|
||||
"InsertIntoPlan\022*\n\ntable_name\030\001 \001(\0132\026.gre"
|
||||
"ptime.v1.TableName\022\024\n\014logical_plan\030\002 \001(\014"
|
||||
"\"=\n\016InsertRequests\022+\n\007inserts\030\001 \003(\0132\032.gr"
|
||||
"eptime.v1.InsertRequest\"\\\n\rInsertRequest"
|
||||
"\022\022\n\ntable_name\030\001 \001(\t\022$\n\007columns\030\003 \003(\0132\023."
|
||||
"greptime.v1.Column\022\021\n\trow_count\030\004 \001(\r\"=\n"
|
||||
"\016DeleteRequests\022+\n\007deletes\030\001 \003(\0132\032.grept"
|
||||
"ime.v1.DeleteRequest\"`\n\rDeleteRequest\022\022\n"
|
||||
"\ntable_name\030\001 \001(\t\022(\n\013key_columns\030\003 \003(\0132\023"
|
||||
".greptime.v1.Column\022\021\n\trow_count\030\004 \001(\r\"C"
|
||||
"\n\021RowInsertRequests\022.\n\007inserts\030\001 \003(\0132\035.g"
|
||||
"reptime.v1.RowInsertRequest\"G\n\020RowInsert"
|
||||
"Request\022\022\n\ntable_name\030\001 \001(\t\022\037\n\004rows\030\002 \001("
|
||||
"\0132\021.greptime.v1.Rows2\252\001\n\020GreptimeDatabas"
|
||||
"e\022E\n\006Handle\022\034.greptime.v1.GreptimeReques"
|
||||
"t\032\035.greptime.v1.GreptimeResponse\022O\n\016Hand"
|
||||
"leRequests\022\034.greptime.v1.GreptimeRequest"
|
||||
"\032\035.greptime.v1.GreptimeResponse(\001BQ\n\016io."
|
||||
"greptime.v1B\010DatabaseZ5github.com/Grepti"
|
||||
"meTeam/greptime-proto/go/greptime/v1b\006pr"
|
||||
"oto3"
|
||||
"\0132\021.greptime.v1.Rows\"C\n\021RowDeleteRequest"
|
||||
"s\022.\n\007deletes\030\001 \003(\0132\035.greptime.v1.RowDele"
|
||||
"teRequest\"G\n\020RowDeleteRequest\022\022\n\ntable_n"
|
||||
"ame\030\001 \001(\t\022\037\n\004rows\030\002 \001(\0132\021.greptime.v1.Ro"
|
||||
"ws2\252\001\n\020GreptimeDatabase\022E\n\006Handle\022\034.grep"
|
||||
"time.v1.GreptimeRequest\032\035.greptime.v1.Gr"
|
||||
"eptimeResponse\022O\n\016HandleRequests\022\034.grept"
|
||||
"ime.v1.GreptimeRequest\032\035.greptime.v1.Gre"
|
||||
"ptimeResponse(\001BQ\n\016io.greptime.v1B\010Datab"
|
||||
"aseZ5github.com/GreptimeTeam/greptime-pr"
|
||||
"oto/go/greptime/v1b\006proto3"
|
||||
;
|
||||
static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2fdatabase_2eproto_deps[5] = {
|
||||
&::descriptor_table_greptime_2fv1_2fcolumn_2eproto,
|
||||
@@ -360,9 +388,9 @@ static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2fdat
|
||||
};
|
||||
static ::_pbi::once_flag descriptor_table_greptime_2fv1_2fdatabase_2eproto_once;
|
||||
const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2fdatabase_2eproto = {
|
||||
false, false, 1644, descriptor_table_protodef_greptime_2fv1_2fdatabase_2eproto,
|
||||
false, false, 1786, 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, 5, 11,
|
||||
&descriptor_table_greptime_2fv1_2fdatabase_2eproto_once, descriptor_table_greptime_2fv1_2fdatabase_2eproto_deps, 5, 12,
|
||||
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,
|
||||
@@ -1279,12 +1307,17 @@ void GreptimeResponse::InternalSwap(GreptimeResponse* other) {
|
||||
class QueryRequest::_Internal {
|
||||
public:
|
||||
static const ::greptime::v1::PromRangeQuery& prom_range_query(const QueryRequest* msg);
|
||||
static const ::greptime::v1::InsertIntoPlan& insert_into_plan(const QueryRequest* msg);
|
||||
};
|
||||
|
||||
const ::greptime::v1::PromRangeQuery&
|
||||
QueryRequest::_Internal::prom_range_query(const QueryRequest* msg) {
|
||||
return *msg->_impl_.query_.prom_range_query_;
|
||||
}
|
||||
const ::greptime::v1::InsertIntoPlan&
|
||||
QueryRequest::_Internal::insert_into_plan(const QueryRequest* msg) {
|
||||
return *msg->_impl_.query_.insert_into_plan_;
|
||||
}
|
||||
void QueryRequest::set_allocated_prom_range_query(::greptime::v1::PromRangeQuery* prom_range_query) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
|
||||
clear_query();
|
||||
@@ -1309,6 +1342,21 @@ void QueryRequest::clear_prom_range_query() {
|
||||
clear_has_query();
|
||||
}
|
||||
}
|
||||
void QueryRequest::set_allocated_insert_into_plan(::greptime::v1::InsertIntoPlan* insert_into_plan) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
|
||||
clear_query();
|
||||
if (insert_into_plan) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
|
||||
::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(insert_into_plan);
|
||||
if (message_arena != submessage_arena) {
|
||||
insert_into_plan = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
|
||||
message_arena, insert_into_plan, submessage_arena);
|
||||
}
|
||||
set_has_insert_into_plan();
|
||||
_impl_.query_.insert_into_plan_ = insert_into_plan;
|
||||
}
|
||||
// @@protoc_insertion_point(field_set_allocated:greptime.v1.QueryRequest.insert_into_plan)
|
||||
}
|
||||
QueryRequest::QueryRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena,
|
||||
bool is_message_owned)
|
||||
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
|
||||
@@ -1339,6 +1387,11 @@ QueryRequest::QueryRequest(const QueryRequest& from)
|
||||
from._internal_prom_range_query());
|
||||
break;
|
||||
}
|
||||
case kInsertIntoPlan: {
|
||||
_this->_internal_mutable_insert_into_plan()->::greptime::v1::InsertIntoPlan::MergeFrom(
|
||||
from._internal_insert_into_plan());
|
||||
break;
|
||||
}
|
||||
case QUERY_NOT_SET: {
|
||||
break;
|
||||
}
|
||||
@@ -1395,6 +1448,12 @@ void QueryRequest::clear_query() {
|
||||
}
|
||||
break;
|
||||
}
|
||||
case kInsertIntoPlan: {
|
||||
if (GetArenaForAllocation() == nullptr) {
|
||||
delete _impl_.query_.insert_into_plan_;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case QUERY_NOT_SET: {
|
||||
break;
|
||||
}
|
||||
@@ -1446,6 +1505,14 @@ const char* QueryRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext*
|
||||
} else
|
||||
goto handle_unusual;
|
||||
continue;
|
||||
// .greptime.v1.InsertIntoPlan insert_into_plan = 4;
|
||||
case 4:
|
||||
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
|
||||
ptr = ctx->ParseMessage(_internal_mutable_insert_into_plan(), ptr);
|
||||
CHK_(ptr);
|
||||
} else
|
||||
goto handle_unusual;
|
||||
continue;
|
||||
default:
|
||||
goto handle_unusual;
|
||||
} // switch
|
||||
@@ -1498,6 +1565,13 @@ uint8_t* QueryRequest::_InternalSerialize(
|
||||
_Internal::prom_range_query(this).GetCachedSize(), target, stream);
|
||||
}
|
||||
|
||||
// .greptime.v1.InsertIntoPlan insert_into_plan = 4;
|
||||
if (_internal_has_insert_into_plan()) {
|
||||
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
|
||||
InternalWriteMessage(4, _Internal::insert_into_plan(this),
|
||||
_Internal::insert_into_plan(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);
|
||||
@@ -1536,6 +1610,13 @@ size_t QueryRequest::ByteSizeLong() const {
|
||||
*_impl_.query_.prom_range_query_);
|
||||
break;
|
||||
}
|
||||
// .greptime.v1.InsertIntoPlan insert_into_plan = 4;
|
||||
case kInsertIntoPlan: {
|
||||
total_size += 1 +
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
|
||||
*_impl_.query_.insert_into_plan_);
|
||||
break;
|
||||
}
|
||||
case QUERY_NOT_SET: {
|
||||
break;
|
||||
}
|
||||
@@ -1572,6 +1653,11 @@ void QueryRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::P
|
||||
from._internal_prom_range_query());
|
||||
break;
|
||||
}
|
||||
case kInsertIntoPlan: {
|
||||
_this->_internal_mutable_insert_into_plan()->::greptime::v1::InsertIntoPlan::MergeFrom(
|
||||
from._internal_insert_into_plan());
|
||||
break;
|
||||
}
|
||||
case QUERY_NOT_SET: {
|
||||
break;
|
||||
}
|
||||
@@ -1605,6 +1691,252 @@ void QueryRequest::InternalSwap(QueryRequest* other) {
|
||||
|
||||
// ===================================================================
|
||||
|
||||
class InsertIntoPlan::_Internal {
|
||||
public:
|
||||
static const ::greptime::v1::TableName& table_name(const InsertIntoPlan* msg);
|
||||
};
|
||||
|
||||
const ::greptime::v1::TableName&
|
||||
InsertIntoPlan::_Internal::table_name(const InsertIntoPlan* msg) {
|
||||
return *msg->_impl_.table_name_;
|
||||
}
|
||||
void InsertIntoPlan::clear_table_name() {
|
||||
if (GetArenaForAllocation() == nullptr && _impl_.table_name_ != nullptr) {
|
||||
delete _impl_.table_name_;
|
||||
}
|
||||
_impl_.table_name_ = nullptr;
|
||||
}
|
||||
InsertIntoPlan::InsertIntoPlan(::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.InsertIntoPlan)
|
||||
}
|
||||
InsertIntoPlan::InsertIntoPlan(const InsertIntoPlan& from)
|
||||
: ::PROTOBUF_NAMESPACE_ID::Message() {
|
||||
InsertIntoPlan* const _this = this; (void)_this;
|
||||
new (&_impl_) Impl_{
|
||||
decltype(_impl_.logical_plan_){}
|
||||
, decltype(_impl_.table_name_){nullptr}
|
||||
, /*decltype(_impl_._cached_size_)*/{}};
|
||||
|
||||
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
||||
_impl_.logical_plan_.InitDefault();
|
||||
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
_impl_.logical_plan_.Set("", GetArenaForAllocation());
|
||||
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
if (!from._internal_logical_plan().empty()) {
|
||||
_this->_impl_.logical_plan_.Set(from._internal_logical_plan(),
|
||||
_this->GetArenaForAllocation());
|
||||
}
|
||||
if (from._internal_has_table_name()) {
|
||||
_this->_impl_.table_name_ = new ::greptime::v1::TableName(*from._impl_.table_name_);
|
||||
}
|
||||
// @@protoc_insertion_point(copy_constructor:greptime.v1.InsertIntoPlan)
|
||||
}
|
||||
|
||||
inline void InsertIntoPlan::SharedCtor(
|
||||
::_pb::Arena* arena, bool is_message_owned) {
|
||||
(void)arena;
|
||||
(void)is_message_owned;
|
||||
new (&_impl_) Impl_{
|
||||
decltype(_impl_.logical_plan_){}
|
||||
, decltype(_impl_.table_name_){nullptr}
|
||||
, /*decltype(_impl_._cached_size_)*/{}
|
||||
};
|
||||
_impl_.logical_plan_.InitDefault();
|
||||
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
_impl_.logical_plan_.Set("", GetArenaForAllocation());
|
||||
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
}
|
||||
|
||||
InsertIntoPlan::~InsertIntoPlan() {
|
||||
// @@protoc_insertion_point(destructor:greptime.v1.InsertIntoPlan)
|
||||
if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
|
||||
(void)arena;
|
||||
return;
|
||||
}
|
||||
SharedDtor();
|
||||
}
|
||||
|
||||
inline void InsertIntoPlan::SharedDtor() {
|
||||
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
|
||||
_impl_.logical_plan_.Destroy();
|
||||
if (this != internal_default_instance()) delete _impl_.table_name_;
|
||||
}
|
||||
|
||||
void InsertIntoPlan::SetCachedSize(int size) const {
|
||||
_impl_._cached_size_.Set(size);
|
||||
}
|
||||
|
||||
void InsertIntoPlan::Clear() {
|
||||
// @@protoc_insertion_point(message_clear_start:greptime.v1.InsertIntoPlan)
|
||||
uint32_t cached_has_bits = 0;
|
||||
// Prevent compiler warnings about cached_has_bits being unused
|
||||
(void) cached_has_bits;
|
||||
|
||||
_impl_.logical_plan_.ClearToEmpty();
|
||||
if (GetArenaForAllocation() == nullptr && _impl_.table_name_ != nullptr) {
|
||||
delete _impl_.table_name_;
|
||||
}
|
||||
_impl_.table_name_ = nullptr;
|
||||
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
||||
}
|
||||
|
||||
const char* InsertIntoPlan::_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.TableName table_name = 1;
|
||||
case 1:
|
||||
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
|
||||
ptr = ctx->ParseMessage(_internal_mutable_table_name(), ptr);
|
||||
CHK_(ptr);
|
||||
} 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;
|
||||
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* InsertIntoPlan::_InternalSerialize(
|
||||
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
|
||||
// @@protoc_insertion_point(serialize_to_array_start:greptime.v1.InsertIntoPlan)
|
||||
uint32_t cached_has_bits = 0;
|
||||
(void) cached_has_bits;
|
||||
|
||||
// .greptime.v1.TableName table_name = 1;
|
||||
if (this->_internal_has_table_name()) {
|
||||
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
|
||||
InternalWriteMessage(1, _Internal::table_name(this),
|
||||
_Internal::table_name(this).GetCachedSize(), target, stream);
|
||||
}
|
||||
|
||||
// bytes logical_plan = 2;
|
||||
if (!this->_internal_logical_plan().empty()) {
|
||||
target = stream->WriteBytesMaybeAliased(
|
||||
2, this->_internal_logical_plan(), 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.InsertIntoPlan)
|
||||
return target;
|
||||
}
|
||||
|
||||
size_t InsertIntoPlan::ByteSizeLong() const {
|
||||
// @@protoc_insertion_point(message_byte_size_start:greptime.v1.InsertIntoPlan)
|
||||
size_t total_size = 0;
|
||||
|
||||
uint32_t cached_has_bits = 0;
|
||||
// Prevent compiler warnings about cached_has_bits being unused
|
||||
(void) cached_has_bits;
|
||||
|
||||
// bytes logical_plan = 2;
|
||||
if (!this->_internal_logical_plan().empty()) {
|
||||
total_size += 1 +
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
|
||||
this->_internal_logical_plan());
|
||||
}
|
||||
|
||||
// .greptime.v1.TableName table_name = 1;
|
||||
if (this->_internal_has_table_name()) {
|
||||
total_size += 1 +
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
|
||||
*_impl_.table_name_);
|
||||
}
|
||||
|
||||
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
|
||||
}
|
||||
|
||||
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData InsertIntoPlan::_class_data_ = {
|
||||
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
|
||||
InsertIntoPlan::MergeImpl
|
||||
};
|
||||
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*InsertIntoPlan::GetClassData() const { return &_class_data_; }
|
||||
|
||||
|
||||
void InsertIntoPlan::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
|
||||
auto* const _this = static_cast<InsertIntoPlan*>(&to_msg);
|
||||
auto& from = static_cast<const InsertIntoPlan&>(from_msg);
|
||||
// @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.InsertIntoPlan)
|
||||
GOOGLE_DCHECK_NE(&from, _this);
|
||||
uint32_t cached_has_bits = 0;
|
||||
(void) cached_has_bits;
|
||||
|
||||
if (!from._internal_logical_plan().empty()) {
|
||||
_this->_internal_set_logical_plan(from._internal_logical_plan());
|
||||
}
|
||||
if (from._internal_has_table_name()) {
|
||||
_this->_internal_mutable_table_name()->::greptime::v1::TableName::MergeFrom(
|
||||
from._internal_table_name());
|
||||
}
|
||||
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
||||
}
|
||||
|
||||
void InsertIntoPlan::CopyFrom(const InsertIntoPlan& from) {
|
||||
// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.InsertIntoPlan)
|
||||
if (&from == this) return;
|
||||
Clear();
|
||||
MergeFrom(from);
|
||||
}
|
||||
|
||||
bool InsertIntoPlan::IsInitialized() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
void InsertIntoPlan::InternalSwap(InsertIntoPlan* other) {
|
||||
using std::swap;
|
||||
auto* lhs_arena = GetArenaForAllocation();
|
||||
auto* rhs_arena = other->GetArenaForAllocation();
|
||||
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
|
||||
&_impl_.logical_plan_, lhs_arena,
|
||||
&other->_impl_.logical_plan_, rhs_arena
|
||||
);
|
||||
swap(_impl_.table_name_, other->_impl_.table_name_);
|
||||
}
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::Metadata InsertIntoPlan::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 InsertRequests::_Internal {
|
||||
public:
|
||||
};
|
||||
@@ -1785,7 +2117,7 @@ void InsertRequests::InternalSwap(InsertRequests* other) {
|
||||
::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]);
|
||||
file_level_metadata_greptime_2fv1_2fdatabase_2eproto[4]);
|
||||
}
|
||||
|
||||
// ===================================================================
|
||||
@@ -2052,7 +2384,7 @@ void InsertRequest::InternalSwap(InsertRequest* other) {
|
||||
::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]);
|
||||
file_level_metadata_greptime_2fv1_2fdatabase_2eproto[5]);
|
||||
}
|
||||
|
||||
// ===================================================================
|
||||
@@ -2237,7 +2569,7 @@ void DeleteRequests::InternalSwap(DeleteRequests* other) {
|
||||
::PROTOBUF_NAMESPACE_ID::Metadata DeleteRequests::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]);
|
||||
file_level_metadata_greptime_2fv1_2fdatabase_2eproto[6]);
|
||||
}
|
||||
|
||||
// ===================================================================
|
||||
@@ -2504,7 +2836,7 @@ void DeleteRequest::InternalSwap(DeleteRequest* other) {
|
||||
::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[6]);
|
||||
file_level_metadata_greptime_2fv1_2fdatabase_2eproto[7]);
|
||||
}
|
||||
|
||||
// ===================================================================
|
||||
@@ -2689,7 +3021,7 @@ void RowInsertRequests::InternalSwap(RowInsertRequests* other) {
|
||||
::PROTOBUF_NAMESPACE_ID::Metadata RowInsertRequests::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[7]);
|
||||
file_level_metadata_greptime_2fv1_2fdatabase_2eproto[8]);
|
||||
}
|
||||
|
||||
// ===================================================================
|
||||
@@ -2940,7 +3272,7 @@ void RowInsertRequest::InternalSwap(RowInsertRequest* other) {
|
||||
::PROTOBUF_NAMESPACE_ID::Metadata RowInsertRequest::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[8]);
|
||||
file_level_metadata_greptime_2fv1_2fdatabase_2eproto[9]);
|
||||
}
|
||||
|
||||
// ===================================================================
|
||||
@@ -3125,7 +3457,7 @@ void RowDeleteRequests::InternalSwap(RowDeleteRequests* other) {
|
||||
::PROTOBUF_NAMESPACE_ID::Metadata RowDeleteRequests::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[9]);
|
||||
file_level_metadata_greptime_2fv1_2fdatabase_2eproto[10]);
|
||||
}
|
||||
|
||||
// ===================================================================
|
||||
@@ -3376,7 +3708,7 @@ void RowDeleteRequest::InternalSwap(RowDeleteRequest* other) {
|
||||
::PROTOBUF_NAMESPACE_ID::Metadata RowDeleteRequest::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[10]);
|
||||
file_level_metadata_greptime_2fv1_2fdatabase_2eproto[11]);
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(namespace_scope)
|
||||
@@ -3395,6 +3727,10 @@ 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::InsertIntoPlan*
|
||||
Arena::CreateMaybeMessage< ::greptime::v1::InsertIntoPlan >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< ::greptime::v1::InsertIntoPlan >(arena);
|
||||
}
|
||||
template<> PROTOBUF_NOINLINE ::greptime::v1::InsertRequests*
|
||||
Arena::CreateMaybeMessage< ::greptime::v1::InsertRequests >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< ::greptime::v1::InsertRequests >(arena);
|
||||
|
||||
@@ -63,6 +63,9 @@ extern GreptimeRequestDefaultTypeInternal _GreptimeRequest_default_instance_;
|
||||
class GreptimeResponse;
|
||||
struct GreptimeResponseDefaultTypeInternal;
|
||||
extern GreptimeResponseDefaultTypeInternal _GreptimeResponse_default_instance_;
|
||||
class InsertIntoPlan;
|
||||
struct InsertIntoPlanDefaultTypeInternal;
|
||||
extern InsertIntoPlanDefaultTypeInternal _InsertIntoPlan_default_instance_;
|
||||
class InsertRequest;
|
||||
struct InsertRequestDefaultTypeInternal;
|
||||
extern InsertRequestDefaultTypeInternal _InsertRequest_default_instance_;
|
||||
@@ -91,6 +94,7 @@ template<> ::greptime::v1::DeleteRequest* Arena::CreateMaybeMessage<::greptime::
|
||||
template<> ::greptime::v1::DeleteRequests* Arena::CreateMaybeMessage<::greptime::v1::DeleteRequests>(Arena*);
|
||||
template<> ::greptime::v1::GreptimeRequest* Arena::CreateMaybeMessage<::greptime::v1::GreptimeRequest>(Arena*);
|
||||
template<> ::greptime::v1::GreptimeResponse* Arena::CreateMaybeMessage<::greptime::v1::GreptimeResponse>(Arena*);
|
||||
template<> ::greptime::v1::InsertIntoPlan* Arena::CreateMaybeMessage<::greptime::v1::InsertIntoPlan>(Arena*);
|
||||
template<> ::greptime::v1::InsertRequest* Arena::CreateMaybeMessage<::greptime::v1::InsertRequest>(Arena*);
|
||||
template<> ::greptime::v1::InsertRequests* Arena::CreateMaybeMessage<::greptime::v1::InsertRequests>(Arena*);
|
||||
template<> ::greptime::v1::QueryRequest* Arena::CreateMaybeMessage<::greptime::v1::QueryRequest>(Arena*);
|
||||
@@ -649,6 +653,7 @@ class QueryRequest final :
|
||||
kSql = 1,
|
||||
kLogicalPlan = 2,
|
||||
kPromRangeQuery = 3,
|
||||
kInsertIntoPlan = 4,
|
||||
QUERY_NOT_SET = 0,
|
||||
};
|
||||
|
||||
@@ -733,6 +738,7 @@ class QueryRequest final :
|
||||
kSqlFieldNumber = 1,
|
||||
kLogicalPlanFieldNumber = 2,
|
||||
kPromRangeQueryFieldNumber = 3,
|
||||
kInsertIntoPlanFieldNumber = 4,
|
||||
};
|
||||
// string sql = 1;
|
||||
bool has_sql() const;
|
||||
@@ -788,6 +794,24 @@ class QueryRequest final :
|
||||
::greptime::v1::PromRangeQuery* prom_range_query);
|
||||
::greptime::v1::PromRangeQuery* unsafe_arena_release_prom_range_query();
|
||||
|
||||
// .greptime.v1.InsertIntoPlan insert_into_plan = 4;
|
||||
bool has_insert_into_plan() const;
|
||||
private:
|
||||
bool _internal_has_insert_into_plan() const;
|
||||
public:
|
||||
void clear_insert_into_plan();
|
||||
const ::greptime::v1::InsertIntoPlan& insert_into_plan() const;
|
||||
PROTOBUF_NODISCARD ::greptime::v1::InsertIntoPlan* release_insert_into_plan();
|
||||
::greptime::v1::InsertIntoPlan* mutable_insert_into_plan();
|
||||
void set_allocated_insert_into_plan(::greptime::v1::InsertIntoPlan* insert_into_plan);
|
||||
private:
|
||||
const ::greptime::v1::InsertIntoPlan& _internal_insert_into_plan() const;
|
||||
::greptime::v1::InsertIntoPlan* _internal_mutable_insert_into_plan();
|
||||
public:
|
||||
void unsafe_arena_set_allocated_insert_into_plan(
|
||||
::greptime::v1::InsertIntoPlan* insert_into_plan);
|
||||
::greptime::v1::InsertIntoPlan* unsafe_arena_release_insert_into_plan();
|
||||
|
||||
void clear_query();
|
||||
QueryCase query_case() const;
|
||||
// @@protoc_insertion_point(class_scope:greptime.v1.QueryRequest)
|
||||
@@ -796,6 +820,7 @@ class QueryRequest final :
|
||||
void set_has_sql();
|
||||
void set_has_logical_plan();
|
||||
void set_has_prom_range_query();
|
||||
void set_has_insert_into_plan();
|
||||
|
||||
inline bool has_query() const;
|
||||
inline void clear_has_query();
|
||||
@@ -810,6 +835,7 @@ class QueryRequest final :
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr sql_;
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr logical_plan_;
|
||||
::greptime::v1::PromRangeQuery* prom_range_query_;
|
||||
::greptime::v1::InsertIntoPlan* insert_into_plan_;
|
||||
} query_;
|
||||
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
||||
uint32_t _oneof_case_[1];
|
||||
@@ -820,6 +846,179 @@ class QueryRequest final :
|
||||
};
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
class InsertIntoPlan final :
|
||||
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.InsertIntoPlan) */ {
|
||||
public:
|
||||
inline InsertIntoPlan() : InsertIntoPlan(nullptr) {}
|
||||
~InsertIntoPlan() override;
|
||||
explicit PROTOBUF_CONSTEXPR InsertIntoPlan(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
|
||||
|
||||
InsertIntoPlan(const InsertIntoPlan& from);
|
||||
InsertIntoPlan(InsertIntoPlan&& from) noexcept
|
||||
: InsertIntoPlan() {
|
||||
*this = ::std::move(from);
|
||||
}
|
||||
|
||||
inline InsertIntoPlan& operator=(const InsertIntoPlan& from) {
|
||||
CopyFrom(from);
|
||||
return *this;
|
||||
}
|
||||
inline InsertIntoPlan& operator=(InsertIntoPlan&& from) noexcept {
|
||||
if (this == &from) return *this;
|
||||
if (GetOwningArena() == from.GetOwningArena()
|
||||
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
&& GetOwningArena() != nullptr
|
||||
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
) {
|
||||
InternalSwap(&from);
|
||||
} else {
|
||||
CopyFrom(from);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
|
||||
return GetDescriptor();
|
||||
}
|
||||
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
|
||||
return default_instance().GetMetadata().descriptor;
|
||||
}
|
||||
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
|
||||
return default_instance().GetMetadata().reflection;
|
||||
}
|
||||
static const InsertIntoPlan& default_instance() {
|
||||
return *internal_default_instance();
|
||||
}
|
||||
static inline const InsertIntoPlan* internal_default_instance() {
|
||||
return reinterpret_cast<const InsertIntoPlan*>(
|
||||
&_InsertIntoPlan_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
3;
|
||||
|
||||
friend void swap(InsertIntoPlan& a, InsertIntoPlan& b) {
|
||||
a.Swap(&b);
|
||||
}
|
||||
inline void Swap(InsertIntoPlan* other) {
|
||||
if (other == this) return;
|
||||
#ifdef PROTOBUF_FORCE_COPY_IN_SWAP
|
||||
if (GetOwningArena() != nullptr &&
|
||||
GetOwningArena() == other->GetOwningArena()) {
|
||||
#else // PROTOBUF_FORCE_COPY_IN_SWAP
|
||||
if (GetOwningArena() == other->GetOwningArena()) {
|
||||
#endif // !PROTOBUF_FORCE_COPY_IN_SWAP
|
||||
InternalSwap(other);
|
||||
} else {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
|
||||
}
|
||||
}
|
||||
void UnsafeArenaSwap(InsertIntoPlan* other) {
|
||||
if (other == this) return;
|
||||
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
|
||||
InternalSwap(other);
|
||||
}
|
||||
|
||||
// implements Message ----------------------------------------------
|
||||
|
||||
InsertIntoPlan* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final {
|
||||
return CreateMaybeMessage<InsertIntoPlan>(arena);
|
||||
}
|
||||
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
|
||||
void CopyFrom(const InsertIntoPlan& from);
|
||||
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
|
||||
void MergeFrom( const InsertIntoPlan& from) {
|
||||
InsertIntoPlan::MergeImpl(*this, from);
|
||||
}
|
||||
private:
|
||||
static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
|
||||
public:
|
||||
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
|
||||
bool IsInitialized() const final;
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
|
||||
uint8_t* _InternalSerialize(
|
||||
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
|
||||
int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
|
||||
|
||||
private:
|
||||
void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
|
||||
void SharedDtor();
|
||||
void SetCachedSize(int size) const final;
|
||||
void InternalSwap(InsertIntoPlan* other);
|
||||
|
||||
private:
|
||||
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
|
||||
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
|
||||
return "greptime.v1.InsertIntoPlan";
|
||||
}
|
||||
protected:
|
||||
explicit InsertIntoPlan(::PROTOBUF_NAMESPACE_ID::Arena* arena,
|
||||
bool is_message_owned = false);
|
||||
public:
|
||||
|
||||
static const ClassData _class_data_;
|
||||
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final;
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
|
||||
|
||||
// nested types ----------------------------------------------------
|
||||
|
||||
// accessors -------------------------------------------------------
|
||||
|
||||
enum : int {
|
||||
kLogicalPlanFieldNumber = 2,
|
||||
kTableNameFieldNumber = 1,
|
||||
};
|
||||
// bytes logical_plan = 2;
|
||||
void clear_logical_plan();
|
||||
const std::string& logical_plan() const;
|
||||
template <typename ArgT0 = const std::string&, typename... ArgT>
|
||||
void set_logical_plan(ArgT0&& arg0, ArgT... args);
|
||||
std::string* mutable_logical_plan();
|
||||
PROTOBUF_NODISCARD std::string* release_logical_plan();
|
||||
void set_allocated_logical_plan(std::string* logical_plan);
|
||||
private:
|
||||
const std::string& _internal_logical_plan() const;
|
||||
inline PROTOBUF_ALWAYS_INLINE void _internal_set_logical_plan(const std::string& value);
|
||||
std::string* _internal_mutable_logical_plan();
|
||||
public:
|
||||
|
||||
// .greptime.v1.TableName table_name = 1;
|
||||
bool has_table_name() const;
|
||||
private:
|
||||
bool _internal_has_table_name() const;
|
||||
public:
|
||||
void clear_table_name();
|
||||
const ::greptime::v1::TableName& table_name() const;
|
||||
PROTOBUF_NODISCARD ::greptime::v1::TableName* release_table_name();
|
||||
::greptime::v1::TableName* mutable_table_name();
|
||||
void set_allocated_table_name(::greptime::v1::TableName* table_name);
|
||||
private:
|
||||
const ::greptime::v1::TableName& _internal_table_name() const;
|
||||
::greptime::v1::TableName* _internal_mutable_table_name();
|
||||
public:
|
||||
void unsafe_arena_set_allocated_table_name(
|
||||
::greptime::v1::TableName* table_name);
|
||||
::greptime::v1::TableName* unsafe_arena_release_table_name();
|
||||
|
||||
// @@protoc_insertion_point(class_scope:greptime.v1.InsertIntoPlan)
|
||||
private:
|
||||
class _Internal;
|
||||
|
||||
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
|
||||
typedef void InternalArenaConstructable_;
|
||||
typedef void DestructorSkippable_;
|
||||
struct Impl_ {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr logical_plan_;
|
||||
::greptime::v1::TableName* table_name_;
|
||||
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
||||
};
|
||||
union { Impl_ _impl_; };
|
||||
friend struct ::TableStruct_greptime_2fv1_2fdatabase_2eproto;
|
||||
};
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
class InsertRequests final :
|
||||
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.InsertRequests) */ {
|
||||
public:
|
||||
@@ -868,7 +1067,7 @@ class InsertRequests final :
|
||||
&_InsertRequests_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
3;
|
||||
4;
|
||||
|
||||
friend void swap(InsertRequests& a, InsertRequests& b) {
|
||||
a.Swap(&b);
|
||||
@@ -1025,7 +1224,7 @@ class InsertRequest final :
|
||||
&_InsertRequest_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
4;
|
||||
5;
|
||||
|
||||
friend void swap(InsertRequest& a, InsertRequest& b) {
|
||||
a.Swap(&b);
|
||||
@@ -1209,7 +1408,7 @@ class DeleteRequests final :
|
||||
&_DeleteRequests_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
5;
|
||||
6;
|
||||
|
||||
friend void swap(DeleteRequests& a, DeleteRequests& b) {
|
||||
a.Swap(&b);
|
||||
@@ -1366,7 +1565,7 @@ class DeleteRequest final :
|
||||
&_DeleteRequest_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
6;
|
||||
7;
|
||||
|
||||
friend void swap(DeleteRequest& a, DeleteRequest& b) {
|
||||
a.Swap(&b);
|
||||
@@ -1550,7 +1749,7 @@ class RowInsertRequests final :
|
||||
&_RowInsertRequests_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
7;
|
||||
8;
|
||||
|
||||
friend void swap(RowInsertRequests& a, RowInsertRequests& b) {
|
||||
a.Swap(&b);
|
||||
@@ -1707,7 +1906,7 @@ class RowInsertRequest final :
|
||||
&_RowInsertRequest_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
8;
|
||||
9;
|
||||
|
||||
friend void swap(RowInsertRequest& a, RowInsertRequest& b) {
|
||||
a.Swap(&b);
|
||||
@@ -1880,7 +2079,7 @@ class RowDeleteRequests final :
|
||||
&_RowDeleteRequests_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
9;
|
||||
10;
|
||||
|
||||
friend void swap(RowDeleteRequests& a, RowDeleteRequests& b) {
|
||||
a.Swap(&b);
|
||||
@@ -2037,7 +2236,7 @@ class RowDeleteRequest final :
|
||||
&_RowDeleteRequest_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
10;
|
||||
11;
|
||||
|
||||
friend void swap(RowDeleteRequest& a, RowDeleteRequest& b) {
|
||||
a.Swap(&b);
|
||||
@@ -3089,6 +3288,80 @@ inline ::greptime::v1::PromRangeQuery* QueryRequest::mutable_prom_range_query()
|
||||
return _msg;
|
||||
}
|
||||
|
||||
// .greptime.v1.InsertIntoPlan insert_into_plan = 4;
|
||||
inline bool QueryRequest::_internal_has_insert_into_plan() const {
|
||||
return query_case() == kInsertIntoPlan;
|
||||
}
|
||||
inline bool QueryRequest::has_insert_into_plan() const {
|
||||
return _internal_has_insert_into_plan();
|
||||
}
|
||||
inline void QueryRequest::set_has_insert_into_plan() {
|
||||
_impl_._oneof_case_[0] = kInsertIntoPlan;
|
||||
}
|
||||
inline void QueryRequest::clear_insert_into_plan() {
|
||||
if (_internal_has_insert_into_plan()) {
|
||||
if (GetArenaForAllocation() == nullptr) {
|
||||
delete _impl_.query_.insert_into_plan_;
|
||||
}
|
||||
clear_has_query();
|
||||
}
|
||||
}
|
||||
inline ::greptime::v1::InsertIntoPlan* QueryRequest::release_insert_into_plan() {
|
||||
// @@protoc_insertion_point(field_release:greptime.v1.QueryRequest.insert_into_plan)
|
||||
if (_internal_has_insert_into_plan()) {
|
||||
clear_has_query();
|
||||
::greptime::v1::InsertIntoPlan* temp = _impl_.query_.insert_into_plan_;
|
||||
if (GetArenaForAllocation() != nullptr) {
|
||||
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
|
||||
}
|
||||
_impl_.query_.insert_into_plan_ = nullptr;
|
||||
return temp;
|
||||
} else {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
inline const ::greptime::v1::InsertIntoPlan& QueryRequest::_internal_insert_into_plan() const {
|
||||
return _internal_has_insert_into_plan()
|
||||
? *_impl_.query_.insert_into_plan_
|
||||
: reinterpret_cast< ::greptime::v1::InsertIntoPlan&>(::greptime::v1::_InsertIntoPlan_default_instance_);
|
||||
}
|
||||
inline const ::greptime::v1::InsertIntoPlan& QueryRequest::insert_into_plan() const {
|
||||
// @@protoc_insertion_point(field_get:greptime.v1.QueryRequest.insert_into_plan)
|
||||
return _internal_insert_into_plan();
|
||||
}
|
||||
inline ::greptime::v1::InsertIntoPlan* QueryRequest::unsafe_arena_release_insert_into_plan() {
|
||||
// @@protoc_insertion_point(field_unsafe_arena_release:greptime.v1.QueryRequest.insert_into_plan)
|
||||
if (_internal_has_insert_into_plan()) {
|
||||
clear_has_query();
|
||||
::greptime::v1::InsertIntoPlan* temp = _impl_.query_.insert_into_plan_;
|
||||
_impl_.query_.insert_into_plan_ = nullptr;
|
||||
return temp;
|
||||
} else {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
inline void QueryRequest::unsafe_arena_set_allocated_insert_into_plan(::greptime::v1::InsertIntoPlan* insert_into_plan) {
|
||||
clear_query();
|
||||
if (insert_into_plan) {
|
||||
set_has_insert_into_plan();
|
||||
_impl_.query_.insert_into_plan_ = insert_into_plan;
|
||||
}
|
||||
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.QueryRequest.insert_into_plan)
|
||||
}
|
||||
inline ::greptime::v1::InsertIntoPlan* QueryRequest::_internal_mutable_insert_into_plan() {
|
||||
if (!_internal_has_insert_into_plan()) {
|
||||
clear_query();
|
||||
set_has_insert_into_plan();
|
||||
_impl_.query_.insert_into_plan_ = CreateMaybeMessage< ::greptime::v1::InsertIntoPlan >(GetArenaForAllocation());
|
||||
}
|
||||
return _impl_.query_.insert_into_plan_;
|
||||
}
|
||||
inline ::greptime::v1::InsertIntoPlan* QueryRequest::mutable_insert_into_plan() {
|
||||
::greptime::v1::InsertIntoPlan* _msg = _internal_mutable_insert_into_plan();
|
||||
// @@protoc_insertion_point(field_mutable:greptime.v1.QueryRequest.insert_into_plan)
|
||||
return _msg;
|
||||
}
|
||||
|
||||
inline bool QueryRequest::has_query() const {
|
||||
return query_case() != QUERY_NOT_SET;
|
||||
}
|
||||
@@ -3100,6 +3373,145 @@ inline QueryRequest::QueryCase QueryRequest::query_case() const {
|
||||
}
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// InsertIntoPlan
|
||||
|
||||
// .greptime.v1.TableName table_name = 1;
|
||||
inline bool InsertIntoPlan::_internal_has_table_name() const {
|
||||
return this != internal_default_instance() && _impl_.table_name_ != nullptr;
|
||||
}
|
||||
inline bool InsertIntoPlan::has_table_name() const {
|
||||
return _internal_has_table_name();
|
||||
}
|
||||
inline const ::greptime::v1::TableName& InsertIntoPlan::_internal_table_name() const {
|
||||
const ::greptime::v1::TableName* p = _impl_.table_name_;
|
||||
return p != nullptr ? *p : reinterpret_cast<const ::greptime::v1::TableName&>(
|
||||
::greptime::v1::_TableName_default_instance_);
|
||||
}
|
||||
inline const ::greptime::v1::TableName& InsertIntoPlan::table_name() const {
|
||||
// @@protoc_insertion_point(field_get:greptime.v1.InsertIntoPlan.table_name)
|
||||
return _internal_table_name();
|
||||
}
|
||||
inline void InsertIntoPlan::unsafe_arena_set_allocated_table_name(
|
||||
::greptime::v1::TableName* table_name) {
|
||||
if (GetArenaForAllocation() == nullptr) {
|
||||
delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.table_name_);
|
||||
}
|
||||
_impl_.table_name_ = table_name;
|
||||
if (table_name) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.InsertIntoPlan.table_name)
|
||||
}
|
||||
inline ::greptime::v1::TableName* InsertIntoPlan::release_table_name() {
|
||||
|
||||
::greptime::v1::TableName* temp = _impl_.table_name_;
|
||||
_impl_.table_name_ = nullptr;
|
||||
#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE
|
||||
auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp);
|
||||
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
|
||||
if (GetArenaForAllocation() == nullptr) { delete old; }
|
||||
#else // PROTOBUF_FORCE_COPY_IN_RELEASE
|
||||
if (GetArenaForAllocation() != nullptr) {
|
||||
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
|
||||
}
|
||||
#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE
|
||||
return temp;
|
||||
}
|
||||
inline ::greptime::v1::TableName* InsertIntoPlan::unsafe_arena_release_table_name() {
|
||||
// @@protoc_insertion_point(field_release:greptime.v1.InsertIntoPlan.table_name)
|
||||
|
||||
::greptime::v1::TableName* temp = _impl_.table_name_;
|
||||
_impl_.table_name_ = nullptr;
|
||||
return temp;
|
||||
}
|
||||
inline ::greptime::v1::TableName* InsertIntoPlan::_internal_mutable_table_name() {
|
||||
|
||||
if (_impl_.table_name_ == nullptr) {
|
||||
auto* p = CreateMaybeMessage<::greptime::v1::TableName>(GetArenaForAllocation());
|
||||
_impl_.table_name_ = p;
|
||||
}
|
||||
return _impl_.table_name_;
|
||||
}
|
||||
inline ::greptime::v1::TableName* InsertIntoPlan::mutable_table_name() {
|
||||
::greptime::v1::TableName* _msg = _internal_mutable_table_name();
|
||||
// @@protoc_insertion_point(field_mutable:greptime.v1.InsertIntoPlan.table_name)
|
||||
return _msg;
|
||||
}
|
||||
inline void InsertIntoPlan::set_allocated_table_name(::greptime::v1::TableName* table_name) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
|
||||
if (message_arena == nullptr) {
|
||||
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.table_name_);
|
||||
}
|
||||
if (table_name) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
|
||||
::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(
|
||||
reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(table_name));
|
||||
if (message_arena != submessage_arena) {
|
||||
table_name = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
|
||||
message_arena, table_name, submessage_arena);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
_impl_.table_name_ = table_name;
|
||||
// @@protoc_insertion_point(field_set_allocated:greptime.v1.InsertIntoPlan.table_name)
|
||||
}
|
||||
|
||||
// bytes logical_plan = 2;
|
||||
inline void InsertIntoPlan::clear_logical_plan() {
|
||||
_impl_.logical_plan_.ClearToEmpty();
|
||||
}
|
||||
inline const std::string& InsertIntoPlan::logical_plan() const {
|
||||
// @@protoc_insertion_point(field_get:greptime.v1.InsertIntoPlan.logical_plan)
|
||||
return _internal_logical_plan();
|
||||
}
|
||||
template <typename ArgT0, typename... ArgT>
|
||||
inline PROTOBUF_ALWAYS_INLINE
|
||||
void InsertIntoPlan::set_logical_plan(ArgT0&& arg0, ArgT... args) {
|
||||
|
||||
_impl_.logical_plan_.SetBytes(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
|
||||
// @@protoc_insertion_point(field_set:greptime.v1.InsertIntoPlan.logical_plan)
|
||||
}
|
||||
inline std::string* InsertIntoPlan::mutable_logical_plan() {
|
||||
std::string* _s = _internal_mutable_logical_plan();
|
||||
// @@protoc_insertion_point(field_mutable:greptime.v1.InsertIntoPlan.logical_plan)
|
||||
return _s;
|
||||
}
|
||||
inline const std::string& InsertIntoPlan::_internal_logical_plan() const {
|
||||
return _impl_.logical_plan_.Get();
|
||||
}
|
||||
inline void InsertIntoPlan::_internal_set_logical_plan(const std::string& value) {
|
||||
|
||||
_impl_.logical_plan_.Set(value, GetArenaForAllocation());
|
||||
}
|
||||
inline std::string* InsertIntoPlan::_internal_mutable_logical_plan() {
|
||||
|
||||
return _impl_.logical_plan_.Mutable(GetArenaForAllocation());
|
||||
}
|
||||
inline std::string* InsertIntoPlan::release_logical_plan() {
|
||||
// @@protoc_insertion_point(field_release:greptime.v1.InsertIntoPlan.logical_plan)
|
||||
return _impl_.logical_plan_.Release();
|
||||
}
|
||||
inline void InsertIntoPlan::set_allocated_logical_plan(std::string* logical_plan) {
|
||||
if (logical_plan != nullptr) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
_impl_.logical_plan_.SetAllocated(logical_plan, GetArenaForAllocation());
|
||||
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
if (_impl_.logical_plan_.IsDefault()) {
|
||||
_impl_.logical_plan_.Set("", GetArenaForAllocation());
|
||||
}
|
||||
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
// @@protoc_insertion_point(field_set_allocated:greptime.v1.InsertIntoPlan.logical_plan)
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// InsertRequests
|
||||
|
||||
// repeated .greptime.v1.InsertRequest inserts = 1;
|
||||
@@ -3797,6 +4209,8 @@ inline void RowDeleteRequest::set_allocated_rows(::greptime::v1::Rows* rows) {
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
|
||||
// @@protoc_insertion_point(namespace_scope)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user