MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / value

Method value

lib/sqlalchemy/orm/query.py:1471–1479  ·  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

1469 "in combination with :meth:`_query.Query.scalar`",
1470 )
1471 def value(self, column: _ColumnExpressionArgument[Any]) -> Any:
1472 """Return a scalar result corresponding to the given
1473 column expression.
1474
1475 """
1476 try:
1477 return next(self._values_no_warn(column))[0] # type: ignore
1478 except StopIteration:
1479 return None
1480
1481 @overload
1482 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