summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/testing/requirements.py
diff options
context:
space:
mode:
authorMike Barry <michael.barry@gmo.com>2022-10-26 13:40:32 -0400
committermike bayer <mike_mp@zzzcomputing.com>2022-10-28 13:08:49 +0000
commit59f2d0c96152128d8e02e43dcda045593153c86e (patch)
tree86759dfd658cd2671cf6552ac5d801dd5dd7bbf1 /lib/sqlalchemy/testing/requirements.py
parent50d3b85c693a4ca673bcabd711f130ae58111f16 (diff)
downloadsqlalchemy-59f2d0c96152128d8e02e43dcda045593153c86e.tar.gz
use only object_id() function for temp tables
Fixed issue with :meth:`.Inspector.has_table` when used against a temporary table for the SQL Server dialect would fail an invalid object name error on some Azure variants, due to an unnecessary information schema query that is not supported on those server versions. Pull request courtesy Mike Barry. the patch also fills out test support for has_table() against temp tables, temp views, adding to the has_table() support just added for views in #8700. Fixes: #8714 Closes: #8716 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/8716 Pull-request-sha: e2ac7a52e2b09a349a703ba1e1a2911f4d3c0912 Change-Id: Ia73e4e9e977a2d6b7e100abd2f81a8c8777dc9bb
Diffstat (limited to 'lib/sqlalchemy/testing/requirements.py')
-rw-r--r--lib/sqlalchemy/testing/requirements.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/sqlalchemy/testing/requirements.py b/lib/sqlalchemy/testing/requirements.py
index 1d6f1103d..8ceb2af2f 100644
--- a/lib/sqlalchemy/testing/requirements.py
+++ b/lib/sqlalchemy/testing/requirements.py
@@ -710,6 +710,11 @@ class SuiteRequirements(Requirements):
return exclusions.closed()
@property
+ def has_temp_table(self):
+ """target dialect supports checking a single temp table name"""
+ return exclusions.closed()
+
+ @property
def temporary_tables(self):
"""target database supports temporary tables"""
return exclusions.open()