(self, metadata)
| 955 | ) |
| 956 | |
| 957 | def visit_metadata(self, metadata): |
| 958 | if self.tables is not None: |
| 959 | tables = self.tables |
| 960 | else: |
| 961 | tables = list(metadata.tables.values()) |
| 962 | |
| 963 | collection = sort_tables_and_constraints( |
| 964 | [t for t in tables if self._can_create_table(t)] |
| 965 | ) |
| 966 | |
| 967 | seq_coll = [ |
| 968 | s |
| 969 | for s in metadata._sequences.values() |
| 970 | if s.column is None and self._can_create_sequence(s) |
| 971 | ] |
| 972 | |
| 973 | event_collection = [t for (t, fks) in collection if t is not None] |
| 974 | |
| 975 | with self.with_ddl_events( |
| 976 | metadata, |
| 977 | tables=event_collection, |
| 978 | checkfirst=self.checkfirst, |
| 979 | ): |
| 980 | for seq in seq_coll: |
| 981 | self.traverse_single(seq, create_ok=True) |
| 982 | |
| 983 | for table, fkcs in collection: |
| 984 | if table is not None: |
| 985 | self.traverse_single( |
| 986 | table, |
| 987 | create_ok=True, |
| 988 | include_foreign_key_constraints=fkcs, |
| 989 | _is_metadata_operation=True, |
| 990 | ) |
| 991 | else: |
| 992 | for fkc in fkcs: |
| 993 | self.traverse_single(fkc) |
| 994 | |
| 995 | def visit_table( |
| 996 | self, |
nothing calls this directly
no test coverage detected