def results
      return @results if defined? @results
      return [] if frozen?

      enforce_timezone do
        case query
        when /\ADELETE/i
          @affected_rows = connection.delete(query, "#{self.class.name} Delete")

        when /\AINSERT/i
          @last_insert_id = connection.insert(query, "#{self.class.name} Insert")

        when /\AUPDATE/i
          @affected_rows = connection.update(query, "#{self.class.name} Update")

        when /\ASELECT/i
          # Why not execute or select_rows? Because select_all hits the query cache.
          ar_results = connection.select_all(query, "#{self.class.name} Select")
          @hash_results = ar_results.to_ary
          @results = ar_results.rows
        else
          @results = connection.execute(query, "#{self.class.name} Execute").to_a
        end

        @results ||= []

        retrieve_found_row_count
        freeze

        @results
      end
    end
def results
      return @results if defined? @results
      return [] if frozen?

      enforce_timezone do
        case query
        when /\ADELETE/i
          @affected_rows = connection.delete(query, "#{self.class.name} Delete")

        when /\AINSERT/i
          @last_insert_id = connection.insert(query, "#{self.class.name} Insert")

        when /\AUPDATE/i
          @affected_rows = connection.update(query, "#{self.class.name} Update")

        when /\ASELECT/i
          # Why not execute or select_rows? Because select_all hits the query cache.
          ar_results = connection.select_all(query, "#{self.class.name} Select")
          @hash_results = ar_results.to_ary
          @results = ar_results.rows
        else
          @results = connection.execute(query, "#{self.class.name} Execute").to_a
        end

        @results ||= []

        retrieve_found_row_count
        freeze

        @results
      end
    end
Public: Execute, memoize, and return the results of this query.