@@ -506,20 +506,23 @@ <T> List<T> queryForList(String sql, Map<String, ?> paramMap, Class<T> elementTy
506
506
/**
507
507
* Issue an update via a prepared statement, binding the given arguments,
508
508
* returning generated keys.
509
+ * <p>This method requires support for generated keys in the JDBC driver.
509
510
* @param sql the SQL containing named parameters
510
511
* @param paramSource container of arguments and SQL types to bind to the query
511
512
* @param generatedKeyHolder a {@link KeyHolder} that will hold the generated keys
512
513
* @return the number of rows affected
513
514
* @throws DataAccessException if there is any problem issuing the update
514
515
* @see MapSqlParameterSource
515
516
* @see org.springframework.jdbc.support.GeneratedKeyHolder
517
+ * @see java.sql.DatabaseMetaData#supportsGetGeneratedKeys()
516
518
*/
517
519
int update (String sql , SqlParameterSource paramSource , KeyHolder generatedKeyHolder )
518
520
throws DataAccessException ;
519
521
520
522
/**
521
523
* Issue an update via a prepared statement, binding the given arguments,
522
524
* returning generated keys.
525
+ * <p>This method requires support for generated keys in the JDBC driver.
523
526
* @param sql the SQL containing named parameters
524
527
* @param paramSource container of arguments and SQL types to bind to the query
525
528
* @param generatedKeyHolder a {@link KeyHolder} that will hold the generated keys
@@ -528,6 +531,7 @@ int update(String sql, SqlParameterSource paramSource, KeyHolder generatedKeyHol
528
531
* @throws DataAccessException if there is any problem issuing the update
529
532
* @see MapSqlParameterSource
530
533
* @see org.springframework.jdbc.support.GeneratedKeyHolder
534
+ * @see java.sql.DatabaseMetaData#supportsGetGeneratedKeys()
531
535
*/
532
536
int update (String sql , SqlParameterSource paramSource , KeyHolder generatedKeyHolder , String [] keyColumnNames )
533
537
throws DataAccessException ;
@@ -558,6 +562,7 @@ int update(String sql, SqlParameterSource paramSource, KeyHolder generatedKeyHol
558
562
/**
559
563
* Execute a batch using the supplied SQL statement with the batch of supplied
560
564
* arguments, returning generated keys.
565
+ * <p>This method requires support for generated keys in the JDBC driver.
561
566
* @param sql the SQL statement to execute
562
567
* @param batchArgs the array of {@link SqlParameterSource} containing the batch of
563
568
* arguments for the query
@@ -568,12 +573,14 @@ int update(String sql, SqlParameterSource paramSource, KeyHolder generatedKeyHol
568
573
* @throws DataAccessException if there is any problem issuing the update
569
574
* @since 6.1
570
575
* @see org.springframework.jdbc.support.GeneratedKeyHolder
576
+ * @see java.sql.DatabaseMetaData#supportsGetGeneratedKeys()
571
577
*/
572
578
int [] batchUpdate (String sql , SqlParameterSource [] batchArgs , KeyHolder generatedKeyHolder );
573
579
574
580
/**
575
581
* Execute a batch using the supplied SQL statement with the batch of supplied arguments,
576
582
* returning generated keys.
583
+ * <p>This method requires support for generated keys in the JDBC driver.
577
584
* @param sql the SQL statement to execute
578
585
* @param batchArgs the array of {@link SqlParameterSource} containing the batch of
579
586
* arguments for the query
@@ -585,7 +592,9 @@ int update(String sql, SqlParameterSource paramSource, KeyHolder generatedKeyHol
585
592
* @throws DataAccessException if there is any problem issuing the update
586
593
* @since 6.1
587
594
* @see org.springframework.jdbc.support.GeneratedKeyHolder
595
+ * @see java.sql.DatabaseMetaData#supportsGetGeneratedKeys()
588
596
*/
589
597
int [] batchUpdate (String sql , SqlParameterSource [] batchArgs , KeyHolder generatedKeyHolder ,
590
598
String [] keyColumnNames );
599
+
591
600
}
0 commit comments