TypeValue should include Value
This commit is contained in:
@@ -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
|
// 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.
|
// when registered as a data type in a ConnType. It should not be used directly as a Value.
|
||||||
type EnumType interface {
|
type EnumType interface {
|
||||||
Value
|
|
||||||
TypeValue
|
TypeValue
|
||||||
|
|
||||||
// Members returns possible members of this enumeration. The returned slice must not be modified.
|
// Members returns possible members of this enumeration. The returned slice must not be modified.
|
||||||
|
|||||||
@@ -128,12 +128,14 @@ type Value interface {
|
|||||||
AssignTo(dst interface{}) error
|
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.
|
// 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
|
// 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.
|
// encoder and decoder internal to ConnInfo.
|
||||||
type TypeValue interface {
|
type TypeValue interface {
|
||||||
|
Value
|
||||||
|
|
||||||
// NewTypeValue creates a TypeValue including references to internal type information. e.g. the list of members
|
// NewTypeValue creates a TypeValue including references to internal type information. e.g. the list of members
|
||||||
// in an EnumType.
|
// in an EnumType.
|
||||||
NewTypeValue() Value
|
NewTypeValue() Value
|
||||||
|
|||||||
Reference in New Issue
Block a user