File tree Expand file tree Collapse file tree 2 files changed +17
-6
lines changed
spring-jdbc/src/main/java/org/springframework/jdbc/core/support Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Original file line number Diff line number Diff line change 3434 *
3535 * <p>Designed for use with {@link org.springframework.jdbc.core.JdbcTemplate}
3636 * as well as {@link org.springframework.jdbc.core.simple.JdbcClient}, to be
37- * passed in as a parameter value wrapping the target content value. Can be
38- * combined with {@link org.springframework.jdbc.core.SqlParameterValue} for
39- * specifying a SQL type, for example,
37+ * passed in as a parameter value wrapping the target content value.
38+ *
39+ * <p>Can be combined with {@link org.springframework.jdbc.core.SqlParameterValue}
40+ * for specifying a SQL type, for example,
4041 * {@code new SqlParameterValue(Types.BLOB, new SqlBinaryValue(myContent))}.
4142 * With most database drivers, the type hint is not actually necessary.
4243 *
44+ * <p>Note: Only specify {@code Types.BLOB} in case of an actual BLOB, preferring
45+ * {@code Types.LONGVARBINARY} otherwise. With PostgreSQL, {@code Types.ARRAY}
46+ * has to be specified for BYTEA columns, rather than {@code Types.BLOB}. This
47+ * is in contrast to {@link SqlLobValue} where byte array handling was lenient.
48+ *
4349 * @author Juergen Hoeller
4450 * @since 6.1.4
4551 * @see SqlCharacterValue
Original file line number Diff line number Diff line change 3333 *
3434 * <p>Designed for use with {@link org.springframework.jdbc.core.JdbcTemplate}
3535 * as well as {@link org.springframework.jdbc.core.simple.JdbcClient}, to be
36- * passed in as a parameter value wrapping the target content value. Can be
37- * combined with {@link org.springframework.jdbc.core.SqlParameterValue} for
38- * specifying a SQL type, for example,
36+ * passed in as a parameter value wrapping the target content value.
37+ *
38+ * <p>Can be combined with {@link org.springframework.jdbc.core.SqlParameterValue}
39+ * for specifying a SQL type, for example,
3940 * {@code new SqlParameterValue(Types.CLOB, new SqlCharacterValue(myContent))}.
4041 * With most database drivers, the type hint is not actually necessary.
4142 *
43+ * <p>Note: Only specify {@code Types.CLOB} in case of an actual CLOB, preferring
44+ * {@code Types.LONGVARCHAR} otherwise. This is in contrast to {@link SqlLobValue}
45+ * where char sequence handling was lenient.
46+ *
4247 * @author Juergen Hoeller
4348 * @since 6.1.4
4449 * @see SqlBinaryValue
You can’t perform that action at this time.
0 commit comments