File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 115
115
# Binding parameters to SQL statements
116
116
" bind `val` to the named parameter `name`"
117
117
function bind! (stmt:: Stmt ,name:: AbstractString ,val)
118
- i = sqlite3_bind_parameter_index (stmt. handle,name)
118
+ i:: Int = sqlite3_bind_parameter_index (stmt. handle,name)
119
119
if i == 0
120
120
throw (SQLiteException (" SQL parameter $name not found in $stmt " ))
121
121
end
Original file line number Diff line number Diff line change @@ -311,3 +311,9 @@ dt3 = SQLite.query(db, "Select * from temp")
311
311
@test get (dt3[2 ,2 ]) == " B"
312
312
@test get (dt3[3 ,1 ]) == 2
313
313
@test get (dt3[3 ,2 ]) == " C"
314
+
315
+ # issue #104
316
+ db = SQLite. DB () # In case the order of tests is changed
317
+ SQLite. execute! (db, " CREATE TABLE IF NOT EXISTS tbl(a INTEGER);" )
318
+ stmt = SQLite. Stmt (db, " INSERT INTO tbl (a) VALUES (@a);" )
319
+ SQLite. bind! (stmt, " @a" , 1 )
You can’t perform that action at this time.
0 commit comments