Expose wrap functions on ConnInfo
- Remove rarely used ScanPlan.Scan arguments - Plus other refactorings and fixes that fell out of this change. - Plus rows Scan now handles checking for changed type.
This commit is contained in:
+3
-3
@@ -246,7 +246,7 @@ func (c Uint32Codec) DecodeValue(ci *ConnInfo, oid uint32, format int16, src []b
|
||||
|
||||
type scanPlanBinaryUint32ToUint32 struct{}
|
||||
|
||||
func (scanPlanBinaryUint32ToUint32) Scan(ci *ConnInfo, oid uint32, formatCode int16, src []byte, dst interface{}) error {
|
||||
func (scanPlanBinaryUint32ToUint32) Scan(src []byte, dst interface{}) error {
|
||||
if src == nil {
|
||||
return fmt.Errorf("cannot scan null into %T", dst)
|
||||
}
|
||||
@@ -263,7 +263,7 @@ func (scanPlanBinaryUint32ToUint32) Scan(ci *ConnInfo, oid uint32, formatCode in
|
||||
|
||||
type scanPlanBinaryUint32ToUint32Scanner struct{}
|
||||
|
||||
func (scanPlanBinaryUint32ToUint32Scanner) Scan(ci *ConnInfo, oid uint32, formatCode int16, src []byte, dst interface{}) error {
|
||||
func (scanPlanBinaryUint32ToUint32Scanner) Scan(src []byte, dst interface{}) error {
|
||||
s, ok := (dst).(Uint32Scanner)
|
||||
if !ok {
|
||||
return ErrScanTargetTypeChanged
|
||||
@@ -284,7 +284,7 @@ func (scanPlanBinaryUint32ToUint32Scanner) Scan(ci *ConnInfo, oid uint32, format
|
||||
|
||||
type scanPlanTextAnyToUint32Scanner struct{}
|
||||
|
||||
func (scanPlanTextAnyToUint32Scanner) Scan(ci *ConnInfo, oid uint32, formatCode int16, src []byte, dst interface{}) error {
|
||||
func (scanPlanTextAnyToUint32Scanner) Scan(src []byte, dst interface{}) error {
|
||||
s, ok := (dst).(Uint32Scanner)
|
||||
if !ok {
|
||||
return ErrScanTargetTypeChanged
|
||||
|
||||
Reference in New Issue
Block a user