summaryrefslogtreecommitdiff
path: root/test/dialect/mssql
Commit message (Collapse)AuthorAgeFilesLines
* Deprecate FromClause.count()Mike Bayer2016-06-141-1/+2
| | | | | | | | | | | count() here is misleading in that it not only counts from an arbitrary column in the table, it also does not make accommodations for DISTINCT, JOIN, etc. as the ORM-level function does. Core should not be attempting to provide a function like this. Change-Id: I9916fc51ef744389a92c54660ab08e9695b8afc2 Fixes: #3724
* Allow creating explicit non-clustered keys and indexes MS SQL.Saulius Žemaitaitis2016-06-061-0/+38
| | | | | | | | | | 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
* Use new mxODBC 3.3.4 varbinary null symbolSheila Allen2016-05-311-1/+3
| | | | | | | | | Use new mxODBC 3.3.4 varbinary null symbol with VARBINARY data types when value is None(based on similar change to pyodbc). Fix a test to pass on mxODBC starting w 3.3.3 version Change-Id: Id703ecb51ebc5db149c81fef124f673433606c7f Pull-request: https://bitbucket.org/zzzeek/sqlalchemy/pull-requests/58
* Fix label referencing in SQL Server OFFSET logicMike Bayer2016-05-101-0/+25
| | | | | | | | | | 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
* - update the mssql autoincrement reflection test to accommodateMike Bayer2016-02-201-27/+23
| | | | the new behavior of the autoincrement flag as per ref #3216
* - reworked the way the "select_wraps_for" expression isMike Bayer2016-02-201-1/+25
| | | | | | | | | | | | | | | | | | | | | | | handled within visit_select(); this attribute was added in the 1.0 series to accommodate the subquery wrapping behavior of SQL Server and Oracle while also working with positional column targeting and no longer relying upon "key fallback" in order to target columns in such a statement. The IBM DB2 third-party dialect also has this use case, but its implementation is using regular expressions to rewrite the textual SELECT only and does not make use of a "wrapped" select at this time. The logic no longer attempts to reconcile proxy set collections as this was not deterministic, and instead assumes that the select() and the wrapper select() match their columns postionally, at least for the column positions they have in common, so it is now very simple and safe. fixes #3657. - as a side effect of #3657 it was also revealed that the strategy of calling upon a ResultProxy._getter was not correctly calling into NoSuchColumnError when an expected column was not present, and instead returned None up to loading.instances() to produce NoneType failures; added a raiseerr argument to _getter() which is called when we aren't expecting None, fixes #3658.
* - add missing __backend__ directives for SQL serverMike Bayer2016-02-082-0/+6
|
* - there was a DATEPART test after all, fix formatMike Bayer2016-01-141-1/+1
|
* - changelog for pr bitbucket:70, fixes #3624Mike Bayer2016-01-121-0/+12
|
* - A descriptive ValueError is now raised in the event that SQL serverMike Bayer2015-11-301-3/+33
| | | | | | | 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
* - extend pullreq github:213 to also include DATETIMEOFFSET and TIME,Mike Bayer2015-11-141-1/+87
| | | | | | which also accept zero precision - extend test case here to include a backend-agnostic suite - changelog for MSSQL date fix
* Pass precision value to mssql.DATETIME2 when it is 0pr/213Jacobo de Vera2015-11-131-0/+2
| | | | | The simple check on the precision results in DATETIME2(0) generating a DATETIME2 column, with default precision, which is 7.
* - The ``legacy_schema_aliasing`` flag, introduced in version 1.0.5Mike Bayer2015-09-193-12/+10
| | | | | | | 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
* - fix the postgresql_jsonb requirement to include the 9.4 requirementMike Bayer2015-08-181-3/+1
| | | | | | | | - new test for json col['x']['y']['z'] seems to fail pre PG 9.4, fails on comparisons for non-compatible data instead of not matching - no need to call SpecPredicate(db) directly in exclusion functions, by using Predicate.as_predicate() the spec strings can have version comparisons
* - Fixed issue where the SQL Server dialect would reflect a string-Mike Bayer2015-07-301-4/+30
| | | | | | | | | | | | 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
* - Fixed issue when using :class:`.VARBINARY` type in conjunction withMike Bayer2015-06-221-67/+92
| | | | | | | | | 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
* - fix this test to not require pyodbc installedMike Bayer2015-06-031-1/+2
|
* - Fixed bug where known boolean values used byMike Bayer2015-05-261-0/+10
| | | | | | | | :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-242-41/+171
| | | | | | | | | | | | | | | | | | | | | | | ``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
* - break out binary insert against None, disable for freetds for nowMike Bayer2015-05-241-12/+37
|
* - autopep8Mike Bayer2015-05-242-234/+270
|
* - fix some more result_map callsMike Bayer2015-03-082-8/+8
|
* - the change for #918 was of course not nearly that simple.Mike Bayer2015-03-071-1/+17
| | | | | | | | | | | | | | | | | | 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.
* - rework assertsql system, fixes #3293Mike Bayer2015-01-181-15/+61
|
* - SQL Server 2012 now recommends VARCHAR(max), NVARCHAR(max),Mike Bayer2014-12-063-14/+71
| | | | | | | 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
* pep8Mike Bayer2014-12-061-106/+141
|
* - The :attr:`.Column.key` attribute is now used as the source ofMike Bayer2014-11-101-2/+2
| | | | | | | | | | | anonymous bound parameter names within expressions, to match the existing use of this value as the key when rendered in an INSERT or UPDATE statement. This allows :attr:`.Column.key` to be used as a "substitute" string to work around a difficult column name that doesn't translate well into a bound parameter name. Note that the paramstyle is configurable on :func:`.create_engine` in any case, and most DBAPIs today support a named and positional style. fixes #3245
* - Fixed the version string detection in the pymssql dialect toMike Bayer2014-09-161-0/+20
| | | | | | work with Microsoft SQL Azure, which changes the word "SQL Server" to "SQL Azure". fixes #3151
* - The hostname-based connection format for SQL Server when usingMike Bayer2014-09-031-6/+20
| | | | | | | | 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
* - more tests, including backend testsMike Bayer2014-05-161-6/+6
| | | | - implement for SQL server, use window functions when simple limit/offset not available
* Fix many typos throughout the codebasepr/85Alex Gaynor2014-04-261-1/+1
| | | | Found using: https://github.com/intgr/topy
* Support mssql_clustered option on UniqueConstraint (plus docs and test)donkopotamus2014-01-171-0/+12
|
* Remove support for mssql_clustered on Tabledonkopotamus2014-01-171-12/+1
|
* Support mssql_clustered option in mssql dialect for both Table and ↵donkopotamus2014-01-141-0/+22
| | | | PrimaryKeyConstraint
* - support addition of fails_if()/only_on(), just wraps the decoratorsMike Bayer2014-01-021-1/+2
| | | | - update a few exclusions to support current pymssql. passes all of test_suite and dialect/mssql
* Remove terminated connections from the pool.pr/51John Anderson2013-12-161-3/+4
| | | | | | 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.
* - changelog + test for pullreq #7, MSSQL dialect for DROP INDEXMike Bayer2013-12-051-0/+11
|
* - Fixed bug in default compiler plus those of postgresql, mysql, andMike Bayer2013-10-121-0/+10
| | | | | | | | 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.
* refactor test suites for postgresql, mssql, mysql into packages.Mike Bayer2013-06-286-0/+2145