Skip to content

Commit f7bf243

Browse files
committed
Clarify IN clause resolution with List/Iterable parameter
Closes gh-31228
1 parent 40678bb commit f7bf243

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

src/docs/asciidoc/data-access.adoc

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6035,18 +6035,17 @@ The following example shows how to create and insert a BLOB:
60356035
<2> Using the method `setClobAsCharacterStream` to pass in the contents of the CLOB.
60366036
<3> Using the method `setBlobAsBinaryStream` to pass in the contents of the BLOB.
60376037

6038-
60396038
[NOTE]
60406039
====
60416040
If you invoke the `setBlobAsBinaryStream`, `setClobAsAsciiStream`, or
60426041
`setClobAsCharacterStream` method on the `LobCreator` returned from
6043-
`DefaultLobHandler.getLobCreator()`, you can optionally specify a negative value for the
6044-
`contentLength` argument. If the specified content length is negative, the
6042+
`DefaultLobHandler.getLobCreator()`, you can optionally specify a negative value
6043+
for the `contentLength` argument. If the specified content length is negative, the
60456044
`DefaultLobHandler` uses the JDBC 4.0 variants of the set-stream methods without a
60466045
length parameter. Otherwise, it passes the specified length on to the driver.
60476046
6048-
See the documentation for the JDBC driver you use to verify that it supports streaming a
6049-
LOB without providing the content length.
6047+
See the documentation for the JDBC driver you use to verify that it supports streaming
6048+
a LOB without providing the content length.
60506049
====
60516050

60526051
Now it is time to read the LOB data from the database. Again, you use a `JdbcTemplate`
@@ -6093,15 +6092,15 @@ variable list of values. A typical example would be `select * from t_actor where
60936092
JDBC standard. You cannot declare a variable number of placeholders. You need a number
60946093
of variations with the desired number of placeholders prepared, or you need to generate
60956094
the SQL string dynamically once you know how many placeholders are required. The named
6096-
parameter support provided in the `NamedParameterJdbcTemplate` and `JdbcTemplate` takes
6097-
the latter approach. You can pass in the values as a `java.util.List` of primitive objects. This
6098-
list is used to insert the required placeholders and pass in the values during
6099-
statement execution.
6100-
6101-
NOTE: Be careful when passing in many values. The JDBC standard does not guarantee that you
6102-
can use more than 100 values for an `in` expression list. Various databases exceed this
6103-
number, but they usually have a hard limit for how many values are allowed. For example, Oracle's
6104-
limit is 1000.
6095+
parameter support provided in the `NamedParameterJdbcTemplate` takes the latter approach.
6096+
You can pass in the values as a `java.util.List` (or any `Iterable`) of simple values.
6097+
This list is used to insert the required placeholders into the actual SQL statement
6098+
and pass in the values during statement execution.
6099+
6100+
NOTE: Be careful when passing in many values. The JDBC standard does not guarantee that
6101+
you can use more than 100 values for an `IN` expression list. Various databases exceed
6102+
this number, but they usually have a hard limit for how many values are allowed.
6103+
For example, Oracle's limit is 1000.
61056104

61066105
In addition to the primitive values in the value list, you can create a `java.util.List`
61076106
of object arrays. This list can support multiple expressions being defined for the `in`

0 commit comments

Comments
 (0)