feat: Query ctx snapshots (#212)
* feat: seq_snapshots field for query context * chore: make * chore: comment * refactor: new type * chore: rename * chore: not fmt stuff
This commit is contained in:
+361
-17
@@ -101,6 +101,12 @@ extern RequestHeader_TracingContextEntry_DoNotUseDefaultTypeInternal _RequestHea
|
||||
class ResponseHeader;
|
||||
struct ResponseHeaderDefaultTypeInternal;
|
||||
extern ResponseHeaderDefaultTypeInternal _ResponseHeader_default_instance_;
|
||||
class SequenceSnapshot;
|
||||
struct SequenceSnapshotDefaultTypeInternal;
|
||||
extern SequenceSnapshotDefaultTypeInternal _SequenceSnapshot_default_instance_;
|
||||
class SequenceSnapshot_SeqSnapshotEntry_DoNotUse;
|
||||
struct SequenceSnapshot_SeqSnapshotEntry_DoNotUseDefaultTypeInternal;
|
||||
extern SequenceSnapshot_SeqSnapshotEntry_DoNotUseDefaultTypeInternal _SequenceSnapshot_SeqSnapshotEntry_DoNotUse_default_instance_;
|
||||
class Status;
|
||||
struct StatusDefaultTypeInternal;
|
||||
extern StatusDefaultTypeInternal _Status_default_instance_;
|
||||
@@ -133,6 +139,8 @@ template<> ::greptime::v1::QueryContext_ExtensionsEntry_DoNotUse* Arena::CreateM
|
||||
template<> ::greptime::v1::RequestHeader* Arena::CreateMaybeMessage<::greptime::v1::RequestHeader>(Arena*);
|
||||
template<> ::greptime::v1::RequestHeader_TracingContextEntry_DoNotUse* Arena::CreateMaybeMessage<::greptime::v1::RequestHeader_TracingContextEntry_DoNotUse>(Arena*);
|
||||
template<> ::greptime::v1::ResponseHeader* Arena::CreateMaybeMessage<::greptime::v1::ResponseHeader>(Arena*);
|
||||
template<> ::greptime::v1::SequenceSnapshot* Arena::CreateMaybeMessage<::greptime::v1::SequenceSnapshot>(Arena*);
|
||||
template<> ::greptime::v1::SequenceSnapshot_SeqSnapshotEntry_DoNotUse* Arena::CreateMaybeMessage<::greptime::v1::SequenceSnapshot_SeqSnapshotEntry_DoNotUse>(Arena*);
|
||||
template<> ::greptime::v1::Status* Arena::CreateMaybeMessage<::greptime::v1::Status>(Arena*);
|
||||
template<> ::greptime::v1::TableName* Arena::CreateMaybeMessage<::greptime::v1::TableName>(Arena*);
|
||||
template<> ::greptime::v1::Token* Arena::CreateMaybeMessage<::greptime::v1::Token>(Arena*);
|
||||
@@ -401,6 +409,7 @@ class QueryContext final :
|
||||
kCurrentCatalogFieldNumber = 1,
|
||||
kCurrentSchemaFieldNumber = 2,
|
||||
kTimezoneFieldNumber = 4,
|
||||
kSeqSnapshotFieldNumber = 7,
|
||||
kChannelFieldNumber = 6,
|
||||
};
|
||||
// map<string, string> extensions = 5;
|
||||
@@ -462,6 +471,24 @@ class QueryContext final :
|
||||
std::string* _internal_mutable_timezone();
|
||||
public:
|
||||
|
||||
// .greptime.v1.SequenceSnapshot seq_snapshot = 7;
|
||||
bool has_seq_snapshot() const;
|
||||
private:
|
||||
bool _internal_has_seq_snapshot() const;
|
||||
public:
|
||||
void clear_seq_snapshot();
|
||||
const ::greptime::v1::SequenceSnapshot& seq_snapshot() const;
|
||||
PROTOBUF_NODISCARD ::greptime::v1::SequenceSnapshot* release_seq_snapshot();
|
||||
::greptime::v1::SequenceSnapshot* mutable_seq_snapshot();
|
||||
void set_allocated_seq_snapshot(::greptime::v1::SequenceSnapshot* seq_snapshot);
|
||||
private:
|
||||
const ::greptime::v1::SequenceSnapshot& _internal_seq_snapshot() const;
|
||||
::greptime::v1::SequenceSnapshot* _internal_mutable_seq_snapshot();
|
||||
public:
|
||||
void unsafe_arena_set_allocated_seq_snapshot(
|
||||
::greptime::v1::SequenceSnapshot* seq_snapshot);
|
||||
::greptime::v1::SequenceSnapshot* unsafe_arena_release_seq_snapshot();
|
||||
|
||||
// uint32 channel = 6;
|
||||
void clear_channel();
|
||||
uint32_t channel() const;
|
||||
@@ -487,6 +514,7 @@ class QueryContext final :
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr current_catalog_;
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr current_schema_;
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr timezone_;
|
||||
::greptime::v1::SequenceSnapshot* seq_snapshot_;
|
||||
uint32_t channel_;
|
||||
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
||||
};
|
||||
@@ -495,6 +523,193 @@ class QueryContext final :
|
||||
};
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
class SequenceSnapshot_SeqSnapshotEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry<SequenceSnapshot_SeqSnapshotEntry_DoNotUse,
|
||||
uint64_t, uint64_t,
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64,
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64> {
|
||||
public:
|
||||
typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry<SequenceSnapshot_SeqSnapshotEntry_DoNotUse,
|
||||
uint64_t, uint64_t,
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64,
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64> SuperType;
|
||||
SequenceSnapshot_SeqSnapshotEntry_DoNotUse();
|
||||
explicit PROTOBUF_CONSTEXPR SequenceSnapshot_SeqSnapshotEntry_DoNotUse(
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
|
||||
explicit SequenceSnapshot_SeqSnapshotEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena);
|
||||
void MergeFrom(const SequenceSnapshot_SeqSnapshotEntry_DoNotUse& other);
|
||||
static const SequenceSnapshot_SeqSnapshotEntry_DoNotUse* internal_default_instance() { return reinterpret_cast<const SequenceSnapshot_SeqSnapshotEntry_DoNotUse*>(&_SequenceSnapshot_SeqSnapshotEntry_DoNotUse_default_instance_); }
|
||||
static bool ValidateKey(void*) { return true; }
|
||||
static bool ValidateValue(void*) { return true; }
|
||||
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
|
||||
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
|
||||
friend struct ::TableStruct_greptime_2fv1_2fcommon_2eproto;
|
||||
};
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
class SequenceSnapshot final :
|
||||
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.SequenceSnapshot) */ {
|
||||
public:
|
||||
inline SequenceSnapshot() : SequenceSnapshot(nullptr) {}
|
||||
~SequenceSnapshot() override;
|
||||
explicit PROTOBUF_CONSTEXPR SequenceSnapshot(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
|
||||
|
||||
SequenceSnapshot(const SequenceSnapshot& from);
|
||||
SequenceSnapshot(SequenceSnapshot&& from) noexcept
|
||||
: SequenceSnapshot() {
|
||||
*this = ::std::move(from);
|
||||
}
|
||||
|
||||
inline SequenceSnapshot& operator=(const SequenceSnapshot& from) {
|
||||
CopyFrom(from);
|
||||
return *this;
|
||||
}
|
||||
inline SequenceSnapshot& operator=(SequenceSnapshot&& 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 SequenceSnapshot& default_instance() {
|
||||
return *internal_default_instance();
|
||||
}
|
||||
static inline const SequenceSnapshot* internal_default_instance() {
|
||||
return reinterpret_cast<const SequenceSnapshot*>(
|
||||
&_SequenceSnapshot_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
3;
|
||||
|
||||
friend void swap(SequenceSnapshot& a, SequenceSnapshot& b) {
|
||||
a.Swap(&b);
|
||||
}
|
||||
inline void Swap(SequenceSnapshot* 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(SequenceSnapshot* other) {
|
||||
if (other == this) return;
|
||||
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
|
||||
InternalSwap(other);
|
||||
}
|
||||
|
||||
// implements Message ----------------------------------------------
|
||||
|
||||
SequenceSnapshot* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final {
|
||||
return CreateMaybeMessage<SequenceSnapshot>(arena);
|
||||
}
|
||||
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
|
||||
void CopyFrom(const SequenceSnapshot& from);
|
||||
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
|
||||
void MergeFrom( const SequenceSnapshot& from) {
|
||||
SequenceSnapshot::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(SequenceSnapshot* other);
|
||||
|
||||
private:
|
||||
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
|
||||
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
|
||||
return "greptime.v1.SequenceSnapshot";
|
||||
}
|
||||
protected:
|
||||
explicit SequenceSnapshot(::PROTOBUF_NAMESPACE_ID::Arena* arena,
|
||||
bool is_message_owned = false);
|
||||
private:
|
||||
static void ArenaDtor(void* object);
|
||||
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 {
|
||||
kSeqSnapshotFieldNumber = 7,
|
||||
};
|
||||
// map<uint64, uint64> seq_snapshot = 7;
|
||||
int seq_snapshot_size() const;
|
||||
private:
|
||||
int _internal_seq_snapshot_size() const;
|
||||
public:
|
||||
void clear_seq_snapshot();
|
||||
private:
|
||||
const ::PROTOBUF_NAMESPACE_ID::Map< uint64_t, uint64_t >&
|
||||
_internal_seq_snapshot() const;
|
||||
::PROTOBUF_NAMESPACE_ID::Map< uint64_t, uint64_t >*
|
||||
_internal_mutable_seq_snapshot();
|
||||
public:
|
||||
const ::PROTOBUF_NAMESPACE_ID::Map< uint64_t, uint64_t >&
|
||||
seq_snapshot() const;
|
||||
::PROTOBUF_NAMESPACE_ID::Map< uint64_t, uint64_t >*
|
||||
mutable_seq_snapshot();
|
||||
|
||||
// @@protoc_insertion_point(class_scope:greptime.v1.SequenceSnapshot)
|
||||
private:
|
||||
class _Internal;
|
||||
|
||||
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
|
||||
typedef void InternalArenaConstructable_;
|
||||
typedef void DestructorSkippable_;
|
||||
struct Impl_ {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::MapField<
|
||||
SequenceSnapshot_SeqSnapshotEntry_DoNotUse,
|
||||
uint64_t, uint64_t,
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64,
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64> seq_snapshot_;
|
||||
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
||||
};
|
||||
union { Impl_ _impl_; };
|
||||
friend struct ::TableStruct_greptime_2fv1_2fcommon_2eproto;
|
||||
};
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
class RequestHeader_TracingContextEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry<RequestHeader_TracingContextEntry_DoNotUse,
|
||||
std::string, std::string,
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING,
|
||||
@@ -571,7 +786,7 @@ class RequestHeader final :
|
||||
&_RequestHeader_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
3;
|
||||
5;
|
||||
|
||||
friend void swap(RequestHeader& a, RequestHeader& b) {
|
||||
a.Swap(&b);
|
||||
@@ -818,7 +1033,7 @@ class ResponseHeader final :
|
||||
&_ResponseHeader_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
4;
|
||||
6;
|
||||
|
||||
friend void swap(ResponseHeader& a, ResponseHeader& b) {
|
||||
a.Swap(&b);
|
||||
@@ -975,7 +1190,7 @@ class Status final :
|
||||
&_Status_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
5;
|
||||
7;
|
||||
|
||||
friend void swap(Status& a, Status& b) {
|
||||
a.Swap(&b);
|
||||
@@ -1145,7 +1360,7 @@ class AuthHeader final :
|
||||
&_AuthHeader_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
6;
|
||||
8;
|
||||
|
||||
friend void swap(AuthHeader& a, AuthHeader& b) {
|
||||
a.Swap(&b);
|
||||
@@ -1335,7 +1550,7 @@ class Basic final :
|
||||
&_Basic_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
7;
|
||||
9;
|
||||
|
||||
friend void swap(Basic& a, Basic& b) {
|
||||
a.Swap(&b);
|
||||
@@ -1504,7 +1719,7 @@ class Token final :
|
||||
&_Token_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
8;
|
||||
10;
|
||||
|
||||
friend void swap(Token& a, Token& b) {
|
||||
a.Swap(&b);
|
||||
@@ -1657,7 +1872,7 @@ class TableName final :
|
||||
&_TableName_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
9;
|
||||
11;
|
||||
|
||||
friend void swap(TableName& a, TableName& b) {
|
||||
a.Swap(&b);
|
||||
@@ -1842,7 +2057,7 @@ class AffectedRows final :
|
||||
&_AffectedRows_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
10;
|
||||
12;
|
||||
|
||||
friend void swap(AffectedRows& a, AffectedRows& b) {
|
||||
a.Swap(&b);
|
||||
@@ -1990,7 +2205,7 @@ class Metrics final :
|
||||
&_Metrics_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
11;
|
||||
13;
|
||||
|
||||
friend void swap(Metrics& a, Metrics& b) {
|
||||
a.Swap(&b);
|
||||
@@ -2143,7 +2358,7 @@ class ExpireAfter final :
|
||||
&_ExpireAfter_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
12;
|
||||
14;
|
||||
|
||||
friend void swap(ExpireAfter& a, ExpireAfter& b) {
|
||||
a.Swap(&b);
|
||||
@@ -2291,7 +2506,7 @@ class FlightMetadata final :
|
||||
&_FlightMetadata_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
13;
|
||||
15;
|
||||
|
||||
friend void swap(FlightMetadata& a, FlightMetadata& b) {
|
||||
a.Swap(&b);
|
||||
@@ -2468,7 +2683,7 @@ class IntervalMonthDayNano final :
|
||||
&_IntervalMonthDayNano_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
14;
|
||||
16;
|
||||
|
||||
friend void swap(IntervalMonthDayNano& a, IntervalMonthDayNano& b) {
|
||||
a.Swap(&b);
|
||||
@@ -2638,7 +2853,7 @@ class Decimal128 final :
|
||||
&_Decimal128_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
15;
|
||||
17;
|
||||
|
||||
friend void swap(Decimal128& a, Decimal128& b) {
|
||||
a.Swap(&b);
|
||||
@@ -2804,7 +3019,7 @@ class ColumnDataTypeExtension final :
|
||||
&_ColumnDataTypeExtension_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
16;
|
||||
18;
|
||||
|
||||
friend void swap(ColumnDataTypeExtension& a, ColumnDataTypeExtension& b) {
|
||||
a.Swap(&b);
|
||||
@@ -3010,7 +3225,7 @@ class DecimalTypeExtension final :
|
||||
&_DecimalTypeExtension_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
17;
|
||||
19;
|
||||
|
||||
friend void swap(DecimalTypeExtension& a, DecimalTypeExtension& b) {
|
||||
a.Swap(&b);
|
||||
@@ -3169,7 +3384,7 @@ class VectorTypeExtension final :
|
||||
&_VectorTypeExtension_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
18;
|
||||
20;
|
||||
|
||||
friend void swap(VectorTypeExtension& a, VectorTypeExtension& b) {
|
||||
a.Swap(&b);
|
||||
@@ -3345,7 +3560,7 @@ class ColumnOptions final :
|
||||
&_ColumnOptions_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
20;
|
||||
22;
|
||||
|
||||
friend void swap(ColumnOptions& a, ColumnOptions& b) {
|
||||
a.Swap(&b);
|
||||
@@ -3670,6 +3885,131 @@ inline void QueryContext::set_channel(uint32_t value) {
|
||||
// @@protoc_insertion_point(field_set:greptime.v1.QueryContext.channel)
|
||||
}
|
||||
|
||||
// .greptime.v1.SequenceSnapshot seq_snapshot = 7;
|
||||
inline bool QueryContext::_internal_has_seq_snapshot() const {
|
||||
return this != internal_default_instance() && _impl_.seq_snapshot_ != nullptr;
|
||||
}
|
||||
inline bool QueryContext::has_seq_snapshot() const {
|
||||
return _internal_has_seq_snapshot();
|
||||
}
|
||||
inline void QueryContext::clear_seq_snapshot() {
|
||||
if (GetArenaForAllocation() == nullptr && _impl_.seq_snapshot_ != nullptr) {
|
||||
delete _impl_.seq_snapshot_;
|
||||
}
|
||||
_impl_.seq_snapshot_ = nullptr;
|
||||
}
|
||||
inline const ::greptime::v1::SequenceSnapshot& QueryContext::_internal_seq_snapshot() const {
|
||||
const ::greptime::v1::SequenceSnapshot* p = _impl_.seq_snapshot_;
|
||||
return p != nullptr ? *p : reinterpret_cast<const ::greptime::v1::SequenceSnapshot&>(
|
||||
::greptime::v1::_SequenceSnapshot_default_instance_);
|
||||
}
|
||||
inline const ::greptime::v1::SequenceSnapshot& QueryContext::seq_snapshot() const {
|
||||
// @@protoc_insertion_point(field_get:greptime.v1.QueryContext.seq_snapshot)
|
||||
return _internal_seq_snapshot();
|
||||
}
|
||||
inline void QueryContext::unsafe_arena_set_allocated_seq_snapshot(
|
||||
::greptime::v1::SequenceSnapshot* seq_snapshot) {
|
||||
if (GetArenaForAllocation() == nullptr) {
|
||||
delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.seq_snapshot_);
|
||||
}
|
||||
_impl_.seq_snapshot_ = seq_snapshot;
|
||||
if (seq_snapshot) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.QueryContext.seq_snapshot)
|
||||
}
|
||||
inline ::greptime::v1::SequenceSnapshot* QueryContext::release_seq_snapshot() {
|
||||
|
||||
::greptime::v1::SequenceSnapshot* temp = _impl_.seq_snapshot_;
|
||||
_impl_.seq_snapshot_ = nullptr;
|
||||
#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE
|
||||
auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp);
|
||||
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
|
||||
if (GetArenaForAllocation() == nullptr) { delete old; }
|
||||
#else // PROTOBUF_FORCE_COPY_IN_RELEASE
|
||||
if (GetArenaForAllocation() != nullptr) {
|
||||
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
|
||||
}
|
||||
#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE
|
||||
return temp;
|
||||
}
|
||||
inline ::greptime::v1::SequenceSnapshot* QueryContext::unsafe_arena_release_seq_snapshot() {
|
||||
// @@protoc_insertion_point(field_release:greptime.v1.QueryContext.seq_snapshot)
|
||||
|
||||
::greptime::v1::SequenceSnapshot* temp = _impl_.seq_snapshot_;
|
||||
_impl_.seq_snapshot_ = nullptr;
|
||||
return temp;
|
||||
}
|
||||
inline ::greptime::v1::SequenceSnapshot* QueryContext::_internal_mutable_seq_snapshot() {
|
||||
|
||||
if (_impl_.seq_snapshot_ == nullptr) {
|
||||
auto* p = CreateMaybeMessage<::greptime::v1::SequenceSnapshot>(GetArenaForAllocation());
|
||||
_impl_.seq_snapshot_ = p;
|
||||
}
|
||||
return _impl_.seq_snapshot_;
|
||||
}
|
||||
inline ::greptime::v1::SequenceSnapshot* QueryContext::mutable_seq_snapshot() {
|
||||
::greptime::v1::SequenceSnapshot* _msg = _internal_mutable_seq_snapshot();
|
||||
// @@protoc_insertion_point(field_mutable:greptime.v1.QueryContext.seq_snapshot)
|
||||
return _msg;
|
||||
}
|
||||
inline void QueryContext::set_allocated_seq_snapshot(::greptime::v1::SequenceSnapshot* seq_snapshot) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
|
||||
if (message_arena == nullptr) {
|
||||
delete _impl_.seq_snapshot_;
|
||||
}
|
||||
if (seq_snapshot) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
|
||||
::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(seq_snapshot);
|
||||
if (message_arena != submessage_arena) {
|
||||
seq_snapshot = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
|
||||
message_arena, seq_snapshot, submessage_arena);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
_impl_.seq_snapshot_ = seq_snapshot;
|
||||
// @@protoc_insertion_point(field_set_allocated:greptime.v1.QueryContext.seq_snapshot)
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// SequenceSnapshot
|
||||
|
||||
// map<uint64, uint64> seq_snapshot = 7;
|
||||
inline int SequenceSnapshot::_internal_seq_snapshot_size() const {
|
||||
return _impl_.seq_snapshot_.size();
|
||||
}
|
||||
inline int SequenceSnapshot::seq_snapshot_size() const {
|
||||
return _internal_seq_snapshot_size();
|
||||
}
|
||||
inline void SequenceSnapshot::clear_seq_snapshot() {
|
||||
_impl_.seq_snapshot_.Clear();
|
||||
}
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::Map< uint64_t, uint64_t >&
|
||||
SequenceSnapshot::_internal_seq_snapshot() const {
|
||||
return _impl_.seq_snapshot_.GetMap();
|
||||
}
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::Map< uint64_t, uint64_t >&
|
||||
SequenceSnapshot::seq_snapshot() const {
|
||||
// @@protoc_insertion_point(field_map:greptime.v1.SequenceSnapshot.seq_snapshot)
|
||||
return _internal_seq_snapshot();
|
||||
}
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Map< uint64_t, uint64_t >*
|
||||
SequenceSnapshot::_internal_mutable_seq_snapshot() {
|
||||
return _impl_.seq_snapshot_.MutableMap();
|
||||
}
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Map< uint64_t, uint64_t >*
|
||||
SequenceSnapshot::mutable_seq_snapshot() {
|
||||
// @@protoc_insertion_point(field_mutable_map:greptime.v1.SequenceSnapshot.seq_snapshot)
|
||||
return _internal_mutable_seq_snapshot();
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
@@ -5375,6 +5715,10 @@ ColumnOptions::mutable_options() {
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
|
||||
// @@protoc_insertion_point(namespace_scope)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user