def query(sql, *args, &block)
      fetched = nil
      execute do |dbh|
        result = dbh.execute(sql, *args)
        if block_given? then
          result.each(&block)
        else
          fetched = result.fetch(:all)
        end
        result.finish
      end
      fetched
    end
def query(sql, *args, &block)
      fetched = nil
      execute do |dbh|
        result = dbh.execute(sql, *args)
        if block_given? then
          result.each(&block)
        else
          fetched = result.fetch(:all)
        end
        result.finish
      end
      fetched
    end
Runs the given query.

 @param [String] sql the SQL to execute
 @param [Array] args the SQL bindings
 @yield [row] operate on the result
 @yield [Array] the result row
 @return [Array] the query result