code: def on_change(self, path, event_type):
          
          # I can do all this work in a sql statement, but
          # for debugging it's easier to do it in stages.
          sql = """SELECT collection_id
                   FROM collection_table
                   WHERE path == ?
          """
          cursor = self._execute(sql, (path,))
          results = cursor.fetchall()
          # there should always be exactly one result, but
          # there's no harm in using a loop to process the
          # single result
          for result in results:
              collection_id = result[0]
              # remove all keywords in this collection
              sql = """DELETE from keyword_table
                       WHERE collection_id == ?
              """
              cursor = self._execute(sql, (collection_id,))
              self._load_keywords(collection_id, path=path)
docs: Respond to changes in the file system
  
          This method will be given the path to a file that
          has changed on disk. We need to reload the keywords
          from that file