MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / outparam

Function outparam

lib/sqlalchemy/sql/_elements_constructors.py:457–469  ·  view source on GitHub ↗

Create an 'OUT' parameter for usage in functions (stored procedures), for databases which support them. The ``outparam`` can be used like a regular function parameter. The "output" value will be available from the :class:`~sqlalchemy.engine.CursorResult` object via its ``out_paramet

(
    key: str, type_: Optional[TypeEngine[_T]] = None
)

Source from the content-addressed store, hash-verified

455
456
457def outparam(
458 key: str, type_: Optional[TypeEngine[_T]] = None
459) -> BindParameter[_T]:
460 """Create an 'OUT' parameter for usage in functions (stored procedures),
461 for databases which support them.
462
463 The ``outparam`` can be used like a regular function parameter.
464 The "output" value will be available from the
465 :class:`~sqlalchemy.engine.CursorResult` object via its ``out_parameters``
466 attribute, which returns a dictionary containing the values.
467
468 """
469 return BindParameter(key, None, type_=type_, unique=False, isoutparam=True)
470
471
472@overload

Callers 2

test_out_paramsMethod · 0.90

Calls 1

BindParameterClass · 0.85

Tested by 2

test_out_paramsMethod · 0.72