Return at most one object or raise an exception. Equivalent to :meth:`_engine.Result.one_or_none` except that scalar values, rather than :class:`_engine.Row` objects, are returned.
(self)
| 1399 | ) |
| 1400 | |
| 1401 | def one_or_none(self) -> Optional[_R]: |
| 1402 | """Return at most one object or raise an exception. |
| 1403 | |
| 1404 | Equivalent to :meth:`_engine.Result.one_or_none` except that |
| 1405 | scalar values, rather than :class:`_engine.Row` objects, |
| 1406 | are returned. |
| 1407 | |
| 1408 | """ |
| 1409 | return self._only_one_row( |
| 1410 | raise_for_second_row=True, raise_for_none=False, scalar=False |
| 1411 | ) |
| 1412 | |
| 1413 | def one(self) -> _R: |
| 1414 | """Return exactly one object or raise an exception. |
nothing calls this directly
no test coverage detected