Skip to content

Commit 115285e

Browse files
committed
implement IsStringType
1 parent 47af6f8 commit 115285e

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

server/types/type.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -625,12 +625,7 @@ func (t *DoltgresType) MaxCharacterLength() int64 {
625625

626626
// IsNumericType implements the sql.NumberType interface.
627627
func (t *DoltgresType) IsNumericType() bool {
628-
switch t.TypCategory {
629-
case TypeCategory_NumericTypes:
630-
return true
631-
default:
632-
return false
633-
}
628+
return t.TypCategory == TypeCategory_NumericTypes
634629
}
635630

636631
// IsFloat implements the sql.NumberType interface.
@@ -663,6 +658,11 @@ func (t *DoltgresType) DisplayWidth() int {
663658
}
664659
}
665660

661+
// IsStringType implements the sql.StringType interface.
662+
func (t *DoltgresType) IsStringType() bool {
663+
return t.TypCategory == TypeCategory_StringTypes
664+
}
665+
666666
// MaxSerializedWidth implements the types.ExtendedType interface.
667667
func (t *DoltgresType) MaxSerializedWidth() sql.ExtendedTypeSerializedWidth {
668668
if t.TypLength < 0 {

0 commit comments

Comments
 (0)