summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/testing/provision.py
diff options
context:
space:
mode:
authormike bayer <mike_mp@zzzcomputing.com>2020-09-01 17:12:11 +0000
committerGerrit Code Review <gerrit@bbpush.zzzcomputing.com>2020-09-01 17:12:11 +0000
commit7439697ca3c8b07af79de6a146a15c34fc85d9d6 (patch)
treeec0f4a477276017f2b8e48646e47ca64c13c83ec /lib/sqlalchemy/testing/provision.py
parentd61cf0a9ad91edfcb569214a19122a9572fbb29b (diff)
parent516131c40da9c8cd304061850e2d98e309966dd5 (diff)
downloadsqlalchemy-7439697ca3c8b07af79de6a146a15c34fc85d9d6.tar.gz
Merge "Improve reflection for mssql temporary tables"
Diffstat (limited to 'lib/sqlalchemy/testing/provision.py')
-rw-r--r--lib/sqlalchemy/testing/provision.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/sqlalchemy/testing/provision.py b/lib/sqlalchemy/testing/provision.py
index 0edaae490..8bdad357c 100644
--- a/lib/sqlalchemy/testing/provision.py
+++ b/lib/sqlalchemy/testing/provision.py
@@ -296,3 +296,18 @@ def temp_table_keyword_args(cfg, eng):
raise NotImplementedError(
"no temp table keyword args routine for cfg: %s" % eng.url
)
+
+
+@register.init
+def get_temp_table_name(cfg, eng, base_name):
+ """Specify table name for creating a temporary Table.
+
+ Dialect-specific implementations of this method will return the
+ name to use when creating a temporary table for testing,
+ e.g., in the define_temp_tables method of the
+ ComponentReflectionTest class in suite/test_reflection.py
+
+ Default to just the base name since that's what most dialects will
+ use. The mssql dialect's implementation will need a "#" prepended.
+ """
+ return base_name