MCPcopy
hub / github.com/psycopg/psycopg / nextset

Method nextset

psycopg/psycopg/_cursor_base.py:161–173  ·  view source on GitHub ↗

Move to the result set of the next query executed through `executemany()` or to the next result set if `execute()` returned more than one. Return `!True` if a new result is available, which will be the one methods `!fetch*()` will operate on.

(self)

Source from the content-addressed store, hash-verified

159 pass
160
161 def nextset(self) -> bool | None:
162 """
163 Move to the result set of the next query executed through `executemany()`
164 or to the next result set if `execute()` returned more than one.
165
166 Return `!True` if a new result is available, which will be the one
167 methods `!fetch*()` will operate on.
168 """
169 if self._iresult < len(self._results) - 1:
170 self._select_current_result(self._iresult + 1)
171 return True
172 else:
173 return None
174
175 @property
176 def statusmessage(self) -> str | None:

Callers 15

test_nextsetMethod · 0.80
test_dict_rowFunction · 0.80
test_namedtuple_rowFunction · 0.80
test_nextsetFunction · 0.80
test_nextsetFunction · 0.80
test_executemanyFunction · 0.80
test_execute_nextsetFunction · 0.80
test_execute_sequenceFunction · 0.80

Calls 1

Tested by 15

test_nextsetMethod · 0.64
test_dict_rowFunction · 0.64
test_namedtuple_rowFunction · 0.64
test_nextsetFunction · 0.64
test_nextsetFunction · 0.64
test_executemanyFunction · 0.64
test_execute_nextsetFunction · 0.64
test_execute_sequenceFunction · 0.64