def to_s
      s = "SELECT "
      s << @wheres.map{|k,v| "#{k} = #{v.inspect}"}.join(" AND ")
      if sorted?
        order_by_clause = @sort_orders.map{|attr,asc| "#{attr} #{asc ? 'ASC' : 'DESC'}"}.join(', ')
        s << " ORDER_BY #{order_by_clause}"
      end
      s << " LIMIT #{@limit}" if @limit
      s
    end
def to_s
      s = "SELECT "
      s << @wheres.map{|k,v| "#{k} = #{v.inspect}"}.join(" AND ")
      if sorted?
        order_by_clause = @sort_orders.map{|attr,asc| "#{attr} #{asc ? 'ASC' : 'DESC'}"}.join(', ')
        s << " ORDER_BY #{order_by_clause}"
      end
      s << " LIMIT #{@limit}" if @limit
      s
    end
DEPRECATED