It seems there has been a api change, with broken backward compatibility.
looking at lib/sqlite3/database.rb execute implementation, it should
warn user of the deprecated API.
It does not.

Passing an array containing argument works:

$ cat t2.rb
#!/usr/bin/ruby

require 'sqlite3'

db = SQLite3::Database.new("t.sqlite3")
db.execute("CREATE TABLE t (a, b, c, d, e)")
db.execute("INSERT INTO t (a, b, c, d, e) VALUES (?, ?, ?, ?, ?)", [
                "thisvalueisreplacedbyNULL", "b", "c", "d", "e"])

$ rm -f t.sqlite3 && ruby t2.rb && sqlite3 t.sqlite3 "select * from t"
thisvalueisreplacedbyNULL|b|c|d|e


This will lead to funny surprises.
-- 
Arnaud Cornet



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to