MakeCollatedType is like MakeCollatedString but also handles NULL and arrays of string types that need to become arrays of collated string types. UNKNOWN => STRING COLLATE EN []STRING => []STRING COLLATE EN
(typ *T, locale string)
| 998 | // UNKNOWN => STRING COLLATE EN |
| 999 | // []STRING => []STRING COLLATE EN |
| 1000 | func MakeCollatedType(typ *T, locale string) *T { |
| 1001 | if typ.Family() == ArrayFamily { |
| 1002 | return MakeArray(MakeCollatedType(typ.ArrayContents(), locale)) |
| 1003 | } |
| 1004 | if typ.Family() == UnknownFamily { |
| 1005 | return MakeCollatedType(String, locale) |
| 1006 | } |
| 1007 | return MakeCollatedString(typ, locale) |
| 1008 | } |
| 1009 | |
| 1010 | // MakeDecimal constructs a new instance of a DECIMAL type (oid = T_numeric) |
| 1011 | // that has at most "precision" # of decimal digits (0 = unspecified number of |
no test coverage detected
searching dependent graphs…