summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Accommodate "callable" bound param in evaluatorMike Bayer2016-05-161-1/+13
| | | | | | | | | | | Fixed bug in "evaluate" strategy of :meth:`.Query.update` and :meth:`.Query.delete` which would fail to accommodate a bound parameter with a "callable" value, as which occurs when filtering by a many-to-one equality expression along a relationship. Change-Id: I47758d3f5d8b9ea1a07e23166780d5f3c32b17f1 Fixes: #3700 (cherry picked from commit a51ab916622dd016ce51d6be0969112817cc42ad)
* Fix formatting on test_evaluatorMike Bayer2016-05-161-10/+16
| | | | | Change-Id: Idcd77a570b19f1b022a74d67fa8253d922dadc67 (cherry picked from commit 1873d8107ac8cf4258440914d68f12332220e244)
* change "psotgresql" to 'postgresql' in decoratorMark Sandan2016-05-131-1/+1
| | | | (cherry picked from commit ba3d4aa5baebacfef8a56de66a5c06cd1372e893)
* 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 (cherry picked from commit a4be7c92393e08607dc46f318e97803519052a93)
* Check for duplicate calls to register_attribute_implMike Bayer2016-05-101-0/+41
| | | | | | | | | | | Fixed bug whereby the event listeners used for backrefs could be inadvertently applied multiple times, when using a deep class inheritance hierarchy in conjunction with mutiple mapper configuration steps. Change-Id: I712beaf4674e2323bf5b282922658020a6d00b53 Fixes: #3710 (cherry picked from commit 743e9d4589946f1a29cdec7f2f1a2e4ec0853db7)
* Repair _orm_columns() to accommodate text()Mike Bayer2016-05-051-0/+19
| | | | | | | | | | Fixed bug whereby passing a :func:`.text` construct to the :meth:`.Query.group_by` method would raise an error, instead of intepreting the object as a SQL fragment. Change-Id: I5fc2f590b76508d52e23b5fa9cf037ddea8080c3 fixes: #3706 (cherry picked from commit 9bdd6f2b1f6b34a82b77849ec05811aa0279931d)
* Don't double-process ResultMetaData for BufferedColumnResultProxyMike Bayer2016-04-271-5/+47
| | | | | | | | | | | | | Fixed a bug in the result proxy used mainly by Oracle when binary and other LOB types are in play, such that when query / statement caching were used, the type-level result processors, notably that required by the binary type itself but also any other processor, would become lost after the first run of the statement due to it being removed from the cached result metadata. Change-Id: I751940866cffb4f48de46edc8137482eab59790c Fixes: #3699 (cherry picked from commit f3bc60bdd809235cbeb3f414717ac0e273269cf9)
* Fix result set handling for case insensitive dupe colsMike Bayer2016-04-211-0/+15
| | | | | | | | | | | | Fixed bug where when using ``case_sensitive=False`` with an :class:`.Engine`, the result set would fail to correctly accomodate for duplicate column names in the result set, causing an error when the statement is executed in 1.0, and preventing the "ambiguous column" exception from functioning in 1.1. Change-Id: If582bb9fdd057e4da3ae42f7180b17d1a1a2d98e Fixes: #3690 (cherry picked from commit 1f3e5d9826fe989f2212745f6b3592b2ef9b5e32)
* - move all resultproxy tests intio test_resultset, adapted fromMike Bayer2016-03-302-307/+311
| | | | 03d35a833cff68013781640b1192d079ab7e1154 in master (not cherry-picked)
* - Fixed bug where the negation of an EXISTS expression would notMike Bayer2016-03-212-0/+42
| | | | | | | | | be properly typed as boolean in the result, and also would fail to be anonymously aliased in a SELECT list as is the case with a non-negated EXISTS construct. fixes #3682 (cherry picked from commit 07a4b6cbcda6e6ee6e67893c5a5d2fd01e5f125f)
* - skip GC tests here when coverage is enabled, seems to interfereMike Bayer2016-03-081-1/+1
| | | | (cherry picked from commit be7f8e0b81106c21fa7956f0c27cf207375681c4)
* - move out unconsumed names tests from test_compiler out to test_insert, ↵Mike Bayer2016-03-023-48/+62
| | | | | | | | | test_update - establish consistent names between existing unconsumed names tests and new ones added per ref #3666 (cherry picked from commit 6b7c207801d826db872aeda02e7c7b531df68034)
* Add test for inserting multiple valuesAthena Yao2016-03-021-0/+38
| | | | (cherry picked from commit a1de176d23ee03724ce269d143790686f862b400)
* - Anonymous labeling is applied to a :attr:`.func` construct that isMike Bayer2016-02-261-1/+58
| | | | | | | | | | | passed to :func:`.column_property`, so that if the same attribute is referred to as a column expression twice the names are de-duped, thus avoiding "ambiguous column" errors. Previously, the ``.label(None)`` would need to be applied in order for the name to be de-anonymized. fixes #3663 (cherry picked from commit 0210695bd97e76f58d8781b69337816501482fb0)
* - additional adjustment to the fix made in ↵Mike Bayer2016-02-211-0/+40
| | | | | | | | | | | | | 8ad968f33100baeb3b13c7e0b724b6b79ab4277f for ref #3657. The Oracle dialect makes more use of the "select_wraps_for" feature than SQL server because Oracle doesn't have "TOP" for a limit-only select, so tests are showing more happening here. In the case where the select() has some dupe columns, these are deduped from the .c collection so a positional match between the wrapper and original can't use .inner_columns, because these collections wont match. Using _columns_plus_names instead which is the deduped collection that determines the SELECT display, which definitely have to match up.
* - Fixed bug in "to_list" conversion where a single bytes objectMike Bayer2016-02-211-1/+15
| | | | | | | | | would be turned into a list of individual characters. This would impact among other things using the :meth:`.Query.get` method on a primary key that's a bytes object. fixes #3660 (cherry picked from commit 01809bddff5b6e93010eb139aed54526c6e6c058)
* - reworked the way the "select_wraps_for" expression isMike Bayer2016-02-204-3/+75
| | | | | | | | | | | | | | | | | | | | | | | | | 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. (cherry picked from commit 8ad968f33100baeb3b13c7e0b724b6b79ab4277f)
* - Fixed bug in :meth:`.Session.merge` where an object with a compositeMike Bayer2016-02-111-1/+50
| | | | | | | | | | primary key that has values for some but not all of the PK fields would emit a SELECT statement leaking the internal NEVER_SET symbol into the query, rather than detecting that this object does not have a searchable primary key and no SELECT should be emitted. fixes #3647 (cherry picked from commit 366f97b5617af0d15cfaf594ec5ef0408c70e873)
* - Fixed bug in :func:`.expression.text` construct where a double-colonMike Bayer2016-02-091-0/+11
| | | | | | | | expression would not escape properly, e.g. ``some\:\:expr``, as is most commonly required when rendering Postgresql-style CAST expressions. fixes #3644 (cherry picked from commit 29dcaa2b0ae2d26b36ec624be80f56e03ab9095e)
* - backport changes to SQLite attached DB tests so thatMike Bayer2016-02-091-28/+10
| | | | we dont get file conflicts, cherry-pick from 5bb2536cc57c55c7d8c5901b5b622d18a9a6c646
* - backport new profile system from 1.1 so we can run new-styleMike Bayer2016-02-091-1/+505
| | | | test envs on jenkins
* - add missing __backend__ directives so that oracle tests actually run with ↵Mike Bayer2016-02-081-0/+17
| | | | | | --backend-only (cherry picked from commit 860d07ff89a8fd8b6a4d3036837c0e129d6cc233)
* - detect "Enterprise" and assume compression stuff isn't availableMike Bayer2016-02-081-0/+6
| | | | | | if not (cherry picked from commit 308244a90b95d2b78ed8f76e3af0d0c3d2329720)
* - adjust the MultiSchemaTest to handle multiple test_schemas / processes at theMike Bayer2016-02-081-5/+6
| | | | | | same time (cherry picked from commit 80853059a9f4bebfe41f9c340eddc2d6a86ef70f)
* - adjust to allow dblink tests to work with multiprocess users.Mike Bayer2016-02-081-9/+3
| | | | | | | | unfortunately the synonym doesn't work for SQL statements here when the dblink is on a different user, testing this is not really critical so just removed it. (cherry picked from commit 7e619d0be41afc3b6cd5e5fceba9dbc5f39b012d)
* - add literal_binds for delete() statements in addition to insert()/update()Mike Bayer2016-02-031-16/+25
| | | | | | | - move tests to CRUDTest - changelog, fixes #3643 (cherry picked from commit 150591f9e0a94902cb2a76b68ac7c9d8a1a3ec83)
* fix passing literal_binds flag through for update and insertTim Tate2016-02-031-0/+16
| | | | (cherry picked from commit c9b03fa8afd52646aba8c59fc038330eeee6db60)
* - Fixed issue where inadvertent use of the Python ``__contains__``Mike Bayer2016-02-022-2/+22
| | | | | | | | | | | override with a column expression (e.g. by using ``'x' in col``) would cause an endless loop in the case of an ARRAY type, as Python defers this to ``__getitem__`` access which never raises for this type. Overall, all use of ``__contains__`` now raises NotImplementedError. fixes #3642 (cherry picked from commit e0a580b3d055a600afae61840058a5a30ef5fe74)
* - revert the change first made in a6fe4dc, as we are now generalizingMike Bayer2016-01-284-4/+61
| | | | | | | | | | | | | | | | | | | | | | | | | the warning here to all safe_reraise() cases in Python 2. - Revisiting :ticket:`2696`, first released in 1.0.10, which attempts to work around Python 2's lack of exception context reporting by emitting a warning for an exception that was interrupted by a second exception when attempting to roll back the already-failed transaction; this issue continues to occur for MySQL backends in conjunction with a savepoint that gets unexpectedly lost, which then causes a "no such savepoint" error when the rollback is attempted, obscuring what the original condition was. The approach has been generalized to the Core "safe reraise" function which takes place across the ORM and Core in any place that a transaction is being rolled back in response to an error which occurred trying to commit, including the context managers provided by :class:`.Session` and :class:`.Connection`, and taking place for operations such as a failure on "RELEASE SAVEPOINT". Previously, the fix was only in place for a specific path within the ORM flush/commit process; it now takes place for all transational context managers as well. fixes #2696 (cherry picked from commit 8a1e619fb20df1be6ad2e0c563e451e17eb17628)
* - rework ColumnCollection to no longer persist "all_col_set"; we don'tMike Bayer2016-01-261-0/+19
| | | | | | | | | | | | | | | need this collection except in the extend/update uses where we create it ad-hoc. simplifies pickling. Compatibility with 1.0 should be OK as ColumnColleciton uses __getstate__ in any case and the __setstate__ contract hasn't changed. - Fixed bug in :class:`.Table` metadata construct which appeared around the 0.9 series where adding columns to a :class:`.Table` that was unpickled would fail to correctly establish the :class:`.Column` within the 'c' collection, leading to issues in areas such as ORM configuration. This could impact use cases such as ``extend_existing`` and others. fixes #3632 (cherry picked from commit 8163de4cc9e01460d3476b9fb3ed14a5b3e70bae)
* - fix array test that was essentially taking a weird guessMike Bayer2016-01-231-2/+2
| | | | at the primary key of a row based on other tests invoking around it
* - fix stray connectionMike Bayer2016-01-231-1/+4
| | | | (cherry picked from commit 2419bfe34cd5a1f4ead67d556ba74f3f1950762b)
* - native unicode expectations are too difficult to maintainMike Bayer2016-01-231-60/+0
| | | | | | w/ the number of drivers /DBURIs / python versions (cherry picked from commit d18d6d9baf4c98c47af70c0a7c796423396a51c1)
* - move out match compiler test to test_compilerMike Bayer2016-01-232-22/+9
| | | | | | - test_query isn't assertscompiledsql (cherry picked from commit 269313218ddd06a21387085295c553becbd00e46)
* - add missing IGNORE_EXCEPTION_DETAIL flagMike Bayer2016-01-211-1/+1
|
* - add a forwards-test here as wellMike Bayer2016-01-211-0/+4
| | | | (cherry picked from commit 38958f7b3f3e6009c419ba8e021f2b14c1f2b89a)
* - documenation updates to clarify specific SQLite versionsMike Bayer2016-01-211-10/+20
| | | | | | | | | | | that have problems with right-nested joins and UNION column keys; references #3633 references #3634. backport from 1.1 to 0.9 announcing 1.1 as where these behaviors will be retired based on version-specific checks - fix test_resultset so that it passes when SQLite 3.10.0 is present, references #3633 (cherry picked from commit 89fa08792e98b9e31452aa3c949d9b909b10e7cd)
* - Fixed bug where some exception re-raise scenarios would attachMike Bayer2016-01-181-0/+59
| | | | | | | | | | the exception to itself as the "cause"; while the Python 3 interpreter is OK with this, it could cause endless loops in iPython. fixes #3625 - add tests for reraise, raise_from_cause - raise_from_cause is the same on py2k/3k, use just one function (cherry picked from commit d4d9a6524886eb33644e8ce42212267fa569e555)
* - there was a DATEPART test after all, fix formatMike Bayer2016-01-141-1/+1
| | | | (cherry picked from commit 0ff3f95d5b41335c977e1bdbe88b7dfd4ae581e1)
* Remove quote on first DATEPART paramaterGuillaume DOUMENC2016-01-121-0/+12
| | | | | | | (cherry picked from commit c4f415d97988bc8a8d901b150bfb67571f29712e) - changelog for pr bitbucket:70, fixes #3624 (cherry picked from commit 215167d8d38a381d27c8448f5c6e50c70b9ba0cc)
* - Fixed regression since 0.9 where the 0.9 style loader optionsMike Bayer2016-01-091-0/+58
| | | | | | | | | system failed to accommodate for multiple :func:`.undefer_group` loader options in a single query. Multiple :func:`.undefer_group` options will now be taken into account even against the same entity. fixes #3623 (cherry picked from commit c7ae0daf0ed24e2697d6f948db2d9fdc5953c795)
* - Fixed 1.0 regression where the eager fetch of cursor.rowcount wasMike Bayer2016-01-051-0/+17
| | | | | | | | | | no longer called for an UPDATE or DELETE statement emitted via plain text or via the :func:`.text` construct, affecting those drivers that erase cursor.rowcount once the cursor is closed such as SQL Server ODBC and Firebird drivers. fixes #3622 (cherry picked from commit 197ffa2be2cadce3df8bfb0799b3c80158250286)
* - An adjustment to the regular expression used to parse MySQL views,Mike Bayer2015-12-221-0/+31
| | | | | | | | | such that we no longer assume the "ALGORITHM" keyword is present in the reflected view source, as some users have reported this not being present in some Amazon RDS environments. fixes #3613 (cherry picked from commit 8c54b14b5c0feee41bd9b9032f6b17b2dbd560a9)
* - varchar requires a lengthMike Bayer2015-12-221-1/+1
| | | | (cherry picked from commit 0c8242b26e6c7c2d373ae11ad5a3f97d75e6299c)
* - add the test from ref #3614 as well for testing ref #3611Mike Bayer2015-12-211-0/+60
| | | | (cherry picked from commit 4b708c48398f6451b6ab0a940a1f247ebcfe26ac)
* - Further fixes to :ticket:`3605`, pop method on :class:`.MutableDict`,Mike Bayer2015-12-171-1/+16
| | | | | | | where the "default" argument was not included. fixes #3605 (cherry picked from commit 913858c949ae9ca6250217d82d72c7d79e9f6585)
* - Fixed bug in baked loader system where the systemwide monkeypatchMike Bayer2015-12-151-0/+18
| | | | | | | | | | for setting up baked lazy loaders would interfere with other loader strategies that rely on lazy loading as a fallback, e.g. joined and subquery eager loaders, leading to ``IndexError`` exceptions at mapper configuration time. fixes #3612 (cherry picked from commit a22b2085068f860d05dbb98631d2ac2079a12b39)
* - Fixed regression caused in 1.0.10 by the fix for :ticket:`3593` whereMike Bayer2015-12-151-18/+99
| | | | | | | | | the check added for a polymorphic joinedload from a poly_subclass->class->poly_baseclass connection would fail for the scenario of class->poly_subclass->class. fixes #3611 (cherry picked from commit a8ec3491983ed5e68452514b4d52a4347377809f)
* - add some more oracle skipsMike Bayer2015-12-141-0/+2
| | | | (cherry picked from commit c42725ed54a61d7e5a0931404ee83aa6b94d0aea)
* - Fixed bug where :meth:`.Session.bulk_update_mappings` and relatedMike Bayer2015-12-141-0/+37
| | | | | | | | | | would not bump a version id counter when in use. The experience here is still a little rough as the original version id is required in the given dictionaries and there's not clean error reporting on that yet. fixes #3610 (cherry picked from commit 26ed90ab22dde7bdafe933cb1d16acfe70c1ab78)