IsAmbiguous returns true if this type is in UnknownFamily or AnyFamily. Instances of ambiguous types can be NULL or be in one of several different type families. This is important for parameterized types to determine whether they are fully concrete or not.
()
| 2839 | // type families. This is important for parameterized types to determine whether |
| 2840 | // they are fully concrete or not. |
| 2841 | func (t *T) IsAmbiguous() bool { |
| 2842 | switch t.Family() { |
| 2843 | case UnknownFamily, AnyFamily: |
| 2844 | return true |
| 2845 | case CollatedStringFamily: |
| 2846 | return t.Locale() == "" |
| 2847 | case TupleFamily: |
| 2848 | if len(t.TupleContents()) == 0 { |
| 2849 | return true |
| 2850 | } |
| 2851 | for i := range t.TupleContents() { |
| 2852 | if t.TupleContents()[i].IsAmbiguous() { |
| 2853 | return true |
| 2854 | } |
| 2855 | } |
| 2856 | return false |
| 2857 | case ArrayFamily: |
| 2858 | return t.ArrayContents().IsAmbiguous() |
| 2859 | case EnumFamily: |
| 2860 | return t.Oid() == oid.T_anyenum |
| 2861 | } |
| 2862 | return false |
| 2863 | } |
| 2864 | |
| 2865 | // IsNumeric returns true iff this type is an integer, float, or decimal. |
| 2866 | func (t *T) IsNumeric() bool { |
no test coverage detected