~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/message/table.proto

  • Committer: Mark Atwood
  • Date: 2010-06-24 03:15:21 UTC
  • mto: (1637.2.4 build)
  • mto: This revision was merged to the branch mainline in revision 1639.
  • Revision ID: me@mark.atwood.name-20100624031521-gafmppfbf5afm68w
new syslog module, with plugins for query log, error message, and SYSLOG() function

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
package drizzled.message;
5
5
option optimize_for = SPEED;
6
6
 
7
 
option java_package = "org.drizzle.messages";
8
 
option java_outer_classname = "TableMessage";
9
 
 
10
7
import "engine.proto";
11
 
import "replication_options.proto";
12
8
 
13
9
message Table {
14
10
 
20
16
  }
21
17
 
22
18
  message TableOptions {
23
 
    optional bool has_user_set_auto_increment_value = 1;
 
19
    optional uint64 auto_increment = 1;
24
20
    optional string collation = 2;
25
21
    optional uint32 collation_id = 3;
26
22
    optional string data_file_name = 5;
35
31
    optional bool checksum = 17;
36
32
    optional bool page_checksum = 18;
37
33
    optional bool delay_key_write = 19;
38
 
    optional bool dont_replicate = 20;
 
34
 
 
35
    enum RowType {
 
36
         ROW_TYPE_DEFAULT = 0;
 
37
         ROW_TYPE_FIXED = 1;
 
38
         ROW_TYPE_DYNAMIC = 2;
 
39
         ROW_TYPE_COMPRESSED = 3;
 
40
         ROW_TYPE_REDUNDANT = 4;
 
41
         ROW_TYPE_COMPACT = 5;
 
42
         ROW_TYPE_PAGE = 6;
 
43
    }
 
44
 
 
45
    optional RowType row_type = 20;
39
46
  }
40
47
 
41
48
  message ForeignKeyConstraint {
42
 
    optional string name = 1;
43
 
    repeated string column_names = 2;
44
 
    required string references_table_name = 3;
45
 
    repeated string references_columns = 4;
46
 
 
47
 
    enum ForeignKeyMatchOption {
48
 
      MATCH_UNDEFINED = 0;
49
 
      MATCH_FULL = 1;
50
 
      MATCH_PARTIAL = 2;
51
 
      MATCH_SIMPLE = 3;
52
 
    }
53
 
    required ForeignKeyMatchOption match = 5;
54
 
 
55
 
    enum ForeignKeyOption {
56
 
      OPTION_UNDEF = 0;
57
 
      OPTION_RESTRICT = 1;
58
 
      OPTION_CASCADE = 2;
59
 
      OPTION_SET_NULL = 3;
60
 
      OPTION_NO_ACTION = 4;
61
 
      OPTION_SET_DEFAULT = 5;
62
 
    }
63
 
 
64
 
    required ForeignKeyOption update_option = 6 [ default = OPTION_UNDEF ];
65
 
    required ForeignKeyOption delete_option = 7 [ default = OPTION_UNDEF ];
 
49
    required string name = 1;
 
50
    required Field dependent = 2;
 
51
    required Field parent = 3;
 
52
    /** @TODO Finish this off... */
66
53
  }
67
54
 
68
55
  message Field {
76
63
      BIGINT = 5;
77
64
      DECIMAL = 6;
78
65
      DATE = 7;
79
 
      EPOCH = 9;
 
66
      TIMESTAMP = 9;
80
67
      DATETIME = 10;
81
 
      UUID = 11;
82
 
      TIME = 12;
83
 
      BOOLEAN = 13;
84
68
    }
85
69
 
86
70
    message FieldOptions {
88
72
      optional string update_value = 2;
89
73
      optional bool default_null = 3 [default = false];
90
74
      optional bytes default_bin_value = 4;
91
 
      optional string default_expression = 5;
92
 
      optional string update_expression = 6;
 
75
    }
 
76
 
 
77
    message TimestampFieldOptions {
 
78
      optional bool auto_updates = 1 [default = false];
93
79
    }
94
80
 
95
81
    message FieldConstraints {
96
 
      optional bool is_nullable = 1 [default = true]; // Dead option, do not use
 
82
      required bool is_nullable = 1 [default = true];
97
83
      optional bool is_unsigned = 2 [default = false];
98
 
      optional bool is_notnull = 3 [default = false];
99
 
      optional bool is_unique = 4 [default = false];
100
84
      repeated string expression = 16; /* Reserve 0-15 for frequenty accessed attributes */
101
85
    }
102
86
 
119
103
      repeated string field_value = 4;
120
104
    }
121
105
 
122
 
    /*
123
 
      Do we store microseconds or timezone.
124
 
    */
125
 
    message TimeFieldOptions {
126
 
      optional bool microseconds = 1;
127
 
    }
128
 
 
129
106
    required string name = 1;
130
107
    required FieldType type = 2;
131
108
    optional FieldOptions options = 4;
132
109
    optional FieldConstraints constraints = 5;
133
110
    optional NumericFieldOptions numeric_options = 6;
134
111
    optional StringFieldOptions string_options = 7;
135
 
    optional TimeFieldOptions time_options = 8;
136
112
 
137
113
    optional string comment = 16; /* Reserve 0-15 for frequently accessed attributes */
138
114
    optional EnumerationValues enumeration_values = 17;
 
115
    optional TimestampFieldOptions timestamp_options = 18;
139
116
  }
140
117
 
141
118
  message Index {
142
119
 
143
120
    enum IndexType {
144
 
    /* Kept in sync with enum ha_key_alg if only for stewart sanity. */
 
121
    /* Kept in sync with enum ha_key_alg if only for stewart's sanity. */
145
122
      UNKNOWN_INDEX = 0;
146
123
      BTREE = 1;
147
124
      RTREE = 2;
187
164
  required uint64 creation_timestamp= 11 [default = 0];
188
165
  required uint64 update_timestamp= 12 [default = 0];
189
166
  optional string catalog = 13;
190
 
  optional string uuid = 14;
191
 
  /*
192
 
    A version value of 0, means that it was never set.
193
 
    */
194
 
  optional uint64 version = 15;
195
 
 
196
 
  optional ReplicationOptions replication_options= 16;
197
167
}
198
168
 
199
169
message AlterTable {