2
0

Expand pgtype.Value interface

- Include and rename ConvertFrom to Set
- Add Get
- Include AssignTo
This commit is contained in:
Jack Christensen
2017-03-11 19:53:02 -06:00
parent 542eac08c6
commit 57494a6a0f
74 changed files with 568 additions and 185 deletions
+8 -5
View File
@@ -66,13 +66,16 @@ const (
NegativeInfinity InfinityModifier = -Infinity
)
type Value interface{}
type Value interface {
// Set converts and assigns src to itself.
Set(src interface{}) error
type ConverterFrom interface {
ConvertFrom(src interface{}) error
}
// Get returns the simplest representation of Value. If the Value is Null or
// Undefined that is the return value. If no simpler representation is
// possible, then Get() returns Value.
Get() interface{}
type AssignerTo interface {
// AssignTo converts and assigns the Value to dst.
AssignTo(dst interface{}) error
}