~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/message.h

  • Committer: Brian Aker
  • Date: 2011-04-03 06:02:00 UTC
  • mto: (2263.2.2 drizzle-ga)
  • mto: This revision was merged to the branch mainline in revision 2268.
  • Revision ID: brian@tangent.org-20110403060200-g8v2x1k33rrpx1an
This adds the concept of a definer to a table definition.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
#pragma once
22
22
 
 
23
#include <drizzled/message/access.h>
 
24
#include <drizzled/message/replication_options.h>
 
25
#include <drizzled/message/schema.h>
23
26
#include <drizzled/message/table.h>
24
 
#include <drizzled/message/schema.h>
25
 
#if 0
26
 
#include <drizzled/message/transaction.pb.h>
27
 
#include <google/protobuf/text_format.h>
28
 
#endif
 
27
 
29
28
#include <drizzled/identifier.h>
30
29
 
31
 
#include <boost/shared_ptr.hpp>
32
 
 
33
30
namespace drizzled {
34
31
namespace message {
35
32
 
46
43
const std::string &type(drizzled::message::Table::ForeignKeyConstraint::ForeignKeyMatchOption type);
47
44
const std::string &type(drizzled::message::Table::TableType type);
48
45
 
49
 
template<class T> bool is_replicated(const T& reference)
50
 
{
51
 
  if (reference.has_replication_options() and
52
 
      reference.replication_options().has_is_replicated())
53
 
  {
54
 
    return reference.replication_options().is_replicated();
55
 
  }
56
 
 
57
 
  return true;
58
 
}
59
 
 
60
 
template<class T> void set_is_replicated(T& reference, bool arg)
61
 
{
62
 
  message::ReplicationOptions *options= reference.mutable_replication_options();
63
 
  options->set_is_replicated(arg);
64
 
}
65
 
 
66
46
#if 0
67
47
std::ostream& operator<<(std::ostream& output, const message::Transaction &message);
68
48
std::ostream& operator<<(std::ostream& output, const message::Table &message);