MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / last_updated_params

Method last_updated_params

lib/sqlalchemy/engine/cursor.py:1900–1924  ·  view source on GitHub ↗

Return the collection of updated parameters from this execution. Raises :class:`~sqlalchemy.exc.InvalidRequestError` if the executed statement is not a compiled expression construct or is not an update() construct.

(
        self,
    )

Source from the content-addressed store, hash-verified

1898 return None
1899
1900 def last_updated_params(
1901 self,
1902 ) -> Union[
1903 List[_MutableCoreSingleExecuteParams], _MutableCoreSingleExecuteParams
1904 ]:
1905 """Return the collection of updated parameters from this
1906 execution.
1907
1908 Raises :class:`~sqlalchemy.exc.InvalidRequestError` if the executed
1909 statement is not a compiled expression construct
1910 or is not an update() construct.
1911
1912 """
1913 if not self.context.compiled:
1914 raise exc.InvalidRequestError(
1915 "Statement is not a compiled expression construct."
1916 )
1917 elif not self.context.isupdate:
1918 raise exc.InvalidRequestError(
1919 "Statement is not an update() expression construct."
1920 )
1921 elif self.context.executemany:
1922 return self.context.compiled_parameters
1923 else:
1924 return self.context.compiled_parameters[0]
1925
1926 def last_inserted_params(
1927 self,

Callers 1

test_empty_accessorsMethod · 0.80

Calls

no outgoing calls

Tested by 1

test_empty_accessorsMethod · 0.64