code: def get_priority_rules(db) -> Iterable[PriorityRule]:
      
      cur = db.cursor()
      cur.execute('SELECT id, regexp, priority FROM file_priority')
      for row in cur:
          yield PriorityRule(*row)
docs: Get file priority rules.