ad_manager_api/lib/ad_manager_api/pql_statement_utils.rb
def validate()
      if !@select.to_s.strip.empty? and @from.to_s.strip.empty?
        raise 'FROM clause is required with SELECT'
      end
      if !@from.to_s.strip.empty? and @select.to_s.strip.empty?
        raise 'SELECT clause is required with FROM'
      end
      if !@offset.nil? and @limit.nil?
        raise 'LIMIT clause is required with OFFSET'
      end
      unless @limit.is_a? Integer or @limit.nil?
        raise 'LIMIT must be an integer'
      end
      unless @offset.is_a? Integer or @offset.nil?
        raise 'OFFSET must be an integer'
      end
    end
def validate()
      if !@select.to_s.strip.empty? and @from.to_s.strip.empty?
        raise 'FROM clause is required with SELECT'
      end
      if !@from.to_s.strip.empty? and @select.to_s.strip.empty?
        raise 'SELECT clause is required with FROM'
      end
      if !@offset.nil? and @limit.nil?
        raise 'LIMIT clause is required with OFFSET'
      end
      unless @limit.is_a? Integer or @limit.nil?
        raise 'LIMIT must be an integer'
      end
      unless @offset.is_a? Integer or @offset.nil?
        raise 'OFFSET must be an integer'
      end
    end
Return a list of validation errors.