forked from mirror/go-sqlcipher
fix named args
This commit is contained in:
parent
35cf400919
commit
056f235aa6
|
@ -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))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue