| Commit message (Collapse) | Author | Age | Files | Lines |
| |\ |
|
| | |
| |
| |
| |
| | |
Fixes: #7065
Change-Id: I3666e16f9a8c47f9784ea11f38972cda6b08c146
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixed bug in SQL Server ``DATETIMEOFFSET`` where the ODBC implementation
would not generate the correct DDL, for cases where the type were converted
using the ``dialect.type_descriptor()`` method, the usage of which is
illustrated in some documented examples for :class:`.TypeDecorator`, though
not necessary for most datatypes. Regression was introduced by
:ticket:`6366`. As part of this change, the full list of SQL Server date
types have been amended to return a "dialect impl" that generates the same
DDL name as the supertype.
Fixes: #7129
Change-Id: I7d9bea54c0c38e16d1a6ad978cca996006a1b624
|
| |
|
|
|
|
| |
Also replace http://pypi.python.org/pypi with https://pypi.org/project
Change-Id: I84b5005c39969a82140706472989f2a30b0c7685
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Fixed regression caused by :ticket:`6306` which added support for
``DateTime(timezone=True)``, where the previous behavior of the pyodbc
driver of implicitly dropping the tzinfo from a timezone-aware date when
INSERTing into a timezone-naive DATETIME column were lost, leading to a SQL
Server error when inserting timezone-aware datetime objects into
timezone-native database columns.
Fixes: #6366
Change-Id: Id7821de13d75ede27f2165b37277a7223468dfa4
|
| |
|
|
|
|
|
|
|
|
| |
The :paramref:`_types.DateTime.timezone` parameter when set to ``True``
will now make use of the ``DATETIMEOFFSET`` column type with SQL Server
when used to emit DDL, rather than ``DATETIME`` where the flag was silently
ignored.
Fixes: #6306
Change-Id: I4def8337046e8c190d424fa4a259ab24d5f9039e
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added a new flag to the :class:`_engine.Dialect` class called
:attr:`_engine.Dialect.supports_statement_cache`. This flag now needs to be present
directly on a dialect class in order for SQLAlchemy's
:ref:`query cache <sql_caching>` to take effect for that dialect. The
rationale is based on discovered issues such as :ticket:`6173` revealing
that dialects which hardcode literal values from the compiled statement,
often the numerical parameters used for LIMIT / OFFSET, will not be
compatible with caching until these dialects are revised to use the
parameters present in the statement only. For third party dialects where
this flag is not applied, the SQL logging will show the message "dialect
does not support caching", indicating the dialect should seek to apply this
flag once they have verified that no per-statement literal values are being
rendered within the compilation phase.
Fixes: #6184
Change-Id: I6fd5b5d94200458d4cb0e14f2f556dbc25e27e22
|
| |\
| |
| |
| | |
identities"
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes: #6031
Closes: #6032
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/6032
Pull-request-sha: 00abfffd198a4c0e81bb5d15219dd4e40670ce94
Change-Id: Id67b21e6d2cc93f88d78e291e3bc8f87463377a6
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixed regression where a new setinputsizes() API that's available for
pyodbc was enabled, which is apparently incompatible with pyodbc's
fast_executemany() mode in the absence of more accurate typing information,
which as of yet is not fully implemented or tested. The pyodbc dialect and
connector has been modified so that setinputsizes() is not used at all
unless the parameter ``use_setinputsizes`` is passed to the dialect, e.g.
via :func:`_sa.create_engine`, at which point its behavior can be
customized using the :meth:`.DialectEvents.do_setinputsizes` hook.
Fixes: #6058
Change-Id: I99c2be3a5cd76fc3e490d10865292ed85ffc23ae
|
| |
|
|
| |
Change-Id: Iee0ec6906fe21674a16c20dfd267468ebfe39c3f
|
| |
|
|
|
|
|
| |
Specify that ampersand (not semicolon) must be used to separate
additional keyword arguments in hostname connections.
Change-Id: Id5b3276e6da8d42f5384e3cc4f5272f6e20aa61c
|
| |
|
|
| |
Change-Id: Ic5bb19ca8be3cb47c95a0d3315d84cb484bac47c
|
| |
|
|
|
| |
Fixes: #5646
Change-Id: I25fcba7cf866871f1232b586e7e604162bd8cc43
|
| |
|
|
|
| |
Fixes: #5592
Change-Id: I0688e5ea0fc6b01a0b72f397daea8f57a2ec0766
|
| |
|
|
| |
Change-Id: I8315cfef6e5c4b87d64fc770998a1229cc690870
|
| |
|
|
|
|
|
|
| |
Ideally this would be a per-execution option, or Pyodbc
could perhaps run the data in chunks.
Fixes: #5334
Change-Id: If4a11b312346b8e4c2b8cd38840b3a2ba56dec3b
|
| |
|
|
|
|
|
|
|
| |
PyODBC apparently pools connections by default and this
is a module-wide setting only. Documenent that this happens
and how to disable it.
Fixes: #5440
Change-Id: I415bda7beb2211c66991b6c804b0ddb4d79e427f
|
| |
|
|
|
|
|
|
|
|
| |
Fixed an issue where the ``is_disconnect`` function in the SQL Server
pyodbc dialect was incorrectly reporting the disconnect state when the
exception messsage had a substring that matched a SQL Server ODBC error
code.
Fixes: #5359
Change-Id: I450c6818405a20f4daee20d58fce2d5ecb33e17f
|
| |
|
|
|
| |
Fixes: #5321
Change-Id: Id83e98e9013818424c133297a850746302633158
|
| |
|
|
|
|
|
| |
includes more replacements for create_engine(), Connection,
disambiguation of Result from future/baked
Change-Id: Icb60a79ee7a6c45ea9056c211ffd1be110da3b5e
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Execution of literal sql string is deprecated in the
:meth:`.Connection.execute` and a warning is raised when used stating
that it will be coerced to :func:`.text` in a future release.
To execute a raw sql string the new connection method
:meth:`.Connection.exec_driver_sql` was added, that will retain the previous
behavior, passing the string to the DBAPI driver unchanged.
Usage of scalar or tuple positional parameters in :meth:`.Connection.execute`
is also deprecated.
Fixes: #4848
Fixes: #5178
Change-Id: I2830181054327996d594f7f0d59c157d477c3aa9
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Fixed issue where the :class:`.mssql.DATETIMEOFFSET` type would not
accommodate for the ``None`` value, introduced as part of the series of
fixes for this type first introduced in :ticket:`4983`, :ticket:`5045`.
Additionally, added support for passing a backend-specific date formatted
string through this type, as is typically allowed for date/time types on
most other DBAPIs.
Fixes: #5132
Change-Id: Iab05d67382e0f550474d50e0c3c1c888521b678a
|
| |
|
|
| |
Change-Id: I08440dc25e40ea1ccea1778f6ee9e28a00808235
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Fixed issue where a timezone-aware ``datetime`` value being converted to
string for use as a parameter value of a :class:`.mssql.DATETIMEOFFSET`
column was omitting the fractional seconds.
Fixes: #5045
Closes: #5046
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5046
Pull-request-sha: 99dc7b23f69b7b068795a02d20b88bf352c7dcd7
Change-Id: I971629466fe0675536bbdf55693f0c1821dfb3cc
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Repaired support for the :class:`.mssql.DATETIMEOFFSET` datatype on PyODBC,
by adding PyODBC-level result handlers as it does not include native
support for this datatype. This includes usage of the Python 3 "timezone"
tzinfo subclass in order to set up a timezone, which on Python 2 makes
use of a minimal backport of "timezone" in sqlalchemy.util.
Fixes: #4983
Closes: #4986
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/4986
Pull-request-sha: e3a5a8dda01c7580dc93271092c4f9beaac4be11
Change-Id: Ia4c7c0d1971c6c0492515bd5fa0b1799f07fee1c
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While we were told years ago that ODBC is intended to be used with
DSNs only, however this use does not correspond well with how most
other database connectivity systems work in that modern systems
already have their own registries of connection information in any
case, meaning this is usually the best place to add details such
as hostnames and driver names, rather than having them locked away
in a server-specific ODBC registry. So here we dial back the
language that one style or another of connecting is "preferred";
both styles are supported equally, and the critical advantage of
hostname mapping in that the target database name is both explicit
as well as modifyable is also added.
Add additional background for how DSNs work and refine other
sentences. "URL encoding" is the correct terminology for
adding spaces and special characters to a URL.
Change-Id: I13a74432976e6d3166633b98f9bb84c4856caac8
|
| |
|
|
|
|
|
|
|
|
|
| |
This is a very useful assertion which prevents unused variables
from being set up allows code to be more readable and sometimes
even more efficient. test suites seem to be where the most
problems are and there do not seem to be documentation examples
that are using this, or at least the linter is not taking effect
within rst blocks.
Change-Id: I2b3341d8dd14da34879d8425838e66a4b9f8e27d
|
| |
|
|
|
|
|
|
|
|
| |
Fixes: #4542
Closes: #4546
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/4546
Pull-request-sha: 95d905cdcc33f44ff21d13e411e4a17843e6b54a
Change-Id: Ibaf0852822e281e79770763e7e3550270d26cf66
|
| |
|
|
| |
Change-Id: I6a71f4924d046cf306961c58dffccf21e9c03911
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Applied on top of a pure run of black -l 79 in
I7eda77fed3d8e73df84b3651fd6cfcfe858d4dc9, this set of changes
resolves all remaining flake8 conditions for those codes
we have enabled in setup.cfg.
Included are resolutions for all remaining flake8 issues
including shadowed builtins, long lines, import order, unused
imports, duplicate imports, and docstring issues.
Change-Id: I4f72d3ba1380dd601610ff80b8fb06a2aff8b0fe
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a straight reformat run using black as is, with no edits
applied at all.
The black run will format code consistently, however in
some cases that are prevalent in SQLAlchemy code it produces
too-long lines. The too-long lines will be resolved in the
following commit that will resolve all remaining flake8 issues
including shadowed builtins, long lines, import order, unused
imports, duplicate imports, and docstring issues.
Change-Id: I7eda77fed3d8e73df84b3651fd6cfcfe858d4dc9
|
| |
|
|
|
|
|
|
|
| |
Added ``fast_executemany=True`` parameter to the SQL Server pyodbc dialect,
which enables use of pyodbc's new performance feature of the same name
when using Microsoft ODBC drivers.
Change-Id: I743fa7280e8f709addd330cfc7682623701cbb2e
Fixes: #4158
|
| |
|
|
|
|
|
|
|
|
| |
Adjusted the SQL Server version detection for pyodbc to only allow for
numeric tokens, filtering out non-integers, since the dialect does tuple-
numeric comparisons with this value. This is normally true for all known
SQL Server / pyodbc drivers in any case.
Change-Id: I4ab18a07e19231091b5e877ba1fccd5eda72a992
Fixes: #4227
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
pyodbc 4.0.22 is no longer allowing a datetime to be truncated
into a date, and additionally is asserting that numeric truncation
is not occurring; previously, it looks like we could send a
decimal of -1E-25 through the driver but we were only getting
back -1E-20, the test failed to check this. Not clear if the
larger precision worked fully at some point, but in any case,
it doesn't work now so just remove those values from the test.
Change-Id: I66c7863b1708eb72f48173083b4ef78c93893b52
|
| |/
|
|
|
| |
Change-Id: I6e2518232608f47515b96984b4b7a41b8385975a
Fixes: #4164
|
| |
|
|
| |
Change-Id: I3ef36bfd0cb0ba62b3123c8cf92370a43156cf8f
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Fixed bug where sqltypes.BINARY and sqltypes.VARBINARY datatypes
would not include correct bound-value handlers for pyodbc,
which allows the pyodbc.NullParam value to be passed that
helps with FreeTDS.
Co-authored by: Mike Bayer <mike_mp@zzzcomputing.com>
Change-Id: I6e3c16a69465b4fbc7b17a1927fb5e66acee93cb
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/386
Fixes: #4121
|
| |
|
|
|
|
|
|
|
| |
Moved the SQL server error codes out of connnectors/pyodbc.py
and into mssql/pyodbc.py. Added complete list
of odbc-related disconnect codes.
Change-Id: Icd84a920dbfa1f188847f859654ff6f7a48170f1
Fixes: #4095
|
| |
|
|
| |
Change-Id: Ida0d01ae9bcc0573b86e24fddea620a38c962822
|
| |
|
|
|
|
|
|
|
|
|
| |
Corrects some warnings and adds tox config. Adds DeprecationWarning
to the error category. Large sweep for string literals w/ backslashes
as this is common in docstrings
Co-authored-by: Andrii Soldatenko
Fixes: #3886
Change-Id: Ia7c838dfbbe70b262622ed0803d581edc736e085
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/337
|
| |
|
|
| |
Change-Id: I4e8c2aa8fe817bb2af8707410fa0201f938781de
|
| |
|
|
|
| |
Change-Id: Ide9e916d02fbbef549aa2838d1402c2b091e701d
Fixes: #3820
|
| |
|
|
|
|
|
|
|
| |
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
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
an INSERT of NULL + pyodbc; pyodbc requires a special
object be passed in order to persist NULL. As the :class:`.VARBINARY`
type is now usually the default for :class:`.LargeBinary` due to
:ticket:`3039`, this issue is partially a regression in 1.0.
The pymssql driver appears to be unaffected.
fixes #3464
|