Skip to content

Commit 056f235

Browse files
committed
fix named args
1 parent 35cf400 commit 056f235

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sqlite3.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ func (s *SQLiteStmt) bind(args []namedValue) error {
693693

694694
for i, v := range args {
695695
if v.Name != "" {
696-
cname := C.CString(v.Name)
696+
cname := C.CString(":" + v.Name)
697697
args[i].Ordinal = int(C.sqlite3_bind_parameter_index(s.s, cname))
698698
C.free(unsafe.Pointer(cname))
699699
}

0 commit comments

Comments
 (0)