summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects
diff options
context:
space:
mode:
authormike bayer <mike_mp@zzzcomputing.com>2020-02-19 22:59:46 +0000
committerGerrit Code Review <gerrit@bbpush.zzzcomputing.com>2020-02-19 22:59:46 +0000
commit8c9537d37292459d348214fb8befa85d9cb64059 (patch)
tree74d9872d2a324058f0e94bf5046fc042225ffe12 /lib/sqlalchemy/dialects
parent5ad9e9fbb25decff09104b03904cfe00a2b18916 (diff)
parent60f627cbd0d769e65353e720548efac9d8ab95d9 (diff)
downloadsqlalchemy-8c9537d37292459d348214fb8befa85d9cb64059.tar.gz
Merge "Replace engine.execute w/ context manager (step1)"
Diffstat (limited to 'lib/sqlalchemy/dialects')
-rw-r--r--lib/sqlalchemy/dialects/mssql/base.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sqlalchemy/dialects/mssql/base.py b/lib/sqlalchemy/dialects/mssql/base.py
index 1b1bd8c5c..4339551a3 100644
--- a/lib/sqlalchemy/dialects/mssql/base.py
+++ b/lib/sqlalchemy/dialects/mssql/base.py
@@ -182,7 +182,8 @@ execution. Given this example::
Column('x', Integer))
m.create_all(engine)
- engine.execute(t.insert(), {'id': 1, 'x':1}, {'id':2, 'x':2})
+ with engine.begin() as conn:
+ conn.execute(t.insert(), {'id': 1, 'x':1}, {'id':2, 'x':2})
The above column will be created with IDENTITY, however the INSERT statement
we emit is specifying explicit values. In the echo output we can see