10
message StorageEngine {
12
message EngineOption {
13
enum EngineOptionType {
19
required string name = 1;
20
required string value = 2;
21
required EngineOptionType type = 3;
24
required string name = 1;
25
repeated EngineOption option = 2;
28
message TableOptions {
29
optional uint64 auto_increment = 1;
30
optional string charset = 2;
31
optional string collation = 3;
35
optional uint32 avg_row_length = 1;
36
optional uint64 max_rows = 2;
37
optional uint32 min_rows = 3;
40
message ForeignKeyConstraint {
41
required string name = 1;
42
required Field dependent = 2;
43
required Field parent = 3;
44
/** @TODO Finish this off... */
68
message FieldOptions {
69
optional string default_value = 2;
72
message TimestampFieldOptions {
73
optional bool auto_updates = 1 [default = false];
76
message FieldConstraints {
77
required bool is_nullable = 1 [default = false];
78
optional bool is_unsigned = 2 [default = false];
79
repeated string expression = 16; /* Reserve 0-15 for frequenty accessed attributes */
82
message NumericFieldOptions {
83
optional bool is_autoincrement = 1 [default = false];
84
optional int32 length = 2;
85
optional int32 scale = 3;
86
optional int32 precision = 4;
89
message StringFieldOptions {
90
optional bool is_fixed_width = 1 [default = false];
91
optional int32 length = 2;
92
optional string charset = 3; /* Perhaps this can go away soon...*/
93
optional string collation = 4;
96
message SetFieldOptions {
97
required int32 count_elements = 1;
98
repeated string value = 2;
101
required string name = 1;
102
required FieldType type = 2;
103
optional FieldOptions options = 3;
104
optional FieldConstraints constraints = 4;
105
optional NumericFieldOptions numeric_options = 5;
106
optional StringFieldOptions string_options = 6;
107
optional string comment = 16; /* Reserve 0-15 for frequently accessed attributes */
108
optional SetFieldOptions set_options = 17;
109
optional TimestampFieldOptions timestamp_options = 18;
123
required Field field = 1;
124
optional int32 compare_length = 2;
125
optional bool in_reverse_order = 3 [default = false];
128
required string name = 1;
129
required bool is_primary = 2;
130
required bool is_unique = 3;
131
required IndexType type = 4 [default = UNKNOWN];
132
repeated IndexPart index_part = 5;
135
required string name = 1;
136
required TableType type = 5;
137
required StorageEngine engine = 2;
138
repeated Field field = 3;
139
repeated Index index = 4;
141
repeated ForeignKeyConstraint fk_constraint = 8;
142
optional TableOptions options = 9;
143
optional TableStats stats = 10;
145
optional string comment = 16;
149
repeated Table table = 1;