1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-25 16:19:46 +02:00

Sync with Community

This commit is contained in:
HarveyKandola 2021-08-19 13:02:56 -04:00
parent df8f650319
commit 989b7cd62c
123 changed files with 5054 additions and 2015 deletions

View file

@ -66,10 +66,10 @@ func convertInputParameter(val interface{}) (interface{}, error) {
func (c *Conn) CheckNamedValue(nv *driver.NamedValue) error {
switch v := nv.Value.(type) {
case sql.Out:
if c.outs == nil {
c.outs = make(map[string]interface{})
if c.outs.params == nil {
c.outs.params = make(map[string]interface{})
}
c.outs[nv.Name] = v.Dest
c.outs.params[nv.Name] = v.Dest
if v.Dest == nil {
return errors.New("destination is a nil pointer")
@ -110,7 +110,7 @@ func (c *Conn) CheckNamedValue(nv *driver.NamedValue) error {
return nil
case *ReturnStatus:
*v = 0 // By default the return value should be zero.
c.returnStatus = v
c.outs.returnStatus = v
return driver.ErrRemoveArgument
case TVP:
return nil
@ -194,3 +194,8 @@ func (s *Stmt) makeParamExtra(val driver.Value) (res param, err error) {
func scanIntoOut(name string, fromServer, scanInto interface{}) error {
return convertAssign(scanInto, fromServer)
}
func isOutputValue(val driver.Value) bool {
_, out := val.(sql.Out)
return out
}