public static interface DatabaseClient.GenericExecuteSpec
| Modifier and Type | Method and Description |
|---|---|
DatabaseClient.GenericExecuteSpec |
bind(int index,
Object value)
Bind a non-
null value to a parameter identified by its
index. |
DatabaseClient.GenericExecuteSpec |
bind(String name,
Object value)
Bind a non-
null value to a parameter identified by its name. |
DatabaseClient.GenericExecuteSpec |
bindNull(int index,
Class<?> type)
Bind a
null value to a parameter identified by its index. |
DatabaseClient.GenericExecuteSpec |
bindNull(String name,
Class<?> type)
Bind a
null value to a parameter identified by its name. |
FetchSpec<Map<String,Object>> |
fetch()
Perform the SQL call and retrieve the result by entering the execution stage.
|
default DatabaseClient.GenericExecuteSpec |
filter(Function<? super io.r2dbc.spi.Statement,? extends io.r2dbc.spi.Statement> filterFunction)
Add the given filter to the end of the filter chain.
|
DatabaseClient.GenericExecuteSpec |
filter(StatementFilterFunction filter)
Add the given filter to the end of the filter chain.
|
<R> RowsFetchSpec<R> |
map(BiFunction<io.r2dbc.spi.Row,io.r2dbc.spi.RowMetadata,R> mappingFunction)
Configure a result mapping
function and enter the execution stage. |
default <R> RowsFetchSpec<R> |
map(Function<io.r2dbc.spi.Row,R> mappingFunction)
Configure a result mapping
function and enter the execution stage. |
reactor.core.publisher.Mono<Void> |
then()
Perform the SQL call and return a
Mono that completes without result
on statement completion. |
DatabaseClient.GenericExecuteSpec bind(int index, Object value)
null value to a parameter identified by its
index. value can be either a scalar value or Parameter.index - zero based index to bind the parameter tovalue - either a scalar value or ParameterDatabaseClient.GenericExecuteSpec bindNull(int index, Class<?> type)
null value to a parameter identified by its index.index - zero based index to bind the parameter totype - the parameter typeDatabaseClient.GenericExecuteSpec bind(String name, Object value)
null value to a parameter identified by its name.name - the name of the parametervalue - the value to bindDatabaseClient.GenericExecuteSpec bindNull(String name, Class<?> type)
null value to a parameter identified by its name.name - the name of the parametertype - the parameter typedefault DatabaseClient.GenericExecuteSpec filter(Function<? super io.r2dbc.spi.Statement,? extends io.r2dbc.spi.Statement> filterFunction)
Filter functions are typically used to invoke methods on the Statement before it is executed. For example:
DatabaseClient client = …;
client.sql("SELECT book_id FROM book").filter(statement -> statement.fetchSize(100))
filterFunction - the filter to be added to the chainDatabaseClient.GenericExecuteSpec filter(StatementFilterFunction filter)
Filter functions are typically used to invoke methods on the Statement before it is executed. For example:
DatabaseClient client = …;
client.sql("SELECT book_id FROM book").filter((statement, next) -> next.execute(statement.fetchSize(100)))
filter - the filter to be added to the chaindefault <R> RowsFetchSpec<R> map(Function<io.r2dbc.spi.Row,R> mappingFunction)
function and enter the execution stage.R - the result typemappingFunction - a function that maps from Row to the result typeFetchSpec for configuration what to fetch<R> RowsFetchSpec<R> map(BiFunction<io.r2dbc.spi.Row,io.r2dbc.spi.RowMetadata,R> mappingFunction)
function and enter the execution stage.R - the result typemappingFunction - a function that maps from Row and RowMetadata
to the result typeFetchSpec for configuration what to fetchFetchSpec<Map<String,Object>> fetch()
reactor.core.publisher.Mono<Void> then()
Mono that completes without result
on statement completion.Mono ignoring its payload (actively dropping)