code: def GetEntries(self, parser_mediator, cache=None, database=None, **kwargs):
      
      if database is None:
        raise ValueError('Invalid database.')
  
      for table_name, callback_method in iter(self._tables.items()):
        if parser_mediator.abort:
          break
  
        if not callback_method:
          # Table names without a callback method are allowed to improve
          # the detection of a database based on its table names.
          continue
  
        callback = getattr(self, callback_method, None)
        if callback is None:
          logger.warning(
              '[{0:s}] missing callback method: {1:s} for table: {2:s}'.format(
                  self.NAME, callback_method, table_name))
          continue
  
        esedb_table = database.get_table_by_name(table_name)
        if not esedb_table:
          logger.warning('[{0:s}] missing table: {1:s}'.format(
              self.NAME, table_name))
          continue
  
        # The database is passed in case the database contains table names
        # that are assigned dynamically and cannot be defined by
        # the table name-callback mechanism.
        callback(
            parser_mediator, cache=cache, database=database, table=esedb_table,
            **kwargs)
docs: Extracts event objects from the database.
  
      Args:
        parser_mediator (ParserMediator): mediates interactions between parsers
            and other components, such as storage and dfvfs.
        cache (Optional[ESEDBCache]): cache.
        database (Optional[pyesedb.file]): ESE database.
  
      Raises:
        ValueError: If the database attribute is not valid.