MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / construct_expanded_state

Method construct_expanded_state

lib/sqlalchemy/sql/compiler.py:1886–1907  ·  view source on GitHub ↗

Return a new :class:`.ExpandedState` for a given parameter set. For queries that use "expanding" or other late-rendered parameters, this method will provide for both the finalized SQL string as well as the parameters that would be used for a particular parameter set.

(
        self,
        params: Optional[_CoreSingleExecuteParams] = None,
        escape_names: bool = True,
    )

Source from the content-addressed store, hash-verified

1884 return self
1885
1886 def construct_expanded_state(
1887 self,
1888 params: Optional[_CoreSingleExecuteParams] = None,
1889 escape_names: bool = True,
1890 ) -> ExpandedState:
1891 """Return a new :class:`.ExpandedState` for a given parameter set.
1892
1893 For queries that use "expanding" or other late-rendered parameters,
1894 this method will provide for both the finalized SQL string as well
1895 as the parameters that would be used for a particular parameter set.
1896
1897 .. versionadded:: 2.0.0rc1
1898
1899 """
1900 parameters = self.construct_params(
1901 params,
1902 escape_names=escape_names,
1903 _no_postcompile=True,
1904 )
1905 return self._process_parameters_for_postcompile(
1906 parameters,
1907 )
1908
1909 def construct_params(
1910 self,

Calls 2

construct_paramsMethod · 0.95