MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / __init__

Method __init__

lib/sqlalchemy/engine/result.py:1985–2006  ·  view source on GitHub ↗
(
        self,
        cursor_metadata: ResultMetaData,
        results: Sequence[Result[Unpack[_Ts]]],
    )

Source from the content-addressed store, hash-verified

1983 rowcount: Optional[int]
1984
1985 def __init__(
1986 self,
1987 cursor_metadata: ResultMetaData,
1988 results: Sequence[Result[Unpack[_Ts]]],
1989 ):
1990 self._results = results
1991 super().__init__(
1992 cursor_metadata,
1993 itertools.chain.from_iterable(
1994 r._raw_row_iterator() for r in results
1995 ),
1996 )
1997
1998 self._unique_filter_state = results[0]._unique_filter_state
1999 self._yield_per = results[0]._yield_per
2000
2001 # going to try something w/ this in next rev
2002 self._source_supports_scalars = results[0]._source_supports_scalars
2003
2004 self._attributes = self._attributes.merge_with(
2005 *[r._attributes for r in results]
2006 )
2007
2008 def _soft_close(self, hard: bool = False, **kw: Any) -> None:
2009 for r in self._results:

Callers

nothing calls this directly

Calls 3

__init__Method · 0.45
_raw_row_iteratorMethod · 0.45
merge_withMethod · 0.45

Tested by

no test coverage detected