MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / value

Method value

lib/sqlalchemy/orm/query.py:1458–1466  ·  view source on GitHub ↗

Return a scalar result corresponding to the given column expression.

(self, column: _ColumnExpressionArgument[Any])

Source from the content-addressed store, hash-verified

1456 "in combination with :meth:`_query.Query.scalar`",
1457 )
1458 def value(self, column: _ColumnExpressionArgument[Any]) -> Any:
1459 """Return a scalar result corresponding to the given
1460 column expression.
1461
1462 """
1463 try:
1464 return next(self._values_no_warn(column))[0] # type: ignore
1465 except StopIteration:
1466 return None
1467
1468 @overload
1469 def with_entities(self, _entity: _EntityType[_O]) -> Query[_O]: ...

Callers

nothing calls this directly

Calls 1

_values_no_warnMethod · 0.95

Tested by

no test coverage detected