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

Method select

lib/sqlalchemy/orm/writeonly.py:583–593  ·  view source on GitHub ↗

Produce a :class:`_sql.Select` construct that represents the rows within this instance-local :class:`_orm.WriteOnlyCollection`.

(self)

Source from the content-addressed store, hash-verified

581 )
582
583 def select(self) -> Select[Tuple[_T]]:
584 """Produce a :class:`_sql.Select` construct that represents the
585 rows within this instance-local :class:`_orm.WriteOnlyCollection`.
586
587 """
588 stmt = select(self.attr.target_mapper).where(*self._where_criteria)
589 if self._from_obj:
590 stmt = stmt.select_from(*self._from_obj)
591 if self._order_by_clauses:
592 stmt = stmt.order_by(*self._order_by_clauses)
593 return stmt
594
595 def insert(self) -> Insert:
596 """For one-to-many collections, produce a :class:`_dml.Insert` which

Callers 7

_subclass_load_via_inMethod · 0.45
polymorphic_unionFunction · 0.45
refreshMethod · 0.45
_get_implMethod · 0.45

Calls 4

selectFunction · 0.90
whereMethod · 0.45
select_fromMethod · 0.45
order_byMethod · 0.45

Tested by

no test coverage detected