MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _execute_on_scalar

Method _execute_on_scalar

lib/sqlalchemy/sql/elements.py:539–553  ·  view source on GitHub ↗

an additional hook for subclasses to provide a different implementation for connection.scalar() vs. connection.execute(). .. versionadded:: 2.0

(
        self,
        connection: Connection,
        distilled_params: _CoreMultiExecuteParams,
        execution_options: CoreExecuteOptionsParameter,
    )

Source from the content-addressed store, hash-verified

537 raise exc.ObjectNotExecutableError(self)
538
539 def _execute_on_scalar(
540 self,
541 connection: Connection,
542 distilled_params: _CoreMultiExecuteParams,
543 execution_options: CoreExecuteOptionsParameter,
544 ) -> Any:
545 """an additional hook for subclasses to provide a different
546 implementation for connection.scalar() vs. connection.execute().
547
548 .. versionadded:: 2.0
549
550 """
551 return self._execute_on_connection(
552 connection, distilled_params, execution_options
553 ).scalar()
554
555 def _get_embedded_bindparams(self) -> Sequence[BindParameter[Any]]:
556 """Return the list of :class:`.BindParameter` objects embedded in the

Callers

nothing calls this directly

Calls 2

scalarMethod · 0.45

Tested by

no test coverage detected