Skip to content

Commit d0d6e48

Browse files
zhixinwenZhixin Wen
authored andcommitted
mysqlStmt Implements CheckNamedValue (go-sql-driver#1090)
* Add CheckNamedValue for mysqlStmt * Update AUTHORS Co-authored-by: Zhixin Wen <[email protected]>
1 parent d8de882 commit d0d6e48

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

AUTHORS

+1
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ Xiangyu Hu <xiangyu.hu at outlook.com>
9191
Xiaobing Jiang <s7v7nislands at gmail.com>
9292
Xiuming Chen <cc at cxm.cc>
9393
Zhenye Xie <xiezhenye at gmail.com>
94+
Zhixin Wen <john.wenzhixin at gmail.com>
9495

9596
# Organizations
9697

statement.go

+5
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ func (stmt *mysqlStmt) ColumnConverter(idx int) driver.ValueConverter {
4444
return converter{}
4545
}
4646

47+
func (stmt *mysqlStmt) CheckNamedValue(nv *driver.NamedValue) (err error) {
48+
nv.Value, err = converter{}.ConvertValue(nv.Value)
49+
return
50+
}
51+
4752
func (stmt *mysqlStmt) Exec(args []driver.Value) (driver.Result, error) {
4853
if stmt.mc.closed.IsSet() {
4954
errLog.Print(ErrInvalidConn)

0 commit comments

Comments
 (0)