File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -543,6 +543,34 @@ const (
543543 TableOptionPackKeys
544544)
545545
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+
546574func (t TableOptionType ) String () string {
547575 switch t {
548576 case TableOptionEngine :
@@ -585,6 +613,9 @@ func (t TableOptionType) String() string {
585613}
586614
587615func (o * TableOption ) String () string {
616+ if o .Type == TableOptionRowFormat {
617+ return fmt .Sprintf ("%s=%s" , o .Type , RowFormatType (o .UintValue ))
618+ }
588619 if o .StrValue != "" {
589620 return fmt .Sprintf ("%s=%s" , o .Type , o .StrValue )
590621 }
You can’t perform that action at this time.
0 commit comments