mirror of
https://github.com/actiontech/dble.git
synced 2026-05-01 12:00:35 -05:00
46 lines
1.6 KiB
Plaintext
46 lines
1.6 KiB
Plaintext
package io.mycat.meta.protocol;
|
|
|
|
option java_package = "io.mycat.meta.protocol";
|
|
option java_outer_classname = "StructureMeta";
|
|
option optimize_for = SPEED;
|
|
|
|
|
|
message IndexMeta{
|
|
required string name = 1;
|
|
required string type = 2;//PRI,UNI,MUI
|
|
repeated string columns = 3;
|
|
|
|
|
|
}
|
|
message ColumnMeta{
|
|
required string name = 1;
|
|
required string dataType = 2;
|
|
optional bool isUnsigned = 3;
|
|
optional int32 length = 4;
|
|
optional int32 precision = 5;
|
|
optional int32 scale = 6;
|
|
optional bool canNull = 7;
|
|
optional string sdefault = 8;
|
|
optional bool auto_incre = 9;
|
|
optional string charsetname = 10 [default = "utf8"];
|
|
//[COMMENT 'string']
|
|
//[COLUMN_FORMAT {FIXED|DYNAMIC|DEFAULT}]
|
|
//[STORAGE {DISK|MEMORY|DEFAULT}]
|
|
//[reference_definition]
|
|
//[GENERATED ALWAYS] AS (expression)
|
|
}
|
|
|
|
message TableMeta{
|
|
optional string tableName = 1;//不带dbname的表名:如table1
|
|
repeated ColumnMeta columns = 2;//所有的列属性,有序
|
|
optional bool isView = 3[default = false];
|
|
optional string createSql = 4;
|
|
optional int64 version = 5;
|
|
optional int64 aiOffset = 6[default=-1];
|
|
optional int32 type = 7;
|
|
optional int32 aiColPos = 8[default=-1];
|
|
optional IndexMeta primary = 9;
|
|
repeated IndexMeta uniIndex = 10;
|
|
repeated IndexMeta index = 11;
|
|
}
|