diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/NamedParameterUtils.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/NamedParameterUtils.java index aee35e52fcf..4d9f1141dfa 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/NamedParameterUtils.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/NamedParameterUtils.java @@ -273,9 +273,10 @@ public abstract class NamedParameterUtils { * parentheses. This allows for the use of "expression lists" in the SQL statement * like:

* {@code select id, name, state from table where (name, age) in (('John', 35), ('Ann', 50))} - *

The parameter values passed in are used to determine the number of placeholders to - * be used for a select list. Select lists should be limited to 100 or fewer elements and not be empty, - * A larger number of or empty elements is not guaranteed to be supported by the database and + *

The parameter values passed in are used to determine the number of + * placeholders to be used for a select list. Select lists should not be empty + * and should be limited to 100 or fewer elements. An empty list or a larger + * number of elements is not guaranteed to be supported by the database and * is strictly vendor-dependent. * @param parsedSql the parsed representation of the SQL statement * @param paramSource the source for named parameters @@ -460,7 +461,7 @@ public abstract class NamedParameterUtils { /** * Parse the SQL statement and locate any placeholders or named parameters. - * Named parameters are substituted for a JDBC placeholder. + *

Named parameters are substituted for a JDBC placeholder. *

This is a shortcut version of * {@link #parseSqlStatement(String)} in combination with * {@link #substituteNamedParameters(ParsedSql, SqlParameterSource)}. @@ -474,9 +475,10 @@ public abstract class NamedParameterUtils { /** * Parse the SQL statement and locate any placeholders or named parameters. - * Named parameters are substituted for a JDBC placeholder and any select list - * is expanded to the required number of placeholders. + *

Named parameters are substituted for a JDBC placeholder, and any select + * list is expanded to the required number of placeholders. *

This is a shortcut version of + * {@link #parseSqlStatement(String)} in combination with * {@link #substituteNamedParameters(ParsedSql, SqlParameterSource)}. * @param sql the SQL statement * @param paramSource the source for named parameters diff --git a/spring-r2dbc/src/main/java/org/springframework/r2dbc/core/NamedParameterUtils.java b/spring-r2dbc/src/main/java/org/springframework/r2dbc/core/NamedParameterUtils.java index 940d7bc8b3f..f6696e8d9cd 100644 --- a/spring-r2dbc/src/main/java/org/springframework/r2dbc/core/NamedParameterUtils.java +++ b/spring-r2dbc/src/main/java/org/springframework/r2dbc/core/NamedParameterUtils.java @@ -275,9 +275,10 @@ abstract class NamedParameterUtils { * and in that case the placeholders will be grouped and enclosed with parentheses. * This allows for the use of "expression lists" in the SQL statement like: * {@code select id, name, state from table where (name, age) in (('John', 35), ('Ann', 50))} - *

The parameter values passed in are used to determine the number of placeholders to - * be used for a select list. Select lists should be limited to 100 or fewer elements. - * A larger number of elements is not guaranteed to be supported by the database and + *

The parameter values passed in are used to determine the number of + * placeholders to be used for a select list. Select lists should not be empty + * and should be limited to 100 or fewer elements. An empty list or a larger + * number of elements is not guaranteed to be supported by the database and * is strictly vendor-dependent. * @param parsedSql the parsed representation of the SQL statement * @param bindMarkersFactory the bind marker factory. @@ -361,8 +362,11 @@ abstract class NamedParameterUtils { /** * Parse the SQL statement and locate any placeholders or named parameters. - * Named parameters are substituted for a native placeholder and any + *

Named parameters are substituted for a native placeholder and any * select list is expanded to the required number of placeholders. + *

This is a shortcut version of + * {@link #parseSqlStatement(String)} in combination with + * {@link #substituteNamedParameters(ParsedSql, BindMarkersFactory, BindParameterSource)}. * @param sql the SQL statement * @param bindMarkersFactory the bind marker factory * @param paramSource the source for named parameters