summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/mssql
Commit message (Collapse)AuthorAgeFilesLines
* Update to correct TDS version; FreeTDS only supports up to 7.3. 8.0 is not a ↵pr/176Allen, Timothy2015-05-281-2/+6
| | | | valid version (Microsoft released the spec late).
* - Fixed bug where known boolean values used byMike Bayer2015-05-261-0/+4
| | | | | | | | :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
* - Added a new dialect flag to the MSSQL dialectMike Bayer2015-05-241-28/+107
| | | | | | | | | | | | | | | | | | | | | | | ``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
* - Fixed a regression that was incorrectly fixed in 1.0.0b4Mike Bayer2015-04-241-1/+0
| | | | | | | | | | | | | | | | | | (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
* - Fixed support for "literal_binds" mode when using limit/offsetMike Bayer2015-04-231-2/+3
| | | | | | with Firebird, so that the values are again rendered inline when this is selected. Related to :ticket:`3034`. fixes #3381
* - pymssql has PEP249 Binary contructor since 2.1.1pr/166Ramiro Morales2015-04-051-4/+5
| | | | See https://github.com/pymssql/pymssql/commit/e7fb15dd29090e1f1bb570842b53aea1ec32d8f0
* - Turned off the "simple order by" flag on the MSSQL dialect; thisMike Bayer2015-03-241-0/+1
| | | | | | | | | | | 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
* - add a note that we aren't really doing zxjdbc right now even thoughMike Bayer2015-03-201-0/+2
| | | | these files are present.
* - copyright 2015Mike Bayer2015-03-108-8/+8
|
* - rename _select_wrapsMike Bayer2015-03-081-1/+1
| | | | | - replace force_result_map with a mini-API for nested result sets, add coverage
* - the change for #918 was of course not nearly that simple.Mike Bayer2015-03-071-1/+2
| | | | | | | | | | | | | | | | | | 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.
* - Custom dialects that implement :class:`.GenericTypeCompiler` canMike Bayer2015-01-161-40/+42
| | | | | | | | | | | | | | 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
* - SQL Server 2012 now recommends VARCHAR(max), NVARCHAR(max),Mike Bayer2014-12-061-9/+96
| | | | | | | 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
* cleanup exception handling - use new exception hierarchy (since python 2.5)pr/140ndparker2014-10-021-3/+1
|
* improve exception vs. exit handlingndparker2014-09-231-0/+2
|
* - 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
* - ensure literal_binds works with LIMIT clause, FOR UPDATEMike Bayer2014-09-031-1/+1
|
* - The hostname-based connection format for SQL Server when usingMike Bayer2014-09-031-53/+34
| | | | | | | | pyodbc will no longer specify a default "driver name", and a warning is emitted if this is missing. The optimal driver name for SQL Server changes frequently and is per-platform, so hostname based connections need to specify this. DSN-based connections are preferred. fixes #3182
* - update some SQL server tests, supportMike Bayer2014-07-221-1/+17
| | | | - add support for IDENTITY INSERT setting for INSERT with inline VALUES
* - apply pep8 formatting to sqlalchemy/sql, sqlalchemy/util, sqlalchemy/dialects,Brian Jarrett2014-07-208-296/+354
| | | | sqlalchemy/orm, sqlalchemy/event, sqlalchemy/testing
* - Fixed a regression from 0.9.5 caused by :ticket:`3025` where theMike Bayer2014-07-141-0/+3
| | | | | | | 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
* - Added statement encoding to the "SET IDENTITY_INSERT"Mike Bayer2014-07-141-6/+12
| | | | | | | | | 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.
* - In the SQL Server pyodbc dialect, repaired the implementationMike Bayer2014-07-141-1/+2
| | | | | | | | | for the ``description_encoding`` dialect parameter, which when not explicitly set was preventing cursor.description from being parsed correctly in the case of result sets that contained names in alternate encodings. This parameter shouldn't be needed going forward. fixes #3091
* - break up the <authors> copyright comment as part of a passMike Bayer2014-07-098-8/+16
| | | | to get all flake8 passing
* Merge pull request #98 from abbec/mssql2008-multivalues-insertmike bayer2014-07-061-0/+2
|\ | | | | Fixed support for multivalue inserts for MS SQL 2008
| * - Fixed support for multivalue inserts for MS SQL 2008 since it is actually ↵pr/98Albert Cervin2014-06-161-0/+2
| | | | | | | | supported.
* | - write some really complete docs on MSSQL autoincrement, fixes #3094Mike Bayer2014-06-241-10/+132
|/
* - more tests, including backend testsMike Bayer2014-05-161-17/+34
| | | | - implement for SQL server, use window functions when simple limit/offset not available
* Use _offset_clause and _limit_clause, which are always Visitable and usually ↵Dobes Vandermeer2014-04-251-3/+4
| | | | a BindParameter, instead of _offset and _limit in GenerativeSelect.
* - Revised the query used to determine the current default schema nameMike Bayer2014-04-171-14/+8
| | | | | | | 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
* 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
|
* - implement kwarg validation and type system for dialect-specificMike Bayer2014-01-181-7/+18
| | | | | arguments; [ticket:2866] - add dialect specific kwarg functionality to ForeignKeyConstraint, ForeignKey
* - changelog for pullreq:11Mike Bayer2014-01-181-1/+1
| | | | - be specific about version 0.9.2
* Bug Fix: Stop generating bad sql if an empty UniqueConstraint() is givendonkopotamus2014-01-171-0/+2
|
* Support mssql_clustered option on UniqueConstraint (plus docs and test)donkopotamus2014-01-171-4/+29
|
* Remove support for mssql_clustered on Tabledonkopotamus2014-01-171-15/+5
|
* Support mssql_clustered option in mssql dialect for both Table and ↵donkopotamus2014-01-141-8/+54
| | | | PrimaryKeyConstraint
* - happy new yearMike Bayer2014-01-058-8/+8
|
* - apply a similar fix for floats to mssql+pyodbc as we did to firebirdMike Bayer2013-12-281-3/+9
| | | | | - wrangle through osx+pyodbc+freetds to get at least test_suite to pass again with mssql+pyodbc. invovled adding some silly requirements
* 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.
* Fix MSSQL dialects visit_drop_index to use the correct DDLdonkopotamus2013-12-051-5/+3
|
* - Fixed bug in default compiler plus those of postgresql, mysql, andMike Bayer2013-10-121-1/+1
| | | | | | | | mssql to ensure that any literal SQL expression values are rendered directly as literals, instead of as bound parameters, within a CREATE INDEX statement. [ticket:2742] - don't need expression_as_ddl(); literal_binds and include_table take care of this functionality.
* - A rework to the way that "quoted" identifiers are handled, in thatMike Bayer2013-08-271-2/+2
| | | | | | | | | | | | | | | | instead of relying upon various ``quote=True`` flags being passed around, these flags are converted into rich string objects with quoting information included at the point at which they are passed to common schema constructs like :class:`.Table`, :class:`.Column`, etc. This solves the issue of various methods that don't correctly honor the "quote" flag such as :meth:`.Engine.has_table` and related methods. The :class:`.quoted_name` object is a string subclass that can also be used explicitly if needed; the object will hold onto the quoting preferences passed and will also bypass the "name normalization" performed by dialects that standardize on uppercase symbols, such as Oracle, Firebird and DB2. The upshot is that the "uppercase" backends can now work with force-quoted names, such as lowercase-quoted names and new reserved words. [ticket:2812]
* - we dont actually need this unicode cast, on py3k + linux it seems theMike Bayer2013-07-092-8/+2
| | | | | 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]
* - some tweaks to try to help out mssql+pyodbc support a bit, py3k is reallyMike Bayer2013-06-031-0/+1
| | | | not happening too well (I need to stick with linux + freetds 0.91, I know)
* merge defaultMike Bayer2013-05-151-0/+6
|\