Skip to content

Commit

Permalink
mysqlStmt Implements CheckNamedValue (#1090)
Browse files Browse the repository at this point in the history
* Add CheckNamedValue for mysqlStmt

* Update AUTHORS

Co-authored-by: Zhixin Wen <zwen@nuro.ai>
  • Loading branch information
zhixinwen and Zhixin Wen committed May 9, 2020
1 parent f070e56 commit 343c803
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Expand Up @@ -91,6 +91,7 @@ Xiangyu Hu <xiangyu.hu at outlook.com>
Xiaobing Jiang <s7v7nislands at gmail.com>
Xiuming Chen <cc at cxm.cc>
Zhenye Xie <xiezhenye at gmail.com>
Zhixin Wen <john.wenzhixin at gmail.com>

# Organizations

Expand Down
5 changes: 5 additions & 0 deletions statement.go
Expand Up @@ -44,6 +44,11 @@ func (stmt *mysqlStmt) ColumnConverter(idx int) driver.ValueConverter {
return converter{}
}

func (stmt *mysqlStmt) CheckNamedValue(nv *driver.NamedValue) (err error) {
nv.Value, err = converter{}.ConvertValue(nv.Value)
return
}

func (stmt *mysqlStmt) Exec(args []driver.Value) (driver.Result, error) {
if stmt.mc.closed.IsSet() {
errLog.Print(ErrInvalidConn)
Expand Down

0 comments on commit 343c803

Please sign in to comment.