Erik Veenstra
2/15/2005 5:35:00 PM
I have a problem when using SQLITE3. I think it's a bug in the
Ruby bindings, but I'm not quiet sure.
Just run this script to regenerate the problem.
gegroet,
Erik V.
----------------------------------------------------------------
require "rubygems"
require_gem "sqlite3-ruby"
dbfile = "dummy.db"
File.delete(dbfile) if File.file?(dbfile)
db = SQLite3::Database.new(dbfile)
db.type_translation = true # This is causing the problem.
db.execute("CREATE TABLE t1 (c1 INTEGER)")
db.execute("INSERT INTO t1 (c1) VALUES (1)")
db.execute("INSERT INTO t1 (c1) VALUES (2)")
db.execute("INSERT INTO t1 (c1) VALUES (3)")
p db.execute("SELECT MAX(c1) FROM t1").shift.shift
----------------------------------------------------------------