diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2016-01-11 14:35:56 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2016-01-11 16:44:28 -0500 |
commit | 6fbfadc7388dad4576ad99ce597e0878ee1d297f (patch) | |
tree | 2aeaeec66050d6377ae719f825b6d5f45ea62252 /lib/sqlalchemy/sql/ddl.py | |
parent | b301f009e18246db9277a4b9d7e3a1bf01a92ae9 (diff) | |
download | sqlalchemy-6fbfadc7388dad4576ad99ce597e0878ee1d297f.tar.gz |
- reorganize schema_translate_map to be succinct and gain the performance
back by using an attrgetter for the default case
Diffstat (limited to 'lib/sqlalchemy/sql/ddl.py')
-rw-r--r-- | lib/sqlalchemy/sql/ddl.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/sqlalchemy/sql/ddl.py b/lib/sqlalchemy/sql/ddl.py index 7225da551..7953b61b8 100644 --- a/lib/sqlalchemy/sql/ddl.py +++ b/lib/sqlalchemy/sql/ddl.py @@ -679,7 +679,7 @@ class SchemaGenerator(DDLBase): def _can_create_table(self, table): self.dialect.validate_identifier(table.name) - effective_schema = self.connection._get_effective_schema(table) + effective_schema = self.connection.schema_for_object(table) if effective_schema: self.dialect.validate_identifier(effective_schema) return not self.checkfirst or \ @@ -687,7 +687,7 @@ class SchemaGenerator(DDLBase): table.name, schema=effective_schema) def _can_create_sequence(self, sequence): - effective_schema = self.connection._get_effective_schema(sequence) + effective_schema = self.connection.schema_for_object(sequence) return self.dialect.supports_sequences and \ ( @@ -885,14 +885,14 @@ class SchemaDropper(DDLBase): def _can_drop_table(self, table): self.dialect.validate_identifier(table.name) - effective_schema = self.connection._get_effective_schema(table) + effective_schema = self.connection.schema_for_object(table) if effective_schema: self.dialect.validate_identifier(effective_schema) return not self.checkfirst or self.dialect.has_table( self.connection, table.name, schema=effective_schema) def _can_drop_sequence(self, sequence): - effective_schema = self.connection._get_effective_schema(sequence) + effective_schema = self.connection.schema_for_object(sequence) return self.dialect.supports_sequences and \ ((not self.dialect.sequences_optional or not sequence.optional) and |