Package org.springframework.r2dbc.core
Interface StatementFilterFunction
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Represents a function that filters an
execute function.
The filter is executed when a Subscriber subscribes
to the Publisher returned by the DatabaseClient.
StatementFilterFunctions are typically used to specify additional details on
the Statement objects such as fetchSize or key generation.
- Since:
- 5.3
- Author:
- Mark Paluch, Juergen Hoeller
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StatementFilterFunctionAn emptyStatementFilterFunctionthat delegates toExecuteFunction. -
Method Summary
Modifier and TypeMethodDescriptiondefault StatementFilterFunctionandThen(StatementFilterFunction afterFilter) Return a composed filter function that first applies this filter, and then applies the given"after"filter.filter(Statement statement, ExecuteFunction next) Apply this filter to the givenStatementandExecuteFunction.
-
Field Details
-
EMPTY_FILTER
An emptyStatementFilterFunctionthat delegates toExecuteFunction.
-
-
Method Details
-
filter
Apply this filter to the givenStatementandExecuteFunction.The given
ExecuteFunctionrepresents the next entity in the chain, to be invoked viaExecuteFunction.execute(Statement)in order to proceed with the execution, or not invoked to shortcut the chain. -
andThen
Return a composed filter function that first applies this filter, and then applies the given"after"filter.- Parameters:
afterFilter- the filter to apply after this filter- Returns:
- the composed filter.
-