class SQLite3::Database

def query(sql, bind_vars = [])

terminates.
with a block, +close+ will be invoked implicitly when the block
returned, or you could have problems with locks on the table. If called
You must be sure to call +close+ on the ResultSet instance that is

result = db.prepare( "select * from foo where a=?" ).execute( 5 )
# is the same as
result = db.query( "select * from foo where a=?", [5])

parameters to it, and calling execute:
This is a convenience method for creating a statement, binding
def query(sql, bind_vars = [])
  result = prepare(sql).execute(bind_vars)
  if block_given?
    begin
      yield result
    ensure
      result.close
    end
  else
    result
  end
end