diff --git a/c++/greptime/v1/ddl.pb.cc b/c++/greptime/v1/ddl.pb.cc index 7e52ed55..8d4a1450 100644 --- a/c++/greptime/v1/ddl.pb.cc +++ b/c++/greptime/v1/ddl.pb.cc @@ -146,6 +146,21 @@ struct TruncateTableExprDefaultTypeInternal { }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TruncateTableExprDefaultTypeInternal _TruncateTableExpr_default_instance_; +PROTOBUF_CONSTEXPR DropDatabaseExpr::DropDatabaseExpr( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.catalog_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.schema_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.drop_if_exists_)*/false + , /*decltype(_impl_._cached_size_)*/{}} {} +struct DropDatabaseExprDefaultTypeInternal { + PROTOBUF_CONSTEXPR DropDatabaseExprDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~DropDatabaseExprDefaultTypeInternal() {} + union { + DropDatabaseExpr _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DropDatabaseExprDefaultTypeInternal _DropDatabaseExpr_default_instance_; PROTOBUF_CONSTEXPR AddColumns::AddColumns( ::_pbi::ConstantInitialized): _impl_{ /*decltype(_impl_.add_columns_)*/{} @@ -260,7 +275,7 @@ struct AddColumnLocationDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AddColumnLocationDefaultTypeInternal _AddColumnLocation_default_instance_; } // namespace v1 } // namespace greptime -static ::_pb::Metadata file_level_metadata_greptime_2fv1_2fddl_2eproto[16]; +static ::_pb::Metadata file_level_metadata_greptime_2fv1_2fddl_2eproto[17]; static const ::_pb::EnumDescriptor* file_level_enum_descriptors_greptime_2fv1_2fddl_2eproto[1]; static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_greptime_2fv1_2fddl_2eproto = nullptr; @@ -358,6 +373,15 @@ const uint32_t TableStruct_greptime_2fv1_2fddl_2eproto::offsets[] PROTOBUF_SECTI PROTOBUF_FIELD_OFFSET(::greptime::v1::TruncateTableExpr, _impl_.table_name_), PROTOBUF_FIELD_OFFSET(::greptime::v1::TruncateTableExpr, _impl_.table_id_), ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::DropDatabaseExpr, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::DropDatabaseExpr, _impl_.catalog_name_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::DropDatabaseExpr, _impl_.schema_name_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::DropDatabaseExpr, _impl_.drop_if_exists_), + ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::greptime::v1::AddColumns, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ @@ -431,14 +455,15 @@ static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protode { 63, 71, -1, sizeof(::greptime::v1::CreateDatabaseExpr_OptionsEntry_DoNotUse)}, { 73, -1, -1, sizeof(::greptime::v1::CreateDatabaseExpr)}, { 82, -1, -1, sizeof(::greptime::v1::TruncateTableExpr)}, - { 92, -1, -1, sizeof(::greptime::v1::AddColumns)}, - { 99, -1, -1, sizeof(::greptime::v1::DropColumns)}, - { 106, -1, -1, sizeof(::greptime::v1::RenameTable)}, - { 113, -1, -1, sizeof(::greptime::v1::AddColumn)}, - { 121, -1, -1, sizeof(::greptime::v1::DropColumn)}, - { 128, -1, -1, sizeof(::greptime::v1::TableId)}, - { 135, -1, -1, sizeof(::greptime::v1::ColumnDef)}, - { 148, -1, -1, sizeof(::greptime::v1::AddColumnLocation)}, + { 92, -1, -1, sizeof(::greptime::v1::DropDatabaseExpr)}, + { 101, -1, -1, sizeof(::greptime::v1::AddColumns)}, + { 108, -1, -1, sizeof(::greptime::v1::DropColumns)}, + { 115, -1, -1, sizeof(::greptime::v1::RenameTable)}, + { 122, -1, -1, sizeof(::greptime::v1::AddColumn)}, + { 130, -1, -1, sizeof(::greptime::v1::DropColumn)}, + { 137, -1, -1, sizeof(::greptime::v1::TableId)}, + { 144, -1, -1, sizeof(::greptime::v1::ColumnDef)}, + { 157, -1, -1, sizeof(::greptime::v1::AddColumnLocation)}, }; static const ::_pb::Message* const file_default_instances[] = { @@ -450,6 +475,7 @@ static const ::_pb::Message* const file_default_instances[] = { &::greptime::v1::_CreateDatabaseExpr_OptionsEntry_DoNotUse_default_instance_._instance, &::greptime::v1::_CreateDatabaseExpr_default_instance_._instance, &::greptime::v1::_TruncateTableExpr_default_instance_._instance, + &::greptime::v1::_DropDatabaseExpr_default_instance_._instance, &::greptime::v1::_AddColumns_default_instance_._instance, &::greptime::v1::_DropColumns_default_instance_._instance, &::greptime::v1::_RenameTable_default_instance_._instance, @@ -496,37 +522,39 @@ const char descriptor_table_protodef_greptime_2fv1_2fddl_2eproto[] PROTOBUF_SECT "ey\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"z\n\021TruncateT" "ableExpr\022\024\n\014catalog_name\030\001 \001(\t\022\023\n\013schema" "_name\030\002 \001(\t\022\022\n\ntable_name\030\003 \001(\t\022&\n\010table" - "_id\030\004 \001(\0132\024.greptime.v1.TableId\"9\n\nAddCo" - "lumns\022+\n\013add_columns\030\001 \003(\0132\026.greptime.v1" - ".AddColumn\"<\n\013DropColumns\022-\n\014drop_column" - "s\030\001 \003(\0132\027.greptime.v1.DropColumn\"%\n\013Rena" - "meTable\022\026\n\016new_table_name\030\001 \001(\t\"i\n\tAddCo" - "lumn\022*\n\ncolumn_def\030\001 \001(\0132\026.greptime.v1.C" - "olumnDef\0220\n\010location\030\003 \001(\0132\036.greptime.v1" - ".AddColumnLocation\"\032\n\nDropColumn\022\014\n\004name" - "\030\001 \001(\t\"\025\n\007TableId\022\n\n\002id\030\001 \001(\r\"\377\001\n\tColumn" - "Def\022\014\n\004name\030\001 \001(\t\022.\n\tdata_type\030\002 \001(\0162\033.g" - "reptime.v1.ColumnDataType\022\023\n\013is_nullable" - "\030\003 \001(\010\022\032\n\022default_constraint\030\004 \001(\014\0220\n\rse" - "mantic_type\030\005 \001(\0162\031.greptime.v1.Semantic" - "Type\022\017\n\007comment\030\006 \001(\t\022@\n\022datatype_extens" - "ion\030\007 \001(\0132$.greptime.v1.ColumnDataTypeEx" - "tension\"\230\001\n\021AddColumnLocation\022B\n\rlocatio" - "n_type\030\001 \001(\0162+.greptime.v1.AddColumnLoca" - "tion.LocationType\022\031\n\021after_column_name\030\002" - " \001(\t\"$\n\014LocationType\022\t\n\005FIRST\020\000\022\t\n\005AFTER" - "\020\001BL\n\016io.greptime.v1B\003DdlZ5github.com/Gr" - "eptimeTeam/greptime-proto/go/greptime/v1" - "b\006proto3" + "_id\030\004 \001(\0132\024.greptime.v1.TableId\"U\n\020DropD" + "atabaseExpr\022\024\n\014catalog_name\030\001 \001(\t\022\023\n\013sch" + "ema_name\030\002 \001(\t\022\026\n\016drop_if_exists\030\003 \001(\010\"9" + "\n\nAddColumns\022+\n\013add_columns\030\001 \003(\0132\026.grep" + "time.v1.AddColumn\"<\n\013DropColumns\022-\n\014drop" + "_columns\030\001 \003(\0132\027.greptime.v1.DropColumn\"" + "%\n\013RenameTable\022\026\n\016new_table_name\030\001 \001(\t\"i" + "\n\tAddColumn\022*\n\ncolumn_def\030\001 \001(\0132\026.grepti" + "me.v1.ColumnDef\0220\n\010location\030\003 \001(\0132\036.grep" + "time.v1.AddColumnLocation\"\032\n\nDropColumn\022" + "\014\n\004name\030\001 \001(\t\"\025\n\007TableId\022\n\n\002id\030\001 \001(\r\"\377\001\n" + "\tColumnDef\022\014\n\004name\030\001 \001(\t\022.\n\tdata_type\030\002 " + "\001(\0162\033.greptime.v1.ColumnDataType\022\023\n\013is_n" + "ullable\030\003 \001(\010\022\032\n\022default_constraint\030\004 \001(" + "\014\0220\n\rsemantic_type\030\005 \001(\0162\031.greptime.v1.S" + "emanticType\022\017\n\007comment\030\006 \001(\t\022@\n\022datatype" + "_extension\030\007 \001(\0132$.greptime.v1.ColumnDat" + "aTypeExtension\"\230\001\n\021AddColumnLocation\022B\n\r" + "location_type\030\001 \001(\0162+.greptime.v1.AddCol" + "umnLocation.LocationType\022\031\n\021after_column" + "_name\030\002 \001(\t\"$\n\014LocationType\022\t\n\005FIRST\020\000\022\t" + "\n\005AFTER\020\001BL\n\016io.greptime.v1B\003DdlZ5github" + ".com/GreptimeTeam/greptime-proto/go/grep" + "time/v1b\006proto3" ; static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2fddl_2eproto_deps[1] = { &::descriptor_table_greptime_2fv1_2fcommon_2eproto, }; static ::_pbi::once_flag descriptor_table_greptime_2fv1_2fddl_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2fddl_2eproto = { - false, false, 2248, descriptor_table_protodef_greptime_2fv1_2fddl_2eproto, + false, false, 2335, descriptor_table_protodef_greptime_2fv1_2fddl_2eproto, "greptime/v1/ddl.proto", - &descriptor_table_greptime_2fv1_2fddl_2eproto_once, descriptor_table_greptime_2fv1_2fddl_2eproto_deps, 1, 16, + &descriptor_table_greptime_2fv1_2fddl_2eproto_once, descriptor_table_greptime_2fv1_2fddl_2eproto_deps, 1, 17, schemas, file_default_instances, TableStruct_greptime_2fv1_2fddl_2eproto::offsets, file_level_metadata_greptime_2fv1_2fddl_2eproto, file_level_enum_descriptors_greptime_2fv1_2fddl_2eproto, file_level_service_descriptors_greptime_2fv1_2fddl_2eproto, @@ -3271,6 +3299,286 @@ ::PROTOBUF_NAMESPACE_ID::Metadata TruncateTableExpr::GetMetadata() const { // =================================================================== +class DropDatabaseExpr::_Internal { + public: +}; + +DropDatabaseExpr::DropDatabaseExpr(::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.DropDatabaseExpr) +} +DropDatabaseExpr::DropDatabaseExpr(const DropDatabaseExpr& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + DropDatabaseExpr* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.catalog_name_){} + , decltype(_impl_.schema_name_){} + , decltype(_impl_.drop_if_exists_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.catalog_name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.catalog_name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_catalog_name().empty()) { + _this->_impl_.catalog_name_.Set(from._internal_catalog_name(), + _this->GetArenaForAllocation()); + } + _impl_.schema_name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.schema_name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_schema_name().empty()) { + _this->_impl_.schema_name_.Set(from._internal_schema_name(), + _this->GetArenaForAllocation()); + } + _this->_impl_.drop_if_exists_ = from._impl_.drop_if_exists_; + // @@protoc_insertion_point(copy_constructor:greptime.v1.DropDatabaseExpr) +} + +inline void DropDatabaseExpr::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.catalog_name_){} + , decltype(_impl_.schema_name_){} + , decltype(_impl_.drop_if_exists_){false} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.catalog_name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.catalog_name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.schema_name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.schema_name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +DropDatabaseExpr::~DropDatabaseExpr() { + // @@protoc_insertion_point(destructor:greptime.v1.DropDatabaseExpr) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void DropDatabaseExpr::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.catalog_name_.Destroy(); + _impl_.schema_name_.Destroy(); +} + +void DropDatabaseExpr::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void DropDatabaseExpr::Clear() { +// @@protoc_insertion_point(message_clear_start:greptime.v1.DropDatabaseExpr) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.catalog_name_.ClearToEmpty(); + _impl_.schema_name_.ClearToEmpty(); + _impl_.drop_if_exists_ = false; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* DropDatabaseExpr::_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 catalog_name = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_catalog_name(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "greptime.v1.DropDatabaseExpr.catalog_name")); + } else + goto handle_unusual; + continue; + // string schema_name = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_schema_name(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "greptime.v1.DropDatabaseExpr.schema_name")); + } else + goto handle_unusual; + continue; + // bool drop_if_exists = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + _impl_.drop_if_exists_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&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* DropDatabaseExpr::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.DropDatabaseExpr) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // string catalog_name = 1; + if (!this->_internal_catalog_name().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_catalog_name().data(), static_cast(this->_internal_catalog_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "greptime.v1.DropDatabaseExpr.catalog_name"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_catalog_name(), target); + } + + // string schema_name = 2; + if (!this->_internal_schema_name().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_schema_name().data(), static_cast(this->_internal_schema_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "greptime.v1.DropDatabaseExpr.schema_name"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_schema_name(), target); + } + + // bool drop_if_exists = 3; + if (this->_internal_drop_if_exists() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(3, this->_internal_drop_if_exists(), 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.DropDatabaseExpr) + return target; +} + +size_t DropDatabaseExpr::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:greptime.v1.DropDatabaseExpr) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string catalog_name = 1; + if (!this->_internal_catalog_name().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_catalog_name()); + } + + // string schema_name = 2; + if (!this->_internal_schema_name().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_schema_name()); + } + + // bool drop_if_exists = 3; + if (this->_internal_drop_if_exists() != 0) { + total_size += 1 + 1; + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData DropDatabaseExpr::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + DropDatabaseExpr::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*DropDatabaseExpr::GetClassData() const { return &_class_data_; } + + +void DropDatabaseExpr::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.DropDatabaseExpr) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_catalog_name().empty()) { + _this->_internal_set_catalog_name(from._internal_catalog_name()); + } + if (!from._internal_schema_name().empty()) { + _this->_internal_set_schema_name(from._internal_schema_name()); + } + if (from._internal_drop_if_exists() != 0) { + _this->_internal_set_drop_if_exists(from._internal_drop_if_exists()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void DropDatabaseExpr::CopyFrom(const DropDatabaseExpr& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.DropDatabaseExpr) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool DropDatabaseExpr::IsInitialized() const { + return true; +} + +void DropDatabaseExpr::InternalSwap(DropDatabaseExpr* 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_.catalog_name_, lhs_arena, + &other->_impl_.catalog_name_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.schema_name_, lhs_arena, + &other->_impl_.schema_name_, rhs_arena + ); + swap(_impl_.drop_if_exists_, other->_impl_.drop_if_exists_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata DropDatabaseExpr::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_greptime_2fv1_2fddl_2eproto_getter, &descriptor_table_greptime_2fv1_2fddl_2eproto_once, + file_level_metadata_greptime_2fv1_2fddl_2eproto[8]); +} + +// =================================================================== + class AddColumns::_Internal { public: }; @@ -3451,7 +3759,7 @@ void AddColumns::InternalSwap(AddColumns* other) { ::PROTOBUF_NAMESPACE_ID::Metadata AddColumns::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2fddl_2eproto_getter, &descriptor_table_greptime_2fv1_2fddl_2eproto_once, - file_level_metadata_greptime_2fv1_2fddl_2eproto[8]); + file_level_metadata_greptime_2fv1_2fddl_2eproto[9]); } // =================================================================== @@ -3636,7 +3944,7 @@ void DropColumns::InternalSwap(DropColumns* other) { ::PROTOBUF_NAMESPACE_ID::Metadata DropColumns::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2fddl_2eproto_getter, &descriptor_table_greptime_2fv1_2fddl_2eproto_once, - file_level_metadata_greptime_2fv1_2fddl_2eproto[9]); + file_level_metadata_greptime_2fv1_2fddl_2eproto[10]); } // =================================================================== @@ -3839,7 +4147,7 @@ void RenameTable::InternalSwap(RenameTable* other) { ::PROTOBUF_NAMESPACE_ID::Metadata RenameTable::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2fddl_2eproto_getter, &descriptor_table_greptime_2fv1_2fddl_2eproto_once, - file_level_metadata_greptime_2fv1_2fddl_2eproto[10]); + file_level_metadata_greptime_2fv1_2fddl_2eproto[11]); } // =================================================================== @@ -4078,7 +4386,7 @@ void AddColumn::InternalSwap(AddColumn* other) { ::PROTOBUF_NAMESPACE_ID::Metadata AddColumn::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2fddl_2eproto_getter, &descriptor_table_greptime_2fv1_2fddl_2eproto_once, - file_level_metadata_greptime_2fv1_2fddl_2eproto[11]); + file_level_metadata_greptime_2fv1_2fddl_2eproto[12]); } // =================================================================== @@ -4281,7 +4589,7 @@ void DropColumn::InternalSwap(DropColumn* other) { ::PROTOBUF_NAMESPACE_ID::Metadata DropColumn::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2fddl_2eproto_getter, &descriptor_table_greptime_2fv1_2fddl_2eproto_once, - file_level_metadata_greptime_2fv1_2fddl_2eproto[12]); + file_level_metadata_greptime_2fv1_2fddl_2eproto[13]); } // =================================================================== @@ -4459,7 +4767,7 @@ void TableId::InternalSwap(TableId* other) { ::PROTOBUF_NAMESPACE_ID::Metadata TableId::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2fddl_2eproto_getter, &descriptor_table_greptime_2fv1_2fddl_2eproto_once, - file_level_metadata_greptime_2fv1_2fddl_2eproto[13]); + file_level_metadata_greptime_2fv1_2fddl_2eproto[14]); } // =================================================================== @@ -4894,7 +5202,7 @@ void ColumnDef::InternalSwap(ColumnDef* other) { ::PROTOBUF_NAMESPACE_ID::Metadata ColumnDef::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2fddl_2eproto_getter, &descriptor_table_greptime_2fv1_2fddl_2eproto_once, - file_level_metadata_greptime_2fv1_2fddl_2eproto[14]); + file_level_metadata_greptime_2fv1_2fddl_2eproto[15]); } // =================================================================== @@ -5127,7 +5435,7 @@ void AddColumnLocation::InternalSwap(AddColumnLocation* other) { ::PROTOBUF_NAMESPACE_ID::Metadata AddColumnLocation::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2fddl_2eproto_getter, &descriptor_table_greptime_2fv1_2fddl_2eproto_once, - file_level_metadata_greptime_2fv1_2fddl_2eproto[15]); + file_level_metadata_greptime_2fv1_2fddl_2eproto[16]); } // @@protoc_insertion_point(namespace_scope) @@ -5166,6 +5474,10 @@ template<> PROTOBUF_NOINLINE ::greptime::v1::TruncateTableExpr* Arena::CreateMaybeMessage< ::greptime::v1::TruncateTableExpr >(Arena* arena) { return Arena::CreateMessageInternal< ::greptime::v1::TruncateTableExpr >(arena); } +template<> PROTOBUF_NOINLINE ::greptime::v1::DropDatabaseExpr* +Arena::CreateMaybeMessage< ::greptime::v1::DropDatabaseExpr >(Arena* arena) { + return Arena::CreateMessageInternal< ::greptime::v1::DropDatabaseExpr >(arena); +} template<> PROTOBUF_NOINLINE ::greptime::v1::AddColumns* Arena::CreateMaybeMessage< ::greptime::v1::AddColumns >(Arena* arena) { return Arena::CreateMessageInternal< ::greptime::v1::AddColumns >(arena); diff --git a/c++/greptime/v1/ddl.pb.h b/c++/greptime/v1/ddl.pb.h index e9b6c3d7..e4ae5aad 100644 --- a/c++/greptime/v1/ddl.pb.h +++ b/c++/greptime/v1/ddl.pb.h @@ -87,6 +87,9 @@ extern DropColumnDefaultTypeInternal _DropColumn_default_instance_; class DropColumns; struct DropColumnsDefaultTypeInternal; extern DropColumnsDefaultTypeInternal _DropColumns_default_instance_; +class DropDatabaseExpr; +struct DropDatabaseExprDefaultTypeInternal; +extern DropDatabaseExprDefaultTypeInternal _DropDatabaseExpr_default_instance_; class DropTableExpr; struct DropTableExprDefaultTypeInternal; extern DropTableExprDefaultTypeInternal _DropTableExpr_default_instance_; @@ -114,6 +117,7 @@ template<> ::greptime::v1::CreateTableExpr_TableOptionsEntry_DoNotUse* Arena::Cr template<> ::greptime::v1::DdlRequest* Arena::CreateMaybeMessage<::greptime::v1::DdlRequest>(Arena*); template<> ::greptime::v1::DropColumn* Arena::CreateMaybeMessage<::greptime::v1::DropColumn>(Arena*); template<> ::greptime::v1::DropColumns* Arena::CreateMaybeMessage<::greptime::v1::DropColumns>(Arena*); +template<> ::greptime::v1::DropDatabaseExpr* Arena::CreateMaybeMessage<::greptime::v1::DropDatabaseExpr>(Arena*); template<> ::greptime::v1::DropTableExpr* Arena::CreateMaybeMessage<::greptime::v1::DropTableExpr>(Arena*); template<> ::greptime::v1::RenameTable* Arena::CreateMaybeMessage<::greptime::v1::RenameTable>(Arena*); template<> ::greptime::v1::TableId* Arena::CreateMaybeMessage<::greptime::v1::TableId>(Arena*); @@ -1680,6 +1684,186 @@ class TruncateTableExpr final : }; // ------------------------------------------------------------------- +class DropDatabaseExpr final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.DropDatabaseExpr) */ { + public: + inline DropDatabaseExpr() : DropDatabaseExpr(nullptr) {} + ~DropDatabaseExpr() override; + explicit PROTOBUF_CONSTEXPR DropDatabaseExpr(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + DropDatabaseExpr(const DropDatabaseExpr& from); + DropDatabaseExpr(DropDatabaseExpr&& from) noexcept + : DropDatabaseExpr() { + *this = ::std::move(from); + } + + inline DropDatabaseExpr& operator=(const DropDatabaseExpr& from) { + CopyFrom(from); + return *this; + } + inline DropDatabaseExpr& operator=(DropDatabaseExpr&& 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 DropDatabaseExpr& default_instance() { + return *internal_default_instance(); + } + static inline const DropDatabaseExpr* internal_default_instance() { + return reinterpret_cast( + &_DropDatabaseExpr_default_instance_); + } + static constexpr int kIndexInFileMessages = + 8; + + friend void swap(DropDatabaseExpr& a, DropDatabaseExpr& b) { + a.Swap(&b); + } + inline void Swap(DropDatabaseExpr* 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(DropDatabaseExpr* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + DropDatabaseExpr* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const DropDatabaseExpr& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const DropDatabaseExpr& from) { + DropDatabaseExpr::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(DropDatabaseExpr* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "greptime.v1.DropDatabaseExpr"; + } + protected: + explicit DropDatabaseExpr(::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 { + kCatalogNameFieldNumber = 1, + kSchemaNameFieldNumber = 2, + kDropIfExistsFieldNumber = 3, + }; + // string catalog_name = 1; + void clear_catalog_name(); + const std::string& catalog_name() const; + template + void set_catalog_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_catalog_name(); + PROTOBUF_NODISCARD std::string* release_catalog_name(); + void set_allocated_catalog_name(std::string* catalog_name); + private: + const std::string& _internal_catalog_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_catalog_name(const std::string& value); + std::string* _internal_mutable_catalog_name(); + public: + + // string schema_name = 2; + void clear_schema_name(); + const std::string& schema_name() const; + template + void set_schema_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_schema_name(); + PROTOBUF_NODISCARD std::string* release_schema_name(); + void set_allocated_schema_name(std::string* schema_name); + private: + const std::string& _internal_schema_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_schema_name(const std::string& value); + std::string* _internal_mutable_schema_name(); + public: + + // bool drop_if_exists = 3; + void clear_drop_if_exists(); + bool drop_if_exists() const; + void set_drop_if_exists(bool value); + private: + bool _internal_drop_if_exists() const; + void _internal_set_drop_if_exists(bool value); + public: + + // @@protoc_insertion_point(class_scope:greptime.v1.DropDatabaseExpr) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr catalog_name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr schema_name_; + bool drop_if_exists_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_greptime_2fv1_2fddl_2eproto; +}; +// ------------------------------------------------------------------- + class AddColumns final : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.AddColumns) */ { public: @@ -1728,7 +1912,7 @@ class AddColumns final : &_AddColumns_default_instance_); } static constexpr int kIndexInFileMessages = - 8; + 9; friend void swap(AddColumns& a, AddColumns& b) { a.Swap(&b); @@ -1885,7 +2069,7 @@ class DropColumns final : &_DropColumns_default_instance_); } static constexpr int kIndexInFileMessages = - 9; + 10; friend void swap(DropColumns& a, DropColumns& b) { a.Swap(&b); @@ -2042,7 +2226,7 @@ class RenameTable final : &_RenameTable_default_instance_); } static constexpr int kIndexInFileMessages = - 10; + 11; friend void swap(RenameTable& a, RenameTable& b) { a.Swap(&b); @@ -2195,7 +2379,7 @@ class AddColumn final : &_AddColumn_default_instance_); } static constexpr int kIndexInFileMessages = - 11; + 12; friend void swap(AddColumn& a, AddColumn& b) { a.Swap(&b); @@ -2372,7 +2556,7 @@ class DropColumn final : &_DropColumn_default_instance_); } static constexpr int kIndexInFileMessages = - 12; + 13; friend void swap(DropColumn& a, DropColumn& b) { a.Swap(&b); @@ -2525,7 +2709,7 @@ class TableId final : &_TableId_default_instance_); } static constexpr int kIndexInFileMessages = - 13; + 14; friend void swap(TableId& a, TableId& b) { a.Swap(&b); @@ -2673,7 +2857,7 @@ class ColumnDef final : &_ColumnDef_default_instance_); } static constexpr int kIndexInFileMessages = - 14; + 15; friend void swap(ColumnDef& a, ColumnDef& b) { a.Swap(&b); @@ -2911,7 +3095,7 @@ class AddColumnLocation final : &_AddColumnLocation_default_instance_); } static constexpr int kIndexInFileMessages = - 15; + 16; friend void swap(AddColumnLocation& a, AddColumnLocation& b) { a.Swap(&b); @@ -5005,6 +5189,130 @@ inline void TruncateTableExpr::set_allocated_table_id(::greptime::v1::TableId* t // ------------------------------------------------------------------- +// DropDatabaseExpr + +// string catalog_name = 1; +inline void DropDatabaseExpr::clear_catalog_name() { + _impl_.catalog_name_.ClearToEmpty(); +} +inline const std::string& DropDatabaseExpr::catalog_name() const { + // @@protoc_insertion_point(field_get:greptime.v1.DropDatabaseExpr.catalog_name) + return _internal_catalog_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void DropDatabaseExpr::set_catalog_name(ArgT0&& arg0, ArgT... args) { + + _impl_.catalog_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:greptime.v1.DropDatabaseExpr.catalog_name) +} +inline std::string* DropDatabaseExpr::mutable_catalog_name() { + std::string* _s = _internal_mutable_catalog_name(); + // @@protoc_insertion_point(field_mutable:greptime.v1.DropDatabaseExpr.catalog_name) + return _s; +} +inline const std::string& DropDatabaseExpr::_internal_catalog_name() const { + return _impl_.catalog_name_.Get(); +} +inline void DropDatabaseExpr::_internal_set_catalog_name(const std::string& value) { + + _impl_.catalog_name_.Set(value, GetArenaForAllocation()); +} +inline std::string* DropDatabaseExpr::_internal_mutable_catalog_name() { + + return _impl_.catalog_name_.Mutable(GetArenaForAllocation()); +} +inline std::string* DropDatabaseExpr::release_catalog_name() { + // @@protoc_insertion_point(field_release:greptime.v1.DropDatabaseExpr.catalog_name) + return _impl_.catalog_name_.Release(); +} +inline void DropDatabaseExpr::set_allocated_catalog_name(std::string* catalog_name) { + if (catalog_name != nullptr) { + + } else { + + } + _impl_.catalog_name_.SetAllocated(catalog_name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.catalog_name_.IsDefault()) { + _impl_.catalog_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:greptime.v1.DropDatabaseExpr.catalog_name) +} + +// string schema_name = 2; +inline void DropDatabaseExpr::clear_schema_name() { + _impl_.schema_name_.ClearToEmpty(); +} +inline const std::string& DropDatabaseExpr::schema_name() const { + // @@protoc_insertion_point(field_get:greptime.v1.DropDatabaseExpr.schema_name) + return _internal_schema_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void DropDatabaseExpr::set_schema_name(ArgT0&& arg0, ArgT... args) { + + _impl_.schema_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:greptime.v1.DropDatabaseExpr.schema_name) +} +inline std::string* DropDatabaseExpr::mutable_schema_name() { + std::string* _s = _internal_mutable_schema_name(); + // @@protoc_insertion_point(field_mutable:greptime.v1.DropDatabaseExpr.schema_name) + return _s; +} +inline const std::string& DropDatabaseExpr::_internal_schema_name() const { + return _impl_.schema_name_.Get(); +} +inline void DropDatabaseExpr::_internal_set_schema_name(const std::string& value) { + + _impl_.schema_name_.Set(value, GetArenaForAllocation()); +} +inline std::string* DropDatabaseExpr::_internal_mutable_schema_name() { + + return _impl_.schema_name_.Mutable(GetArenaForAllocation()); +} +inline std::string* DropDatabaseExpr::release_schema_name() { + // @@protoc_insertion_point(field_release:greptime.v1.DropDatabaseExpr.schema_name) + return _impl_.schema_name_.Release(); +} +inline void DropDatabaseExpr::set_allocated_schema_name(std::string* schema_name) { + if (schema_name != nullptr) { + + } else { + + } + _impl_.schema_name_.SetAllocated(schema_name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.schema_name_.IsDefault()) { + _impl_.schema_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:greptime.v1.DropDatabaseExpr.schema_name) +} + +// bool drop_if_exists = 3; +inline void DropDatabaseExpr::clear_drop_if_exists() { + _impl_.drop_if_exists_ = false; +} +inline bool DropDatabaseExpr::_internal_drop_if_exists() const { + return _impl_.drop_if_exists_; +} +inline bool DropDatabaseExpr::drop_if_exists() const { + // @@protoc_insertion_point(field_get:greptime.v1.DropDatabaseExpr.drop_if_exists) + return _internal_drop_if_exists(); +} +inline void DropDatabaseExpr::_internal_set_drop_if_exists(bool value) { + + _impl_.drop_if_exists_ = value; +} +inline void DropDatabaseExpr::set_drop_if_exists(bool value) { + _internal_set_drop_if_exists(value); + // @@protoc_insertion_point(field_set:greptime.v1.DropDatabaseExpr.drop_if_exists) +} + +// ------------------------------------------------------------------- + // AddColumns // repeated .greptime.v1.AddColumn add_columns = 1; @@ -5813,6 +6121,8 @@ inline void AddColumnLocation::set_allocated_after_column_name(std::string* afte // ------------------------------------------------------------------- +// ------------------------------------------------------------------- + // @@protoc_insertion_point(namespace_scope) diff --git a/go/greptime/v1/ddl.pb.go b/go/greptime/v1/ddl.pb.go index 9e04e9b3..47f39a1a 100644 --- a/go/greptime/v1/ddl.pb.go +++ b/go/greptime/v1/ddl.pb.go @@ -77,7 +77,7 @@ func (x AddColumnLocation_LocationType) Number() protoreflect.EnumNumber { // Deprecated: Use AddColumnLocation_LocationType.Descriptor instead. func (AddColumnLocation_LocationType) EnumDescriptor() ([]byte, []int) { - return file_greptime_v1_ddl_proto_rawDescGZIP(), []int{13, 0} + return file_greptime_v1_ddl_proto_rawDescGZIP(), []int{14, 0} } // "Data Definition Language" requests, that create, modify or delete the @@ -666,6 +666,69 @@ func (x *TruncateTableExpr) GetTableId() *TableId { return nil } +type DropDatabaseExpr struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CatalogName string `protobuf:"bytes,1,opt,name=catalog_name,json=catalogName,proto3" json:"catalog_name,omitempty"` + SchemaName string `protobuf:"bytes,2,opt,name=schema_name,json=schemaName,proto3" json:"schema_name,omitempty"` + DropIfExists bool `protobuf:"varint,3,opt,name=drop_if_exists,json=dropIfExists,proto3" json:"drop_if_exists,omitempty"` +} + +func (x *DropDatabaseExpr) Reset() { + *x = DropDatabaseExpr{} + if protoimpl.UnsafeEnabled { + mi := &file_greptime_v1_ddl_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DropDatabaseExpr) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DropDatabaseExpr) ProtoMessage() {} + +func (x *DropDatabaseExpr) ProtoReflect() protoreflect.Message { + mi := &file_greptime_v1_ddl_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DropDatabaseExpr.ProtoReflect.Descriptor instead. +func (*DropDatabaseExpr) Descriptor() ([]byte, []int) { + return file_greptime_v1_ddl_proto_rawDescGZIP(), []int{6} +} + +func (x *DropDatabaseExpr) GetCatalogName() string { + if x != nil { + return x.CatalogName + } + return "" +} + +func (x *DropDatabaseExpr) GetSchemaName() string { + if x != nil { + return x.SchemaName + } + return "" +} + +func (x *DropDatabaseExpr) GetDropIfExists() bool { + if x != nil { + return x.DropIfExists + } + return false +} + type AddColumns struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -677,7 +740,7 @@ type AddColumns struct { func (x *AddColumns) Reset() { *x = AddColumns{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_ddl_proto_msgTypes[6] + mi := &file_greptime_v1_ddl_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -690,7 +753,7 @@ func (x *AddColumns) String() string { func (*AddColumns) ProtoMessage() {} func (x *AddColumns) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_ddl_proto_msgTypes[6] + mi := &file_greptime_v1_ddl_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -703,7 +766,7 @@ func (x *AddColumns) ProtoReflect() protoreflect.Message { // Deprecated: Use AddColumns.ProtoReflect.Descriptor instead. func (*AddColumns) Descriptor() ([]byte, []int) { - return file_greptime_v1_ddl_proto_rawDescGZIP(), []int{6} + return file_greptime_v1_ddl_proto_rawDescGZIP(), []int{7} } func (x *AddColumns) GetAddColumns() []*AddColumn { @@ -724,7 +787,7 @@ type DropColumns struct { func (x *DropColumns) Reset() { *x = DropColumns{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_ddl_proto_msgTypes[7] + mi := &file_greptime_v1_ddl_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -737,7 +800,7 @@ func (x *DropColumns) String() string { func (*DropColumns) ProtoMessage() {} func (x *DropColumns) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_ddl_proto_msgTypes[7] + mi := &file_greptime_v1_ddl_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -750,7 +813,7 @@ func (x *DropColumns) ProtoReflect() protoreflect.Message { // Deprecated: Use DropColumns.ProtoReflect.Descriptor instead. func (*DropColumns) Descriptor() ([]byte, []int) { - return file_greptime_v1_ddl_proto_rawDescGZIP(), []int{7} + return file_greptime_v1_ddl_proto_rawDescGZIP(), []int{8} } func (x *DropColumns) GetDropColumns() []*DropColumn { @@ -771,7 +834,7 @@ type RenameTable struct { func (x *RenameTable) Reset() { *x = RenameTable{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_ddl_proto_msgTypes[8] + mi := &file_greptime_v1_ddl_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -784,7 +847,7 @@ func (x *RenameTable) String() string { func (*RenameTable) ProtoMessage() {} func (x *RenameTable) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_ddl_proto_msgTypes[8] + mi := &file_greptime_v1_ddl_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -797,7 +860,7 @@ func (x *RenameTable) ProtoReflect() protoreflect.Message { // Deprecated: Use RenameTable.ProtoReflect.Descriptor instead. func (*RenameTable) Descriptor() ([]byte, []int) { - return file_greptime_v1_ddl_proto_rawDescGZIP(), []int{8} + return file_greptime_v1_ddl_proto_rawDescGZIP(), []int{9} } func (x *RenameTable) GetNewTableName() string { @@ -819,7 +882,7 @@ type AddColumn struct { func (x *AddColumn) Reset() { *x = AddColumn{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_ddl_proto_msgTypes[9] + mi := &file_greptime_v1_ddl_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -832,7 +895,7 @@ func (x *AddColumn) String() string { func (*AddColumn) ProtoMessage() {} func (x *AddColumn) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_ddl_proto_msgTypes[9] + mi := &file_greptime_v1_ddl_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -845,7 +908,7 @@ func (x *AddColumn) ProtoReflect() protoreflect.Message { // Deprecated: Use AddColumn.ProtoReflect.Descriptor instead. func (*AddColumn) Descriptor() ([]byte, []int) { - return file_greptime_v1_ddl_proto_rawDescGZIP(), []int{9} + return file_greptime_v1_ddl_proto_rawDescGZIP(), []int{10} } func (x *AddColumn) GetColumnDef() *ColumnDef { @@ -873,7 +936,7 @@ type DropColumn struct { func (x *DropColumn) Reset() { *x = DropColumn{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_ddl_proto_msgTypes[10] + mi := &file_greptime_v1_ddl_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -886,7 +949,7 @@ func (x *DropColumn) String() string { func (*DropColumn) ProtoMessage() {} func (x *DropColumn) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_ddl_proto_msgTypes[10] + mi := &file_greptime_v1_ddl_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -899,7 +962,7 @@ func (x *DropColumn) ProtoReflect() protoreflect.Message { // Deprecated: Use DropColumn.ProtoReflect.Descriptor instead. func (*DropColumn) Descriptor() ([]byte, []int) { - return file_greptime_v1_ddl_proto_rawDescGZIP(), []int{10} + return file_greptime_v1_ddl_proto_rawDescGZIP(), []int{11} } func (x *DropColumn) GetName() string { @@ -920,7 +983,7 @@ type TableId struct { func (x *TableId) Reset() { *x = TableId{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_ddl_proto_msgTypes[11] + mi := &file_greptime_v1_ddl_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -933,7 +996,7 @@ func (x *TableId) String() string { func (*TableId) ProtoMessage() {} func (x *TableId) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_ddl_proto_msgTypes[11] + mi := &file_greptime_v1_ddl_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -946,7 +1009,7 @@ func (x *TableId) ProtoReflect() protoreflect.Message { // Deprecated: Use TableId.ProtoReflect.Descriptor instead. func (*TableId) Descriptor() ([]byte, []int) { - return file_greptime_v1_ddl_proto_rawDescGZIP(), []int{11} + return file_greptime_v1_ddl_proto_rawDescGZIP(), []int{12} } func (x *TableId) GetId() uint32 { @@ -974,7 +1037,7 @@ type ColumnDef struct { func (x *ColumnDef) Reset() { *x = ColumnDef{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_ddl_proto_msgTypes[12] + mi := &file_greptime_v1_ddl_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -987,7 +1050,7 @@ func (x *ColumnDef) String() string { func (*ColumnDef) ProtoMessage() {} func (x *ColumnDef) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_ddl_proto_msgTypes[12] + mi := &file_greptime_v1_ddl_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1000,7 +1063,7 @@ func (x *ColumnDef) ProtoReflect() protoreflect.Message { // Deprecated: Use ColumnDef.ProtoReflect.Descriptor instead. func (*ColumnDef) Descriptor() ([]byte, []int) { - return file_greptime_v1_ddl_proto_rawDescGZIP(), []int{12} + return file_greptime_v1_ddl_proto_rawDescGZIP(), []int{13} } func (x *ColumnDef) GetName() string { @@ -1064,7 +1127,7 @@ type AddColumnLocation struct { func (x *AddColumnLocation) Reset() { *x = AddColumnLocation{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_ddl_proto_msgTypes[13] + mi := &file_greptime_v1_ddl_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1077,7 +1140,7 @@ func (x *AddColumnLocation) String() string { func (*AddColumnLocation) ProtoMessage() {} func (x *AddColumnLocation) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_ddl_proto_msgTypes[13] + mi := &file_greptime_v1_ddl_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1090,7 +1153,7 @@ func (x *AddColumnLocation) ProtoReflect() protoreflect.Message { // Deprecated: Use AddColumnLocation.ProtoReflect.Descriptor instead. func (*AddColumnLocation) Descriptor() ([]byte, []int) { - return file_greptime_v1_ddl_proto_rawDescGZIP(), []int{13} + return file_greptime_v1_ddl_proto_rawDescGZIP(), []int{14} } func (x *AddColumnLocation) GetLocationType() AddColumnLocation_LocationType { @@ -1226,70 +1289,78 @@ var file_greptime_v1_ddl_proto_rawDesc = []byte{ 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x08, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x49, - 0x64, 0x52, 0x07, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x64, 0x22, 0x45, 0x0a, 0x0a, 0x41, 0x64, - 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x37, 0x0a, 0x0b, 0x61, 0x64, 0x64, 0x5f, - 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, - 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x43, - 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x52, 0x0a, 0x61, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, - 0x73, 0x22, 0x49, 0x0a, 0x0b, 0x44, 0x72, 0x6f, 0x70, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, - 0x12, 0x3a, 0x0a, 0x0c, 0x64, 0x72, 0x6f, 0x70, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x72, 0x6f, 0x70, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x52, - 0x0b, 0x64, 0x72, 0x6f, 0x70, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x22, 0x33, 0x0a, 0x0b, - 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x6e, - 0x65, 0x77, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6e, 0x65, 0x77, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, - 0x65, 0x22, 0x7e, 0x0a, 0x09, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x35, - 0x0a, 0x0a, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x64, 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x44, 0x65, 0x66, 0x52, 0x09, 0x63, 0x6f, 0x6c, 0x75, - 0x6d, 0x6e, 0x44, 0x65, 0x66, 0x12, 0x3a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, - 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4c, - 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x22, 0x20, 0x0a, 0x0a, 0x44, 0x72, 0x6f, 0x70, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x22, 0x19, 0x0a, 0x07, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x22, 0xd8, - 0x02, 0x0a, 0x09, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x44, 0x65, 0x66, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x38, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, - 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, - 0x5f, 0x6e, 0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0a, 0x69, 0x73, 0x4e, 0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x64, - 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, - 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x11, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, - 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x12, 0x3e, 0x0a, 0x0d, 0x73, 0x65, - 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x73, 0x65, - 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, - 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x53, 0x0a, 0x12, 0x64, 0x61, 0x74, 0x61, 0x74, 0x79, 0x70, 0x65, - 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x24, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, - 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x45, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x64, 0x61, 0x74, 0x61, 0x74, 0x79, 0x70, 0x65, - 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xb7, 0x01, 0x0a, 0x11, 0x41, 0x64, - 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x50, 0x0a, 0x0d, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4c, 0x6f, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, - 0x79, 0x70, 0x65, 0x52, 0x0c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x61, 0x66, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, - 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x61, 0x66, - 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x24, 0x0a, - 0x0c, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x09, 0x0a, - 0x05, 0x46, 0x49, 0x52, 0x53, 0x54, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x46, 0x54, 0x45, - 0x52, 0x10, 0x01, 0x42, 0x4c, 0x0a, 0x0e, 0x69, 0x6f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, - 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x03, 0x44, 0x64, 0x6c, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x54, - 0x65, 0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2d, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x64, 0x52, 0x07, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x64, 0x22, 0x7c, 0x0a, 0x10, 0x44, 0x72, + 0x6f, 0x70, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x45, 0x78, 0x70, 0x72, 0x12, 0x21, + 0x0a, 0x0c, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x64, 0x72, 0x6f, 0x70, 0x5f, 0x69, 0x66, 0x5f, 0x65, 0x78, + 0x69, 0x73, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x64, 0x72, 0x6f, 0x70, + 0x49, 0x66, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x22, 0x45, 0x0a, 0x0a, 0x41, 0x64, 0x64, 0x43, + 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x37, 0x0a, 0x0b, 0x61, 0x64, 0x64, 0x5f, 0x63, 0x6f, + 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x72, + 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, + 0x75, 0x6d, 0x6e, 0x52, 0x0a, 0x61, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x22, + 0x49, 0x0a, 0x0b, 0x44, 0x72, 0x6f, 0x70, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x3a, + 0x0a, 0x0c, 0x64, 0x72, 0x6f, 0x70, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x44, 0x72, 0x6f, 0x70, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x52, 0x0b, 0x64, + 0x72, 0x6f, 0x70, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x22, 0x33, 0x0a, 0x0b, 0x52, 0x65, + 0x6e, 0x61, 0x6d, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x6e, 0x65, 0x77, + 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x6e, 0x65, 0x77, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, + 0x7e, 0x0a, 0x09, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x35, 0x0a, 0x0a, + 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x64, 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x16, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, + 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x44, 0x65, 0x66, 0x52, 0x09, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, + 0x44, 0x65, 0x66, 0x12, 0x3a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, + 0x20, 0x0a, 0x0a, 0x44, 0x72, 0x6f, 0x70, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x22, 0x19, 0x0a, 0x07, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x22, 0xd8, 0x02, 0x0a, + 0x09, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x44, 0x65, 0x66, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x38, + 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, + 0x64, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x6e, + 0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, + 0x73, 0x4e, 0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x64, 0x65, 0x66, + 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x11, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x6f, + 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x12, 0x3e, 0x0a, 0x0d, 0x73, 0x65, 0x6d, 0x61, + 0x6e, 0x74, 0x69, 0x63, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x19, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, + 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x73, 0x65, 0x6d, 0x61, + 0x6e, 0x74, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, + 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, + 0x6e, 0x74, 0x12, 0x53, 0x0a, 0x12, 0x64, 0x61, 0x74, 0x61, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, + 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6c, + 0x75, 0x6d, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x64, 0x61, 0x74, 0x61, 0x74, 0x79, 0x70, 0x65, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xb7, 0x01, 0x0a, 0x11, 0x41, 0x64, 0x64, 0x43, + 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x50, 0x0a, + 0x0d, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, + 0x65, 0x52, 0x0c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x2a, 0x0a, 0x11, 0x61, 0x66, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x61, 0x66, 0x74, 0x65, + 0x72, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x24, 0x0a, 0x0c, 0x4c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x46, + 0x49, 0x52, 0x53, 0x54, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x46, 0x54, 0x45, 0x52, 0x10, + 0x01, 0x42, 0x4c, 0x0a, 0x0e, 0x69, 0x6f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, + 0x2e, 0x76, 0x31, 0x42, 0x03, 0x44, 0x64, 0x6c, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x65, 0x61, + 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1305,7 +1376,7 @@ func file_greptime_v1_ddl_proto_rawDescGZIP() []byte { } var file_greptime_v1_ddl_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_greptime_v1_ddl_proto_msgTypes = make([]protoimpl.MessageInfo, 16) +var file_greptime_v1_ddl_proto_msgTypes = make([]protoimpl.MessageInfo, 17) var file_greptime_v1_ddl_proto_goTypes = []interface{}{ (AddColumnLocation_LocationType)(0), // 0: greptime.v1.AddColumnLocation.LocationType (*DdlRequest)(nil), // 1: greptime.v1.DdlRequest @@ -1314,19 +1385,20 @@ var file_greptime_v1_ddl_proto_goTypes = []interface{}{ (*DropTableExpr)(nil), // 4: greptime.v1.DropTableExpr (*CreateDatabaseExpr)(nil), // 5: greptime.v1.CreateDatabaseExpr (*TruncateTableExpr)(nil), // 6: greptime.v1.TruncateTableExpr - (*AddColumns)(nil), // 7: greptime.v1.AddColumns - (*DropColumns)(nil), // 8: greptime.v1.DropColumns - (*RenameTable)(nil), // 9: greptime.v1.RenameTable - (*AddColumn)(nil), // 10: greptime.v1.AddColumn - (*DropColumn)(nil), // 11: greptime.v1.DropColumn - (*TableId)(nil), // 12: greptime.v1.TableId - (*ColumnDef)(nil), // 13: greptime.v1.ColumnDef - (*AddColumnLocation)(nil), // 14: greptime.v1.AddColumnLocation - nil, // 15: greptime.v1.CreateTableExpr.TableOptionsEntry - nil, // 16: greptime.v1.CreateDatabaseExpr.OptionsEntry - (ColumnDataType)(0), // 17: greptime.v1.ColumnDataType - (SemanticType)(0), // 18: greptime.v1.SemanticType - (*ColumnDataTypeExtension)(nil), // 19: greptime.v1.ColumnDataTypeExtension + (*DropDatabaseExpr)(nil), // 7: greptime.v1.DropDatabaseExpr + (*AddColumns)(nil), // 8: greptime.v1.AddColumns + (*DropColumns)(nil), // 9: greptime.v1.DropColumns + (*RenameTable)(nil), // 10: greptime.v1.RenameTable + (*AddColumn)(nil), // 11: greptime.v1.AddColumn + (*DropColumn)(nil), // 12: greptime.v1.DropColumn + (*TableId)(nil), // 13: greptime.v1.TableId + (*ColumnDef)(nil), // 14: greptime.v1.ColumnDef + (*AddColumnLocation)(nil), // 15: greptime.v1.AddColumnLocation + nil, // 16: greptime.v1.CreateTableExpr.TableOptionsEntry + nil, // 17: greptime.v1.CreateDatabaseExpr.OptionsEntry + (ColumnDataType)(0), // 18: greptime.v1.ColumnDataType + (SemanticType)(0), // 19: greptime.v1.SemanticType + (*ColumnDataTypeExtension)(nil), // 20: greptime.v1.ColumnDataTypeExtension } var file_greptime_v1_ddl_proto_depIdxs = []int32{ 5, // 0: greptime.v1.DdlRequest.create_database:type_name -> greptime.v1.CreateDatabaseExpr @@ -1334,22 +1406,22 @@ var file_greptime_v1_ddl_proto_depIdxs = []int32{ 3, // 2: greptime.v1.DdlRequest.alter:type_name -> greptime.v1.AlterExpr 4, // 3: greptime.v1.DdlRequest.drop_table:type_name -> greptime.v1.DropTableExpr 6, // 4: greptime.v1.DdlRequest.truncate_table:type_name -> greptime.v1.TruncateTableExpr - 13, // 5: greptime.v1.CreateTableExpr.column_defs:type_name -> greptime.v1.ColumnDef - 15, // 6: greptime.v1.CreateTableExpr.table_options:type_name -> greptime.v1.CreateTableExpr.TableOptionsEntry - 12, // 7: greptime.v1.CreateTableExpr.table_id:type_name -> greptime.v1.TableId - 7, // 8: greptime.v1.AlterExpr.add_columns:type_name -> greptime.v1.AddColumns - 8, // 9: greptime.v1.AlterExpr.drop_columns:type_name -> greptime.v1.DropColumns - 9, // 10: greptime.v1.AlterExpr.rename_table:type_name -> greptime.v1.RenameTable - 12, // 11: greptime.v1.DropTableExpr.table_id:type_name -> greptime.v1.TableId - 16, // 12: greptime.v1.CreateDatabaseExpr.options:type_name -> greptime.v1.CreateDatabaseExpr.OptionsEntry - 12, // 13: greptime.v1.TruncateTableExpr.table_id:type_name -> greptime.v1.TableId - 10, // 14: greptime.v1.AddColumns.add_columns:type_name -> greptime.v1.AddColumn - 11, // 15: greptime.v1.DropColumns.drop_columns:type_name -> greptime.v1.DropColumn - 13, // 16: greptime.v1.AddColumn.column_def:type_name -> greptime.v1.ColumnDef - 14, // 17: greptime.v1.AddColumn.location:type_name -> greptime.v1.AddColumnLocation - 17, // 18: greptime.v1.ColumnDef.data_type:type_name -> greptime.v1.ColumnDataType - 18, // 19: greptime.v1.ColumnDef.semantic_type:type_name -> greptime.v1.SemanticType - 19, // 20: greptime.v1.ColumnDef.datatype_extension:type_name -> greptime.v1.ColumnDataTypeExtension + 14, // 5: greptime.v1.CreateTableExpr.column_defs:type_name -> greptime.v1.ColumnDef + 16, // 6: greptime.v1.CreateTableExpr.table_options:type_name -> greptime.v1.CreateTableExpr.TableOptionsEntry + 13, // 7: greptime.v1.CreateTableExpr.table_id:type_name -> greptime.v1.TableId + 8, // 8: greptime.v1.AlterExpr.add_columns:type_name -> greptime.v1.AddColumns + 9, // 9: greptime.v1.AlterExpr.drop_columns:type_name -> greptime.v1.DropColumns + 10, // 10: greptime.v1.AlterExpr.rename_table:type_name -> greptime.v1.RenameTable + 13, // 11: greptime.v1.DropTableExpr.table_id:type_name -> greptime.v1.TableId + 17, // 12: greptime.v1.CreateDatabaseExpr.options:type_name -> greptime.v1.CreateDatabaseExpr.OptionsEntry + 13, // 13: greptime.v1.TruncateTableExpr.table_id:type_name -> greptime.v1.TableId + 11, // 14: greptime.v1.AddColumns.add_columns:type_name -> greptime.v1.AddColumn + 12, // 15: greptime.v1.DropColumns.drop_columns:type_name -> greptime.v1.DropColumn + 14, // 16: greptime.v1.AddColumn.column_def:type_name -> greptime.v1.ColumnDef + 15, // 17: greptime.v1.AddColumn.location:type_name -> greptime.v1.AddColumnLocation + 18, // 18: greptime.v1.ColumnDef.data_type:type_name -> greptime.v1.ColumnDataType + 19, // 19: greptime.v1.ColumnDef.semantic_type:type_name -> greptime.v1.SemanticType + 20, // 20: greptime.v1.ColumnDef.datatype_extension:type_name -> greptime.v1.ColumnDataTypeExtension 0, // 21: greptime.v1.AddColumnLocation.location_type:type_name -> greptime.v1.AddColumnLocation.LocationType 22, // [22:22] is the sub-list for method output_type 22, // [22:22] is the sub-list for method input_type @@ -1438,7 +1510,7 @@ func file_greptime_v1_ddl_proto_init() { } } file_greptime_v1_ddl_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddColumns); i { + switch v := v.(*DropDatabaseExpr); i { case 0: return &v.state case 1: @@ -1450,7 +1522,7 @@ func file_greptime_v1_ddl_proto_init() { } } file_greptime_v1_ddl_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DropColumns); i { + switch v := v.(*AddColumns); i { case 0: return &v.state case 1: @@ -1462,7 +1534,7 @@ func file_greptime_v1_ddl_proto_init() { } } file_greptime_v1_ddl_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RenameTable); i { + switch v := v.(*DropColumns); i { case 0: return &v.state case 1: @@ -1474,7 +1546,7 @@ func file_greptime_v1_ddl_proto_init() { } } file_greptime_v1_ddl_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddColumn); i { + switch v := v.(*RenameTable); i { case 0: return &v.state case 1: @@ -1486,7 +1558,7 @@ func file_greptime_v1_ddl_proto_init() { } } file_greptime_v1_ddl_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DropColumn); i { + switch v := v.(*AddColumn); i { case 0: return &v.state case 1: @@ -1498,7 +1570,7 @@ func file_greptime_v1_ddl_proto_init() { } } file_greptime_v1_ddl_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TableId); i { + switch v := v.(*DropColumn); i { case 0: return &v.state case 1: @@ -1510,7 +1582,7 @@ func file_greptime_v1_ddl_proto_init() { } } file_greptime_v1_ddl_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ColumnDef); i { + switch v := v.(*TableId); i { case 0: return &v.state case 1: @@ -1522,6 +1594,18 @@ func file_greptime_v1_ddl_proto_init() { } } file_greptime_v1_ddl_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ColumnDef); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_greptime_v1_ddl_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AddColumnLocation); i { case 0: return &v.state @@ -1552,7 +1636,7 @@ func file_greptime_v1_ddl_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_greptime_v1_ddl_proto_rawDesc, NumEnums: 1, - NumMessages: 16, + NumMessages: 17, NumExtensions: 0, NumServices: 0, }, diff --git a/java/src/main/java/io/greptime/v1/Ddl.java b/java/src/main/java/io/greptime/v1/Ddl.java index c5b7b2fd..50188e31 100644 --- a/java/src/main/java/io/greptime/v1/Ddl.java +++ b/java/src/main/java/io/greptime/v1/Ddl.java @@ -8991,6 +8991,797 @@ public io.greptime.v1.Ddl.TruncateTableExpr getDefaultInstanceForType() { } + public interface DropDatabaseExprOrBuilder extends + // @@protoc_insertion_point(interface_extends:greptime.v1.DropDatabaseExpr) + com.google.protobuf.MessageOrBuilder { + + /** + * string catalog_name = 1; + * @return The catalogName. + */ + java.lang.String getCatalogName(); + /** + * string catalog_name = 1; + * @return The bytes for catalogName. + */ + com.google.protobuf.ByteString + getCatalogNameBytes(); + + /** + * string schema_name = 2; + * @return The schemaName. + */ + java.lang.String getSchemaName(); + /** + * string schema_name = 2; + * @return The bytes for schemaName. + */ + com.google.protobuf.ByteString + getSchemaNameBytes(); + + /** + * bool drop_if_exists = 3; + * @return The dropIfExists. + */ + boolean getDropIfExists(); + } + /** + * Protobuf type {@code greptime.v1.DropDatabaseExpr} + */ + public static final class DropDatabaseExpr extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:greptime.v1.DropDatabaseExpr) + DropDatabaseExprOrBuilder { + private static final long serialVersionUID = 0L; + // Use DropDatabaseExpr.newBuilder() to construct. + private DropDatabaseExpr(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DropDatabaseExpr() { + catalogName_ = ""; + schemaName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DropDatabaseExpr(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DropDatabaseExpr( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + catalogName_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + schemaName_ = s; + break; + } + case 24: { + + dropIfExists_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.greptime.v1.Ddl.internal_static_greptime_v1_DropDatabaseExpr_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.greptime.v1.Ddl.internal_static_greptime_v1_DropDatabaseExpr_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.greptime.v1.Ddl.DropDatabaseExpr.class, io.greptime.v1.Ddl.DropDatabaseExpr.Builder.class); + } + + public static final int CATALOG_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object catalogName_; + /** + * string catalog_name = 1; + * @return The catalogName. + */ + @java.lang.Override + public java.lang.String getCatalogName() { + java.lang.Object ref = catalogName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + catalogName_ = s; + return s; + } + } + /** + * string catalog_name = 1; + * @return The bytes for catalogName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCatalogNameBytes() { + java.lang.Object ref = catalogName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + catalogName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCHEMA_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object schemaName_; + /** + * string schema_name = 2; + * @return The schemaName. + */ + @java.lang.Override + public java.lang.String getSchemaName() { + java.lang.Object ref = schemaName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + schemaName_ = s; + return s; + } + } + /** + * string schema_name = 2; + * @return The bytes for schemaName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSchemaNameBytes() { + java.lang.Object ref = schemaName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + schemaName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DROP_IF_EXISTS_FIELD_NUMBER = 3; + private boolean dropIfExists_; + /** + * bool drop_if_exists = 3; + * @return The dropIfExists. + */ + @java.lang.Override + public boolean getDropIfExists() { + return dropIfExists_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(catalogName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, catalogName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(schemaName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, schemaName_); + } + if (dropIfExists_ != false) { + output.writeBool(3, dropIfExists_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(catalogName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, catalogName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(schemaName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, schemaName_); + } + if (dropIfExists_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, dropIfExists_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.greptime.v1.Ddl.DropDatabaseExpr)) { + return super.equals(obj); + } + io.greptime.v1.Ddl.DropDatabaseExpr other = (io.greptime.v1.Ddl.DropDatabaseExpr) obj; + + if (!getCatalogName() + .equals(other.getCatalogName())) return false; + if (!getSchemaName() + .equals(other.getSchemaName())) return false; + if (getDropIfExists() + != other.getDropIfExists()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CATALOG_NAME_FIELD_NUMBER; + hash = (53 * hash) + getCatalogName().hashCode(); + hash = (37 * hash) + SCHEMA_NAME_FIELD_NUMBER; + hash = (53 * hash) + getSchemaName().hashCode(); + hash = (37 * hash) + DROP_IF_EXISTS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getDropIfExists()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.greptime.v1.Ddl.DropDatabaseExpr parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.Ddl.DropDatabaseExpr parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.greptime.v1.Ddl.DropDatabaseExpr parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.Ddl.DropDatabaseExpr parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.greptime.v1.Ddl.DropDatabaseExpr parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.Ddl.DropDatabaseExpr parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.greptime.v1.Ddl.DropDatabaseExpr parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.greptime.v1.Ddl.DropDatabaseExpr parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.greptime.v1.Ddl.DropDatabaseExpr parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.greptime.v1.Ddl.DropDatabaseExpr parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.greptime.v1.Ddl.DropDatabaseExpr parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.greptime.v1.Ddl.DropDatabaseExpr parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.greptime.v1.Ddl.DropDatabaseExpr prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code greptime.v1.DropDatabaseExpr} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:greptime.v1.DropDatabaseExpr) + io.greptime.v1.Ddl.DropDatabaseExprOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.greptime.v1.Ddl.internal_static_greptime_v1_DropDatabaseExpr_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.greptime.v1.Ddl.internal_static_greptime_v1_DropDatabaseExpr_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.greptime.v1.Ddl.DropDatabaseExpr.class, io.greptime.v1.Ddl.DropDatabaseExpr.Builder.class); + } + + // Construct using io.greptime.v1.Ddl.DropDatabaseExpr.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + catalogName_ = ""; + + schemaName_ = ""; + + dropIfExists_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.greptime.v1.Ddl.internal_static_greptime_v1_DropDatabaseExpr_descriptor; + } + + @java.lang.Override + public io.greptime.v1.Ddl.DropDatabaseExpr getDefaultInstanceForType() { + return io.greptime.v1.Ddl.DropDatabaseExpr.getDefaultInstance(); + } + + @java.lang.Override + public io.greptime.v1.Ddl.DropDatabaseExpr build() { + io.greptime.v1.Ddl.DropDatabaseExpr result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.greptime.v1.Ddl.DropDatabaseExpr buildPartial() { + io.greptime.v1.Ddl.DropDatabaseExpr result = new io.greptime.v1.Ddl.DropDatabaseExpr(this); + result.catalogName_ = catalogName_; + result.schemaName_ = schemaName_; + result.dropIfExists_ = dropIfExists_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.greptime.v1.Ddl.DropDatabaseExpr) { + return mergeFrom((io.greptime.v1.Ddl.DropDatabaseExpr)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.greptime.v1.Ddl.DropDatabaseExpr other) { + if (other == io.greptime.v1.Ddl.DropDatabaseExpr.getDefaultInstance()) return this; + if (!other.getCatalogName().isEmpty()) { + catalogName_ = other.catalogName_; + onChanged(); + } + if (!other.getSchemaName().isEmpty()) { + schemaName_ = other.schemaName_; + onChanged(); + } + if (other.getDropIfExists() != false) { + setDropIfExists(other.getDropIfExists()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + io.greptime.v1.Ddl.DropDatabaseExpr parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.greptime.v1.Ddl.DropDatabaseExpr) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object catalogName_ = ""; + /** + * string catalog_name = 1; + * @return The catalogName. + */ + public java.lang.String getCatalogName() { + java.lang.Object ref = catalogName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + catalogName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string catalog_name = 1; + * @return The bytes for catalogName. + */ + public com.google.protobuf.ByteString + getCatalogNameBytes() { + java.lang.Object ref = catalogName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + catalogName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string catalog_name = 1; + * @param value The catalogName to set. + * @return This builder for chaining. + */ + public Builder setCatalogName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + catalogName_ = value; + onChanged(); + return this; + } + /** + * string catalog_name = 1; + * @return This builder for chaining. + */ + public Builder clearCatalogName() { + + catalogName_ = getDefaultInstance().getCatalogName(); + onChanged(); + return this; + } + /** + * string catalog_name = 1; + * @param value The bytes for catalogName to set. + * @return This builder for chaining. + */ + public Builder setCatalogNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + catalogName_ = value; + onChanged(); + return this; + } + + private java.lang.Object schemaName_ = ""; + /** + * string schema_name = 2; + * @return The schemaName. + */ + public java.lang.String getSchemaName() { + java.lang.Object ref = schemaName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + schemaName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string schema_name = 2; + * @return The bytes for schemaName. + */ + public com.google.protobuf.ByteString + getSchemaNameBytes() { + java.lang.Object ref = schemaName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + schemaName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string schema_name = 2; + * @param value The schemaName to set. + * @return This builder for chaining. + */ + public Builder setSchemaName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + schemaName_ = value; + onChanged(); + return this; + } + /** + * string schema_name = 2; + * @return This builder for chaining. + */ + public Builder clearSchemaName() { + + schemaName_ = getDefaultInstance().getSchemaName(); + onChanged(); + return this; + } + /** + * string schema_name = 2; + * @param value The bytes for schemaName to set. + * @return This builder for chaining. + */ + public Builder setSchemaNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + schemaName_ = value; + onChanged(); + return this; + } + + private boolean dropIfExists_ ; + /** + * bool drop_if_exists = 3; + * @return The dropIfExists. + */ + @java.lang.Override + public boolean getDropIfExists() { + return dropIfExists_; + } + /** + * bool drop_if_exists = 3; + * @param value The dropIfExists to set. + * @return This builder for chaining. + */ + public Builder setDropIfExists(boolean value) { + + dropIfExists_ = value; + onChanged(); + return this; + } + /** + * bool drop_if_exists = 3; + * @return This builder for chaining. + */ + public Builder clearDropIfExists() { + + dropIfExists_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:greptime.v1.DropDatabaseExpr) + } + + // @@protoc_insertion_point(class_scope:greptime.v1.DropDatabaseExpr) + private static final io.greptime.v1.Ddl.DropDatabaseExpr DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.greptime.v1.Ddl.DropDatabaseExpr(); + } + + public static io.greptime.v1.Ddl.DropDatabaseExpr getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DropDatabaseExpr parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DropDatabaseExpr(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.greptime.v1.Ddl.DropDatabaseExpr getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + public interface AddColumnsOrBuilder extends // @@protoc_insertion_point(interface_extends:greptime.v1.AddColumns) com.google.protobuf.MessageOrBuilder { @@ -15204,6 +15995,11 @@ public io.greptime.v1.Ddl.AddColumnLocation getDefaultInstanceForType() { private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_greptime_v1_TruncateTableExpr_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_greptime_v1_DropDatabaseExpr_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_greptime_v1_DropDatabaseExpr_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_greptime_v1_AddColumns_descriptor; private static final @@ -15288,28 +16084,30 @@ public io.greptime.v1.Ddl.AddColumnLocation getDefaultInstanceForType() { "ey\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"z\n\021TruncateT" + "ableExpr\022\024\n\014catalog_name\030\001 \001(\t\022\023\n\013schema" + "_name\030\002 \001(\t\022\022\n\ntable_name\030\003 \001(\t\022&\n\010table" + - "_id\030\004 \001(\0132\024.greptime.v1.TableId\"9\n\nAddCo" + - "lumns\022+\n\013add_columns\030\001 \003(\0132\026.greptime.v1" + - ".AddColumn\"<\n\013DropColumns\022-\n\014drop_column" + - "s\030\001 \003(\0132\027.greptime.v1.DropColumn\"%\n\013Rena" + - "meTable\022\026\n\016new_table_name\030\001 \001(\t\"i\n\tAddCo" + - "lumn\022*\n\ncolumn_def\030\001 \001(\0132\026.greptime.v1.C" + - "olumnDef\0220\n\010location\030\003 \001(\0132\036.greptime.v1" + - ".AddColumnLocation\"\032\n\nDropColumn\022\014\n\004name" + - "\030\001 \001(\t\"\025\n\007TableId\022\n\n\002id\030\001 \001(\r\"\377\001\n\tColumn" + - "Def\022\014\n\004name\030\001 \001(\t\022.\n\tdata_type\030\002 \001(\0162\033.g" + - "reptime.v1.ColumnDataType\022\023\n\013is_nullable" + - "\030\003 \001(\010\022\032\n\022default_constraint\030\004 \001(\014\0220\n\rse" + - "mantic_type\030\005 \001(\0162\031.greptime.v1.Semantic" + - "Type\022\017\n\007comment\030\006 \001(\t\022@\n\022datatype_extens" + - "ion\030\007 \001(\0132$.greptime.v1.ColumnDataTypeEx" + - "tension\"\230\001\n\021AddColumnLocation\022B\n\rlocatio" + - "n_type\030\001 \001(\0162+.greptime.v1.AddColumnLoca" + - "tion.LocationType\022\031\n\021after_column_name\030\002" + - " \001(\t\"$\n\014LocationType\022\t\n\005FIRST\020\000\022\t\n\005AFTER" + - "\020\001BL\n\016io.greptime.v1B\003DdlZ5github.com/Gr" + - "eptimeTeam/greptime-proto/go/greptime/v1" + - "b\006proto3" + "_id\030\004 \001(\0132\024.greptime.v1.TableId\"U\n\020DropD" + + "atabaseExpr\022\024\n\014catalog_name\030\001 \001(\t\022\023\n\013sch" + + "ema_name\030\002 \001(\t\022\026\n\016drop_if_exists\030\003 \001(\010\"9" + + "\n\nAddColumns\022+\n\013add_columns\030\001 \003(\0132\026.grep" + + "time.v1.AddColumn\"<\n\013DropColumns\022-\n\014drop" + + "_columns\030\001 \003(\0132\027.greptime.v1.DropColumn\"" + + "%\n\013RenameTable\022\026\n\016new_table_name\030\001 \001(\t\"i" + + "\n\tAddColumn\022*\n\ncolumn_def\030\001 \001(\0132\026.grepti" + + "me.v1.ColumnDef\0220\n\010location\030\003 \001(\0132\036.grep" + + "time.v1.AddColumnLocation\"\032\n\nDropColumn\022" + + "\014\n\004name\030\001 \001(\t\"\025\n\007TableId\022\n\n\002id\030\001 \001(\r\"\377\001\n" + + "\tColumnDef\022\014\n\004name\030\001 \001(\t\022.\n\tdata_type\030\002 " + + "\001(\0162\033.greptime.v1.ColumnDataType\022\023\n\013is_n" + + "ullable\030\003 \001(\010\022\032\n\022default_constraint\030\004 \001(" + + "\014\0220\n\rsemantic_type\030\005 \001(\0162\031.greptime.v1.S" + + "emanticType\022\017\n\007comment\030\006 \001(\t\022@\n\022datatype" + + "_extension\030\007 \001(\0132$.greptime.v1.ColumnDat" + + "aTypeExtension\"\230\001\n\021AddColumnLocation\022B\n\r" + + "location_type\030\001 \001(\0162+.greptime.v1.AddCol" + + "umnLocation.LocationType\022\031\n\021after_column" + + "_name\030\002 \001(\t\"$\n\014LocationType\022\t\n\005FIRST\020\000\022\t" + + "\n\005AFTER\020\001BL\n\016io.greptime.v1B\003DdlZ5github" + + ".com/GreptimeTeam/greptime-proto/go/grep" + + "time/v1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -15364,50 +16162,56 @@ public io.greptime.v1.Ddl.AddColumnLocation getDefaultInstanceForType() { com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_greptime_v1_TruncateTableExpr_descriptor, new java.lang.String[] { "CatalogName", "SchemaName", "TableName", "TableId", }); - internal_static_greptime_v1_AddColumns_descriptor = + internal_static_greptime_v1_DropDatabaseExpr_descriptor = getDescriptor().getMessageTypes().get(6); + internal_static_greptime_v1_DropDatabaseExpr_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_greptime_v1_DropDatabaseExpr_descriptor, + new java.lang.String[] { "CatalogName", "SchemaName", "DropIfExists", }); + internal_static_greptime_v1_AddColumns_descriptor = + getDescriptor().getMessageTypes().get(7); internal_static_greptime_v1_AddColumns_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_greptime_v1_AddColumns_descriptor, new java.lang.String[] { "AddColumns", }); internal_static_greptime_v1_DropColumns_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(8); internal_static_greptime_v1_DropColumns_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_greptime_v1_DropColumns_descriptor, new java.lang.String[] { "DropColumns", }); internal_static_greptime_v1_RenameTable_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(9); internal_static_greptime_v1_RenameTable_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_greptime_v1_RenameTable_descriptor, new java.lang.String[] { "NewTableName", }); internal_static_greptime_v1_AddColumn_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(10); internal_static_greptime_v1_AddColumn_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_greptime_v1_AddColumn_descriptor, new java.lang.String[] { "ColumnDef", "Location", }); internal_static_greptime_v1_DropColumn_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(11); internal_static_greptime_v1_DropColumn_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_greptime_v1_DropColumn_descriptor, new java.lang.String[] { "Name", }); internal_static_greptime_v1_TableId_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageTypes().get(12); internal_static_greptime_v1_TableId_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_greptime_v1_TableId_descriptor, new java.lang.String[] { "Id", }); internal_static_greptime_v1_ColumnDef_descriptor = - getDescriptor().getMessageTypes().get(12); + getDescriptor().getMessageTypes().get(13); internal_static_greptime_v1_ColumnDef_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_greptime_v1_ColumnDef_descriptor, new java.lang.String[] { "Name", "DataType", "IsNullable", "DefaultConstraint", "SemanticType", "Comment", "DatatypeExtension", }); internal_static_greptime_v1_AddColumnLocation_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageTypes().get(14); internal_static_greptime_v1_AddColumnLocation_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_greptime_v1_AddColumnLocation_descriptor, diff --git a/proto/greptime/v1/ddl.proto b/proto/greptime/v1/ddl.proto index eb6ca3d7..6f721c01 100644 --- a/proto/greptime/v1/ddl.proto +++ b/proto/greptime/v1/ddl.proto @@ -82,6 +82,12 @@ message TruncateTableExpr { TableId table_id = 4; } +message DropDatabaseExpr { + string catalog_name = 1; + string schema_name = 2; + bool drop_if_exists = 3; +} + message AddColumns { repeated AddColumn add_columns = 1; } message DropColumns { repeated DropColumn drop_columns = 1; }