Skip to content

Commit 30ed618

Browse files
authored
Assign converted value instead of discarding. (#45)
This fixes a bug in 7dada5e which breaks all drivers that do not implement the NamedValueConverter interface.
1 parent 7dada5e commit 30ed618

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

driver.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -516,12 +516,12 @@ func (c *ocConn) BeginTx(ctx context.Context, opts driver.TxOptions) (tx driver.
516516
return ocTx{parent: tx, ctx: ctx, options: c.options}, nil
517517
}
518518

519-
func (c *ocConn) CheckNamedValue(nv *driver.NamedValue) error {
519+
func (c *ocConn) CheckNamedValue(nv *driver.NamedValue) (err error) {
520520
nvc, ok := c.parent.(driver.NamedValueChecker)
521521
if ok {
522522
return nvc.CheckNamedValue(nv)
523523
}
524-
_, err := driver.DefaultParameterConverter.ConvertValue(nv.Value)
524+
nv.Value, err = driver.DefaultParameterConverter.ConvertValue(nv.Value)
525525
return err
526526
}
527527

0 commit comments

Comments
 (0)