2
0

Extract nullAssignmentError

This commit is contained in:
Jack Christensen
2020-05-10 12:28:47 -05:00
parent 52729c1b77
commit a71c179ce3
2 changed files with 11 additions and 2 deletions
+9
View File
@@ -3,6 +3,7 @@ package pgtype
import (
"database/sql"
"encoding/binary"
"fmt"
"math"
"net"
"reflect"
@@ -198,6 +199,14 @@ func (f BinaryEncoderFunc) EncodeBinary(ci *ConnInfo, buf []byte) (newBuf []byte
var errUndefined = errors.New("cannot encode status undefined")
var errBadStatus = errors.New("invalid status")
type nullAssignmentError struct {
dst interface{}
}
func (e *nullAssignmentError) Error() string {
return fmt.Sprintf("cannot assign NULL to %T", e.dst)
}
type DataType struct {
Value Value