def query( sql, bind_vars = [], *args )
if bind_vars.nil? || !args.empty?
if args.empty?
bind_vars = []
else
bind_vars = [nil] + args
end
warn("\#{caller[0]} is calling SQLite3::Database#query with nil or multiple bind params\nwithout using an array. Please switch to passing bind parameters as an array.\nSupport for this will be removed in version 2.0.0.\n") if $VERBOSE
end
result = prepare( sql ).execute( bind_vars )
if block_given?
begin
yield result
ensure
result.close
end
else
return result
end
end