summaryrefslogtreecommitdiff
path: root/doc
Commit message (Collapse)AuthorAgeFilesLines
* Fixes: #7278masterjonathan vanasco2021-11-021-1/+1
| | | | | | Correct a typo in the 1.4 changelog Change-Id: Ib7d1fc75957ad2efb348fee9d862d75b06dbafef
* use full context manager flow for future.Engine.begin()Mike Bayer2021-11-011-0/+14
| | | | | | | | | | | | | | | Fixed issue in future :class:`_future.Engine` where calling upon :meth:`_future.Engine.begin` and entering the context manager would not close the connection if the actual BEGIN operation failed for some reason, such as an event handler raising an exception; this use case failed to be tested for the future version of the engine. Note that the "future" context managers which handle ``begin()`` blocks in Core and ORM don't actually run the "BEGIN" operation until the context managers are actually entered. This is different from the legacy version which runs the "BEGIN" operation up front. Fixes: #7272 Change-Id: I9667ac0861a9e007c4b3dfcf0fcf0829038a8711
* Merge "remove case_sensitive create_engine parameter" into mainmike bayer2021-11-011-0/+18
|\
| * remove case_sensitive create_engine parameterMike Bayer2021-11-011-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | Removed the previously deprecated ``case_sensitive`` parameter from :func:`_sa.create_engine`, which would impact only the lookup of string column names in Core-only result set rows; it had no effect on the behavior of the ORM. The effective behavior of what ``case_sensitive`` refers towards remains at its default value of ``True``, meaning that string names looked up in ``row._mapping`` will match case-sensitively, just like any other Python mapping. Change-Id: I0dc4be3fac37d30202b1603db26fa10a110b618d
* | de-link LegacyRow, LegacyCursorResultMike Bayer2021-11-014-23/+17
|/ | | | Change-Id: I4a9d210c3cb07fc1d59643463acef95f9cc9b12e
* Merge "Update psycopg2 dialect to use the DBAPI interface to execute two ↵mike bayer2021-11-011-0/+7
|\ | | | | | | phase transactions" into main
| * Update psycopg2 dialect to use the DBAPI interface to executeFederico Caselli2021-10-311-0/+7
| | | | | | | | | | | | | | two phase transactions Fixes: #7238 Change-Id: Ie4f5cf59d29b5bfc142ec2dfdecffb896ee7d708
* | Revise "literal parameters" FAQ sectionMike Bayer2021-11-011-36/+218
| | | | | | | | | | | | | | | | | | | | based on feedback in #7271, the emphasis on TypeDecorator as a solution to this problem is not very practical. illustrate a series of quick recipes that are useful for debugging purposes to print out a repr() or simple stringify of a parameter without the need to construct custom dialects or types. Change-Id: I788ce1b5ea01d88dd0a22d03d06f35aabff5e5c8
* | Merge "2.0 removals: LegacyRow, connectionless execution, close_with_result" ↵mike bayer2021-10-311-8/+0
|\ \ | |/ |/| | | into main
| * 2.0 removals: LegacyRow, connectionless execution, close_with_resultMike Bayer2021-10-311-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in order to remove LegacyRow / LegacyResult, we have to also lose close_with_result, which connectionless execution relies upon. also includes a new profiles.txt file that's all against py310, as that's what CI is on now. some result counts changed by one function call which was enough to fail the low-count result tests. Replaces Connectable as the common interface between Connection and Engine with EngineEventsTarget. Engine is no longer Connectable. Connection and MockConnection still are. References: #7257 Change-Id: Iad5eba0313836d347e65490349a22b061356896a
* | Merge "Remove deprecated dialects and drivers" into mainmike bayer2021-10-3111-79/+52
|\ \
| * | Remove deprecated dialects and driversFederico Caselli2021-10-3111-79/+52
| | | | | | | | | | | | | | | Fixes: #7258 Change-Id: I3577f665eca04f2632b69bcb090f0a4ec9271db9
* | | The ``has_table`` method now also checks viewsFederico Caselli2021-10-311-0/+10
| |/ |/| | | | | | | | | | | | | | | | | | | | | The :meth:`_engine.Inspector.has_table` method will now consistently check for views of the given name as well as tables. Previously this behavior was dialect dependent, with PostgreSQL, MySQL/MariaDB and SQLite supporting it, and Oracle and SQL Server not supporting it. Third party dialects should also seek to ensure their :meth:`_engine.Inspector.has_table` method searches for views as well as tables for the given name. Fixes: #7161 Change-Id: I9e523c76741b19596c81ef577dc6f0823e44183b
* | remove ORM autocommit and public-facing subtransactions conceptMike Bayer2021-10-302-103/+15
| | | | | | | | | | | | | | | | | | In order to do LegacyRow we have to do Connection, which means we lose close_with_result (hooray) which then means we have to get rid of ORM session autocommit which relies on it, so let's do that first. Change-Id: I115f614733b1d0ba19f320ffa9a49f0d762db094
* | initial 2.0 setupMike Bayer2021-10-3011-4943/+67
|/ | | | | | | Adapted from 55e64f857daeb6057b85ff67297a774b when we previously started a 2.0 branch. Change-Id: Ib5af75df94b23104eebe0e918adcf979d798ea3b
* Merge "Modernize tests - session_query_get" into mainmike bayer2021-10-291-1/+1
|\
| * Modernize tests - session_query_getGord Thompson2021-10-281-1/+1
| | | | | | | | | | Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com> Change-Id: I92013aad471baf32df1b51b756e86d95449b5cfd
* | warnings: cascade_backrefsMike Bayer2021-10-281-0/+4
| | | | | | | | | | | | | | this one is a little different in that the thing changing is the detection of a behavior, not an explicit API. Change-Id: Id142943a2b901b39fe9053d0120c1e820dc1a6d0
* | Merge "Improve array support on pg8000" into mainmike bayer2021-10-281-0/+6
|\ \ | |/ |/|
| * Improve array support on pg8000Federico Caselli2021-10-271-0/+6
| | | | | | | | | | | | References: #6023 Change-Id: I0f6cbc34b3c0bfc0b8c86b3ebe4531e23039b6c0
* | Merge "consider "inspect(_of_type)" to be the entity of a comparator" into mainmike bayer2021-10-272-0/+12
|\ \
| * | consider "inspect(_of_type)" to be the entity of a comparatorMike Bayer2021-10-272-0/+12
| |/ | | | | | | | | | | | | | | | | | | | | Fixed 1.4 regression where :meth:`_orm.Query.filter_by` would not function correctly when :meth:`_orm.Query.join` were joined to an entity which made use of :meth:`_orm.PropComparator.of_type` to specify an aliased version of the target entity. The issue also applies to future style ORM queries constructed with :func:`_sql.select`. Fixes: #7244 Change-Id: Ied28a03ce93201f932c7172d283cd4297be4d592
* | Merge "Fixes: #4100" into mainmike bayer2021-10-271-0/+10
|\ \ | |/ |/|
| * Fixes: #4100jonathan vanasco2021-10-261-0/+10
| | | | | | | | | | | | | | | | | | | | Add a warning, in two places, stating `with_for_update` will lock joinedload tables, because at least one person did not expect the obvious to happen. Also warn that eager loading techniques may not work with `with_for_update` and combining the two is not officially supported or recommended. Change-Id: Iedd609b56b3144d90a90fc2eea3cf5335a2d178a
* | dont pull filter_by from from_obj, entity is hopefully sufficientMike Bayer2021-10-261-0/+7
|/ | | | | | | | | Fixed 1.4 regression where :meth:`_orm.Query.filter_by` would not function correctly on a :class:`_orm.Query` that was produced from :meth:`_orm.Query.union`, :meth:`_orm.Query.from_self` or similar. Fixes: #7239 Change-Id: I3a0c3fd71180b1bfb6bf855f436a29c729664082
* add sections for ORM use with UNIONMike Bayer2021-10-253-2/+184
| | | | | | | this is a fairly non-obvious part of the new ORM querying style and needs its own sections Change-Id: Iacb176020d580066c1e0b7f2b40bfbbcb3587d76
* Merge "use correct entity in path for aliased class relationship" into mainmike bayer2021-10-221-0/+15
|\
| * use correct entity in path for aliased class relationshipMike Bayer2021-10-221-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed bug in "relationship to aliased class" feature introduced at :ref:`relationship_aliased_class` where it was not possible to create a loader strategy option targeting an attribute on the target using the :func:`_orm.aliased` construct directly in a second loader option, such as ``selectinload(A.aliased_bs).joinedload(aliased_b.cs)``, without explicitly qualifying using :meth:`_orm.PropComparator.of_type` on the preceding element of the path. Additionally, targeting the non-aliased class directly would be accepted (inappropriately), but would silently fail, such as ``selectinload(A.aliased_bs).joinedload(B.cs)``; this now raises an error referring to the typing mismatch. Fixes: #7224 Change-Id: I40857c7275667dcb64f1d1fd0c8072e48758e678
* | fix: Update reserved words list of MySQL / MariaDB dialectKevin Kirsche2021-10-201-0/+11
|/ | | | | | | | | | | | | | | | | | | | | | | Reorganized the list of reserved words into two separate lists, one for MySQL and one for MariaDB, so that these diverging sets of words can be managed more accurately; adjusted the MySQL/MariaDB dialect to switch among these lists based on either explicitly configured or server-version-detected "MySQL" or "MariaDB" backend. Added all current reserved words through MySQL 8 and current MariaDB versions including recently added keywords like "lead" . Pull request courtesy Kevin Kirsche. 1. Move reserved words to it's own file. 2. Add missing reserved words from https://mariadb.com/kb/en/reserved-words/ * Note: this only adds MariaDB though links to MySQL, it also does not include the reserved words for Oracle mode, as listed in the link. Fixes: #7167 Supercedes: #7197 Closes: #7207 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/7207 Pull-request-sha: 5a682e331069520ccad9e6bf3cc5e4a77a889ef0 Change-Id: Ib25be8148568899f56b5c9b42d4f530ade8a04e3
* Version 1.4.27 placeholderMike Bayer2021-10-191-0/+4
|
* - 1.4.26rel_1_4_26Mike Bayer2021-10-1928-305/+331
|
* typo fixMike Bayer2021-10-191-5/+5
| | | | Change-Id: Ic4a334e48e652d5bd561a04cc11c35433a429188
* process bulk_update_tuples before cache key or compilationMike Bayer2021-10-191-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed regression where the use of a :class:`_orm.hybrid_property` attribute or a mapped :func:`_orm.composite` attribute as a key passed to the :meth:`_dml.Update.values` method for an ORM-enabled :class:`_dml.Update` statement, as well as when using it via the legacy :meth:`_orm.Query.update` method, would be processed for incoming ORM/hybrid/composite values within the compilation stage of the UPDATE statement, which meant that in those cases where caching occurred, subsequent invocations of the same statement would no longer receive the correct values. This would include not only hybrids that use the :meth:`_orm.hybrid_property.update_expression` method, but any use of a plain hybrid attribute as well. For composites, the issue instead caused a non-repeatable cache key to be generated, which would break caching and could fill up the statement cache with repeated statements. The :class:`_dml.Update` construct now handles the processing of key/value pairs passed to :meth:`_dml.Update.values` and :meth:`_dml.Update.ordered_values` up front when the construct is first generated, before the cache key has been generated so that the key/value pairs are processed each time, and so that the cache key is generated against the individual column/value pairs that will ultimately be used in the statement. Fixes: #7209 Change-Id: I08f248d1d60ea9690b014c21439b775d951fb9e5
* changelog updatesMike Bayer2021-10-199-35/+39
| | | | Change-Id: I527dd71eb90b7c3e9e773f7c3ba79374806ffad7
* Merge "use coercions for label element, ensure propagate_attrs" into mainmike bayer2021-10-181-0/+10
|\
| * use coercions for label element, ensure propagate_attrsMike Bayer2021-10-181-0/+10
| | | | | | | | | | | | | | | | | | | | Fixed bug where the ORM "plugin", necessary for features such as :func:`_orm.with_loader_criteria` to work correctly, would not be applied to a :func:`_sql.select` which queried from an ORM column expression if it made use of the :meth:`_sql.ColumnElement.label` modifier. Fixes: #7205 Change-Id: I72b84442e14df8b5ece33916f3c51ca3f358864b
* | Merge "vendor asynccontextmanager outside of greenlet dependency" into mainmike bayer2021-10-181-0/+6
|\ \
| * | vendor asynccontextmanager outside of greenlet dependencyMike Bayer2021-10-181-0/+6
| |/ | | | | | | | | | | | | | | | | | | | | Fixed installation issue where the ``sqlalchemy.dialects.mysql`` module would not be importable if "greenlet" were not installed. This was actually breaking the sphinx build for when greenlet were not installed. Fixes: #7204 Change-Id: Ia351c124a2f1ca44bafe20a97267ce20cb55808f
* | Add Firebolt to table of external dialects (#7206)Kevin Marr2021-10-181-0/+3
| | | | | | We recently built an external dialect for our data warehouse, Firebolt, and would like it to be listed in the documentation. Thanks!
* | Document dynamic for asyncioFederico Caselli2021-10-182-3/+16
|/ | | | | Change-Id: Ieedc748587288c30630a2453f20eb72001cb78ab (cherry picked from commit aeb61f4bb7d0b6d3d550d0206046208d6d4d7e91)
* Merge "fix with_loader_criteria for select(A).join(B)" into mainmike bayer2021-10-151-0/+8
|\
| * fix with_loader_criteria for select(A).join(B)Mike Bayer2021-10-151-0/+8
| | | | | | | | | | | | | | | | | | | | Also revise the contains_eager() note that was just added in fec2b6560c14bb28ee7f, as I mistakenly forgot that WLC also affects elements of the query that are there as part of the normal entites/criteria. Fixes: #7189 Change-Id: Ibd8a1826aaee8e91ab6704173df5fccb56b7e785
* | Merge "support bind expressions w/ expanding IN; apply to psycopg2" into mainmike bayer2021-10-151-0/+22
|\ \ | |/ |/|
| * support bind expressions w/ expanding IN; apply to psycopg2Mike Bayer2021-10-151-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed issue where "expanding IN" would fail to function correctly with datatypes that use the :meth:`_types.TypeEngine.bind_expression` method, where the method would need to be applied to each element of the IN expression rather than the overall IN expression itself. Fixed issue where IN expressions against a series of array elements, as can be done with PostgreSQL, would fail to function correctly due to multiple issues within the "expanding IN" feature of SQLAlchemy Core that was standardized in version 1.4. The psycopg2 dialect now makes use of the :meth:`_types.TypeEngine.bind_expression` method with :class:`_types.ARRAY` to portably apply the correct casts to elements. The asyncpg dialect was not affected by this issue as it applies bind-level casts at the driver level rather than at the compiler level. as part of this commit the "bind translate" feature has been simplified and also applies to the names in the POSTCOMPILE tag to accommodate for brackets. Fixes: #7177 Change-Id: I08c703adb0a9bd6f5aeee5de3ff6f03cccdccdc5
* | Fix reflection of FK against a unique indexGord Thompson2021-10-141-0/+14
|/ | | | | | | | Also implement reflection of ON DELETE, ON UPDATE as the data is right there. Fixes: #7160 Change-Id: Ifff871a8cb1d1bea235616042e16ed3b5c5f19f9
* Merge "Reflect table can reflect table with no columns" into mainmike bayer2021-10-141-0/+9
|\
| * Reflect table can reflect table with no columnsSumit Khanna2021-10-141-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The :meth:`_engine.Inspector.reflect_table` method now supports reflecting tables that do not have user defined columns. This allows :meth:`_schema.MetaData.reflect` to properly complete reflection on databases that contain such tables. Currently, only PostgreSQL is known to support such a construct among the common database backends. Fixes: #3247 Closes: #7118 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/7118 Pull-request-sha: cb8ce01957e9a1453290a7c2728af8c60ef55fa1 Change-Id: I906cebe17d13554d79086b92f3e1e51ffba3e818
* | Merge "Pickling fixes for ORM / Core" into mainmike bayer2021-10-132-0/+17
|\ \
| * | Pickling fixes for ORM / CoreMike Bayer2021-10-132-0/+17
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed regression where ORM loaded objects could not be pickled in cases where loader options making use of ``"*"`` were used in certain combinations, such as combining the :func:`_orm.joinedload` loader strategy with ``raiseload('*')`` of sub-elements. Fixes: #7134 Fixed issue where SQL queries using the :meth:`_functions.FunctionElement.within_group` construct could not be pickled, typically when using the ``sqlalchemy.ext.serializer`` extension but also for general generic pickling. Fixes: #6520 Change-Id: Ib73fd49c875e6da9898493c190f610e68b88ec72
* | Merge "Fix has_table() false negative for #temp tables" into mainmike bayer2021-10-131-0/+9
|\ \