summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/mssql/information_schema.py
Commit message (Collapse)AuthorAgeFilesLines
* happy new year 2023Mike Bayer2023-01-031-1/+1
| | | | Change-Id: I625af65b3fb1815b1af17dc2ef47dd697fdc3fb1
* Support comments on MSSQLDaniel Hall2022-08-101-5/+30
| | | | | | | | | | | | | Added support table and column comments on MSSQL when creating a table. Added support for reflecting table comments. Thanks to Daniel Hall for the help in this pull request. Fixes: #7844 Closes: #8225 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/8225 Pull-request-sha: 540f4eb6395f9feed4b4240e3d22f539021948e9 Change-Id: I69f48c6dda4e00ec3d82fdeff13f3df9d735b7b0
* inline mypy config; files ignoring type errors for the momentMike Bayer2022-04-281-0/+2
| | | | | | | | | | | | | | | | | | | to simplify pyproject.toml change the remaining files that aren't going to be typed on this first pass (unless of course someone wants to type some of these) to include # mypy: ignore-errors. for the moment, only a handful of ORM modules are to have more type checking implemented. It's important that ignore-errors is used and not "# type: ignore", as in the latter case, mypy doesn't even read the existing types in the file, which makes it impossible to type any files that refer to those modules at all. to simplify ongoing typing work use inline mypy config for remaining files that are "done" for now, indicating the level of type checking they currently have. Change-Id: I98669c1a305c2f0adba85d10b5425541f3fe9533
* happy new year 2022Mike Bayer2022-01-061-1/+1
| | | | Change-Id: I49abf2607e0eb0623650efdf0091b1fb3db737ea
* First round of removal of python 2Federico Caselli2021-11-011-6/+0
| | | | | References: #4600 Change-Id: I61e35bc93fe95610ae75b31c18a3282558cd4ffe
* Replace all http:// links to https://Federico Caselli2021-07-041-1/+1
| | | | | | Also replace http://pypi.python.org/pypi with https://pypi.org/project Change-Id: I84b5005c39969a82140706472989f2a30b0c7685
* don't cache TypeDecorator by defaultMike Bayer2021-05-061-0/+2
| | | | | | | | | | The :class:`.TypeDecorator` class will now emit a warning when used in SQL compilation with caching unless the ``.cache_ok`` flag is set to ``True`` or ``False``. ``.cache_ok`` indicates that all the parameters passed to the object are safe to be used as a cache key, ``False`` means they are not. Fixes: #6436 Change-Id: Ib1bb7dc4b124e38521d615c2e2e691e4915594fb
* happy new yearMike Bayer2021-01-041-1/+1
| | | | Change-Id: Ic5bb19ca8be3cb47c95a0d3315d84cb484bac47c
* Add reflection for Identity columnsFederico Caselli2020-09-281-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | Added support for reflecting "identity" columns, which are now returned as part of the structure returned by :meth:`_reflection.Inspector.get_columns`. When reflecting full :class:`_schema.Table` objects, identity columns will be represented using the :class:`_schema.Identity` construct. Fixed compilation error on oracle for sequence and identity column ``nominvalue`` and ``nomaxvalue`` options that require no space in them. Improved test compatibility with oracle 18. As part of the support for reflecting :class:`_schema.Identity` objects, the method :meth:`_reflection.Inspector.get_columns` no longer returns ``mssql_identity_start`` and ``mssql_identity_increment`` as part of the ``dialect_options``. Use the information in the ``identity`` key instead. The mssql dialect will assume that at least MSSQL 2005 is used. There is no hard exception raised if a previous version is detected, but operations may fail for older versions. Fixes: #5527 Fixes: #5324 Change-Id: If039fe637c46b424499e6bac54a2cbc0dc54cb57
* Improve reflection for mssql temporary tablesGord Thompson2020-09-011-3/+19
| | | | | Fixes: #5506 Change-Id: I718474d76e3c630a1b71e07eaa20cefb104d11de
* Add support for "real" sequences in mssqlGord Thompson2020-05-291-0/+9
| | | | | | | | | | | | | | | | | Added support for "CREATE SEQUENCE" and full :class:`.Sequence` support for Microsoft SQL Server. This removes the deprecated feature of using :class:`.Sequence` objects to manipulate IDENTITY characteristics which should now be performed using ``mssql_identity_start`` and ``mssql_identity_increment`` as documented at :ref:`mssql_identity`. The change includes a new parameter :paramref:`.Sequence.data_type` to accommodate SQL Server's choice of datatype, which for that backend includes INTEGER and BIGINT. The default starting value for SQL Server's version of :class:`.Sequence` has been set at 1; this default is now emitted within the CREATE SEQUENCE DDL for all backends. Fixes: #4235 Fixes: #4633 Change-Id: I6aa55c441e8146c2f002e2e201a7f645e667b916
* Support inspection of computed columnFederico Caselli2020-03-151-0/+12
| | | | | | | | | | | | | | | | | | | Added support for reflection of "computed" columns, which are now returned as part of the structure returned by :meth:`.Inspector.get_columns`. When reflecting full :class:`.Table` objects, computed columns will be represented using the :class:`.Computed` construct. Also improve the documentation in :meth:`Inspector.get_columns`, correctly listing all the returned keys. Fixes: #5063 Fixes: #4051 Closes: #5064 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5064 Pull-request-sha: ba00fc321ce468f8885aad23b3dd33c789e50fbe Change-Id: I789986554fc8ac7f084270474d0b2c12046b1cc2
* happy new yearMike Bayer2020-01-011-1/+1
| | | | Change-Id: I08440dc25e40ea1ccea1778f6ee9e28a00808235
* Add deprecation warnings to all deprecated APIsMike Bayer2019-01-231-4/+2
| | | | | | | | | | | | | | | A large change throughout the library has ensured that all objects, parameters, and behaviors which have been noted as deprecated or legacy now emit ``DeprecationWarning`` warnings when invoked. As the Python 3 interpreter now defaults to displaying deprecation warnings, as well as that modern test suites based on tools like tox and pytest tend to display deprecation warnings, this change should make it easier to note what API features are obsolete. See the notes added to the changelog and migration notes for further details. Fixes: #4393 Change-Id: If0ea11a1fc24f9a8029352eeadfc49a7a54c0a1b
* happy new yearMike Bayer2019-01-111-1/+1
| | | | Change-Id: I6a71f4924d046cf306961c58dffccf21e9c03911
* Post black reformattingMike Bayer2019-01-061-3/+9
| | | | | | | | | | | | | 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-95/+115
| | | | | | | | | | | | | | 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
* Add unique_constraint_name to MSSQL FK reflectionSean Dunn2018-06-291-0/+2
| | | | | | | | | | | Fixed bug in MSSQL reflection where when two same-named tables in different schemas had same-named primary key constraints, foreign key constraints referring to one of the tables would have their columns doubled, causing errors. Pull request courtesy Sean Dunn. Fixes: #4228 Change-Id: I7dabaaee0944e1030048826ba39fc574b0d63031 Pull-request: https://github.com/zzzeek/sqlalchemy/pull/457
* happy new yearMike Bayer2018-01-121-1/+1
| | | | Change-Id: I3ef36bfd0cb0ba62b3123c8cf92370a43156cf8f
* Add SQL Server CI coverageMike Bayer2017-08-311-1/+2
| | | | Change-Id: Ida0d01ae9bcc0573b86e24fddea620a38c962822
* update for 2017 copyrightMike Bayer2017-01-041-1/+1
| | | | Change-Id: I4e8c2aa8fe817bb2af8707410fa0201f938781de
* - happy new yearMike Bayer2016-01-291-1/+1
|
* - copyright 2015Mike Bayer2015-03-101-1/+1
|
* - apply pep8 formatting to sqlalchemy/sql, sqlalchemy/util, sqlalchemy/dialects,Brian Jarrett2014-07-201-60/+81
| | | | 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
* - happy new yearMike Bayer2014-01-051-1/+1
|
* - we dont actually need this unicode cast, on py3k + linux it seems theMike Bayer2013-07-091-1/+1
| | | | | has_table issues are OK. On OSX forget it. - still some issues with PY3k + pyodbc + decimal values it doesn't expect, not sure
* When querying the information schema on SQL Server 2000, removedMike Bayer2013-06-061-2/+15
| | | | | | | a CAST call that was added in 0.8.1 to help with driver issues, which apparently is not compatible on 2000. The CAST remains in place for SQL Server 2005 and greater. [ticket:2747]
* plugging awayMike Bayer2013-04-271-4/+3
|
* - the raw 2to3 runMike Bayer2013-04-271-4/+4
| | | | - went through examples/ and cleaned out excess list() calls
* - this pymssql test needs to be against the pymssql dialectMike Bayer2013-04-181-0/+4
| | | | | | | | | | | | | - Part of a longer series of fixes needed for pyodbc+ mssql, a CAST to NVARCHAR(max) has been added to the bound parameter for the table name and schema name in all information schema queries to avoid the issue of comparing NVARCHAR to NTEXT, which seems to be rejected by the ODBC driver in some cases, such as FreeTDS (0.91 only?) plus unicode bound parameters being passed. The issue seems to be specific to the SQL Server information schema tables and the workaround is harmless for those cases where the problem doesn't exist in the first place. [ticket:2355]
* Added a py3K conditional around unnecessary .decode()Mike Bayer2013-01-121-0/+2
| | | | | call in mssql information schema, fixes reflection in Py3K. Also in 0.7.10. [ticket:2638]
* happy new year (see #2645)Diana Clarke2013-01-011-1/+1
|
* kill me now, pep8 pass, so closeDiana Clarke2012-11-201-1/+0
|
* juts a 'expected 2 blank lines' pep8 passDiana Clarke2012-11-191-0/+1
|
* - more import cleanup for MSSQLMike Bayer2012-08-071-2/+2
|
* happy new yearMike Bayer2012-01-041-1/+1
|
* - 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
* Ridding the world of a few wasteful imports.Michael Trier2010-12-191-1/+1
|
* - Rewrote the reflection of indexes to use sys.Mike Bayer2010-10-231-0/+2
| | | | | | | catalogs, so that column names of any configuration (spaces, embedded commas, etc.) can be reflected. Note that reflection of indexes requires SQL Server 2005 or greater. [ticket:1770]
* - idle 78-char adjustmentsMike Bayer2010-07-031-3/+8
|
* removed all dialect table_names() methods and standardizedMike Bayer2010-03-191-2/+2
| | | | on get_table_names(). [ticket:1739]
* merge 0.6 series to trunk.Mike Bayer2009-08-061-0/+83