diff --git a/spring-r2dbc/src/main/java/org/springframework/r2dbc/core/DatabaseClient.java b/spring-r2dbc/src/main/java/org/springframework/r2dbc/core/DatabaseClient.java index 3f1f28d53b..072adb7a9f 100644 --- a/spring-r2dbc/src/main/java/org/springframework/r2dbc/core/DatabaseClient.java +++ b/spring-r2dbc/src/main/java/org/springframework/r2dbc/core/DatabaseClient.java @@ -37,14 +37,14 @@ import org.springframework.r2dbc.core.binding.BindMarkersFactory; import org.springframework.util.Assert; /** - * A non-blocking, reactive client for performing database calls requests with + * A non-blocking, reactive client for performing database calls with * Reactive Streams back pressure. Provides a higher level, common API over * R2DBC client libraries. * - *
Use one of the static factory methods {@link #create(ConnectionFactory)} - * or obtain a {@link DatabaseClient#builder()} to create an instance. + *
Use the static factory method {@link #create(ConnectionFactory)} or obtain + * a {@linkplain DatabaseClient#builder() builder} to create an instance. * - * Usage example: + *
Usage example: *
* ConnectionFactory factory = …
*
@@ -52,8 +52,7 @@ import org.springframework.util.Assert;
* Mono<Actor> actor = client.sql("select first_name, last_name from t_actor")
* .map(row -> new Actor(row.get("first_name", String.class),
* row.get("last_name", String.class)))
- * .first();
- *
+ * .first();
*
* @author Mark Paluch
* @since 5.3
@@ -61,13 +60,13 @@ import org.springframework.util.Assert;
public interface DatabaseClient extends ConnectionAccessor {
/**
- * Return the {@link ConnectionFactory} that this client uses.
+ * Get the {@link ConnectionFactory} that this client uses.
* @return the connection factory
*/
ConnectionFactory getConnectionFactory();
/**
- * Specify a static {@code sql} statement to run. Contract for specifying a
+ * Specify a static {@code sql} statement to run. Contract for specifying an
* SQL call along with options leading to the execution. The SQL string can
* contain either native parameter bind markers or named parameters (e.g.
* {@literal :foo, :bar}) when {@link NamedParameterExpander} is enabled.
@@ -79,7 +78,7 @@ public interface DatabaseClient extends ConnectionAccessor {
GenericExecuteSpec sql(String sql);
/**
- * Specify a {@link Supplier SQL supplier} that provides SQL to run.
+ * Specify an {@linkplain Supplier SQL supplier} that provides SQL to run.
* Contract for specifying an SQL call along with options leading to
* the execution. The SQL string can contain either native parameter
* bind markers or named parameters (e.g. {@literal :foo, :bar}) when
@@ -99,7 +98,7 @@ public interface DatabaseClient extends ConnectionAccessor {
/**
* Create a {@code DatabaseClient} that will use the provided {@link ConnectionFactory}.
* @param factory the {@code ConnectionFactory} to use for obtaining connections
- * @return a new {@code DatabaseClient}. Guaranteed to be not {@code null}.
+ * @return a new {@code DatabaseClient}; never {@code null}
*/
static DatabaseClient create(ConnectionFactory factory) {
return new DefaultDatabaseClientBuilder().connectionFactory(factory).build();
@@ -129,14 +128,14 @@ public interface DatabaseClient extends ConnectionAccessor {
Builder connectionFactory(ConnectionFactory factory);
/**
- * Configure a {@link ExecuteFunction} to execute {@link Statement} objects.
+ * Configure an {@link ExecuteFunction} to execute {@link Statement} objects.
* @see Statement#execute()
*/
Builder executeFunction(ExecuteFunction executeFunction);
/**
* Configure whether to use named parameter expansion.
- * Defaults to {@code true}.
+ * Defaults to {@code true}.
* @param enabled {@code true} to use named parameter expansion;
* {@code false} to disable named parameter expansion
* @see NamedParameterExpander
@@ -144,7 +143,7 @@ public interface DatabaseClient extends ConnectionAccessor {
Builder namedParameters(boolean enabled);
/**
- * Configures a {@link Consumer} to configure this builder.
+ * Apply a {@link Consumer} to configure this builder.
*/
Builder apply(Consumer Can be executed with {@link org.springframework.r2dbc.core.DatabaseClient}.
*
* @author Mark Paluch
* @since 5.3
- * @param