diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-02-25 16:18:12 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-02-25 16:32:19 -0500 |
commit | 6cd195c4a1589620784b052a041e691427d1e086 (patch) | |
tree | 13170d68f7eec9b15cc6fb477aed92dd29846bb5 /lib/sqlalchemy/sql/compiler.py | |
parent | dc615763d39916e9c037c7c376db1817cdf02764 (diff) | |
download | sqlalchemy-6cd195c4a1589620784b052a041e691427d1e086.tar.gz |
implement visit_unsupported_compilation for TypeCompiler
Fixed regression where the "unsupported compilation error" for unknown
datatypes would fail to raise correctly.
Fixes: #5979
Change-Id: I984fe95666813832ab5bdfc568322e2aa7cc3db0
Diffstat (limited to 'lib/sqlalchemy/sql/compiler.py')
-rw-r--r-- | lib/sqlalchemy/sql/compiler.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py index 763b4cabb..c4577e397 100644 --- a/lib/sqlalchemy/sql/compiler.py +++ b/lib/sqlalchemy/sql/compiler.py @@ -550,6 +550,12 @@ class TypeCompiler(util.with_metaclass(util.EnsureKWArgType, object)): def process(self, type_, **kw): return type_._compiler_dispatch(self, **kw) + def visit_unsupported_compilation(self, element, err, **kw): + util.raise_( + exc.UnsupportedCompilationError(self, element), + replace_context=err, + ) + # this was a Visitable, but to allow accurate detection of # column elements this is actually a column element |