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> filter)
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 - must not be null. Can be 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 - must not be nullDatabaseClient.GenericExecuteSpec bind(String name, Object value)
null value to a parameter identified by its name.name - must not be null or emptyvalue - must not be nullDatabaseClient.GenericExecuteSpec bindNull(String name, Class<?> type)
null value to a parameter identified by its name.name - must not be null or emptytype - must not be nulldefault DatabaseClient.GenericExecuteSpec filter(Function<? super io.r2dbc.spi.Statement,? extends io.r2dbc.spi.Statement> 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 -> statement.fetchSize(100))
filter - 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 - result type.mappingFunction - must not be nullFetchSpec for configuration what to fetch. Guaranteed to be not null.<R> RowsFetchSpec<R> map(BiFunction<io.r2dbc.spi.Row,io.r2dbc.spi.RowMetadata,R> mappingFunction)
function and enter the execution stage.R - result type.mappingFunction - must not be nullFetchSpec for configuration what to fetch. Guaranteed to be not null.FetchSpec<Map<String,Object>> fetch()
reactor.core.publisher.Mono<Void> then()
Mono that completes without result on statement completion.Mono ignoring its payload (actively dropping).