MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _compat_fetchone

Method _compat_fetchone

lib/sqlalchemy/dialects/mysql/base.py:3010–3020  ·  view source on GitHub ↗

Proxy a result row to smooth over MySQL-Python driver inconsistencies.

(
        self, rp: CursorResult[Unpack[TupleAny]], charset: Optional[str] = None
    )

Source from the content-addressed store, hash-verified

3008 return [_DecodingRow(row, charset) for row in rp.fetchall()]
3009
3010 def _compat_fetchone(
3011 self, rp: CursorResult[Unpack[TupleAny]], charset: Optional[str] = None
3012 ) -> Union[Row[Unpack[TupleAny]], None, _DecodingRow]:
3013 """Proxy a result row to smooth over MySQL-Python driver
3014 inconsistencies."""
3015
3016 row = rp.fetchone()
3017 if row:
3018 return _DecodingRow(row, charset)
3019 else:
3020 return None
3021
3022 def _compat_first(
3023 self, rp: CursorResult[Unpack[TupleAny]], charset: Optional[str] = None

Callers

nothing calls this directly

Calls 2

_DecodingRowClass · 0.85
fetchoneMethod · 0.45

Tested by

no test coverage detected