Drizzled Public API Documentation

schema.pb.cc
1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: schema.proto
3 
4 #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
5 #include "schema.pb.h"
6 
7 #include <algorithm>
8 
9 #include <google/protobuf/stubs/common.h>
10 #include <google/protobuf/stubs/once.h>
11 #include <google/protobuf/io/coded_stream.h>
12 #include <google/protobuf/wire_format_lite_inl.h>
13 #include <google/protobuf/descriptor.h>
14 #include <google/protobuf/generated_message_reflection.h>
15 #include <google/protobuf/reflection_ops.h>
16 #include <google/protobuf/wire_format.h>
17 // @@protoc_insertion_point(includes)
18 
19 namespace drizzled {
20 namespace message {
21 
22 namespace {
23 
24 const ::google::protobuf::Descriptor* Schema_descriptor_ = NULL;
25 const ::google::protobuf::internal::GeneratedMessageReflection*
26  Schema_reflection_ = NULL;
27 const ::google::protobuf::Descriptor* Schema_Options_descriptor_ = NULL;
28 const ::google::protobuf::internal::GeneratedMessageReflection*
29  Schema_Options_reflection_ = NULL;
30 
31 } // namespace
32 
33 
34 void protobuf_AssignDesc_schema_2eproto() {
35  protobuf_AddDesc_schema_2eproto();
36  const ::google::protobuf::FileDescriptor* file =
37  ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
38  "schema.proto");
39  GOOGLE_CHECK(file != NULL);
40  Schema_descriptor_ = file->message_type(0);
41  static const int Schema_offsets_[11] = {
42  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Schema, name_),
43  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Schema, collation_),
44  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Schema, engine_),
45  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Schema, catalog_),
46  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Schema, creation_timestamp_),
47  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Schema, update_timestamp_),
48  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Schema, uuid_),
49  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Schema, version_),
50  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Schema, options_),
51  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Schema, replication_options_),
52  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Schema, access_),
53  };
54  Schema_reflection_ =
55  new ::google::protobuf::internal::GeneratedMessageReflection(
56  Schema_descriptor_,
57  Schema::default_instance_,
58  Schema_offsets_,
59  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Schema, _has_bits_[0]),
60  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Schema, _unknown_fields_),
61  -1,
62  ::google::protobuf::DescriptorPool::generated_pool(),
63  ::google::protobuf::MessageFactory::generated_factory(),
64  sizeof(Schema));
65  Schema_Options_descriptor_ = Schema_descriptor_->nested_type(0);
66  static const int Schema_Options_offsets_[1] = {
67  };
68  Schema_Options_reflection_ =
69  new ::google::protobuf::internal::GeneratedMessageReflection(
70  Schema_Options_descriptor_,
71  Schema_Options::default_instance_,
72  Schema_Options_offsets_,
73  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Schema_Options, _has_bits_[0]),
74  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Schema_Options, _unknown_fields_),
75  -1,
76  ::google::protobuf::DescriptorPool::generated_pool(),
77  ::google::protobuf::MessageFactory::generated_factory(),
78  sizeof(Schema_Options));
79 }
80 
81 namespace {
82 
83 GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
84 inline void protobuf_AssignDescriptorsOnce() {
85  ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
86  &protobuf_AssignDesc_schema_2eproto);
87 }
88 
89 void protobuf_RegisterTypes(const ::std::string&) {
90  protobuf_AssignDescriptorsOnce();
91  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
92  Schema_descriptor_, &Schema::default_instance());
93  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
94  Schema_Options_descriptor_, &Schema_Options::default_instance());
95 }
96 
97 } // namespace
98 
99 void protobuf_ShutdownFile_schema_2eproto() {
100  delete Schema::default_instance_;
101  delete Schema_reflection_;
102  delete Schema_Options::default_instance_;
103  delete Schema_Options_reflection_;
104 }
105 
106 void protobuf_AddDesc_schema_2eproto() {
107  static bool already_here = false;
108  if (already_here) return;
109  already_here = true;
110  GOOGLE_PROTOBUF_VERIFY_VERSION;
111 
112  ::drizzled::message::protobuf_AddDesc_engine_2eproto();
113  ::drizzled::message::protobuf_AddDesc_access_2eproto();
114  ::drizzled::message::protobuf_AddDesc_replication_5foptions_2eproto();
115  ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
116  "\n\014schema.proto\022\020drizzled.message\032\014engine"
117  ".proto\032\014access.proto\032\031replication_option"
118  "s.proto\"\352\002\n\006Schema\022\014\n\004name\030\001 \002(\t\022\021\n\tcoll"
119  "ation\030\002 \001(\t\022(\n\006engine\030\003 \002(\0132\030.drizzled.m"
120  "essage.Engine\022\017\n\007catalog\030\004 \001(\t\022\035\n\022creati"
121  "on_timestamp\030\013 \002(\004:\0010\022\033\n\020update_timestam"
122  "p\030\014 \002(\004:\0010\022\014\n\004uuid\030\r \001(\t\022\017\n\007version\030\016 \001("
123  "\004\0221\n\007options\030\017 \001(\0132 .drizzled.message.Sc"
124  "hema.Options\022A\n\023replication_options\030\020 \001("
125  "\0132$.drizzled.message.ReplicationOptions\022"
126  "(\n\006access\030\021 \001(\0132\030.drizzled.message.Acces"
127  "s\032\t\n\007OptionsB\'\n\024org.drizzle.messagesB\rSc"
128  "hemaMessageH\001", 493);
129  ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
130  "schema.proto", &protobuf_RegisterTypes);
131  Schema::default_instance_ = new Schema();
132  Schema_Options::default_instance_ = new Schema_Options();
133  Schema::default_instance_->InitAsDefaultInstance();
134  Schema_Options::default_instance_->InitAsDefaultInstance();
135  ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_schema_2eproto);
136 }
137 
138 // Force AddDescriptors() to be called at static initialization time.
141  protobuf_AddDesc_schema_2eproto();
142  }
143 } static_descriptor_initializer_schema_2eproto_;
144 
145 // ===================================================================
146 
147 #ifndef _MSC_VER
148 #endif // !_MSC_VER
149 
150 Schema_Options::Schema_Options()
151  : ::google::protobuf::Message() {
152  SharedCtor();
153  // @@protoc_insertion_point(constructor:drizzled.message.Schema.Options)
154 }
155 
156 void Schema_Options::InitAsDefaultInstance() {
157 }
158 
159 Schema_Options::Schema_Options(const Schema_Options& from)
160  : ::google::protobuf::Message() {
161  SharedCtor();
162  MergeFrom(from);
163  // @@protoc_insertion_point(copy_constructor:drizzled.message.Schema.Options)
164 }
165 
166 void Schema_Options::SharedCtor() {
167  _cached_size_ = 0;
168  ::memset(_has_bits_, 0, sizeof(_has_bits_));
169 }
170 
171 Schema_Options::~Schema_Options() {
172  // @@protoc_insertion_point(destructor:drizzled.message.Schema.Options)
173  SharedDtor();
174 }
175 
176 void Schema_Options::SharedDtor() {
177  if (this != default_instance_) {
178  }
179 }
180 
181 void Schema_Options::SetCachedSize(int size) const {
182  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
183  _cached_size_ = size;
184  GOOGLE_SAFE_CONCURRENT_WRITES_END();
185 }
186 const ::google::protobuf::Descriptor* Schema_Options::descriptor() {
187  protobuf_AssignDescriptorsOnce();
188  return Schema_Options_descriptor_;
189 }
190 
191 const Schema_Options& Schema_Options::default_instance() {
192  if (default_instance_ == NULL) protobuf_AddDesc_schema_2eproto();
193  return *default_instance_;
194 }
195 
196 Schema_Options* Schema_Options::default_instance_ = NULL;
197 
198 Schema_Options* Schema_Options::New() const {
199  return new Schema_Options;
200 }
201 
202 void Schema_Options::Clear() {
203  ::memset(_has_bits_, 0, sizeof(_has_bits_));
204  mutable_unknown_fields()->Clear();
205 }
206 
207 bool Schema_Options::MergePartialFromCodedStream(
208  ::google::protobuf::io::CodedInputStream* input) {
209 #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
210  ::google::protobuf::uint32 tag;
211  // @@protoc_insertion_point(parse_start:drizzled.message.Schema.Options)
212  for (;;) {
213  ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
214  tag = p.first;
215  if (!p.second) goto handle_unusual;
216  handle_unusual:
217  if (tag == 0 ||
218  ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
219  ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
220  goto success;
221  }
222  DO_(::google::protobuf::internal::WireFormat::SkipField(
223  input, tag, mutable_unknown_fields()));
224  }
225 success:
226  // @@protoc_insertion_point(parse_success:drizzled.message.Schema.Options)
227  return true;
228 failure:
229  // @@protoc_insertion_point(parse_failure:drizzled.message.Schema.Options)
230  return false;
231 #undef DO_
232 }
233 
234 void Schema_Options::SerializeWithCachedSizes(
235  ::google::protobuf::io::CodedOutputStream* output) const {
236  // @@protoc_insertion_point(serialize_start:drizzled.message.Schema.Options)
237  if (!unknown_fields().empty()) {
238  ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
239  unknown_fields(), output);
240  }
241  // @@protoc_insertion_point(serialize_end:drizzled.message.Schema.Options)
242 }
243 
244 ::google::protobuf::uint8* Schema_Options::SerializeWithCachedSizesToArray(
245  ::google::protobuf::uint8* target) const {
246  // @@protoc_insertion_point(serialize_to_array_start:drizzled.message.Schema.Options)
247  if (!unknown_fields().empty()) {
248  target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
249  unknown_fields(), target);
250  }
251  // @@protoc_insertion_point(serialize_to_array_end:drizzled.message.Schema.Options)
252  return target;
253 }
254 
255 int Schema_Options::ByteSize() const {
256  int total_size = 0;
257 
258  if (!unknown_fields().empty()) {
259  total_size +=
260  ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
261  unknown_fields());
262  }
263  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
264  _cached_size_ = total_size;
265  GOOGLE_SAFE_CONCURRENT_WRITES_END();
266  return total_size;
267 }
268 
269 void Schema_Options::MergeFrom(const ::google::protobuf::Message& from) {
270  GOOGLE_CHECK_NE(&from, this);
271  const Schema_Options* source =
272  ::google::protobuf::internal::dynamic_cast_if_available<const Schema_Options*>(
273  &from);
274  if (source == NULL) {
275  ::google::protobuf::internal::ReflectionOps::Merge(from, this);
276  } else {
277  MergeFrom(*source);
278  }
279 }
280 
281 void Schema_Options::MergeFrom(const Schema_Options& from) {
282  GOOGLE_CHECK_NE(&from, this);
283  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
284 }
285 
286 void Schema_Options::CopyFrom(const ::google::protobuf::Message& from) {
287  if (&from == this) return;
288  Clear();
289  MergeFrom(from);
290 }
291 
292 void Schema_Options::CopyFrom(const Schema_Options& from) {
293  if (&from == this) return;
294  Clear();
295  MergeFrom(from);
296 }
297 
298 bool Schema_Options::IsInitialized() const {
299 
300  return true;
301 }
302 
303 void Schema_Options::Swap(Schema_Options* other) {
304  if (other != this) {
305  _unknown_fields_.Swap(&other->_unknown_fields_);
306  std::swap(_cached_size_, other->_cached_size_);
307  }
308 }
309 
310 ::google::protobuf::Metadata Schema_Options::GetMetadata() const {
311  protobuf_AssignDescriptorsOnce();
312  ::google::protobuf::Metadata metadata;
313  metadata.descriptor = Schema_Options_descriptor_;
314  metadata.reflection = Schema_Options_reflection_;
315  return metadata;
316 }
317 
318 
319 // -------------------------------------------------------------------
320 
321 #ifndef _MSC_VER
322 const int Schema::kNameFieldNumber;
323 const int Schema::kCollationFieldNumber;
324 const int Schema::kEngineFieldNumber;
325 const int Schema::kCatalogFieldNumber;
326 const int Schema::kCreationTimestampFieldNumber;
327 const int Schema::kUpdateTimestampFieldNumber;
328 const int Schema::kUuidFieldNumber;
329 const int Schema::kVersionFieldNumber;
330 const int Schema::kOptionsFieldNumber;
331 const int Schema::kReplicationOptionsFieldNumber;
332 const int Schema::kAccessFieldNumber;
333 #endif // !_MSC_VER
334 
335 Schema::Schema()
336  : ::google::protobuf::Message() {
337  SharedCtor();
338  // @@protoc_insertion_point(constructor:drizzled.message.Schema)
339 }
340 
341 void Schema::InitAsDefaultInstance() {
342  engine_ = const_cast< ::drizzled::message::Engine*>(&::drizzled::message::Engine::default_instance());
343  options_ = const_cast< ::drizzled::message::Schema_Options*>(&::drizzled::message::Schema_Options::default_instance());
344  replication_options_ = const_cast< ::drizzled::message::ReplicationOptions*>(&::drizzled::message::ReplicationOptions::default_instance());
345  access_ = const_cast< ::drizzled::message::Access*>(&::drizzled::message::Access::default_instance());
346 }
347 
348 Schema::Schema(const Schema& from)
349  : ::google::protobuf::Message() {
350  SharedCtor();
351  MergeFrom(from);
352  // @@protoc_insertion_point(copy_constructor:drizzled.message.Schema)
353 }
354 
355 void Schema::SharedCtor() {
356  ::google::protobuf::internal::GetEmptyString();
357  _cached_size_ = 0;
358  name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
359  collation_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
360  engine_ = NULL;
361  catalog_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
362  creation_timestamp_ = GOOGLE_ULONGLONG(0);
363  update_timestamp_ = GOOGLE_ULONGLONG(0);
364  uuid_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
365  version_ = GOOGLE_ULONGLONG(0);
366  options_ = NULL;
367  replication_options_ = NULL;
368  access_ = NULL;
369  ::memset(_has_bits_, 0, sizeof(_has_bits_));
370 }
371 
372 Schema::~Schema() {
373  // @@protoc_insertion_point(destructor:drizzled.message.Schema)
374  SharedDtor();
375 }
376 
377 void Schema::SharedDtor() {
378  if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
379  delete name_;
380  }
381  if (collation_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
382  delete collation_;
383  }
384  if (catalog_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
385  delete catalog_;
386  }
387  if (uuid_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
388  delete uuid_;
389  }
390  if (this != default_instance_) {
391  delete engine_;
392  delete options_;
393  delete replication_options_;
394  delete access_;
395  }
396 }
397 
398 void Schema::SetCachedSize(int size) const {
399  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
400  _cached_size_ = size;
401  GOOGLE_SAFE_CONCURRENT_WRITES_END();
402 }
403 const ::google::protobuf::Descriptor* Schema::descriptor() {
404  protobuf_AssignDescriptorsOnce();
405  return Schema_descriptor_;
406 }
407 
408 const Schema& Schema::default_instance() {
409  if (default_instance_ == NULL) protobuf_AddDesc_schema_2eproto();
410  return *default_instance_;
411 }
412 
413 Schema* Schema::default_instance_ = NULL;
414 
415 Schema* Schema::New() const {
416  return new Schema;
417 }
418 
419 void Schema::Clear() {
420 #define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>( \
421  &reinterpret_cast<Schema*>(16)->f) - \
422  reinterpret_cast<char*>(16))
423 
424 #define ZR_(first, last) do { \
425  size_t f = OFFSET_OF_FIELD_(first); \
426  size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last); \
427  ::memset(&first, 0, n); \
428  } while (0)
429 
430  if (_has_bits_[0 / 32] & 255) {
431  ZR_(creation_timestamp_, update_timestamp_);
432  if (has_name()) {
433  if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
434  name_->clear();
435  }
436  }
437  if (has_collation()) {
438  if (collation_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
439  collation_->clear();
440  }
441  }
442  if (has_engine()) {
443  if (engine_ != NULL) engine_->::drizzled::message::Engine::Clear();
444  }
445  if (has_catalog()) {
446  if (catalog_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
447  catalog_->clear();
448  }
449  }
450  if (has_uuid()) {
451  if (uuid_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
452  uuid_->clear();
453  }
454  }
455  version_ = GOOGLE_ULONGLONG(0);
456  }
457  if (_has_bits_[8 / 32] & 1792) {
458  if (has_options()) {
459  if (options_ != NULL) options_->::drizzled::message::Schema_Options::Clear();
460  }
461  if (has_replication_options()) {
462  if (replication_options_ != NULL) replication_options_->::drizzled::message::ReplicationOptions::Clear();
463  }
464  if (has_access()) {
465  if (access_ != NULL) access_->::drizzled::message::Access::Clear();
466  }
467  }
468 
469 #undef OFFSET_OF_FIELD_
470 #undef ZR_
471 
472  ::memset(_has_bits_, 0, sizeof(_has_bits_));
473  mutable_unknown_fields()->Clear();
474 }
475 
476 bool Schema::MergePartialFromCodedStream(
477  ::google::protobuf::io::CodedInputStream* input) {
478 #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
479  ::google::protobuf::uint32 tag;
480  // @@protoc_insertion_point(parse_start:drizzled.message.Schema)
481  for (;;) {
482  ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(16383);
483  tag = p.first;
484  if (!p.second) goto handle_unusual;
485  switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
486  // required string name = 1;
487  case 1: {
488  if (tag == 10) {
489  DO_(::google::protobuf::internal::WireFormatLite::ReadString(
490  input, this->mutable_name()));
491  ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
492  this->name().data(), this->name().length(),
493  ::google::protobuf::internal::WireFormat::PARSE,
494  "name");
495  } else {
496  goto handle_unusual;
497  }
498  if (input->ExpectTag(18)) goto parse_collation;
499  break;
500  }
501 
502  // optional string collation = 2;
503  case 2: {
504  if (tag == 18) {
505  parse_collation:
506  DO_(::google::protobuf::internal::WireFormatLite::ReadString(
507  input, this->mutable_collation()));
508  ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
509  this->collation().data(), this->collation().length(),
510  ::google::protobuf::internal::WireFormat::PARSE,
511  "collation");
512  } else {
513  goto handle_unusual;
514  }
515  if (input->ExpectTag(26)) goto parse_engine;
516  break;
517  }
518 
519  // required .drizzled.message.Engine engine = 3;
520  case 3: {
521  if (tag == 26) {
522  parse_engine:
523  DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
524  input, mutable_engine()));
525  } else {
526  goto handle_unusual;
527  }
528  if (input->ExpectTag(34)) goto parse_catalog;
529  break;
530  }
531 
532  // optional string catalog = 4;
533  case 4: {
534  if (tag == 34) {
535  parse_catalog:
536  DO_(::google::protobuf::internal::WireFormatLite::ReadString(
537  input, this->mutable_catalog()));
538  ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
539  this->catalog().data(), this->catalog().length(),
540  ::google::protobuf::internal::WireFormat::PARSE,
541  "catalog");
542  } else {
543  goto handle_unusual;
544  }
545  if (input->ExpectTag(88)) goto parse_creation_timestamp;
546  break;
547  }
548 
549  // required uint64 creation_timestamp = 11 [default = 0];
550  case 11: {
551  if (tag == 88) {
552  parse_creation_timestamp:
553  DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
554  ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
555  input, &creation_timestamp_)));
556  set_has_creation_timestamp();
557  } else {
558  goto handle_unusual;
559  }
560  if (input->ExpectTag(96)) goto parse_update_timestamp;
561  break;
562  }
563 
564  // required uint64 update_timestamp = 12 [default = 0];
565  case 12: {
566  if (tag == 96) {
567  parse_update_timestamp:
568  DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
569  ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
570  input, &update_timestamp_)));
571  set_has_update_timestamp();
572  } else {
573  goto handle_unusual;
574  }
575  if (input->ExpectTag(106)) goto parse_uuid;
576  break;
577  }
578 
579  // optional string uuid = 13;
580  case 13: {
581  if (tag == 106) {
582  parse_uuid:
583  DO_(::google::protobuf::internal::WireFormatLite::ReadString(
584  input, this->mutable_uuid()));
585  ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
586  this->uuid().data(), this->uuid().length(),
587  ::google::protobuf::internal::WireFormat::PARSE,
588  "uuid");
589  } else {
590  goto handle_unusual;
591  }
592  if (input->ExpectTag(112)) goto parse_version;
593  break;
594  }
595 
596  // optional uint64 version = 14;
597  case 14: {
598  if (tag == 112) {
599  parse_version:
600  DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
601  ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
602  input, &version_)));
603  set_has_version();
604  } else {
605  goto handle_unusual;
606  }
607  if (input->ExpectTag(122)) goto parse_options;
608  break;
609  }
610 
611  // optional .drizzled.message.Schema.Options options = 15;
612  case 15: {
613  if (tag == 122) {
614  parse_options:
615  DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
616  input, mutable_options()));
617  } else {
618  goto handle_unusual;
619  }
620  if (input->ExpectTag(130)) goto parse_replication_options;
621  break;
622  }
623 
624  // optional .drizzled.message.ReplicationOptions replication_options = 16;
625  case 16: {
626  if (tag == 130) {
627  parse_replication_options:
628  DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
629  input, mutable_replication_options()));
630  } else {
631  goto handle_unusual;
632  }
633  if (input->ExpectTag(138)) goto parse_access;
634  break;
635  }
636 
637  // optional .drizzled.message.Access access = 17;
638  case 17: {
639  if (tag == 138) {
640  parse_access:
641  DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
642  input, mutable_access()));
643  } else {
644  goto handle_unusual;
645  }
646  if (input->ExpectAtEnd()) goto success;
647  break;
648  }
649 
650  default: {
651  handle_unusual:
652  if (tag == 0 ||
653  ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
654  ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
655  goto success;
656  }
657  DO_(::google::protobuf::internal::WireFormat::SkipField(
658  input, tag, mutable_unknown_fields()));
659  break;
660  }
661  }
662  }
663 success:
664  // @@protoc_insertion_point(parse_success:drizzled.message.Schema)
665  return true;
666 failure:
667  // @@protoc_insertion_point(parse_failure:drizzled.message.Schema)
668  return false;
669 #undef DO_
670 }
671 
672 void Schema::SerializeWithCachedSizes(
673  ::google::protobuf::io::CodedOutputStream* output) const {
674  // @@protoc_insertion_point(serialize_start:drizzled.message.Schema)
675  // required string name = 1;
676  if (has_name()) {
677  ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
678  this->name().data(), this->name().length(),
679  ::google::protobuf::internal::WireFormat::SERIALIZE,
680  "name");
681  ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
682  1, this->name(), output);
683  }
684 
685  // optional string collation = 2;
686  if (has_collation()) {
687  ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
688  this->collation().data(), this->collation().length(),
689  ::google::protobuf::internal::WireFormat::SERIALIZE,
690  "collation");
691  ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
692  2, this->collation(), output);
693  }
694 
695  // required .drizzled.message.Engine engine = 3;
696  if (has_engine()) {
697  ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
698  3, this->engine(), output);
699  }
700 
701  // optional string catalog = 4;
702  if (has_catalog()) {
703  ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
704  this->catalog().data(), this->catalog().length(),
705  ::google::protobuf::internal::WireFormat::SERIALIZE,
706  "catalog");
707  ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
708  4, this->catalog(), output);
709  }
710 
711  // required uint64 creation_timestamp = 11 [default = 0];
712  if (has_creation_timestamp()) {
713  ::google::protobuf::internal::WireFormatLite::WriteUInt64(11, this->creation_timestamp(), output);
714  }
715 
716  // required uint64 update_timestamp = 12 [default = 0];
717  if (has_update_timestamp()) {
718  ::google::protobuf::internal::WireFormatLite::WriteUInt64(12, this->update_timestamp(), output);
719  }
720 
721  // optional string uuid = 13;
722  if (has_uuid()) {
723  ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
724  this->uuid().data(), this->uuid().length(),
725  ::google::protobuf::internal::WireFormat::SERIALIZE,
726  "uuid");
727  ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
728  13, this->uuid(), output);
729  }
730 
731  // optional uint64 version = 14;
732  if (has_version()) {
733  ::google::protobuf::internal::WireFormatLite::WriteUInt64(14, this->version(), output);
734  }
735 
736  // optional .drizzled.message.Schema.Options options = 15;
737  if (has_options()) {
738  ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
739  15, this->options(), output);
740  }
741 
742  // optional .drizzled.message.ReplicationOptions replication_options = 16;
743  if (has_replication_options()) {
744  ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
745  16, this->replication_options(), output);
746  }
747 
748  // optional .drizzled.message.Access access = 17;
749  if (has_access()) {
750  ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
751  17, this->access(), output);
752  }
753 
754  if (!unknown_fields().empty()) {
755  ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
756  unknown_fields(), output);
757  }
758  // @@protoc_insertion_point(serialize_end:drizzled.message.Schema)
759 }
760 
761 ::google::protobuf::uint8* Schema::SerializeWithCachedSizesToArray(
762  ::google::protobuf::uint8* target) const {
763  // @@protoc_insertion_point(serialize_to_array_start:drizzled.message.Schema)
764  // required string name = 1;
765  if (has_name()) {
766  ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
767  this->name().data(), this->name().length(),
768  ::google::protobuf::internal::WireFormat::SERIALIZE,
769  "name");
770  target =
771  ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
772  1, this->name(), target);
773  }
774 
775  // optional string collation = 2;
776  if (has_collation()) {
777  ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
778  this->collation().data(), this->collation().length(),
779  ::google::protobuf::internal::WireFormat::SERIALIZE,
780  "collation");
781  target =
782  ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
783  2, this->collation(), target);
784  }
785 
786  // required .drizzled.message.Engine engine = 3;
787  if (has_engine()) {
788  target = ::google::protobuf::internal::WireFormatLite::
789  WriteMessageNoVirtualToArray(
790  3, this->engine(), target);
791  }
792 
793  // optional string catalog = 4;
794  if (has_catalog()) {
795  ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
796  this->catalog().data(), this->catalog().length(),
797  ::google::protobuf::internal::WireFormat::SERIALIZE,
798  "catalog");
799  target =
800  ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
801  4, this->catalog(), target);
802  }
803 
804  // required uint64 creation_timestamp = 11 [default = 0];
805  if (has_creation_timestamp()) {
806  target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(11, this->creation_timestamp(), target);
807  }
808 
809  // required uint64 update_timestamp = 12 [default = 0];
810  if (has_update_timestamp()) {
811  target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(12, this->update_timestamp(), target);
812  }
813 
814  // optional string uuid = 13;
815  if (has_uuid()) {
816  ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
817  this->uuid().data(), this->uuid().length(),
818  ::google::protobuf::internal::WireFormat::SERIALIZE,
819  "uuid");
820  target =
821  ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
822  13, this->uuid(), target);
823  }
824 
825  // optional uint64 version = 14;
826  if (has_version()) {
827  target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(14, this->version(), target);
828  }
829 
830  // optional .drizzled.message.Schema.Options options = 15;
831  if (has_options()) {
832  target = ::google::protobuf::internal::WireFormatLite::
833  WriteMessageNoVirtualToArray(
834  15, this->options(), target);
835  }
836 
837  // optional .drizzled.message.ReplicationOptions replication_options = 16;
838  if (has_replication_options()) {
839  target = ::google::protobuf::internal::WireFormatLite::
840  WriteMessageNoVirtualToArray(
841  16, this->replication_options(), target);
842  }
843 
844  // optional .drizzled.message.Access access = 17;
845  if (has_access()) {
846  target = ::google::protobuf::internal::WireFormatLite::
847  WriteMessageNoVirtualToArray(
848  17, this->access(), target);
849  }
850 
851  if (!unknown_fields().empty()) {
852  target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
853  unknown_fields(), target);
854  }
855  // @@protoc_insertion_point(serialize_to_array_end:drizzled.message.Schema)
856  return target;
857 }
858 
859 int Schema::ByteSize() const {
860  int total_size = 0;
861 
862  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
863  // required string name = 1;
864  if (has_name()) {
865  total_size += 1 +
866  ::google::protobuf::internal::WireFormatLite::StringSize(
867  this->name());
868  }
869 
870  // optional string collation = 2;
871  if (has_collation()) {
872  total_size += 1 +
873  ::google::protobuf::internal::WireFormatLite::StringSize(
874  this->collation());
875  }
876 
877  // required .drizzled.message.Engine engine = 3;
878  if (has_engine()) {
879  total_size += 1 +
880  ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
881  this->engine());
882  }
883 
884  // optional string catalog = 4;
885  if (has_catalog()) {
886  total_size += 1 +
887  ::google::protobuf::internal::WireFormatLite::StringSize(
888  this->catalog());
889  }
890 
891  // required uint64 creation_timestamp = 11 [default = 0];
892  if (has_creation_timestamp()) {
893  total_size += 1 +
894  ::google::protobuf::internal::WireFormatLite::UInt64Size(
895  this->creation_timestamp());
896  }
897 
898  // required uint64 update_timestamp = 12 [default = 0];
899  if (has_update_timestamp()) {
900  total_size += 1 +
901  ::google::protobuf::internal::WireFormatLite::UInt64Size(
902  this->update_timestamp());
903  }
904 
905  // optional string uuid = 13;
906  if (has_uuid()) {
907  total_size += 1 +
908  ::google::protobuf::internal::WireFormatLite::StringSize(
909  this->uuid());
910  }
911 
912  // optional uint64 version = 14;
913  if (has_version()) {
914  total_size += 1 +
915  ::google::protobuf::internal::WireFormatLite::UInt64Size(
916  this->version());
917  }
918 
919  }
920  if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) {
921  // optional .drizzled.message.Schema.Options options = 15;
922  if (has_options()) {
923  total_size += 1 +
924  ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
925  this->options());
926  }
927 
928  // optional .drizzled.message.ReplicationOptions replication_options = 16;
929  if (has_replication_options()) {
930  total_size += 2 +
931  ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
932  this->replication_options());
933  }
934 
935  // optional .drizzled.message.Access access = 17;
936  if (has_access()) {
937  total_size += 2 +
938  ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
939  this->access());
940  }
941 
942  }
943  if (!unknown_fields().empty()) {
944  total_size +=
945  ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
946  unknown_fields());
947  }
948  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
949  _cached_size_ = total_size;
950  GOOGLE_SAFE_CONCURRENT_WRITES_END();
951  return total_size;
952 }
953 
954 void Schema::MergeFrom(const ::google::protobuf::Message& from) {
955  GOOGLE_CHECK_NE(&from, this);
956  const Schema* source =
957  ::google::protobuf::internal::dynamic_cast_if_available<const Schema*>(
958  &from);
959  if (source == NULL) {
960  ::google::protobuf::internal::ReflectionOps::Merge(from, this);
961  } else {
962  MergeFrom(*source);
963  }
964 }
965 
966 void Schema::MergeFrom(const Schema& from) {
967  GOOGLE_CHECK_NE(&from, this);
968  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
969  if (from.has_name()) {
970  set_name(from.name());
971  }
972  if (from.has_collation()) {
973  set_collation(from.collation());
974  }
975  if (from.has_engine()) {
976  mutable_engine()->::drizzled::message::Engine::MergeFrom(from.engine());
977  }
978  if (from.has_catalog()) {
979  set_catalog(from.catalog());
980  }
981  if (from.has_creation_timestamp()) {
982  set_creation_timestamp(from.creation_timestamp());
983  }
984  if (from.has_update_timestamp()) {
985  set_update_timestamp(from.update_timestamp());
986  }
987  if (from.has_uuid()) {
988  set_uuid(from.uuid());
989  }
990  if (from.has_version()) {
991  set_version(from.version());
992  }
993  }
994  if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) {
995  if (from.has_options()) {
996  mutable_options()->::drizzled::message::Schema_Options::MergeFrom(from.options());
997  }
998  if (from.has_replication_options()) {
999  mutable_replication_options()->::drizzled::message::ReplicationOptions::MergeFrom(from.replication_options());
1000  }
1001  if (from.has_access()) {
1002  mutable_access()->::drizzled::message::Access::MergeFrom(from.access());
1003  }
1004  }
1005  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
1006 }
1007 
1008 void Schema::CopyFrom(const ::google::protobuf::Message& from) {
1009  if (&from == this) return;
1010  Clear();
1011  MergeFrom(from);
1012 }
1013 
1014 void Schema::CopyFrom(const Schema& from) {
1015  if (&from == this) return;
1016  Clear();
1017  MergeFrom(from);
1018 }
1019 
1020 bool Schema::IsInitialized() const {
1021  if ((_has_bits_[0] & 0x00000035) != 0x00000035) return false;
1022 
1023  if (has_engine()) {
1024  if (!this->engine().IsInitialized()) return false;
1025  }
1026  return true;
1027 }
1028 
1029 void Schema::Swap(Schema* other) {
1030  if (other != this) {
1031  std::swap(name_, other->name_);
1032  std::swap(collation_, other->collation_);
1033  std::swap(engine_, other->engine_);
1034  std::swap(catalog_, other->catalog_);
1035  std::swap(creation_timestamp_, other->creation_timestamp_);
1036  std::swap(update_timestamp_, other->update_timestamp_);
1037  std::swap(uuid_, other->uuid_);
1038  std::swap(version_, other->version_);
1039  std::swap(options_, other->options_);
1040  std::swap(replication_options_, other->replication_options_);
1041  std::swap(access_, other->access_);
1042  std::swap(_has_bits_[0], other->_has_bits_[0]);
1043  _unknown_fields_.Swap(&other->_unknown_fields_);
1044  std::swap(_cached_size_, other->_cached_size_);
1045  }
1046 }
1047 
1048 ::google::protobuf::Metadata Schema::GetMetadata() const {
1049  protobuf_AssignDescriptorsOnce();
1050  ::google::protobuf::Metadata metadata;
1051  metadata.descriptor = Schema_descriptor_;
1052  metadata.reflection = Schema_reflection_;
1053  return metadata;
1054 }
1055 
1056 
1057 // @@protoc_insertion_point(namespace_scope)
1058 
1059 } // namespace message
1060 } // namespace drizzled
1061 
1062 // @@protoc_insertion_point(global_scope)
TODO: Rename this file - func.h is stupid.
Definition: schema.h:30