| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
| |
Fixed bug where SQL Server transaction isolation must be fetched
from a different view when using Azure data warehouse, the query
is now attempted against both views and then a NotImplemented
is raised unconditionally if failure continues to provide the
best resiliency against future arbitrary API changes in new
SQL Server versions.
Change-Id: I621b5089febe8ace136428fa133fde1a7e21cda4
Fixes: #3994
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The SQL Server dialect now allows for a database and/or owner name
with a dot inside of it, using brackets explicitly in the string around
the owner and optionally the database name as well. In addition,
sending the :class:`.quoted_name` construct for the schema name will
not split on the dot and will deliver the full string as the "owner".
:class:`.quoted_name` is also now available from the ``sqlalchemy.sql``
import space.
Change-Id: I77491d63ce47638bd23787d903ccde2f35a9d43d
Fixes: #2626
|
|
|
|
|
|
|
|
|
|
| |
Added a version check to the "get_isolation_level" feature, which is
invoked upon first connect, so that it skips for SQL Server version
2000, as the necessary system view is not available prior to SQL Server
2005.
Change-Id: If4f860513f0aae6625803f449714aedfc5075f57
Fixes: #3898
|
|
|
|
| |
Change-Id: I4e8c2aa8fe817bb2af8707410fa0201f938781de
|
|
|
|
|
|
|
|
|
|
|
| |
- Fixed bug where SQL Server dialects would attempt to select the
last row identity for an INSERT from SELECT, failing in the case when
the SELECT has no rows. For such a statement,
the inline flag is set to True indicating no last primary key
should be fetched.
Change-Id: Ic40d56d9eadadc3024a4d71245f9eed4c420024a
Fixes: #3876
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changed the query used to get "default schema name", from one that
queries the database principals table to using the
"schema_name()" function, as issues have been reported that the
former system was unavailable on the Azure Data Warehouse edition.
It is hoped that this will finally work across all SQL Server
versions and authentication styles.
Change-Id: Ic11bd4162c0d6a60432ae44876e86512703c1f81
Fixes: #3810
|
|
|
|
|
|
|
|
|
| |
Updated the server version info scheme for pyodbc to use SQL Server
SERVERPROPERTY(), rather than relying upon pyodbc.SQL_DBMS_VER, which
continues to be unreliable particularly with FreeTDS.
Change-Id: I4ff49ae13c8ff51bd764980131d41c18d73d87ce
Fixes: #3814
|
| |
|
|
|
|
|
|
| |
Fixes #3760
Change-Id: I0613eb66bfdc9d7118688c74e29c8da322c3b4db
|
|
|
|
|
|
|
|
|
|
| |
mssql_clustered=False on Index, UniqueConstraint,
PrimaryKeyConstraint now renders NONCLUSTERED.
The default of mssql_clustered is now None.
Co-Authored-By: mike bayer <mike_mp@zzzcomputing.com>
Change-Id: Id6b8d840e355be8f8fa72360cb4b6d2617ba72cf
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/252
|
|
|
|
|
|
|
|
|
|
| |
Fixed bug where by ROW_NUMBER OVER clause applied for OFFSET
selects in SQL Server would inappropriately substitute a plain column
from the local statement that overlaps with a label name used by
the ORDER BY criteria of the statement.
Change-Id: Ic2500c886cbfc83a1ad5a2681783f008b9f23838
Fixes: #3711
|
|
|
| |
Fixes a misrendering at http://docs.sqlalchemy.org/en/latest/dialects/mssql.html#nullability:
|
|
|
|
|
|
| |
via :paramref:`.create_engine.isolation_level` and
:paramref:`.Connection.execution_options.isolation_level`
parameters. fixes #3534
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
returns an invalid date or time format from a DATE or TIME
column, rather than failing with a NoneType error. Pull request
courtesy Ed Avis.
pullreq github:206
|
|
|
|
|
|
| |
which also accept zero precision
- extend test case here to include a backend-agnostic suite
- changelog for MSSQL date fix
|
|
|
|
|
| |
The simple check on the precision results in DATETIME2(0) generating a
DATETIME2 column, with default precision, which is 7.
|
|
|
| |
Docstring typo keysowrds => keywords
|
|
|
|
|
|
|
| |
as part of :ticket:`3424` to allow disabling of the MSSQL dialect's
attempts to create aliases for schema-qualified tables, now defaults
to False; the old behavior is now disabled unless explicitly turned on.
fixes #3434
|
|
|
|
|
|
|
|
|
|
|
|
| |
or other variable-length column type with unbounded length
by assigning the token ``"max"`` to the
length attribute of the string. While using the ``"max"`` token
explicitly is supported by the SQL Server dialect, it isn't part
of the normal contract of the base string types, and instead the
length should just be left as None. The dialect now assigns the
length to None on reflection of the type so that the type behaves
normally in other contexts.
fixes #3504
|
|
|
|
| |
valid version (Microsoft released the spec late).
|
|
|
|
|
|
|
|
| |
:func:`.engine_from_config` were not being parsed correctly;
these included ``pool_threadlocal`` and the psycopg2 argument
``use_native_unicode``. fixes #3435
- add legacy_schema_aliasing config parsing for mssql
- move use_native_unicode config arg to the psycopg2 dialect
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
``legacy_schema_aliasing`` which when set to False will disable a
very old and obsolete behavior, that of the compiler's
attempt to turn all schema-qualified table names into alias names,
to work around old and no longer locatable issues where SQL
server could not parse a multi-part identifier name in all
circumstances. The behavior prevented more
sophisticated statements from working correctly, including those which
use hints, as well as CRUD statements that embed correlated SELECT
statements. Rather than continue to repair the feature to work
with more complex statements, it's better to just disable it
as it should no longer be needed for any modern SQL server
version. The flag defaults to True for the 1.0.x series, leaving
current behavior unchanged for this version series. In the 1.1
series, it will default to False. For the 1.0 series,
when not set to either value explicitly, a warning is emitted
when a schema-qualified table is first used in a statement, which
suggests that the flag be set to False for all modern SQL Server
versions.
fixes #3424
fixes #3430
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(hence becoming two regressions); reports that
SELECT statements would GROUP BY a label name and fail was misconstrued
that certain backends such as SQL Server should not be emitting
ORDER BY or GROUP BY on a simple label name at all; when in fact,
we had forgotten that 0.9 was already emitting ORDER BY on a simple
label name for all backends, as described in :ref:`migration_1068`,
as 1.0 had rewritten this logic as part of :ticket:`2992`.
In 1.0.2, the bug is fixed both that SQL Server, Firebird and others
will again emit ORDER BY on a simple label name when passed a
:class:`.Label` construct that is expressed in the columns clause,
and no backend will emit GROUP BY on a simple label name in this case,
as even Postgresql can't reliably do GROUP BY on a simple name
in every case.
fixes #3338, fixes #3385
|
|
|
|
|
|
| |
with Firebird, so that the values are again rendered inline when
this is selected. Related to :ticket:`3034`.
fixes #3381
|
|
|
|
|
|
|
|
|
|
|
| |
is the flag that per :ticket:`2992` causes an order by or group by
an expression that's also in the columns clause to be copied by
label, even if referenced as the expression object. The behavior
for MSSQL is now the old behavior that copies the whole expression
in by default, as MSSQL can be picky on these particularly in
GROUP BY expressions.
fixes #3338
- Add a test that includes a composed label in a GROUP BY
|
| |
|
|
|
|
|
| |
- replace force_result_map with a mini-API for nested result sets, add
coverage
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The "wrapping" employed by the mssql and oracle dialects using the
"iswrapper" argument was not being used intelligently by the compiler,
and the result map was being written incorrectly, using
*more* columns in the result map than were actually returned by
the statement, due to "row number" columns that are inside the
subquery. The compiler now writes out result map on the
"top level" select in all cases
fully, and for the mssql/oracle wrapping case extracts out
the "proxied" columns in a second step, which only includes
those columns that are proxied outwards to the top level.
This change might have implications for 3rd party dialects that
might be imitating oracle's approach. They can safely continue
to use the "iswrapper" kw which is now ignored, but they may
need to also add the _select_wraps argument as well.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
now be constructed such that the visit methods receive an indication
of the owning expression object, if any. Any visit method that
accepts keyword arguments (e.g. ``**kw``) will in most cases
receive a keyword argument ``type_expression``, referring to the
expression object that the type is contained within. For columns
in DDL, the dialect's compiler class may need to alter its
``get_column_specification()`` method to support this as well.
The ``UserDefinedType.get_col_spec()`` method will also receive
``type_expression`` if it provides ``**kw`` in its argument
signature.
fixes #3074
|
|
|
|
|
|
|
| |
VARBINARY(max) for large text/binary types. The MSSQL dialect will
now respect this based on version detection, as well as the new
``deprecate_large_types`` flag.
fixes #3039
|
| |
|
| |
|
| |
|
|
|
|
| |
- add support for IDENTITY INSERT setting for INSERT with inline VALUES
|
|
|
|
| |
sqlalchemy/orm, sqlalchemy/event, sqlalchemy/testing
|
|
|
|
|
|
|
| |
query used to determine "default schema" is invalid in SQL Server 2000.
For SQL Server 2000 we go back to defaulting to the "schema name"
parameter of the dialect, which is configurable but defaults
to 'dbo'. fixes #3025
|
|
|
|
|
|
|
|
|
| |
statements which operate when an explicit INSERT is being
interjected into an IDENTITY column, to support non-ascii table
identifiers on drivers such as pyodbc + unix + py2k that don't
support unicode statements.
ref #3091 as this fix is also in that issue's patch, but is
a different issue.
|
|
|
|
| |
to get all flake8 passing
|
|\
| |
| | |
Fixed support for multivalue inserts for MS SQL 2008
|
| |
| |
| |
| | |
supported.
|
|/ |
|
|
|
|
| |
- implement for SQL server, use window functions when simple limit/offset not available
|
|
|
|
| |
a BindParameter, instead of _offset and _limit in GenerativeSelect.
|
|
|
|
|
|
|
| |
to use the ``database_principal_id()`` function in conjunction with
the ``sys.database_principals`` view so that we can determine
the default schema independently of the type of login in progress
(e.g., SQL Server, Windows, etc). fixes #3025
|
|
|
|
|
| |
arguments; [ticket:2866]
- add dialect specific kwarg functionality to ForeignKeyConstraint, ForeignKey
|
|
|
|
| |
- be specific about version 0.9.2
|
| |
|