rewind this result back to the given rowset. this is used internally for the case where an :class:`.Insert` construct combines the use of :meth:`.Insert.return_defaults` along with the "supplemental columns" feature.
(self, rows: Any)
| 1963 | return clone |
| 1964 | |
| 1965 | def _rewind(self, rows: Any) -> Self: |
| 1966 | """rewind this result back to the given rowset. |
| 1967 | |
| 1968 | this is used internally for the case where an :class:`.Insert` |
| 1969 | construct combines the use of |
| 1970 | :meth:`.Insert.return_defaults` along with the |
| 1971 | "supplemental columns" feature. |
| 1972 | |
| 1973 | """ |
| 1974 | |
| 1975 | if self._echo: |
| 1976 | self.context.connection._log_debug( |
| 1977 | "CursorResult rewound %d row(s)", len(rows) |
| 1978 | ) |
| 1979 | |
| 1980 | # the rows given are expected to be Row objects, so we |
| 1981 | # have to clear out processors which have already run on these |
| 1982 | # rows |
| 1983 | self._metadata = cast( |
| 1984 | CursorResultMetaData, self._metadata |
| 1985 | )._remove_processors() |
| 1986 | |
| 1987 | self.cursor_strategy = FullyBufferedCursorFetchStrategy( |
| 1988 | None, |
| 1989 | # TODO: if these are Row objects, can we save on not having to |
| 1990 | # re-make new Row objects out of them a second time? is that |
| 1991 | # what's actually happening right now? maybe look into this |
| 1992 | initial_buffer=rows, |
| 1993 | ) |
| 1994 | self._reset_memoizations() |
| 1995 | return self |
| 1996 | |
| 1997 | @property |
| 1998 | def returned_defaults(self) -> Optional[Row[Any]]: |
no test coverage detected