diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2020-04-14 16:39:42 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2020-04-14 16:39:42 -0400 |
| commit | 447c0750e1f739c4db1d0d20de182c297dc86e36 (patch) | |
| tree | f3fc94e0871fb34205fc5695f82d882bea554839 /lib/sqlalchemy/dialects/mssql | |
| parent | d9b230e78c70c17a6856f4ff3b8380b9ce510702 (diff) | |
| download | sqlalchemy-447c0750e1f739c4db1d0d20de182c297dc86e36.tar.gz | |
Set up absolute references for create_engine and related
includes more replacements for create_engine(), Connection,
disambiguation of Result from future/baked
Change-Id: Icb60a79ee7a6c45ea9056c211ffd1be110da3b5e
Diffstat (limited to 'lib/sqlalchemy/dialects/mssql')
| -rw-r--r-- | lib/sqlalchemy/dialects/mssql/base.py | 15 | ||||
| -rw-r--r-- | lib/sqlalchemy/dialects/mssql/pyodbc.py | 3 |
2 files changed, 10 insertions, 8 deletions
diff --git a/lib/sqlalchemy/dialects/mssql/base.py b/lib/sqlalchemy/dialects/mssql/base.py index b5c49246f..b0021e873 100644 --- a/lib/sqlalchemy/dialects/mssql/base.py +++ b/lib/sqlalchemy/dialects/mssql/base.py @@ -171,7 +171,8 @@ The process for fetching this value has several variants: * Other dialects such as pymssql will call upon ``SELECT scope_identity() AS lastrowid`` subsequent to an INSERT statement. If the flag ``use_scope_identity=False`` is passed to - :func:`.create_engine`, the statement ``SELECT @@identity AS lastrowid`` + :func:`_sa.create_engine`, + the statement ``SELECT @@identity AS lastrowid`` is used instead. A table that contains an ``IDENTITY`` column will prohibit an INSERT statement @@ -293,8 +294,8 @@ Transaction Isolation Level All SQL Server dialects support setting of transaction isolation level both via a dialect-specific parameter -:paramref:`.create_engine.isolation_level` -accepted by :func:`.create_engine`, +:paramref:`_sa.create_engine.isolation_level` +accepted by :func:`_sa.create_engine`, as well as the :paramref:`.Connection.execution_options.isolation_level` argument as passed to :meth:`_engine.Connection.execution_options`. @@ -302,7 +303,7 @@ This feature works by issuing the command ``SET TRANSACTION ISOLATION LEVEL <level>`` for each new connection. -To set isolation level using :func:`.create_engine`:: +To set isolation level using :func:`_sa.create_engine`:: engine = create_engine( "mssql+pyodbc://scott:tiger@ms_2008", @@ -394,7 +395,7 @@ behavior of this flag is as follows: or ``False`` based on whether 2012 or greater is detected. * The flag can be set to either ``True`` or ``False`` when the dialect - is created, typically via :func:`.create_engine`:: + is created, typically via :func:`_sa.create_engine`:: eng = create_engine("mssql+pymssql://user:pass@host/db", deprecate_large_types=True) @@ -497,7 +498,7 @@ below:: This mode of behavior is now off by default, as it appears to have served no purpose; however in the case that legacy applications rely upon it, it is available using the ``legacy_schema_aliasing`` argument to -:func:`.create_engine` as illustrated above. +:func:`_sa.create_engine` as illustrated above. .. versionchanged:: 1.1 the ``legacy_schema_aliasing`` flag introduced in version 1.0.5 to allow disabling of legacy mode for schemas now @@ -638,7 +639,7 @@ Declarative form:: This option can also be specified engine-wide using the -``implicit_returning=False`` argument on :func:`.create_engine`. +``implicit_returning=False`` argument on :func:`_sa.create_engine`. .. _mssql_rowcount_versioning: diff --git a/lib/sqlalchemy/dialects/mssql/pyodbc.py b/lib/sqlalchemy/dialects/mssql/pyodbc.py index ffaf66fdd..5cb92ef07 100644 --- a/lib/sqlalchemy/dialects/mssql/pyodbc.py +++ b/lib/sqlalchemy/dialects/mssql/pyodbc.py @@ -103,7 +103,8 @@ Microsoft ODBC drivers. The feature is enabled by setting the flag ``.fast_executemany`` on the DBAPI cursor when an executemany call is to be used. The SQLAlchemy pyodbc SQL Server dialect supports setting this flag automatically when the ``.fast_executemany`` flag is passed to -:func:`.create_engine`; note that the ODBC driver must be the Microsoft driver +:func:`_sa.create_engine` +; note that the ODBC driver must be the Microsoft driver in order to use this flag:: engine = create_engine( |
