2
0

TypeValue should include Value

This commit is contained in:
Jack Christensen
2020-05-12 10:28:13 -05:00
parent 682201a4fc
commit e5992d0aed
2 changed files with 3 additions and 2 deletions
-1
View File
@@ -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.
+3 -1
View File
@@ -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