diff --git a/enum_type.go b/enum_type.go index 231c21fd..a72bb13f 100644 --- a/enum_type.go +++ b/enum_type.go @@ -5,7 +5,6 @@ import errors "golang.org/x/xerrors" // EnumType represents a enum type. While it implements Value, this is only in service of its type conversion duties // when registered as a data type in a ConnType. It should not be used directly as a Value. type EnumType interface { - Value TypeValue // Members returns possible members of this enumeration. The returned slice must not be modified. diff --git a/pgtype.go b/pgtype.go index 6a703994..5662f4c7 100644 --- a/pgtype.go +++ b/pgtype.go @@ -128,12 +128,14 @@ type Value interface { AssignTo(dst interface{}) error } -// TypeValue represents values where instances can represent different PostgreSQL types. This can be useful for +// TypeValue is a Value where instances can represent different PostgreSQL types. This can be useful for // representing types such as enums, composites, and arrays. // // In general, instances of TypeValue should not be used to directly represent a value. It should only be used as an // encoder and decoder internal to ConnInfo. type TypeValue interface { + Value + // NewTypeValue creates a TypeValue including references to internal type information. e.g. the list of members // in an EnumType. NewTypeValue() Value