API refactor
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-10-07 16:25:52 +09:00
parent 76d0d86211
commit 91c7e04474
1171 changed files with 81940 additions and 44117 deletions

View File

@@ -1,5 +1,5 @@
# orm/dynamic.py
# Copyright (C) 2005-2023 the SQLAlchemy authors and contributors
# Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
@@ -161,10 +161,12 @@ class AppenderMixin(AbstractCollectionWriter[_T]):
return result.IteratorResult(
result.SimpleResultMetaData([self.attr.class_.__name__]),
self.attr._get_collection_history( # type: ignore[arg-type]
attributes.instance_state(self.instance),
PassiveFlag.PASSIVE_NO_INITIALIZE,
).added_items,
iter(
self.attr._get_collection_history(
attributes.instance_state(self.instance),
PassiveFlag.PASSIVE_NO_INITIALIZE,
).added_items
),
_source_supports_scalars=True,
).scalars()
else:
@@ -172,8 +174,7 @@ class AppenderMixin(AbstractCollectionWriter[_T]):
if TYPE_CHECKING:
def __iter__(self) -> Iterator[_T]:
...
def __iter__(self) -> Iterator[_T]: ...
def __getitem__(self, index: Any) -> Union[_T, List[_T]]:
sess = self.session