aboutsummaryrefslogtreecommitdiff
path: root/sqlite3.go
diff options
context:
space:
mode:
authorYasuhiro Matsumoto <mattn.jp@gmail.com>2016-12-09 13:12:14 +0900
committerYasuhiro Matsumoto <mattn.jp@gmail.com>2016-12-09 13:12:14 +0900
commit056f235aa609d5d2a8ba71f4707f2ba138033e9e (patch)
tree72d87d192973bdb73190ecd61e757e8acf3cbb3f /sqlite3.go
parentfix tests (diff)
downloadgolite-056f235aa609d5d2a8ba71f4707f2ba138033e9e.tar.gz
golite-056f235aa609d5d2a8ba71f4707f2ba138033e9e.tar.xz
fix named args
Diffstat (limited to 'sqlite3.go')
-rw-r--r--sqlite3.go2
1 files changed, 1 insertions, 1 deletions
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))
}