Vous avez des améliorations (ou des corrections) à proposer pour ce document :
je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.
Iterate through sub-lists of rows of the size given.
Each list will be of the size given, excluding the last list to
be yielded, which may have a small number of rows. No empty
lists will be yielded.
The result object is automatically closed when the iterator
is fully consumed.
Note that the backend driver will usually buffer the entire result
ahead of time unless the
:paramref:`.Connection.execution_options.stream_results` execution
option is used indicating that the driver should not pre-buffer
results, if possible. Not all drivers support this option and
the option is silently ignored for those who do not.
When using the ORM, the :meth:`_engine.Result.partitions` method
is typically more effective from a memory perspective when it is
combined with use of the
:ref:`yield_per execution option <orm_queryguide_yield_per>`,
which instructs both the DBAPI driver to use server side cursors,
if available, as well as instructs the ORM loading internals to only
build a certain amount of ORM objects from a result at a time before
yielding them out.
.. versionadded:: 1.4
:param size: indicate the maximum number of rows to be present
in each list yielded. If None, makes use of the value set by
the :meth:`_engine.Result.yield_per`, method, if it were called,
or the :paramref:`_engine.Connection.execution_options.yield_per`
execution option, which is equivalent in this regard. If
yield_per weren't set, it makes use of the
:meth:`_engine.Result.fetchmany` default, which may be backend
specific and not well defined.
:return: iterator of lists
.. seealso::
:ref:`engine_stream_results`
:ref:`orm_queryguide_yield_per` - in the :ref:`queryguide_toplevel`
Améliorations / Corrections
Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.
Emplacement :
Description des améliorations :