fix named args

This commit is contained in:
Yasuhiro Matsumoto 2016-12-09 13:12:14 +09:00
parent 35cf400919
commit 056f235aa6
1 changed files with 1 additions and 1 deletions

View File

@ -693,7 +693,7 @@ func (s *SQLiteStmt) bind(args []namedValue) error {
for i, v := range args { for i, v := range args {
if v.Name != "" { if v.Name != "" {
cname := C.CString(v.Name) cname := C.CString(":" + v.Name)
args[i].Ordinal = int(C.sqlite3_bind_parameter_index(s.s, cname)) args[i].Ordinal = int(C.sqlite3_bind_parameter_index(s.s, cname))
C.free(unsafe.Pointer(cname)) C.free(unsafe.Pointer(cname))
} }