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

Function outparam

lib/sqlalchemy/sql/_elements_constructors.py:442–454  ·  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

440
441
442def outparam(
443 key: str, type_: Optional[TypeEngine[_T]] = None
444) -> BindParameter[_T]:
445 """Create an 'OUT' parameter for usage in functions (stored procedures),
446 for databases which support them.
447
448 The ``outparam`` can be used like a regular function parameter.
449 The "output" value will be available from the
450 :class:`~sqlalchemy.engine.CursorResult` object via its ``out_parameters``
451 attribute, which returns a dictionary containing the values.
452
453 """
454 return BindParameter(key, None, type_=type_, unique=False, isoutparam=True)
455
456
457@overload

Callers 2

test_out_paramsMethod · 0.90

Calls 1

BindParameterClass · 0.85

Tested by 2

test_out_paramsMethod · 0.72