feat: add comment field to ColumnDef (#104)
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
This commit is contained in:
+62
-10
@@ -228,6 +228,7 @@ PROTOBUF_CONSTEXPR ColumnDef::ColumnDef(
|
|||||||
::_pbi::ConstantInitialized): _impl_{
|
::_pbi::ConstantInitialized): _impl_{
|
||||||
/*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
/*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
||||||
, /*decltype(_impl_.default_constraint_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
, /*decltype(_impl_.default_constraint_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
||||||
|
, /*decltype(_impl_.comment_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
||||||
, /*decltype(_impl_.data_type_)*/0
|
, /*decltype(_impl_.data_type_)*/0
|
||||||
, /*decltype(_impl_.is_nullable_)*/false
|
, /*decltype(_impl_.is_nullable_)*/false
|
||||||
, /*decltype(_impl_.semantic_type_)*/0
|
, /*decltype(_impl_.semantic_type_)*/0
|
||||||
@@ -407,6 +408,7 @@ const uint32_t TableStruct_greptime_2fv1_2fddl_2eproto::offsets[] PROTOBUF_SECTI
|
|||||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::ColumnDef, _impl_.is_nullable_),
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::ColumnDef, _impl_.is_nullable_),
|
||||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::ColumnDef, _impl_.default_constraint_),
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::ColumnDef, _impl_.default_constraint_),
|
||||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::ColumnDef, _impl_.semantic_type_),
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::ColumnDef, _impl_.semantic_type_),
|
||||||
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::ColumnDef, _impl_.comment_),
|
||||||
~0u, // no _has_bits_
|
~0u, // no _has_bits_
|
||||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::AddColumnLocation, _internal_metadata_),
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::AddColumnLocation, _internal_metadata_),
|
||||||
~0u, // no _extensions_
|
~0u, // no _extensions_
|
||||||
@@ -432,7 +434,7 @@ static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protode
|
|||||||
{ 120, -1, -1, sizeof(::greptime::v1::DropColumn)},
|
{ 120, -1, -1, sizeof(::greptime::v1::DropColumn)},
|
||||||
{ 127, -1, -1, sizeof(::greptime::v1::TableId)},
|
{ 127, -1, -1, sizeof(::greptime::v1::TableId)},
|
||||||
{ 134, -1, -1, sizeof(::greptime::v1::ColumnDef)},
|
{ 134, -1, -1, sizeof(::greptime::v1::ColumnDef)},
|
||||||
{ 145, -1, -1, sizeof(::greptime::v1::AddColumnLocation)},
|
{ 146, -1, -1, sizeof(::greptime::v1::AddColumnLocation)},
|
||||||
};
|
};
|
||||||
|
|
||||||
static const ::_pb::Message* const file_default_instances[] = {
|
static const ::_pb::Message* const file_default_instances[] = {
|
||||||
@@ -498,24 +500,24 @@ const char descriptor_table_protodef_greptime_2fv1_2fddl_2eproto[] PROTOBUF_SECT
|
|||||||
"\026.greptime.v1.ColumnDef\0220\n\010location\030\003 \001("
|
"\026.greptime.v1.ColumnDef\0220\n\010location\030\003 \001("
|
||||||
"\0132\036.greptime.v1.AddColumnLocation\"\032\n\nDro"
|
"\0132\036.greptime.v1.AddColumnLocation\"\032\n\nDro"
|
||||||
"pColumn\022\014\n\004name\030\001 \001(\t\"\025\n\007TableId\022\n\n\002id\030\001"
|
"pColumn\022\014\n\004name\030\001 \001(\t\"\025\n\007TableId\022\n\n\002id\030\001"
|
||||||
" \001(\r\"\254\001\n\tColumnDef\022\014\n\004name\030\001 \001(\t\022.\n\tdata"
|
" \001(\r\"\275\001\n\tColumnDef\022\014\n\004name\030\001 \001(\t\022.\n\tdata"
|
||||||
"_type\030\002 \001(\0162\033.greptime.v1.ColumnDataType"
|
"_type\030\002 \001(\0162\033.greptime.v1.ColumnDataType"
|
||||||
"\022\023\n\013is_nullable\030\003 \001(\010\022\032\n\022default_constra"
|
"\022\023\n\013is_nullable\030\003 \001(\010\022\032\n\022default_constra"
|
||||||
"int\030\004 \001(\014\0220\n\rsemantic_type\030\005 \001(\0162\031.grept"
|
"int\030\004 \001(\014\0220\n\rsemantic_type\030\005 \001(\0162\031.grept"
|
||||||
"ime.v1.SemanticType\"\230\001\n\021AddColumnLocatio"
|
"ime.v1.SemanticType\022\017\n\007comment\030\006 \001(\t\"\230\001\n"
|
||||||
"n\022B\n\rlocation_type\030\001 \001(\0162+.greptime.v1.A"
|
"\021AddColumnLocation\022B\n\rlocation_type\030\001 \001("
|
||||||
"ddColumnLocation.LocationType\022\031\n\021after_c"
|
"\0162+.greptime.v1.AddColumnLocation.Locati"
|
||||||
"olumn_name\030\002 \001(\t\"$\n\014LocationType\022\t\n\005FIRS"
|
"onType\022\031\n\021after_column_name\030\002 \001(\t\"$\n\014Loc"
|
||||||
"T\020\000\022\t\n\005AFTER\020\001BL\n\016io.greptime.v1B\003DdlZ5g"
|
"ationType\022\t\n\005FIRST\020\000\022\t\n\005AFTER\020\001BL\n\016io.gr"
|
||||||
"ithub.com/GreptimeTeam/greptime-proto/go"
|
"eptime.v1B\003DdlZ5github.com/GreptimeTeam/"
|
||||||
"/greptime/v1b\006proto3"
|
"greptime-proto/go/greptime/v1b\006proto3"
|
||||||
;
|
;
|
||||||
static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2fddl_2eproto_deps[1] = {
|
static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2fddl_2eproto_deps[1] = {
|
||||||
&::descriptor_table_greptime_2fv1_2fcommon_2eproto,
|
&::descriptor_table_greptime_2fv1_2fcommon_2eproto,
|
||||||
};
|
};
|
||||||
static ::_pbi::once_flag descriptor_table_greptime_2fv1_2fddl_2eproto_once;
|
static ::_pbi::once_flag descriptor_table_greptime_2fv1_2fddl_2eproto_once;
|
||||||
const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2fddl_2eproto = {
|
const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2fddl_2eproto = {
|
||||||
false, false, 2140, descriptor_table_protodef_greptime_2fv1_2fddl_2eproto,
|
false, false, 2157, descriptor_table_protodef_greptime_2fv1_2fddl_2eproto,
|
||||||
"greptime/v1/ddl.proto",
|
"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, 16,
|
||||||
schemas, file_default_instances, TableStruct_greptime_2fv1_2fddl_2eproto::offsets,
|
schemas, file_default_instances, TableStruct_greptime_2fv1_2fddl_2eproto::offsets,
|
||||||
@@ -4440,6 +4442,7 @@ ColumnDef::ColumnDef(const ColumnDef& from)
|
|||||||
new (&_impl_) Impl_{
|
new (&_impl_) Impl_{
|
||||||
decltype(_impl_.name_){}
|
decltype(_impl_.name_){}
|
||||||
, decltype(_impl_.default_constraint_){}
|
, decltype(_impl_.default_constraint_){}
|
||||||
|
, decltype(_impl_.comment_){}
|
||||||
, decltype(_impl_.data_type_){}
|
, decltype(_impl_.data_type_){}
|
||||||
, decltype(_impl_.is_nullable_){}
|
, decltype(_impl_.is_nullable_){}
|
||||||
, decltype(_impl_.semantic_type_){}
|
, decltype(_impl_.semantic_type_){}
|
||||||
@@ -4462,6 +4465,14 @@ ColumnDef::ColumnDef(const ColumnDef& from)
|
|||||||
_this->_impl_.default_constraint_.Set(from._internal_default_constraint(),
|
_this->_impl_.default_constraint_.Set(from._internal_default_constraint(),
|
||||||
_this->GetArenaForAllocation());
|
_this->GetArenaForAllocation());
|
||||||
}
|
}
|
||||||
|
_impl_.comment_.InitDefault();
|
||||||
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||||
|
_impl_.comment_.Set("", GetArenaForAllocation());
|
||||||
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||||
|
if (!from._internal_comment().empty()) {
|
||||||
|
_this->_impl_.comment_.Set(from._internal_comment(),
|
||||||
|
_this->GetArenaForAllocation());
|
||||||
|
}
|
||||||
::memcpy(&_impl_.data_type_, &from._impl_.data_type_,
|
::memcpy(&_impl_.data_type_, &from._impl_.data_type_,
|
||||||
static_cast<size_t>(reinterpret_cast<char*>(&_impl_.semantic_type_) -
|
static_cast<size_t>(reinterpret_cast<char*>(&_impl_.semantic_type_) -
|
||||||
reinterpret_cast<char*>(&_impl_.data_type_)) + sizeof(_impl_.semantic_type_));
|
reinterpret_cast<char*>(&_impl_.data_type_)) + sizeof(_impl_.semantic_type_));
|
||||||
@@ -4475,6 +4486,7 @@ inline void ColumnDef::SharedCtor(
|
|||||||
new (&_impl_) Impl_{
|
new (&_impl_) Impl_{
|
||||||
decltype(_impl_.name_){}
|
decltype(_impl_.name_){}
|
||||||
, decltype(_impl_.default_constraint_){}
|
, decltype(_impl_.default_constraint_){}
|
||||||
|
, decltype(_impl_.comment_){}
|
||||||
, decltype(_impl_.data_type_){0}
|
, decltype(_impl_.data_type_){0}
|
||||||
, decltype(_impl_.is_nullable_){false}
|
, decltype(_impl_.is_nullable_){false}
|
||||||
, decltype(_impl_.semantic_type_){0}
|
, decltype(_impl_.semantic_type_){0}
|
||||||
@@ -4488,6 +4500,10 @@ inline void ColumnDef::SharedCtor(
|
|||||||
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||||
_impl_.default_constraint_.Set("", GetArenaForAllocation());
|
_impl_.default_constraint_.Set("", GetArenaForAllocation());
|
||||||
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||||
|
_impl_.comment_.InitDefault();
|
||||||
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||||
|
_impl_.comment_.Set("", GetArenaForAllocation());
|
||||||
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnDef::~ColumnDef() {
|
ColumnDef::~ColumnDef() {
|
||||||
@@ -4503,6 +4519,7 @@ inline void ColumnDef::SharedDtor() {
|
|||||||
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
|
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
|
||||||
_impl_.name_.Destroy();
|
_impl_.name_.Destroy();
|
||||||
_impl_.default_constraint_.Destroy();
|
_impl_.default_constraint_.Destroy();
|
||||||
|
_impl_.comment_.Destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ColumnDef::SetCachedSize(int size) const {
|
void ColumnDef::SetCachedSize(int size) const {
|
||||||
@@ -4517,6 +4534,7 @@ void ColumnDef::Clear() {
|
|||||||
|
|
||||||
_impl_.name_.ClearToEmpty();
|
_impl_.name_.ClearToEmpty();
|
||||||
_impl_.default_constraint_.ClearToEmpty();
|
_impl_.default_constraint_.ClearToEmpty();
|
||||||
|
_impl_.comment_.ClearToEmpty();
|
||||||
::memset(&_impl_.data_type_, 0, static_cast<size_t>(
|
::memset(&_impl_.data_type_, 0, static_cast<size_t>(
|
||||||
reinterpret_cast<char*>(&_impl_.semantic_type_) -
|
reinterpret_cast<char*>(&_impl_.semantic_type_) -
|
||||||
reinterpret_cast<char*>(&_impl_.data_type_)) + sizeof(_impl_.semantic_type_));
|
reinterpret_cast<char*>(&_impl_.data_type_)) + sizeof(_impl_.semantic_type_));
|
||||||
@@ -4574,6 +4592,16 @@ const char* ColumnDef::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx
|
|||||||
} else
|
} else
|
||||||
goto handle_unusual;
|
goto handle_unusual;
|
||||||
continue;
|
continue;
|
||||||
|
// string comment = 6;
|
||||||
|
case 6:
|
||||||
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
|
||||||
|
auto str = _internal_mutable_comment();
|
||||||
|
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
|
||||||
|
CHK_(ptr);
|
||||||
|
CHK_(::_pbi::VerifyUTF8(str, "greptime.v1.ColumnDef.comment"));
|
||||||
|
} else
|
||||||
|
goto handle_unusual;
|
||||||
|
continue;
|
||||||
default:
|
default:
|
||||||
goto handle_unusual;
|
goto handle_unusual;
|
||||||
} // switch
|
} // switch
|
||||||
@@ -4639,6 +4667,16 @@ uint8_t* ColumnDef::_InternalSerialize(
|
|||||||
5, this->_internal_semantic_type(), target);
|
5, this->_internal_semantic_type(), target);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// string comment = 6;
|
||||||
|
if (!this->_internal_comment().empty()) {
|
||||||
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
||||||
|
this->_internal_comment().data(), static_cast<int>(this->_internal_comment().length()),
|
||||||
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
||||||
|
"greptime.v1.ColumnDef.comment");
|
||||||
|
target = stream->WriteStringMaybeAliased(
|
||||||
|
6, this->_internal_comment(), target);
|
||||||
|
}
|
||||||
|
|
||||||
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
|
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
|
||||||
target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
|
target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
|
||||||
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
|
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
|
||||||
@@ -4669,6 +4707,13 @@ size_t ColumnDef::ByteSizeLong() const {
|
|||||||
this->_internal_default_constraint());
|
this->_internal_default_constraint());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// string comment = 6;
|
||||||
|
if (!this->_internal_comment().empty()) {
|
||||||
|
total_size += 1 +
|
||||||
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
||||||
|
this->_internal_comment());
|
||||||
|
}
|
||||||
|
|
||||||
// .greptime.v1.ColumnDataType data_type = 2;
|
// .greptime.v1.ColumnDataType data_type = 2;
|
||||||
if (this->_internal_data_type() != 0) {
|
if (this->_internal_data_type() != 0) {
|
||||||
total_size += 1 +
|
total_size += 1 +
|
||||||
@@ -4710,6 +4755,9 @@ void ColumnDef::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROT
|
|||||||
if (!from._internal_default_constraint().empty()) {
|
if (!from._internal_default_constraint().empty()) {
|
||||||
_this->_internal_set_default_constraint(from._internal_default_constraint());
|
_this->_internal_set_default_constraint(from._internal_default_constraint());
|
||||||
}
|
}
|
||||||
|
if (!from._internal_comment().empty()) {
|
||||||
|
_this->_internal_set_comment(from._internal_comment());
|
||||||
|
}
|
||||||
if (from._internal_data_type() != 0) {
|
if (from._internal_data_type() != 0) {
|
||||||
_this->_internal_set_data_type(from._internal_data_type());
|
_this->_internal_set_data_type(from._internal_data_type());
|
||||||
}
|
}
|
||||||
@@ -4746,6 +4794,10 @@ void ColumnDef::InternalSwap(ColumnDef* other) {
|
|||||||
&_impl_.default_constraint_, lhs_arena,
|
&_impl_.default_constraint_, lhs_arena,
|
||||||
&other->_impl_.default_constraint_, rhs_arena
|
&other->_impl_.default_constraint_, rhs_arena
|
||||||
);
|
);
|
||||||
|
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
|
||||||
|
&_impl_.comment_, lhs_arena,
|
||||||
|
&other->_impl_.comment_, rhs_arena
|
||||||
|
);
|
||||||
::PROTOBUF_NAMESPACE_ID::internal::memswap<
|
::PROTOBUF_NAMESPACE_ID::internal::memswap<
|
||||||
PROTOBUF_FIELD_OFFSET(ColumnDef, _impl_.semantic_type_)
|
PROTOBUF_FIELD_OFFSET(ColumnDef, _impl_.semantic_type_)
|
||||||
+ sizeof(ColumnDef::_impl_.semantic_type_)
|
+ sizeof(ColumnDef::_impl_.semantic_type_)
|
||||||
|
|||||||
@@ -2737,6 +2737,7 @@ class ColumnDef final :
|
|||||||
enum : int {
|
enum : int {
|
||||||
kNameFieldNumber = 1,
|
kNameFieldNumber = 1,
|
||||||
kDefaultConstraintFieldNumber = 4,
|
kDefaultConstraintFieldNumber = 4,
|
||||||
|
kCommentFieldNumber = 6,
|
||||||
kDataTypeFieldNumber = 2,
|
kDataTypeFieldNumber = 2,
|
||||||
kIsNullableFieldNumber = 3,
|
kIsNullableFieldNumber = 3,
|
||||||
kSemanticTypeFieldNumber = 5,
|
kSemanticTypeFieldNumber = 5,
|
||||||
@@ -2769,6 +2770,20 @@ class ColumnDef final :
|
|||||||
std::string* _internal_mutable_default_constraint();
|
std::string* _internal_mutable_default_constraint();
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
// string comment = 6;
|
||||||
|
void clear_comment();
|
||||||
|
const std::string& comment() const;
|
||||||
|
template <typename ArgT0 = const std::string&, typename... ArgT>
|
||||||
|
void set_comment(ArgT0&& arg0, ArgT... args);
|
||||||
|
std::string* mutable_comment();
|
||||||
|
PROTOBUF_NODISCARD std::string* release_comment();
|
||||||
|
void set_allocated_comment(std::string* comment);
|
||||||
|
private:
|
||||||
|
const std::string& _internal_comment() const;
|
||||||
|
inline PROTOBUF_ALWAYS_INLINE void _internal_set_comment(const std::string& value);
|
||||||
|
std::string* _internal_mutable_comment();
|
||||||
|
public:
|
||||||
|
|
||||||
// .greptime.v1.ColumnDataType data_type = 2;
|
// .greptime.v1.ColumnDataType data_type = 2;
|
||||||
void clear_data_type();
|
void clear_data_type();
|
||||||
::greptime::v1::ColumnDataType data_type() const;
|
::greptime::v1::ColumnDataType data_type() const;
|
||||||
@@ -2806,6 +2821,7 @@ class ColumnDef final :
|
|||||||
struct Impl_ {
|
struct Impl_ {
|
||||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
|
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
|
||||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr default_constraint_;
|
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr default_constraint_;
|
||||||
|
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr comment_;
|
||||||
int data_type_;
|
int data_type_;
|
||||||
bool is_nullable_;
|
bool is_nullable_;
|
||||||
int semantic_type_;
|
int semantic_type_;
|
||||||
@@ -5504,6 +5520,56 @@ inline void ColumnDef::set_semantic_type(::greptime::v1::SemanticType value) {
|
|||||||
// @@protoc_insertion_point(field_set:greptime.v1.ColumnDef.semantic_type)
|
// @@protoc_insertion_point(field_set:greptime.v1.ColumnDef.semantic_type)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// string comment = 6;
|
||||||
|
inline void ColumnDef::clear_comment() {
|
||||||
|
_impl_.comment_.ClearToEmpty();
|
||||||
|
}
|
||||||
|
inline const std::string& ColumnDef::comment() const {
|
||||||
|
// @@protoc_insertion_point(field_get:greptime.v1.ColumnDef.comment)
|
||||||
|
return _internal_comment();
|
||||||
|
}
|
||||||
|
template <typename ArgT0, typename... ArgT>
|
||||||
|
inline PROTOBUF_ALWAYS_INLINE
|
||||||
|
void ColumnDef::set_comment(ArgT0&& arg0, ArgT... args) {
|
||||||
|
|
||||||
|
_impl_.comment_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
|
||||||
|
// @@protoc_insertion_point(field_set:greptime.v1.ColumnDef.comment)
|
||||||
|
}
|
||||||
|
inline std::string* ColumnDef::mutable_comment() {
|
||||||
|
std::string* _s = _internal_mutable_comment();
|
||||||
|
// @@protoc_insertion_point(field_mutable:greptime.v1.ColumnDef.comment)
|
||||||
|
return _s;
|
||||||
|
}
|
||||||
|
inline const std::string& ColumnDef::_internal_comment() const {
|
||||||
|
return _impl_.comment_.Get();
|
||||||
|
}
|
||||||
|
inline void ColumnDef::_internal_set_comment(const std::string& value) {
|
||||||
|
|
||||||
|
_impl_.comment_.Set(value, GetArenaForAllocation());
|
||||||
|
}
|
||||||
|
inline std::string* ColumnDef::_internal_mutable_comment() {
|
||||||
|
|
||||||
|
return _impl_.comment_.Mutable(GetArenaForAllocation());
|
||||||
|
}
|
||||||
|
inline std::string* ColumnDef::release_comment() {
|
||||||
|
// @@protoc_insertion_point(field_release:greptime.v1.ColumnDef.comment)
|
||||||
|
return _impl_.comment_.Release();
|
||||||
|
}
|
||||||
|
inline void ColumnDef::set_allocated_comment(std::string* comment) {
|
||||||
|
if (comment != nullptr) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
_impl_.comment_.SetAllocated(comment, GetArenaForAllocation());
|
||||||
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||||
|
if (_impl_.comment_.IsDefault()) {
|
||||||
|
_impl_.comment_.Set("", GetArenaForAllocation());
|
||||||
|
}
|
||||||
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||||
|
// @@protoc_insertion_point(field_set_allocated:greptime.v1.ColumnDef.comment)
|
||||||
|
}
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
|
|
||||||
// AddColumnLocation
|
// AddColumnLocation
|
||||||
|
|||||||
+28
-19
@@ -958,6 +958,7 @@ type ColumnDef struct {
|
|||||||
IsNullable bool `protobuf:"varint,3,opt,name=is_nullable,json=isNullable,proto3" json:"is_nullable,omitempty"`
|
IsNullable bool `protobuf:"varint,3,opt,name=is_nullable,json=isNullable,proto3" json:"is_nullable,omitempty"`
|
||||||
DefaultConstraint []byte `protobuf:"bytes,4,opt,name=default_constraint,json=defaultConstraint,proto3" json:"default_constraint,omitempty"`
|
DefaultConstraint []byte `protobuf:"bytes,4,opt,name=default_constraint,json=defaultConstraint,proto3" json:"default_constraint,omitempty"`
|
||||||
SemanticType SemanticType `protobuf:"varint,5,opt,name=semantic_type,json=semanticType,proto3,enum=greptime.v1.SemanticType" json:"semantic_type,omitempty"`
|
SemanticType SemanticType `protobuf:"varint,5,opt,name=semantic_type,json=semanticType,proto3,enum=greptime.v1.SemanticType" json:"semantic_type,omitempty"`
|
||||||
|
Comment string `protobuf:"bytes,6,opt,name=comment,proto3" json:"comment,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ColumnDef) Reset() {
|
func (x *ColumnDef) Reset() {
|
||||||
@@ -1027,6 +1028,13 @@ func (x *ColumnDef) GetSemanticType() SemanticType {
|
|||||||
return SemanticType_TAG
|
return SemanticType_TAG
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *ColumnDef) GetComment() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Comment
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
type AddColumnLocation struct {
|
type AddColumnLocation struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
@@ -1223,7 +1231,7 @@ var file_greptime_v1_ddl_proto_rawDesc = []byte{
|
|||||||
0x72, 0x6f, 0x70, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
|
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,
|
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,
|
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, 0xe9, 0x01, 0x0a, 0x09, 0x43, 0x6f, 0x6c,
|
0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x22, 0x83, 0x02, 0x0a, 0x09, 0x43, 0x6f, 0x6c,
|
||||||
0x75, 0x6d, 0x6e, 0x44, 0x65, 0x66, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
|
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,
|
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,
|
0x74, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e,
|
||||||
@@ -1238,24 +1246,25 @@ var file_greptime_v1_ddl_proto_rawDesc = []byte{
|
|||||||
0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x67, 0x72,
|
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,
|
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,
|
0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63,
|
||||||
0x54, 0x79, 0x70, 0x65, 0x22, 0xb7, 0x01, 0x0a, 0x11, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x75,
|
0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18,
|
||||||
0x6d, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x50, 0x0a, 0x0d, 0x6c, 0x6f,
|
0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0xb7,
|
||||||
0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
|
0x01, 0x0a, 0x11, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4c, 0x6f, 0x63, 0x61,
|
||||||
0x0e, 0x32, 0x2b, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e,
|
0x74, 0x69, 0x6f, 0x6e, 0x12, 0x50, 0x0a, 0x0d, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||||
0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f,
|
0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x67, 0x72,
|
||||||
0x6e, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c,
|
0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c,
|
||||||
0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x11,
|
0x75, 0x6d, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4c, 0x6f, 0x63, 0x61,
|
||||||
0x61, 0x66, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x6e, 0x61, 0x6d,
|
0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69,
|
||||||
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x43, 0x6f,
|
0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x61, 0x66, 0x74, 0x65, 0x72, 0x5f,
|
||||||
0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x24, 0x0a, 0x0c, 0x4c, 0x6f, 0x63, 0x61,
|
0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||||
0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x46, 0x49, 0x52, 0x53,
|
0x09, 0x52, 0x0f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61,
|
||||||
0x54, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x46, 0x54, 0x45, 0x52, 0x10, 0x01, 0x42, 0x4c,
|
0x6d, 0x65, 0x22, 0x24, 0x0a, 0x0c, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79,
|
||||||
0x0a, 0x0e, 0x69, 0x6f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31,
|
0x70, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x46, 0x49, 0x52, 0x53, 0x54, 0x10, 0x00, 0x12, 0x09, 0x0a,
|
||||||
0x42, 0x03, 0x44, 0x64, 0x6c, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
|
0x05, 0x41, 0x46, 0x54, 0x45, 0x52, 0x10, 0x01, 0x42, 0x4c, 0x0a, 0x0e, 0x69, 0x6f, 0x2e, 0x67,
|
||||||
0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x2f, 0x67,
|
0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x03, 0x44, 0x64, 0x6c, 0x5a,
|
||||||
0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f,
|
0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70,
|
||||||
0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72,
|
0x74, 0x69, 0x6d, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d,
|
||||||
0x6f, 0x74, 0x6f, 0x33,
|
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 (
|
var (
|
||||||
|
|||||||
@@ -13015,6 +13015,18 @@ java.lang.String defaultValue);
|
|||||||
* @return The semanticType.
|
* @return The semanticType.
|
||||||
*/
|
*/
|
||||||
io.greptime.v1.Common.SemanticType getSemanticType();
|
io.greptime.v1.Common.SemanticType getSemanticType();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>string comment = 6;</code>
|
||||||
|
* @return The comment.
|
||||||
|
*/
|
||||||
|
java.lang.String getComment();
|
||||||
|
/**
|
||||||
|
* <code>string comment = 6;</code>
|
||||||
|
* @return The bytes for comment.
|
||||||
|
*/
|
||||||
|
com.google.protobuf.ByteString
|
||||||
|
getCommentBytes();
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Protobuf type {@code greptime.v1.ColumnDef}
|
* Protobuf type {@code greptime.v1.ColumnDef}
|
||||||
@@ -13033,6 +13045,7 @@ java.lang.String defaultValue);
|
|||||||
dataType_ = 0;
|
dataType_ = 0;
|
||||||
defaultConstraint_ = com.google.protobuf.ByteString.EMPTY;
|
defaultConstraint_ = com.google.protobuf.ByteString.EMPTY;
|
||||||
semanticType_ = 0;
|
semanticType_ = 0;
|
||||||
|
comment_ = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
@java.lang.Override
|
@java.lang.Override
|
||||||
@@ -13093,6 +13106,12 @@ java.lang.String defaultValue);
|
|||||||
semanticType_ = rawValue;
|
semanticType_ = rawValue;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case 50: {
|
||||||
|
java.lang.String s = input.readStringRequireUtf8();
|
||||||
|
|
||||||
|
comment_ = s;
|
||||||
|
break;
|
||||||
|
}
|
||||||
default: {
|
default: {
|
||||||
if (!parseUnknownField(
|
if (!parseUnknownField(
|
||||||
input, unknownFields, extensionRegistry, tag)) {
|
input, unknownFields, extensionRegistry, tag)) {
|
||||||
@@ -13225,6 +13244,44 @@ java.lang.String defaultValue);
|
|||||||
return result == null ? io.greptime.v1.Common.SemanticType.UNRECOGNIZED : result;
|
return result == null ? io.greptime.v1.Common.SemanticType.UNRECOGNIZED : result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static final int COMMENT_FIELD_NUMBER = 6;
|
||||||
|
private volatile java.lang.Object comment_;
|
||||||
|
/**
|
||||||
|
* <code>string comment = 6;</code>
|
||||||
|
* @return The comment.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public java.lang.String getComment() {
|
||||||
|
java.lang.Object ref = comment_;
|
||||||
|
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();
|
||||||
|
comment_ = s;
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>string comment = 6;</code>
|
||||||
|
* @return The bytes for comment.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public com.google.protobuf.ByteString
|
||||||
|
getCommentBytes() {
|
||||||
|
java.lang.Object ref = comment_;
|
||||||
|
if (ref instanceof java.lang.String) {
|
||||||
|
com.google.protobuf.ByteString b =
|
||||||
|
com.google.protobuf.ByteString.copyFromUtf8(
|
||||||
|
(java.lang.String) ref);
|
||||||
|
comment_ = b;
|
||||||
|
return b;
|
||||||
|
} else {
|
||||||
|
return (com.google.protobuf.ByteString) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private byte memoizedIsInitialized = -1;
|
private byte memoizedIsInitialized = -1;
|
||||||
@java.lang.Override
|
@java.lang.Override
|
||||||
public final boolean isInitialized() {
|
public final boolean isInitialized() {
|
||||||
@@ -13254,6 +13311,9 @@ java.lang.String defaultValue);
|
|||||||
if (semanticType_ != io.greptime.v1.Common.SemanticType.TAG.getNumber()) {
|
if (semanticType_ != io.greptime.v1.Common.SemanticType.TAG.getNumber()) {
|
||||||
output.writeEnum(5, semanticType_);
|
output.writeEnum(5, semanticType_);
|
||||||
}
|
}
|
||||||
|
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(comment_)) {
|
||||||
|
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, comment_);
|
||||||
|
}
|
||||||
unknownFields.writeTo(output);
|
unknownFields.writeTo(output);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -13282,6 +13342,9 @@ java.lang.String defaultValue);
|
|||||||
size += com.google.protobuf.CodedOutputStream
|
size += com.google.protobuf.CodedOutputStream
|
||||||
.computeEnumSize(5, semanticType_);
|
.computeEnumSize(5, semanticType_);
|
||||||
}
|
}
|
||||||
|
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(comment_)) {
|
||||||
|
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, comment_);
|
||||||
|
}
|
||||||
size += unknownFields.getSerializedSize();
|
size += unknownFields.getSerializedSize();
|
||||||
memoizedSize = size;
|
memoizedSize = size;
|
||||||
return size;
|
return size;
|
||||||
@@ -13305,6 +13368,8 @@ java.lang.String defaultValue);
|
|||||||
if (!getDefaultConstraint()
|
if (!getDefaultConstraint()
|
||||||
.equals(other.getDefaultConstraint())) return false;
|
.equals(other.getDefaultConstraint())) return false;
|
||||||
if (semanticType_ != other.semanticType_) return false;
|
if (semanticType_ != other.semanticType_) return false;
|
||||||
|
if (!getComment()
|
||||||
|
.equals(other.getComment())) return false;
|
||||||
if (!unknownFields.equals(other.unknownFields)) return false;
|
if (!unknownFields.equals(other.unknownFields)) return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -13327,6 +13392,8 @@ java.lang.String defaultValue);
|
|||||||
hash = (53 * hash) + getDefaultConstraint().hashCode();
|
hash = (53 * hash) + getDefaultConstraint().hashCode();
|
||||||
hash = (37 * hash) + SEMANTIC_TYPE_FIELD_NUMBER;
|
hash = (37 * hash) + SEMANTIC_TYPE_FIELD_NUMBER;
|
||||||
hash = (53 * hash) + semanticType_;
|
hash = (53 * hash) + semanticType_;
|
||||||
|
hash = (37 * hash) + COMMENT_FIELD_NUMBER;
|
||||||
|
hash = (53 * hash) + getComment().hashCode();
|
||||||
hash = (29 * hash) + unknownFields.hashCode();
|
hash = (29 * hash) + unknownFields.hashCode();
|
||||||
memoizedHashCode = hash;
|
memoizedHashCode = hash;
|
||||||
return hash;
|
return hash;
|
||||||
@@ -13470,6 +13537,8 @@ java.lang.String defaultValue);
|
|||||||
|
|
||||||
semanticType_ = 0;
|
semanticType_ = 0;
|
||||||
|
|
||||||
|
comment_ = "";
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -13501,6 +13570,7 @@ java.lang.String defaultValue);
|
|||||||
result.isNullable_ = isNullable_;
|
result.isNullable_ = isNullable_;
|
||||||
result.defaultConstraint_ = defaultConstraint_;
|
result.defaultConstraint_ = defaultConstraint_;
|
||||||
result.semanticType_ = semanticType_;
|
result.semanticType_ = semanticType_;
|
||||||
|
result.comment_ = comment_;
|
||||||
onBuilt();
|
onBuilt();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -13565,6 +13635,10 @@ java.lang.String defaultValue);
|
|||||||
if (other.semanticType_ != 0) {
|
if (other.semanticType_ != 0) {
|
||||||
setSemanticTypeValue(other.getSemanticTypeValue());
|
setSemanticTypeValue(other.getSemanticTypeValue());
|
||||||
}
|
}
|
||||||
|
if (!other.getComment().isEmpty()) {
|
||||||
|
comment_ = other.comment_;
|
||||||
|
onChanged();
|
||||||
|
}
|
||||||
this.mergeUnknownFields(other.unknownFields);
|
this.mergeUnknownFields(other.unknownFields);
|
||||||
onChanged();
|
onChanged();
|
||||||
return this;
|
return this;
|
||||||
@@ -13842,6 +13916,82 @@ java.lang.String defaultValue);
|
|||||||
onChanged();
|
onChanged();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private java.lang.Object comment_ = "";
|
||||||
|
/**
|
||||||
|
* <code>string comment = 6;</code>
|
||||||
|
* @return The comment.
|
||||||
|
*/
|
||||||
|
public java.lang.String getComment() {
|
||||||
|
java.lang.Object ref = comment_;
|
||||||
|
if (!(ref instanceof java.lang.String)) {
|
||||||
|
com.google.protobuf.ByteString bs =
|
||||||
|
(com.google.protobuf.ByteString) ref;
|
||||||
|
java.lang.String s = bs.toStringUtf8();
|
||||||
|
comment_ = s;
|
||||||
|
return s;
|
||||||
|
} else {
|
||||||
|
return (java.lang.String) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>string comment = 6;</code>
|
||||||
|
* @return The bytes for comment.
|
||||||
|
*/
|
||||||
|
public com.google.protobuf.ByteString
|
||||||
|
getCommentBytes() {
|
||||||
|
java.lang.Object ref = comment_;
|
||||||
|
if (ref instanceof String) {
|
||||||
|
com.google.protobuf.ByteString b =
|
||||||
|
com.google.protobuf.ByteString.copyFromUtf8(
|
||||||
|
(java.lang.String) ref);
|
||||||
|
comment_ = b;
|
||||||
|
return b;
|
||||||
|
} else {
|
||||||
|
return (com.google.protobuf.ByteString) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>string comment = 6;</code>
|
||||||
|
* @param value The comment to set.
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder setComment(
|
||||||
|
java.lang.String value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
|
||||||
|
comment_ = value;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>string comment = 6;</code>
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder clearComment() {
|
||||||
|
|
||||||
|
comment_ = getDefaultInstance().getComment();
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>string comment = 6;</code>
|
||||||
|
* @param value The bytes for comment to set.
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder setCommentBytes(
|
||||||
|
com.google.protobuf.ByteString value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
checkByteStringIsUtf8(value);
|
||||||
|
|
||||||
|
comment_ = value;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
@java.lang.Override
|
@java.lang.Override
|
||||||
public final Builder setUnknownFields(
|
public final Builder setUnknownFields(
|
||||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||||
@@ -14812,17 +14962,17 @@ java.lang.String defaultValue);
|
|||||||
"\026.greptime.v1.ColumnDef\0220\n\010location\030\003 \001(" +
|
"\026.greptime.v1.ColumnDef\0220\n\010location\030\003 \001(" +
|
||||||
"\0132\036.greptime.v1.AddColumnLocation\"\032\n\nDro" +
|
"\0132\036.greptime.v1.AddColumnLocation\"\032\n\nDro" +
|
||||||
"pColumn\022\014\n\004name\030\001 \001(\t\"\025\n\007TableId\022\n\n\002id\030\001" +
|
"pColumn\022\014\n\004name\030\001 \001(\t\"\025\n\007TableId\022\n\n\002id\030\001" +
|
||||||
" \001(\r\"\254\001\n\tColumnDef\022\014\n\004name\030\001 \001(\t\022.\n\tdata" +
|
" \001(\r\"\275\001\n\tColumnDef\022\014\n\004name\030\001 \001(\t\022.\n\tdata" +
|
||||||
"_type\030\002 \001(\0162\033.greptime.v1.ColumnDataType" +
|
"_type\030\002 \001(\0162\033.greptime.v1.ColumnDataType" +
|
||||||
"\022\023\n\013is_nullable\030\003 \001(\010\022\032\n\022default_constra" +
|
"\022\023\n\013is_nullable\030\003 \001(\010\022\032\n\022default_constra" +
|
||||||
"int\030\004 \001(\014\0220\n\rsemantic_type\030\005 \001(\0162\031.grept" +
|
"int\030\004 \001(\014\0220\n\rsemantic_type\030\005 \001(\0162\031.grept" +
|
||||||
"ime.v1.SemanticType\"\230\001\n\021AddColumnLocatio" +
|
"ime.v1.SemanticType\022\017\n\007comment\030\006 \001(\t\"\230\001\n" +
|
||||||
"n\022B\n\rlocation_type\030\001 \001(\0162+.greptime.v1.A" +
|
"\021AddColumnLocation\022B\n\rlocation_type\030\001 \001(" +
|
||||||
"ddColumnLocation.LocationType\022\031\n\021after_c" +
|
"\0162+.greptime.v1.AddColumnLocation.Locati" +
|
||||||
"olumn_name\030\002 \001(\t\"$\n\014LocationType\022\t\n\005FIRS" +
|
"onType\022\031\n\021after_column_name\030\002 \001(\t\"$\n\014Loc" +
|
||||||
"T\020\000\022\t\n\005AFTER\020\001BL\n\016io.greptime.v1B\003DdlZ5g" +
|
"ationType\022\t\n\005FIRST\020\000\022\t\n\005AFTER\020\001BL\n\016io.gr" +
|
||||||
"ithub.com/GreptimeTeam/greptime-proto/go" +
|
"eptime.v1B\003DdlZ5github.com/GreptimeTeam/" +
|
||||||
"/greptime/v1b\006proto3"
|
"greptime-proto/go/greptime/v1b\006proto3"
|
||||||
};
|
};
|
||||||
descriptor = com.google.protobuf.Descriptors.FileDescriptor
|
descriptor = com.google.protobuf.Descriptors.FileDescriptor
|
||||||
.internalBuildGeneratedFileFrom(descriptorData,
|
.internalBuildGeneratedFileFrom(descriptorData,
|
||||||
@@ -14918,7 +15068,7 @@ java.lang.String defaultValue);
|
|||||||
internal_static_greptime_v1_ColumnDef_fieldAccessorTable = new
|
internal_static_greptime_v1_ColumnDef_fieldAccessorTable = new
|
||||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||||
internal_static_greptime_v1_ColumnDef_descriptor,
|
internal_static_greptime_v1_ColumnDef_descriptor,
|
||||||
new java.lang.String[] { "Name", "DataType", "IsNullable", "DefaultConstraint", "SemanticType", });
|
new java.lang.String[] { "Name", "DataType", "IsNullable", "DefaultConstraint", "SemanticType", "Comment", });
|
||||||
internal_static_greptime_v1_AddColumnLocation_descriptor =
|
internal_static_greptime_v1_AddColumnLocation_descriptor =
|
||||||
getDescriptor().getMessageTypes().get(13);
|
getDescriptor().getMessageTypes().get(13);
|
||||||
internal_static_greptime_v1_AddColumnLocation_fieldAccessorTable = new
|
internal_static_greptime_v1_AddColumnLocation_fieldAccessorTable = new
|
||||||
|
|||||||
@@ -102,6 +102,7 @@ message ColumnDef {
|
|||||||
bool is_nullable = 3;
|
bool is_nullable = 3;
|
||||||
bytes default_constraint = 4;
|
bytes default_constraint = 4;
|
||||||
SemanticType semantic_type = 5;
|
SemanticType semantic_type = 5;
|
||||||
|
string comment = 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
message AddColumnLocation {
|
message AddColumnLocation {
|
||||||
|
|||||||
Reference in New Issue
Block a user