diff options
author | Gord Thompson <gord@gordthompson.com> | 2020-08-12 14:46:59 -0600 |
---|---|---|
committer | Gord Thompson <gord@gordthompson.com> | 2020-09-01 08:05:51 -0600 |
commit | 516131c40da9c8cd304061850e2d98e309966dd5 (patch) | |
tree | 148c91095e3021de6881fc0d328980538d3fcea0 /lib/sqlalchemy/dialects/mssql/provision.py | |
parent | 301c3f3579ace1ef1c28067904b57dd789620eae (diff) | |
download | sqlalchemy-516131c40da9c8cd304061850e2d98e309966dd5.tar.gz |
Improve reflection for mssql temporary tables
Fixes: #5506
Change-Id: I718474d76e3c630a1b71e07eaa20cefb104d11de
Diffstat (limited to 'lib/sqlalchemy/dialects/mssql/provision.py')
-rw-r--r-- | lib/sqlalchemy/dialects/mssql/provision.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/sqlalchemy/dialects/mssql/provision.py b/lib/sqlalchemy/dialects/mssql/provision.py index a5131eae6..269eb164f 100644 --- a/lib/sqlalchemy/dialects/mssql/provision.py +++ b/lib/sqlalchemy/dialects/mssql/provision.py @@ -2,8 +2,10 @@ from ... import create_engine from ... import exc from ...testing.provision import create_db from ...testing.provision import drop_db +from ...testing.provision import get_temp_table_name from ...testing.provision import log from ...testing.provision import run_reap_dbs +from ...testing.provision import temp_table_keyword_args @create_db.for_db("mssql") @@ -72,3 +74,13 @@ def _reap_mssql_dbs(url, idents): log.info( "Dropped %d out of %d stale databases detected", dropped, total ) + + +@temp_table_keyword_args.for_db("mssql") +def _mssql_temp_table_keyword_args(cfg, eng): + return {} + + +@get_temp_table_name.for_db("mssql") +def _mssql_get_temp_table_name(cfg, eng, base_name): + return "#" + base_name |