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
ExecuteFunction
.
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
Modifier and TypeFieldDescriptionstatic final StatementFilterFunction
An emptyStatementFilterFunction
that delegates toExecuteFunction
. -
Method Summary
Modifier and TypeMethodDescriptiondefault StatementFilterFunction
andThen
(StatementFilterFunction afterFilter) Return a composed filter function that first applies this filter and then applies the givenafterFilter
.filter
(Statement statement, ExecuteFunction next) Apply this filter to the givenStatement
andExecuteFunction
.
-
Field Details
-
EMPTY_FILTER
An emptyStatementFilterFunction
that delegates toExecuteFunction
.
-
-
Method Details
-
filter
Apply this filter to the givenStatement
andExecuteFunction
.The given
ExecuteFunction
represents the next entity in the chain, to be invoked viaExecuteFunction.execute(Statement)
in order to proceed with the execution, or not invoked to short-circuit the chain. -
andThen
Return a composed filter function that first applies this filter and then applies the givenafterFilter
.- Parameters:
afterFilter
- the filter to apply after this filter- Returns:
- the composed filter.
-