MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / all

Method all

lib/sqlalchemy/orm/query.py:2689–2711  ·  view source on GitHub ↗

Return the results represented by this :class:`_query.Query` as a list. This results in an execution of the underlying SQL statement. .. warning:: The :class:`_query.Query` object, when asked to return either a sequence or iterator that consists of fu

(self)

Source from the content-addressed store, hash-verified

2687 return self
2688
2689 def all(self) -> List[_T]:
2690 """Return the results represented by this :class:`_query.Query`
2691 as a list.
2692
2693 This results in an execution of the underlying SQL statement.
2694
2695 .. warning:: The :class:`_query.Query` object,
2696 when asked to return either
2697 a sequence or iterator that consists of full ORM-mapped entities,
2698 will **deduplicate entries based on primary key**. See the FAQ for
2699 more details.
2700
2701 .. seealso::
2702
2703 :ref:`faq_query_deduplicating`
2704
2705 .. seealso::
2706
2707 :meth:`_engine.Result.all` - v2 comparable method.
2708
2709 :meth:`_engine.Result.scalars` - v2 comparable method.
2710 """
2711 return self._iter().all() # type: ignore
2712
2713 @_generative
2714 @_assertions(_no_clauseelement_condition)

Callers 15

do_recover_twophaseMethod · 0.45
get_schema_namesMethod · 0.45
_get_table_oidsMethod · 0.45
prepare_for_drop_tablesFunction · 0.45
AllFunction · 0.45
_get_synonymsMethod · 0.45
_get_all_objectsMethod · 0.45
_purge_recyclebinFunction · 0.45
get_foreign_keysMethod · 0.45
get_table_namesMethod · 0.45

Calls 1

_iterMethod · 0.95

Tested by 15

test_tuplesMethod · 0.36
test_windowMethod · 0.36
test_bitwiseMethod · 0.36
goMethod · 0.36
test_update_returningMethod · 0.36
test_delete_returningMethod · 0.36
test_empty_insertMethod · 0.36