Annotation Interface Jdbc.GeneratedKeys

Enclosing class:
Jdbc

@Target(METHOD) @Retention(CLASS) public static @interface Jdbc.GeneratedKeys
Requests generated keys from an update statement.

An empty value requests the generated keys selected by the JDBC driver. Otherwise, the provided values are passed to JDBC in declaration order.

Without a local transaction, the update may be committed before the repository finishes reading or mapping the generated keys, checking the expected number of keys, or releasing JDBC resources. Such a failure does not establish that the update was rolled back and must not be retried automatically. When key materialization and the update must be atomic, execute the repository method within a Helidon local transaction and allow the failure to escape the transaction boundary.

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Returns the requested generated column names.
  • Element Details

    • value

      String[] value
      Returns the requested generated column names.
      Returns:
      column names, or an empty array to request the keys selected by the JDBC driver
      Default:
      {}