Top Description Fields Constructors Methods
org.springframework.r2dbc.core

pack-priv final Class DelegateConnectionFunction<R>

extends Object
implements ConnectionFunction<R>
Class Inheritance
All Implemented Interfaces
org.springframework.r2dbc.core.ConnectionFunction, org.springframework.r2dbc.core.SqlProvider, java.util.function.Function
Type Parameters
<R>
the type of the result of the function.
Imports
java.util.function.Function, io.r2dbc.spi.Connection, org.springframework.lang.Nullable

A ConnectionFunction that delegates to a SqlProvider and a plain Function.
Author
Simon Baslé
Since
5.3.26

Field Summary

Modifier and TypeField and Description
private final Function<Connection, R>
private final SqlProvider

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public R
apply(Connection
the function argument
t
)

Implements java.util.function.Function.apply.

Applies this function to the given argument.

public String
getSql()

Implements org.springframework.r2dbc.core.SqlProvider.getSql.

Return the SQL string for this object, i.e. typically the SQL used for creating statements.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

functionback to summary
private final Function<Connection, R> function
sqlback to summary
private final SqlProvider sql

Constructor Detail

DelegateConnectionFunctionback to summary
pack-priv DelegateConnectionFunction(SqlProvider sql, Function<Connection, R> function)

Method Detail

applyback to summary
public R apply(Connection t)

Implements java.util.function.Function.apply.

Doc from java.util.function.Function.apply.

Applies this function to the given argument.

Parameters
t:Connection

the function argument

Returns:R

the function result

Annotations
@Override
getSqlback to summary
public String getSql()

Implements org.springframework.r2dbc.core.SqlProvider.getSql.

Doc from org.springframework.r2dbc.core.SqlProvider.getSql.

Return the SQL string for this object, i.e. typically the SQL used for creating statements.

Returns:String

the SQL string, or null if not available

Annotations
@Nullable
@Override