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 34
34
*
35
35
* <p>Designed for use with {@link org.springframework.jdbc.core.JdbcTemplate}
36
36
* 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,
40
41
* {@code new SqlParameterValue(Types.BLOB, new SqlBinaryValue(myContent))}.
41
42
* With most database drivers, the type hint is not actually necessary.
42
43
*
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
+ *
43
49
* @author Juergen Hoeller
44
50
* @since 6.1.4
45
51
* @see SqlCharacterValue
Original file line number Diff line number Diff line change 33
33
*
34
34
* <p>Designed for use with {@link org.springframework.jdbc.core.JdbcTemplate}
35
35
* 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,
39
40
* {@code new SqlParameterValue(Types.CLOB, new SqlCharacterValue(myContent))}.
40
41
* With most database drivers, the type hint is not actually necessary.
41
42
*
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
+ *
42
47
* @author Juergen Hoeller
43
48
* @since 6.1.4
44
49
* @see SqlBinaryValue
You can’t perform that action at this time.
0 commit comments