File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -543,6 +543,34 @@ const (
543
543
TableOptionPackKeys
544
544
)
545
545
546
+ // RowFormatType is the type for RowFormat
547
+ type RowFormatType uint64
548
+
549
+ // RowFormat types
550
+ const (
551
+ RowFormatDefault RowFormatType = iota + 1
552
+ RowFormatDynamic
553
+ RowFormatFixed
554
+ RowFormatCompressed
555
+ RowFormatRedundant
556
+ RowFormatCompact
557
+ )
558
+
559
+ func (r RowFormatType ) String () string {
560
+ switch r {
561
+ case RowFormatDynamic :
562
+ return "DYNAMIC"
563
+ case RowFormatCompressed :
564
+ return "COMPRESSED"
565
+ case RowFormatRedundant :
566
+ return "REDUNDANT"
567
+ case RowFormatCompact :
568
+ return "COMPACT"
569
+ default :
570
+ }
571
+ return ""
572
+ }
573
+
546
574
func (t TableOptionType ) String () string {
547
575
switch t {
548
576
case TableOptionEngine :
@@ -585,6 +613,9 @@ func (t TableOptionType) String() string {
585
613
}
586
614
587
615
func (o * TableOption ) String () string {
616
+ if o .Type == TableOptionRowFormat {
617
+ return fmt .Sprintf ("%s=%s" , o .Type , RowFormatType (o .UintValue ))
618
+ }
588
619
if o .StrValue != "" {
589
620
return fmt .Sprintf ("%s=%s" , o .Type , o .StrValue )
590
621
}
You can’t perform that action at this time.
0 commit comments