| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Fixes: #6967
Change-Id: I222cb5bdedf572e734c827d72bcbced202cdd62f
|
|
|
|
|
|
|
|
|
|
|
|
| |
while I dont like this approach very much, people will likely
be asking for it a lot, so represent the most correct and
efficient form we can handle right now.
Added missing ``**kw`` arguments to the
:meth:`_asyncio.AsyncSession.connection` method.
Change-Id: Idadae2a02a4d96ecb96a5723ce64d017ab4c6217
References: https://github.com/sqlalchemy/sqlalchemy/discussions/6965
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixed issue where an engine that had ``implicit_returning`` set to False
would fail to function when PostgreSQL's "fast insertmany" feature were
used in conjunction with a ``Sequence``, as well as if any kind of
"executemany" with "return_defaults()" were used in conjunction with a
``Sequence``. Note that PostgreSQL "fast insertmany" uses "RETURNING" by
definition, when the SQL statement is passed to the driver; overall, the
``implicit_returning`` flag is legacy and has no real use in modern
SQLAlchemy, and will be deprecated in a separate change.
Fixes: #6963
Change-Id: Id8e3dd50a21b9124f338067b0fdb57b8f608dca8
|
|
|
|
|
|
|
|
|
|
| |
1798c3cf1c added __slots__ to the base which then
caused af0824fd79 to fail. as we can't use an assignable
class variable with slots, remove slots from AsyncSession
which is how this class was working anyway.
Fixes: #6967
Change-Id: I4e0adab923db8e77cf748a8728e253258838e8f1
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The :class:`_asyncio.AsyncSession` now supports overriding which
:class:`_orm.Session` it uses as the proxied instance. A custom ``Session``
class can be passed using the :paramref:`.AsyncSession.sync_session_class`
parameter or by subclassing the ``AsyncSession`` and specifying a custom
:attr:`.AsyncSession.sync_session_class`.
Fixes: #6689
Change-Id: Idf9c24eae6c9f4e2fff292ed748feaa449a8deaa
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| | |
Provide better error message when trying to insepct and async engine
or asnyc connection.
Change-Id: I907f3a22c6b76fe43df9d40cb0e69c57f74a7982
|
|/
|
|
|
|
|
|
|
| |
Fixed bug where the error message for SQLite invalid isolation level on the
pysqlite driver would fail to indicate that "AUTOCOMMIT" is one of the
valid isolation levels.
Change-Id: Icbceab9a28af6a560859761fa92320b5473269a9
References: #6959
|
|
|
|
|
| |
Change-Id: I7b35bc86a7b78f96d8006515341f7cc7a6b49dcc
References: https://github.com/python/typing/issues/865
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Fixed issue where mypy plugin would crash when interpreting a
``query_expression()`` construct.
Fixes: #6950
Change-Id: Ic1f28d135bf6eb05c92061430c0d5a3663b804ef
|
|/
|
|
|
|
|
|
|
|
| |
Fixed a bug in :meth:`_asyncio.AsyncSession.execute` and
:meth:`_asyncio.AsyncSession.stream` that required ``execution_options``
to be an instance of ``immutabledict`` when defined. It now
correctly accepts any mapping.
Fixes: #6943
Change-Id: Ic09de480dc2da1b0bdce25acb60b8f01371971f9
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixed issue in mypy plugin where columns on a mixin would not be correctly
interpreted if the mapped class relied upon a ``__tablename__`` routine
that came from a superclass.
Fixes: #6937
Change-Id: I74aed4862d0545008ee67f781aaa794ab6866926
|
|\ \
| | |
| | |
| | | |
2999/I5609025feee8cfdecc09b55bfbf1bd13fa2e6602)"
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
(redo of 2999/I5609025feee8cfdecc09b55bfbf1bd13fa2e6602)
This PR is designed to bring more clarity within the docs by renaming object
instances that may be consfusingly similar to class, method, and attribute names.
For example, instances of the class `MetaData` are available on some objects as
`.metadata` property, and had appeared within the docs as both `meta` and
`metadata` which has confused some users in the past. By this PR, the docs now
utilize the following naming convention:
* MetaData - SQLAlchemy class
* .metadata - SQLAlchemy API attributes
* metadata_obj - developer instantiated metadata objects or references
Detailed Changes:
* standardized `meta` and `metadata` instances to `metadata_obj`. note: the docs were evenly split between 'meta' and 'metadata'.
* standardized 'cursor' to 'cursor_obj' to avoid confusion with the method.
* standardized a 'scalar_subquery = ' to 'scalar_subq' to avoid confusion with the method.
* standardized a 'cte = ' to 'cte_obj' to avoid confusion with the method
Change-Id: I79c98aee16c5fc6649289b2dd7d6dfc368222fb4
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Fixes: #6912
Closes: #6920
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/6920
Pull-request-sha: 79af75dfddef25435afd9623698354d280d7c879
Change-Id: Ib6b472452f978378d9f511d17a26988323a89459
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Fixes: #6915
Closes: #6916
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/6916
Pull-request-sha: 6ec484d3d14b7dd7053d10a5d550bd74eb524c8b
Change-Id: I2c87fbed44870110e35a69ee9a9e678671eeb8f0
|
| |_|_|/
|/| | |
| | | | |
Change-Id: I67d593caf9d35371f49cfcb5472cb9c72d4b4bbd
|
|/ / /
| | |
| | |
| | | |
Change-Id: If7db5206ab4fdb04ceec9875c641c8c9eadc7849
|
| |/
|/| |
|
| |
| |
| |
| |
| | |
Fixes: #6910
Change-Id: I9986566e1195d42ad7e9a01f0f84ef2074576257
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Deprecate usage of :class:`_orm.scoped_session` with asyncio drivers.
When using Asyncio the :class:`_asyncio.async_scoped_session` should
be used instead.
Fixes: #6746
Change-Id: I540d57a406f59efc37fc61f0e9dfe03f32fe2904
|
|\ \ \ |
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fixed issue where the ability of the
:meth:`_engine.ConnectionEvents.before_execute` method to alter the SQL
statement object passed, returning the new object to be invoked, was
inadvertently removed. This behavior has been restored.
The refactor in a1939719a652774a437f69f8d4788b3f08650089 removed this
feature for some reason and there were no tests in place to detect
it. I don't see any indication this was planned.
Fixes: #6913
Change-Id: Ia77ca08aa91ab9403f19a8eb61e2a0e41aad138a
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Fixed issue in recently repaired ``Query.with_entities()`` method where the
flag that determines automatic uniquing for legacy ORM ``Query`` objects
only would be set to ``True`` inappropriately in cases where the
``with_entities()`` call would be setting the ``Query`` to return
column-only rows, which are not uniqued.
Fixes: #6924
Change-Id: I81120823914c989bb7a4d13ef2ec08809d8e5a4d
|
|/ / /
| | |
| | |
| | | |
Change-Id: I670d779a2103b3060c7eacb79cb4a803e3ecaadd
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
this flag is not relevant for ORM internals
anymore and is overall legacy.
Change-Id: I58ef7870881ff00b88d552af5eae6af11be6026c
|
|/ /
| |
| |
| |
| | |
Fixes: #6914
Change-Id: I5de9843dd3723c017b94b705fc009b883737ede1
|
|\ \
| | |
| | |
| | | |
Change-Id: I73287795fdf0caafc8b29b1d837419e88ba15fe4
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Summary:
Reading [1 sqlalchemy.future.Engine](https://docs.sqlalchemy.org/en/14/core/future.html#sqlalchemy.future.Engine) and [2 sqlalchemy.create_engine](https://docs.sqlalchemy.org/en/14/core/engines.html#sqlalchemy.create_engine). I fond @ should be used between pass & host.
Test Plan:
I checked with sqlalchemy 1.4.22 locally and I think @ should be used.
|
|\ \ \
| |/ /
|/| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Added a CAST(VARCHAR2(128)) to the "table name", "owner", and other
DDL-name parameters as used in reflection queries against Oracle system
views such as ALL_TABLES, ALL_TAB_CONSTRAINTS, etc to better enable
indexing to take place against these columns, as they previously would be
implicitly handled as NVARCHAR2 due to Python's use of Unicode for strings;
these columns are documented in all Oracle versions as being VARCHAR2 with
lengths varying from 30 to 128 characters depending on server version.
Additionally, test support has been enabled for Unicode-named DDL
structures against Oracle databases.
Fixes: #4486
Change-Id: I2787e3f8de1f656318692bd535d6a7f1cef1a841
|
| | | |
|
| | | |
|
|/ /
| |
| |
| | |
Change-Id: I7c9a6abb85206c56423cfe70d807fc81ae89117e
|
| |
| |
| |
| |
| |
| |
| |
| | |
the change from lambdas in loader strategies as well
as the repair to caching for the Bundle construct has caused
a slight callcount bump.
Change-Id: I0b160c4a71efdb716f15ac3c128a8addbe10850d
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Revised the means by which the
:attr:`_orm.ORMExecuteState.user_defined_options` accessor receives
:class:`_orm.UserDefinedOption` and related option objects from the
context, with particular emphasis on the "selectinload" on the loader
strategy where this previously was not working; other strategies did not
have this problem. The objects that are associated with the current query
being executed, and not that of a query being cached, are now propagated
unconditionally. This essentially separates them out from the "loader
strategy" options which are explicitly associated with the compiled state
of a query and need to be used in relation to the cached query.
The effect of this fix is that a user-defined option, such as those used
by the dogpile.caching example as well as for other recipes such as
defining a "shard id" for the horizontal sharing extension, will be
correctly propagated to eager and lazy loaders regardless of whether
a cached query was ultimately invoked.
Fixes: #6887
Change-Id: Ieaae5b01c85de26ea732ebd625e6e5823a470492
|
|\ \ \
| |/ / |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fixed issue in :func:`_orm.selectinload` where use of the new
:meth:`_orm.PropComparator.and_` feature within options that were nested
more than one level deep would fail to update bound parameter values that
were in the nested criteria, as a side effect of SQL statement caching.
Implementation adds a new step that rewrites the parameters
inside of all _extra_criteria when invoking selectinload
as well as subqueryload. Additionally, changed how Load()
gets "extra_criteria", in that it pulls it from
UnboundLoad._extra_criteria instead of re-fetching it from the
path elements, which are not updated by this new step.
This patch also builds upon the removal of lambda queries
for use in loader strategies in #6889. lambdas made this issue
much more difficult to diagnose. An attempt to reintroduce
lambdas here after finally identifying the "extra_criteria"
issue above showed that lambdas still impact the
assertsql fixture, meaning we have a statement structure that
upon calling .compile() still delivers stale data due to lambdas,
even if caching is turned off, and the non-cached test was still
failing due to stale data within the lambdas.
This is basically the complexity that #6889 fixes and as there's
no real performance gain to using lambdas in these strategies
on top of the existing statement caching that does most of the
work, it should be much less likely going forward to have as many
deeply confusing issues as we've had within selectinload/lazyload
in the 1.4 series.
Fixes: #6881
Change-Id: I919c079d2ed06125def5f8d6d81f3f305e158c04
|
|\ \ \
| |/ /
|/| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fixed issue in lambda caching system where an element of a query that
produces no cache key, like a custom option or clause element, would still
populate the expression in the "lambda cache" inappropriately.
This was discovered as part of :ticket:`6887` but is a separate
issue.
References: #6887
Change-Id: I1665f4320254ddc63a0abf3088e9daeaffbd1840
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Adjusted ORM loader internals to no longer use the "lambda caching" system
that was added in 1.4, as well as repaired one location that was still
using the previous "baked query" system for a query. The lambda caching
system remains an effective way to reduce the overhead of building up
queries that have relatively fixed usage patterns. In the case of loader
strategies, the queries used are responsible for moving through lots of
arbitrary options and criteria, which is both generated and sometimes
consumed by end-user code, that make the lambda cache concept not any more
efficient than not using it, at the cost of more complexity. In particular
the problems noted by :ticket:`6881` and :ticket:`6887` are made
considerably less complicated by removing this feature internally.
Fixed an issue where the :class:`_orm.Bundle` construct would not create
proper cache keys, leading to inefficient use of the query cache. This
had some impact on the "selectinload" strategy and was identified as
part of :ticket:`6889`.
Added a Select._create_raw_select() method which essentially
performs ``__new__`` and then populates ``__dict__`` directly,
with no coercions. This saves most of the overhead time that
the lambda caching system otherwise seeks to avoid.
Includes removal of bakedquery from
mapper->_subclass_load_via_in() which was overlooked from
the 1.4 refactor.
Fixes: #6079
Fixes: #6889
Change-Id: Ieac2d9d709b71ec4270e5c121fbac6ac870e2bb1
|
|\ \ |
|