summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Warn when sorted_tables is not actually sortingMike Bayer2020-05-075-25/+182
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | A warning is emitted when making use of the :attr:`.MetaData.sorted_tables` attribute as well as the :func:`_schema.sort_tables` function, and the given tables cannot be correctly sorted due to a cyclic dependency between foreign key constraints. In this case, the functions will no longer sort the involved tables by foreign key, and a warning will be emitted. Other tables that are not part of the cycle will still be returned in dependency order. Previously, the sorted_table routines would return a collection that would unconditionally omit all foreign keys when a cycle was detected, and no warning was emitted. Fixes: #5316 Change-Id: I14f72ccf39cb568bc77e8da16d0685718b2b9960
* | Merge "Expand CTE testing and begin to make this more prominent."mike bayer2020-05-093-21/+91
|\ \
| * | Expand CTE testing and begin to make this more prominent.Mike Bayer2020-05-083-21/+91
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SQLite supports CTEs as do both the MariaDB and MySQL databases now. Expand test support and begin adding new tutorial sections to make this concept more prominent. Also fix some formatting issues in the tutorial, and start moving more towards {opensql} - the "SQL" button thing is cool but the tutorials mainly need to illustrate how the SQL looks for things. Screens are bigger now and we likely should move away from the SQL button almost entirely. CTE for the tutorial needed zzzeeksphinx fix to recognize "WITH" so bumping that to latest release number in git. Change-Id: Ia1bbe3248b4f7c74fbee06fedf76a6ce94cd28a6 References: #5269
* | Merge "Add sync_backref flag in a relationship"mike bayer2020-05-085-32/+275
|\ \ | |/ |/|
| * Add sync_backref flag in a relationshipFederico Caselli2020-05-055-32/+275
| | | | | | | | | | | | | | | | | | | | | | | | | | Introduce :paramref:`_orm.relationship.sync_backref` flag in a relationship to control if the synchronization events that mutate the in-Python attributes are added. This flag is implied in a ``viewonly=True`` relationship. This supersedes the previous change #5149, that warned that ``viewonly=True`` relationship target of a back_populates or backref configuration would be disallowed. Fixes: #5237 Change-Id: I22c5ba28dcea22fc78a83e68e667140edffc515c
* | Merge "Add warn_deprecated_limited feature"mike bayer2020-05-062-0/+47
|\ \
| * | Add warn_deprecated_limited featureGord Thompson2020-05-012-0/+47
| | | | | | | | | | | | | | | Fixes: #5268 Change-Id: I2f976048af4f8d6dd03a14efa31d179bd7324ba6
* | | Merge "fixes #4212 raise an error if selectable and flat/aliased are sent to ↵mike bayer2020-05-063-0/+35
|\ \ \ | | | | | | | | | | | | with_polymorphic simultaenously"
| * | | fixes #4212 raise an error if selectable and flat/aliased are sent to ↵RamonWill2020-04-283-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with_polymorphic simultaenously <!-- Provide a general summary of your proposed changes in the Title field above --> Hi, This is a proposed fix for Issue #4212 When the selectable argument is passed to with_polymorphic it is already aliased. Therefore an argument error should be raised if flat is also True. I have added an if statement to the with_polymorphic function, that raises an Argument Error if selectable is none/False AND if flat=True. I have also included a test. ### Checklist <!-- go over following points. check them with an `x` if they do apply, (they turn into clickable checkboxes once the PR is submitted, so no need to do everything at once) --> This pull request is: - [ ] A documentation / typographical error fix - Good to go, no issue or tests are needed - [X ] A short code fix - please include the issue number, and create an issue if none exists, which must include a complete example of the issue. one line code fixes without an issue and demonstration will not be accepted. - Please include: `Fixes: #<issue number>` in the commit message - please include tests. one line code fixes without tests will not be accepted. - [ ] A new feature implementation - please include the issue number, and create an issue if none exists, which must include a complete example of how the feature would look. - Please include: `Fixes: #<issue number>` in the commit message - please include tests. Kind Regards, Ramon Closes: #5232 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5232 Pull-request-sha: eae20cdadac82ca1e0352000fe0211e20b590e8b Change-Id: I49c3022296608ede43de7f508fa993fa97dda81a
* | | | Clarify create_engine encoding; update cx_OracleMike Bayer2020-05-063-71/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The create_engine()->encoding parameter is mostly irrelevant under Python 3. make it clear this parameter is not generally useful anymore and refer readers to the dialect documenation. Update cx_Oracle documentation to feature many examples of the encoding / nencoding parameters, remove extra detail that is not generally useful and reorganize information into more specific sections, de-emphasizing legacy / Python 2 specific sections. Change-Id: I42dafb85de0a585c9e05e1e3d787d8d6bfa632c0
* | | | Consider aliased=True, from_joinpoint as legacyMike Bayer2020-05-048-279/+275
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For a 1.4 / 1.3 merge, rewrite the documentation for Query.join() to indicate calling forms that are now considered legacy, including the use of strings in join(), sending a series of join paths in one call, and using the aliased=True flag. update the elementtree examples as well to use aliased() (they are much simpler to understand this way too) and update other links. Also improve docs for aliased() and some other ORM targets such as PropComparator. Change-Id: I636e3a9130dc5509e51c2cf60a52f38fcadffbc6 References: #4705
* | | | Merge "Don't apply sets or similar to objects in IdentitySet"mike bayer2020-05-043-48/+60
|\ \ \ \
| * | | | Don't apply sets or similar to objects in IdentitySetMike Bayer2020-05-033-48/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modified the internal "identity set" implementation, which is a set that hashes objects on their id() rather than their hash values, to not actually call the ``__hash__()`` method of the objects, which are typically user-mapped objects. Some methods were calling this method as a side effect of the implementation. Fixes: #5304 Change-Id: I0ed8762f47622215a54dcad9f210377b1becf8e8
* | | | | Baked query needs to spoil fully on uncachable optionMike Bayer2020-05-044-37/+123
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed issue in the area of where loader options such as selectinload() interact with the baked query system, such that the caching of a query is not supposed to occur if the loader options themselves have elements such as with_polymorphic() objects in them that currently are not cache-compatible. The baked loader could sometimes not fully invalidate itself in these some of these scenarios leading to missed eager loads. Fixes: #5303 Change-Id: Iecf847204a619694d89297f83b63b613ef9767de
* | | | Fix links in future engine to refer to engine.ResultMike Bayer2020-05-021-4/+4
| | | | | | | | | | | | | | | | Change-Id: I1d24db707de15fbdc05e80e0705590eb93d055d0
* | | | Integrate new Result into ORM queryMike Bayer2020-05-0211-398/+412
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The next step in the 2.0 ORM changes is to have the ORM integrate with the new Result object fully. this patch uses Result to represent ORM objects rather than lists. public API to get at this Result is not added yet. dogpile.cache and horizontal sharding recipe/extensions have small adjustments to accommodate this change. Callcounts have fluctuated, some slightly better and some slightly worse. A few have gone up by a bit, however as the codebase is still in flux it is anticipated there will be some performance gains later on as ORM fetching is refined to no longer need to accommodate for extensive aliasing. The addition of caching will then change the entire story. References: #5087 References: #4395 Change-Id: If1a23824ffb77d8d58cf2338cf35dd6b5963b17f
* | | Merge "Capitalize documentation for relationship params"mike bayer2020-05-021-21/+21
|\ \ \
| * | | Capitalize documentation for relationship paramsFederico Caselli2020-04-281-21/+21
| | | | | | | | | | | | | | | | Change-Id: Iec1f0afcc57177a7463d8238f1c5d6bb8b86bbb3
* | | | Merge "Handle non-string, non column expression in index for deferred attach"mike bayer2020-05-023-2/+30
|\ \ \ \
| * | | | Handle non-string, non column expression in index for deferred attachMike Bayer2020-05-013-2/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed issue where an :class:`.Index` that is deferred in being associated with a table, such as as when it contains a :class:`.Column` that is not associated with any :class:`.Table` yet, would fail to attach correctly if it also contained a non table-oriented expession. Fixes: #5298 Change-Id: I0111c400f6bd4a9f31bf00a9957816c7a3fac783
* | | | | Documentation updates for ResultProxy -> ResultMike Bayer2020-05-0131-82/+164
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is based off of I8091919d45421e3f53029b8660427f844fee0228 and includes all documentation-only changes as a separate merge, once the parent is merged. Change-Id: I711adea23df0f9f0b1fe7c76210bd2de6d31842d
* | | | Merge "Propose Result as immediate replacement for ResultProxy"mike bayer2020-05-0131-2128/+4028
|\ \ \ \ | |_|_|/ |/| | |
| * | | Propose Result as immediate replacement for ResultProxyMike Bayer2020-05-0131-2128/+4028
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As progress is made on the _future.Result, including breaking it out such that DBAPI behaviors are local to specific implementations, it becomes apparent that the Result object is a functional superset of ResultProxy and that basic operations like fetchone(), fetchall(), and fetchmany() behave pretty much exactly the same way on the new object. Reorganize things so that ResultProxy is now referred to as LegacyCursorResult, which subclasses CursorResult that represents the DBAPI-cursor version of Result, making use of a multiple inheritance pattern so that the functionality of Result is also available in non-DBAPI contexts, as will be necessary for some ORM patterns. Additionally propose the composition system for Result that will form the basis for ORM-alternative result systems such as horizontal sharding and dogpile cache. As ORM results will soon be coming directly from instances of Result, these extensions will instead build their own ResultFetchStrategies that perform the special steps to create composed or cached result sets. Also considering at the moment not emitting deprecation warnings for fetchXYZ() methods; the immediate issue is Keystone tests are calling upon it, but as the implementations here are proving to be not in any kind of conflict with how Result works, there's not too much issue leaving them around and deprecating at some later point. References: #5087 References: #4395 Fixes: #4959 Change-Id: I8091919d45421e3f53029b8660427f844fee0228
* | | | Merge "Enable loading of external Firebird dialect, if available"Gord Thompson2020-05-012-1/+15
|\ \ \ \
| * | | | Enable loading of external Firebird dialect, if availableGord Thompson2020-04-302-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | Fixes: #5278 Change-Id: I1660abb11c02656fbf388f2f9c4257075111be58
* | | | | repair test_fetch_resultsMike Bayer2020-04-302-11/+12
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | this profiling test was not actually loading the related objects. Change-Id: I9d18a44f50f72f6653f736708829365eb561160e
* | | | Deprecate unsupported dialects and dbapiFederico Caselli2020-04-2917-129/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Deprecate dialects firebird and sybase. - Deprecate DBAPI - mxODBC for mssql - oursql for mysql - pygresql and py-postgresql for postgresql - Removed adodbapi DBAPI for mssql Fixes: #5189 Change-Id: Id9025f4f4de7e97d65aacd0eb4b0c21beb9a67b5
* | | | Restore a line break that is needed for a clean mergeMike Bayer2020-04-291-0/+1
| |/ / |/| | | | | | | | Change-Id: Ib433920080ba159a1478c48d2f837bc71bf5bbbc
* | | Merge "Alias the onclause if ORM join is to same polymorphic selectable"mike bayer2020-04-285-2/+71
|\ \ \ | |_|/ |/| |
| * | Alias the onclause if ORM join is to same polymorphic selectableMike Bayer2020-04-275-2/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed bug where using :func:`.with_polymorphic` as the target of a join via :meth:`.RelationshipComparator.of_type` on a mapper that already has a subquery-based with_polymorphic setting that's equivalent to the one requested would not correctly alias the ON clause in the join. Fixes: #5288 Change-Id: I0212a990ee67a344c87fe21833bf47fdb72ca0cc
* | | other minor cleanupsFederico Caselli2020-04-282-2/+2
| | | | | | | | | | | | Change-Id: Ie7b8cec01ce36f2619b3e3bcb3152747be673ca3
* | | fix typo SQLAchemy -> SQLAlchemyFederico Caselli2020-04-274-5/+5
|/ / | | | | | | Change-Id: If03ccc2c2bec1c48eb6ed26091e1588b3b46e781
* | Update automatic labelFederico Caselli2020-04-243-3/+3
| | | | | | | | Change-Id: I5a1496a3bd55eb8f9863b9b8cb84f1784c26dbf0
* | Improve bug reportFederico Caselli2020-04-231-2/+2
| |
* | Update issue templatesFederico Caselli2020-04-233-0/+87
| |
* | Add code of conduct and contributingFederico Caselli2020-04-233-0/+9
|/ | | | Change-Id: I9793920a9f082ee85be0f4c94f2ce208cf2c6be9
* Merge "Fix regression when reflecting tables in MSSQL"mike bayer2020-04-223-12/+44
|\
| * Fix regression when reflecting tables in MSSQLFederico Caselli2020-04-223-12/+44
| | | | | | | | | | | | | | | | | | | | | | | | Fix a regression introduced by the reflection of computed column in MSSQL when using SQL server versions before 2012, which does not support the ``concat`` function and when using the legacy TDS version 4.2. The dialect will try to detect the protocol version of first connect and run in compatibility mode if it cannot detect it. Fixes: #5255 Fixes: #5271 Change-Id: I7b33f7889ac0784cd8ae5385cbd50bc8c862398a
* | Merge "Add ColumnProperty.Comparator.expressions"mike bayer2020-04-215-1/+105
|\ \
| * | Add ColumnProperty.Comparator.expressionsMike Bayer2020-04-205-1/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | Added an accessor :attr:`.ColumnProperty.Comparator.expressions` which provides access to the group of columns mapped under a multi-column :class:`.ColumnProperty` attribute. Fixes: #5262 Change-Id: I44cf53ff0e6cf76a0c90eee4638ca96da3df8088
* | | Fix typo in pymssql documentation; minor clarificationGord Thompson2020-04-201-2/+3
| |/ |/| | | | | Change-Id: I4aaf0627d2f1ccae82c2eb41db9ec219d73ce4ea
* | Merge "Deprecate ``DISTINCT ON`` when not targeting PostgreSQL"mike bayer2020-04-2014-22/+92
|\ \
| * | Deprecate ``DISTINCT ON`` when not targeting PostgreSQLFederico Caselli2020-04-2014-22/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | Deprecate usage of ``DISTINCT ON`` in dialect other than PostgreSQL. Previously this was silently ignored. Deprecate old usage of string distinct in MySQL dialect Fixes: #4002 Change-Id: I38fc64aef75e77748083c11d388ec831f161c9c9
* | | Merge "Support `ARRAY` of `Enum`, `JSON` or `JSONB`"mike bayer2020-04-208-54/+247
|\ \ \ | |_|/ |/| |
| * | Support `ARRAY` of `Enum`, `JSON` or `JSONB`Federico Caselli2020-04-208-54/+247
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | Added support for columns or type :class:`.ARRAY` of :class:`.Enum`, :class:`.JSON` or :class:`_postgresql.JSONB` in PostgreSQL. Previously a workaround was required in these use cases. Raise an explicit :class:`.exc.CompileError` when adding a table with a column of type :class:`.ARRAY` of :class:`.Enum` configured with :paramref:`.Enum.native_enum` set to ``False`` when :paramref:`.Enum.create_constraint` is not set to ``False`` Fixes: #5265 Fixes: #5266 Change-Id: I83a2d20a599232b7066d0839f3e55ff8b78cd8fc
* | Merge "Raise informative error when non-object m2o comparison used"mike bayer2020-04-203-2/+62
|\ \
| * | Raise informative error when non-object m2o comparison usedMike Bayer2020-04-193-2/+62
| |/ | | | | | | | | | | | | | | | | | | | | An informative error message is raised when an ORM many-to-one comparison is attempted against an object that is not an actual mapped instance. Comparisons such as those to scalar subqueries aren't supported; generalized comparison with subqueries is better achieved using :meth:`~.RelationshipProperty.Comparator.has`. Fixes: #5269 Change-Id: I2e23178eb59728c39241a46bfa7411239a87492e
* | Clean up .execute in test/sql/test_functions.pyGord Thompson2020-04-203-84/+83
| | | | | | | | Change-Id: I2bc7a50893f90c6ea7e119a8558731ee32965871
* | Merge remote-tracking branch 'origin/pr/5247'Mike Bayer2020-04-201-1/+1
|\ \ | | | | | | | | | Change-Id: I781c1083c373a417cbf33946daae556249fcd487
| * | fix changelogFederico Caselli2020-04-101-1/+1
| | |