37
37
optional uint32 min_rows = 3;
40
message FieldOptions {
41
required bool is_autoincrement = 1 [default = false];
42
optional string default_value = 2;
45
message TimestampFieldOptions {
46
optional bool auto_updates = 1 [default = false];
49
message FieldConstraints {
50
required bool is_nullable = 1 [default = false];
51
optional bool is_unsigned = 2 [default = false];
52
repeated string expression = 16; /* Reserve 0-15 for frequenty accessed attributes */
55
40
message ForeignKeyConstraint {
56
41
required string name = 1;
57
42
required Field dependent = 2;
59
44
/** @TODO Finish this off... */
62
message NumericFieldOptions {
63
optional int32 length = 1;
64
optional int32 scale = 2;
65
optional int32 precision = 3;
68
message StringFieldOptions {
69
required bool is_fixed_width = 1;
70
optional int32 length = 2;
71
optional string charset = 3; /* Perhaps this can go away soon...*/
72
optional string collation = 4;
75
message SetFieldOptions {
76
required int32 count_elements = 1;
77
repeated string value = 2;
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;
100
101
required string name = 1;
101
102
required FieldType type = 2;
102
required FieldOptions options = 3;
103
required FieldConstraints constraints = 4;
103
optional FieldOptions options = 3;
104
optional FieldConstraints constraints = 4;
104
105
optional NumericFieldOptions numeric_options = 5;
105
106
optional StringFieldOptions string_options = 6;
106
107
optional string comment = 16; /* Reserve 0-15 for frequently accessed attributes */
108
109
optional TimestampFieldOptions timestamp_options = 18;
112
required Field field = 1;
113
optional int32 compare_length = 2;
114
optional bool in_reverse_order = 3 [default = false];
123
required Field field = 1;
124
optional int32 compare_length = 2;
125
optional bool in_reverse_order = 3 [default = false];
126
128
required string name = 1;
127
129
required bool is_primary = 2;
128
130
required bool is_unique = 3;
129
optional IndexType type = 4;
131
required IndexType type = 4 [default = UNKNOWN];
130
132
repeated IndexPart index_part = 5;