summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/mssql/pymssql.py
Commit message (Collapse)AuthorAgeFilesLines
* Replace all http:// links to https://Federico Caselli2021-07-041-2/+2
| | | | | | Also replace http://pypi.python.org/pypi with https://pypi.org/project Change-Id: I84b5005c39969a82140706472989f2a30b0c7685
* Improve regexp used by pymssql to parse db versionFederico Caselli2021-06-211-1/+1
| | | | | | | | | Made improvements to the server version regexp used by the pymssql dialect to prevent a regexp overflow in case of an invalid version string. Fixes: #5557 Change-Id: Ia3e95a9f11f5a121d84474c97f6b122cf8d9c9cf
* Default caching to opt-out for 3rd party dialectsMike Bayer2021-04-011-0/+1
| | | | | | | | | | | | | | | | | | | 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
* happy new yearMike Bayer2021-01-041-1/+1
| | | | Change-Id: Ic5bb19ca8be3cb47c95a0d3315d84cb484bac47c
* Add note re: pymssql not in CIGord Thompson2020-05-161-0/+5
| | | | Change-Id: I45f78131ffe1881a3965e8aa41bbc46da7d43a5b
* Fix typo in pymssql documentation; minor clarificationGord Thompson2020-04-201-2/+3
| | | | Change-Id: I4aaf0627d2f1ccae82c2eb41db9ec219d73ce4ea
* Update pymssql information for mssql dialectGord Thompson2020-04-201-5/+18
| | | | Change-Id: I94cf63299a094b53e7078b282311f7d0faa256a6
* Deprecate plain string in execute and introduce `exec_driver_sql`Federico Caselli2020-03-211-1/+1
| | | | | | | | | | | | | | | 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
* happy new yearMike Bayer2020-01-011-1/+1
| | | | Change-Id: I08440dc25e40ea1ccea1778f6ee9e28a00808235
* Recognize message 20047 as disconnect event in MSDialect_pymssqlJon Schuff2019-05-151-0/+1
| | | | | | | | | | | | Added error code 20047 to "is_disconnect" for pymssql. Pull request courtesy Jon Schuff. Fixes: #4680 Closes: #4681 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/4681 Pull-request-sha: bc81c935ec0e352734d9ad1b322caf6d08079c3d Change-Id: Ifc7ffc4c933b08a34fad537dc48e05d2cfa66d42
* happy new yearMike Bayer2019-01-111-1/+1
| | | | Change-Id: I6a71f4924d046cf306961c58dffccf21e9c03911
* Post black reformattingMike Bayer2019-01-061-5/+8
| | | | | | | | | | | | | 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
* Run black -l 79 against all source filesMike Bayer2019-01-061-20/+18
| | | | | | | | | | | | | | 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
* happy new yearMike Bayer2018-01-121-1/+1
| | | | Change-Id: I3ef36bfd0cb0ba62b3123c8cf92370a43156cf8f
* Add SQL Server CI coverageMike Bayer2017-08-311-6/+6
| | | | Change-Id: Ida0d01ae9bcc0573b86e24fddea620a38c962822
* Add preparer to pymssql that disables percent doublingMike Bayer2017-08-301-1/+12
| | | | | | | | | | | | | Fixed the pymssql dialect so that percent signs in SQL text, such as used in modulus expressions or literal textual values, are **not** doubled up, as seems to be what pymssql expects. This is despite the fact that the pymssql DBAPI uses the "pyformat" parameter style which itself considers the percent sign to be significant. Tests are part of standard suite already (CI has been disabled) Change-Id: Ie05de403caefcba3292a967183a995e95a5854d5 Fixes: #4057
* Implement AUTOCOMMIT for pyodbc, pymssqlMike Bayer2017-08-291-0/+8
| | | | | | | In prep for CI coverage for SQL Server, allow AUTOCOMMIT isolation level to work Change-Id: I850b977e75f53385986f2c181be4e4412dd3b3f4
* update for 2017 copyrightMike Bayer2017-01-041-1/+1
| | | | Change-Id: I4e8c2aa8fe817bb2af8707410fa0201f938781de
* Add "message 20017" (unexpected EOF from the server) to mssql.Ken Robbins2016-09-191-0/+1
| | | | | | Fixes: #3791 Change-Id: I0dade4fe0ecbb53b4a66881594f362986ba73ae8 Pull-request: https://bitbucket.org/zzzeek/sqlalchemy/pull-requests/89
* Fix pymssql sample URLMike Bayer2016-04-271-1/+1
| | | | | | | | A slash is required before building out the query string portion. Change-Id: Ie97fd3d07047d78e17cbaffed4ff54960a2b956e Fixes: #3696 (cherry picked from commit 83a9e6e1fac276090e60136aa4e9234ae23bc25a)
* - happy new yearMike Bayer2016-01-291-1/+1
|
* - Added the error "20006: Write to the server failed" to the listMike Bayer2015-11-301-1/+2
| | | | | | of disconnect errors for the pymssql driver, as this has been observed to render a connection unusable. fixes #3585
* - pymssql has PEP249 Binary contructor since 2.1.1pr/166Ramiro Morales2015-04-051-4/+5
| | | | See https://github.com/pymssql/pymssql/commit/e7fb15dd29090e1f1bb570842b53aea1ec32d8f0
* - copyright 2015Mike Bayer2015-03-101-1/+1
|
* - Fixed the version string detection in the pymssql dialect toMike Bayer2014-09-161-1/+1
| | | | | | work with Microsoft SQL Azure, which changes the word "SQL Server" to "SQL Azure". fixes #3151
* - apply pep8 formatting to sqlalchemy/sql, sqlalchemy/util, sqlalchemy/dialects,Brian Jarrett2014-07-201-2/+3
| | | | sqlalchemy/orm, sqlalchemy/event, sqlalchemy/testing
* - break up the <authors> copyright comment as part of a passMike Bayer2014-07-091-1/+2
| | | | to get all flake8 passing
* take out the support paragraph and just put a basic introMike Bayer2014-03-091-9/+3
|
* dialects/mssql/pymssql.py: Remove second two paragraphs, as requested by ↵pr/75Marc Abramowitz2014-03-031-9/+0
| | | | @zzzeek.
* Update pymssql dialect description, remove "limitations" sectionMarc Abramowitz2014-02-271-9/+16
|
* Update URL for pymssqlMarc Abramowitz2014-02-271-1/+1
|
* - happy new yearMike Bayer2014-01-051-1/+1
|
* Remove terminated connections from the pool.pr/51John Anderson2013-12-161-0/+1
| | | | | | In pymssql, if you terminate a long running query manually it will give you a connection reset by peer message, but this connection remains in the pool and will be re-used.
* Merged in sontek/sqlalchemy/add_better_disconnect_checks (pull request #47)Mike Bayer2013-03-291-0/+2
|\ | | | | | | Add disconnect check on timeouts
| * cleaned up errors, only check for connection timeout for nowJohn Anderson2013-03-181-3/+2
| |
| * Added disconnect checks for timeout, unable to read, and unable to writeJohn Anderson2013-03-181-0/+3
| |
* | dialects/mssql/pymssql.py: Modify module.Binary to work properly withMarc Abramowitz2013-03-181-1/+1
|/ | | | | | byte strings in Python 3 Fixes http://www.sqlalchemy.org/trac/ticket/2683
* happy new year (see #2645)Diana Clarke2013-01-011-1/+1
|
* kill me now, pep8 pass, so closeDiana Clarke2012-11-201-0/+1
|
* just a pep8 passDiana Clarke2012-11-201-2/+2
|
* juts a 'expected 2 blank lines' pep8 passDiana Clarke2012-11-191-0/+2
|
* - rework the sphinx customizations into distinct modulesMike Bayer2012-10-191-20/+6
| | | | | | | - build a new Sphinx extension that allows dialect info to be entered as directives which is then rendered consistently throughout all dialect/dbapi sections - break out the "empty_strings" requirement for oracle test
* - more import cleanup for MSSQLMike Bayer2012-08-071-2/+2
|
* -whitespace bonanza, contdMike Bayer2012-07-281-2/+2
|
* - [bug] Dropped the "30 char" limit on pymssql,Mike Bayer2012-01-221-1/+0
| | | | | | | | | based on reports that it's doing things better these days. pymssql hasn't been well tested and as the DBAPI is in flux it's still not clear what the status is on this driver and how SQLAlchemy's implementation should adapt. [ticket:2347]
* happy new yearMike Bayer2012-01-041-1/+1
|
* - add connection and cursor to is_disconnect(). We aren't using it yet,Mike Bayer2011-02-091-1/+1
| | | | | | | | | | | | | | | but we'd like to. Most DBAPIs don't give us anything we can do with it. Some research was done on psycopg2 and it still seems like they give us no adequate method (tried connection.closed, cursor.closed, connection.status). mxodbc claims their .closed attribute will work (but I am skeptical). - remove beahvior in pool that auto-invalidated a connection when the cursor failed to create. That's not the pool's job. we need the conn for the error logic. Can't get any tests to fail, curious why that behavior was there, guess we'll find out (or not). - add support for psycopg2 version detection. even though we have no use for it yet... - adjust one of the reconnect tests to work with oracle's horrendously slow connect speed
* - whitespace removal bonanzaMike Bayer2011-01-021-4/+4
|
* - clean up copyright, update for 2011, stamp every file withMike Bayer2011-01-021-0/+6
| | | | | a consistent tag - AUTHORS file
* - support for cdecimalMike Bayer2010-12-111-1/+0
| | | | | | | | | | | | | | | | | | - add --with-cdecimal flag to tests, monkeypatches cdecimal in - fix mssql/pyodbc.py to not use private '_int' accessor in decimal conversion routines - pyodbc version 2.1.8 is needed for cdecimal in any case as previous versions also called '_int', 2.1.8 adds the same string logic as our own dialect, so that logic is skipped for modern pyodbc version - make the imports for "Decimal" consistent across the whole lib. not sure yet how we should be importing "Decimal" or what the best way forward is that would allow a clean user-invoked swap of cdecimal; for now, added docs suggesting a global monkeypatch - the two decimal libs are not compatible with each other so any chance of mixing produces serious issues. adding adapters to DBAPIs tedious and adds in-python overhead. suggestions welcome on how we should be doing Decimal/cdecimal.