def order_string
      o = order
      if o.empty?
        orderby = 'id'
        orderdir = 'asc'
      else
        orderby, orderdir = order[0]
      end

      "#{orderby} #{orderdir}"
    end
def order_string
      o = order
      if o.empty?
        orderby = 'id'
        orderdir = 'asc'
      else
        orderby, orderdir = order[0]
      end

      "#{orderby} #{orderdir}"
    end
where