@@ -34,6 +34,7 @@ const (
34
34
TYPE_DECIMAL // decimal
35
35
TYPE_MEDIUM_INT
36
36
TYPE_BINARY // binary, varbinary
37
+ TYPE_POINT // coordinates
37
38
)
38
39
39
40
type TableColumn struct {
@@ -43,6 +44,7 @@ type TableColumn struct {
43
44
RawType string
44
45
IsAuto bool
45
46
IsUnsigned bool
47
+ IsVirtual bool
46
48
EnumValues []string
47
49
SetValues []string
48
50
FixedSize uint
@@ -118,6 +120,8 @@ func (ta *Table) AddColumn(name string, columnType string, collation string, ext
118
120
ta .Columns [index ].Type = TYPE_BIT
119
121
} else if strings .HasPrefix (columnType , "json" ) {
120
122
ta .Columns [index ].Type = TYPE_JSON
123
+ } else if strings .Contains (columnType , "point" ) {
124
+ ta .Columns [index ].Type = TYPE_POINT
121
125
} else if strings .Contains (columnType , "mediumint" ) {
122
126
ta .Columns [index ].Type = TYPE_MEDIUM_INT
123
127
} else if strings .Contains (columnType , "int" ) || strings .HasPrefix (columnType , "year" ) {
@@ -139,6 +143,8 @@ func (ta *Table) AddColumn(name string, columnType string, collation string, ext
139
143
140
144
if extra == "auto_increment" {
141
145
ta .Columns [index ].IsAuto = true
146
+ } else if extra == "VIRTUAL GENERATED" {
147
+ ta .Columns [index ].IsVirtual = true
142
148
}
143
149
}
144
150
0 commit comments