MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / fetchone

Method fetchone

lib/sqlalchemy/engine/cursor.py:1277–1289  ·  view source on GitHub ↗
(
        self,
        result: CursorResult[Any],
        dbapi_cursor: DBAPICursor,
        hard_close: bool = False,
    )

Source from the content-addressed store, hash-verified

1275 )
1276
1277 def fetchone(
1278 self,
1279 result: CursorResult[Any],
1280 dbapi_cursor: DBAPICursor,
1281 hard_close: bool = False,
1282 ) -> Any:
1283 try:
1284 row = dbapi_cursor.fetchone()
1285 if row is None:
1286 result._soft_close(hard=hard_close)
1287 return row
1288 except BaseException as e:
1289 self.handle_exception(result, dbapi_cursor, e)
1290
1291 def fetchmany(
1292 self,

Callers

nothing calls this directly

Calls 3

handle_exceptionMethod · 0.95
fetchoneMethod · 0.45
_soft_closeMethod · 0.45

Tested by

no test coverage detected