MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / params

Method params

lib/sqlalchemy/orm/query.py:1867–1882  ·  view source on GitHub ↗

r"""Add values for bind parameters which may have been specified in filter(). Parameters may be specified using \**kwargs, or optionally a single dictionary as the first positional argument. The reason for both is that \**kwargs is convenient, however some parameter

(
        self, __params: Optional[Dict[str, Any]] = None, /, **kw: Any
    )

Source from the content-addressed store, hash-verified

1865
1866 @_generative
1867 def params(
1868 self, __params: Optional[Dict[str, Any]] = None, /, **kw: Any
1869 ) -> Self:
1870 r"""Add values for bind parameters which may have been
1871 specified in filter().
1872
1873 Parameters may be specified using \**kwargs, or optionally a single
1874 dictionary as the first positional argument. The reason for both is
1875 that \**kwargs is convenient, however some parameter dictionaries
1876 contain unicode keys in which case \**kwargs cannot be used.
1877
1878 """
1879 if __params:
1880 kw.update(__params)
1881 self._params = self._params.union(kw)
1882 return self
1883
1884 def where(self, *criterion: _ColumnExpressionArgument[bool]) -> Self:
1885 """A synonym for :meth:`.Query.filter`.

Callers 15

_loadMethod · 0.45
statementMethod · 0.45
_all_paramsMethod · 0.45
test_compile_paramsMethod · 0.45
test_plain_selectMethod · 0.45
test_unionMethod · 0.45
test_textMethod · 0.45
test_bindsMethod · 0.45
test_cloned_aliasMethod · 0.45
test_unionMethod · 0.45

Calls 2

updateMethod · 0.45
unionMethod · 0.45

Tested by 15

test_compile_paramsMethod · 0.36
test_plain_selectMethod · 0.36
test_unionMethod · 0.36
test_textMethod · 0.36
test_bindsMethod · 0.36
test_cloned_aliasMethod · 0.36
test_unionMethod · 0.36