From 056f235aa609d5d2a8ba71f4707f2ba138033e9e Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsumoto Date: Fri, 9 Dec 2016 13:12:14 +0900 Subject: [PATCH] fix named args --- sqlite3.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sqlite3.go b/sqlite3.go index fc37d20..64933f1 100644 --- a/sqlite3.go +++ b/sqlite3.go @@ -693,7 +693,7 @@ func (s *SQLiteStmt) bind(args []namedValue) error { for i, v := range args { 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)) C.free(unsafe.Pointer(cname)) }