String implements the types.ExtendedType interface.
()
| 913 | |
| 914 | // String implements the types.ExtendedType interface. |
| 915 | func (t *DoltgresType) String() string { |
| 916 | str := t.InternalName |
| 917 | if t.InternalName == "" { |
| 918 | str = t.Name() |
| 919 | } |
| 920 | if t.attTypMod != -1 { |
| 921 | // TODO: need valid sql.Context |
| 922 | if l, err := t.TypModOut(nil, t.attTypMod); err == nil { |
| 923 | str = fmt.Sprintf("%s%s", str, l) |
| 924 | } |
| 925 | } |
| 926 | return str |
| 927 | } |
| 928 | |
| 929 | // SubscriptFuncName returns the name that would be displayed in pg_type for the `typsubscript` field. |
| 930 | func (t *DoltgresType) SubscriptFuncName() string { |
no test coverage detected