From ca2e4f385802799c2584782a8528e19a9e5513bc Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Fri, 28 Feb 2020 14:56:25 -0500 Subject: Discontinue dynamic __visit_name__ Removed very antiquated logic that checks if __visit_name__ is a property. There's no need for this as the compiler can handle switching between implementations. Convert _compile_dispatch() to be fully inlined. Change-Id: Ic0c7247c2d7dfed93a27f09250a8ed6352370764 --- lib/sqlalchemy/sql/compiler.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/sqlalchemy/sql/compiler.py') diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py index 04ae2532b..9c1f50ce1 100644 --- a/lib/sqlalchemy/sql/compiler.py +++ b/lib/sqlalchemy/sql/compiler.py @@ -3542,6 +3542,12 @@ class DDLCompiler(Compiled): else: return None + def visit_table_or_column_check_constraint(self, constraint, **kw): + if constraint.is_column_level: + return self.visit_column_check_constraint(constraint) + else: + return self.visit_check_constraint(constraint) + def visit_check_constraint(self, constraint): text = "" if constraint.name is not None: -- cgit v1.2.1