Exemple #1
0
  def drop_files (self, files):
    invalid_objs = set()
    outdated_includes = set()
    for file in files:
      if file in self._files:
        split = split_list(self._files[file],
                           lambda i: i[0] if isinstance(i, tuple) else None)
        if 'ignore' in split:
          self.drop_ignores(i[1] for i in split['ignore'])
        if 'include' in split:
          outdated_includes.update(i[1] for i in split['include'])
        if None in split:
          invalid_objs.update(split[None])
        del self._files[file]

    schema_names = {obj.name.schema for obj in invalid_objs}

    for schema_name in schema_names:
      self.schemas[schema_name].drop_invalid_objects(invalid_objs)

    return outdated_includes
Exemple #2
0
 def drop_ignores (self, names):
   split = split_list(names, lambda i: isinstance(i, OracleFQN))
   if True in split:
     self._ignores.difference_update(split[True])
   if False in split:
     self._ignore_schemas.difference_update(split[False])