MCPcopy Index your code
hub / github.com/sqlalchemy/sqlalchemy / NoCursorDMLFetchStrategy

Class NoCursorDMLFetchStrategy

lib/sqlalchemy/engine/cursor.py:1213–1231  ·  view source on GitHub ↗

Cursor strategy for a DML result that has no open cursor. This is a result set that does not return rows, i.e. for an INSERT, UPDATE, DELETE that does not include RETURNING.

Source from the content-addressed store, hash-verified

1211
1212
1213class NoCursorDMLFetchStrategy(NoCursorFetchStrategy):
1214 """Cursor strategy for a DML result that has no open cursor.
1215
1216 This is a result set that does not return rows, i.e. for an INSERT,
1217 UPDATE, DELETE that does not include RETURNING.
1218
1219 """
1220
1221 __slots__ = ()
1222
1223 def _non_result(
1224 self,
1225 result: CursorResult[Unpack[TupleAny]],
1226 default: Any,
1227 err: Optional[BaseException] = None,
1228 ) -> Any:
1229 # we only expect to have a _NoResultMetaData() here right now.
1230 assert not result._metadata.returns_rows
1231 result._metadata._we_dont_return_rows(err) # type: ignore[union-attr]
1232
1233
1234_NO_CURSOR_DML = NoCursorDMLFetchStrategy()

Callers 1

cursor.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected