Record Class SqlBatchSupport.JdbcBatchMetadata

java.lang.Object
java.lang.Record
io.micronaut.data.runtime.operations.internal.sql.SqlBatchSupport.JdbcBatchMetadata
Record Components:
databaseProductName - The database product name
databaseProductVersion - The database product version
driverName - The JDBC driver name
supportsBatchUpdates - Whether the driver reports batch-update support
supportsGetGeneratedKeys - Whether the driver reports generated-key support
Enclosing class:
SqlBatchSupport

public static record SqlBatchSupport.JdbcBatchMetadata(@Nullable String databaseProductName, @Nullable String databaseProductVersion, @Nullable String driverName, @Nullable Boolean supportsBatchUpdates, @Nullable Boolean supportsGetGeneratedKeys) extends Record
The JDBC metadata used to resolve batch insert capabilities. Any value can be null when the metadata could not be read.
Since:
5.2.0
  • Field Details

  • Constructor Details

    • JdbcBatchMetadata

      public JdbcBatchMetadata(@Nullable String databaseProductName, @Nullable String databaseProductVersion, @Nullable String driverName, @Nullable Boolean supportsBatchUpdates, @Nullable Boolean supportsGetGeneratedKeys)
      Creates an instance of a JdbcBatchMetadata record class.
      Parameters:
      databaseProductName - the value for the databaseProductName record component
      databaseProductVersion - the value for the databaseProductVersion record component
      driverName - the value for the driverName record component
      supportsBatchUpdates - the value for the supportsBatchUpdates record component
      supportsGetGeneratedKeys - the value for the supportsGetGeneratedKeys record component
  • Method Details

    • isMariaDb

      public boolean isMariaDb()
      Returns:
      true if the connection is known to target a MariaDB server
    • isMySql

      public boolean isMySql()
      Returns:
      true if the connection is known to target a MySQL server
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • databaseProductName

      public @Nullable String databaseProductName()
      Returns the value of the databaseProductName record component.
      Returns:
      the value of the databaseProductName record component
    • databaseProductVersion

      public @Nullable String databaseProductVersion()
      Returns the value of the databaseProductVersion record component.
      Returns:
      the value of the databaseProductVersion record component
    • driverName

      public @Nullable String driverName()
      Returns the value of the driverName record component.
      Returns:
      the value of the driverName record component
    • supportsBatchUpdates

      public @Nullable Boolean supportsBatchUpdates()
      Returns the value of the supportsBatchUpdates record component.
      Returns:
      the value of the supportsBatchUpdates record component
    • supportsGetGeneratedKeys

      public @Nullable Boolean supportsGetGeneratedKeys()
      Returns the value of the supportsGetGeneratedKeys record component.
      Returns:
      the value of the supportsGetGeneratedKeys record component