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 namedatabaseProductVersion- The database product versiondriverName- The JDBC driver namesupportsBatchUpdates- Whether the driver reports batch-update supportsupportsGetGeneratedKeys- Whether the driver reports generated-key supportdriverMajorVersion- The major version of the JDBC driver (since 5.3.0)
- Enclosing class:
SqlBatchSupport
public static record SqlBatchSupport.JdbcBatchMetadata(@Nullable String databaseProductName, @Nullable String databaseProductVersion, @Nullable String driverName, @Nullable Boolean supportsBatchUpdates, @Nullable Boolean supportsGetGeneratedKeys, @Nullable Integer driverMajorVersion)
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final SqlBatchSupport.JdbcBatchMetadataThe metadata used when the JDBC metadata could not be read. -
Constructor Summary
ConstructorsConstructorDescriptionJdbcBatchMetadata(@Nullable String databaseProductName, @Nullable String databaseProductVersion, @Nullable String driverName, @Nullable Boolean supportsBatchUpdates, @Nullable Boolean supportsGetGeneratedKeys) Creates the metadata without the driver version.JdbcBatchMetadata(@Nullable String databaseProductName, @Nullable String databaseProductVersion, @Nullable String driverName, @Nullable Boolean supportsBatchUpdates, @Nullable Boolean supportsGetGeneratedKeys, @Nullable Integer driverMajorVersion) Creates an instance of aJdbcBatchMetadatarecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable StringReturns the value of thedatabaseProductNamerecord component.@Nullable StringReturns the value of thedatabaseProductVersionrecord component.@Nullable IntegerReturns the value of thedriverMajorVersionrecord component.@Nullable StringReturns the value of thedriverNamerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanbooleanisMySql()boolean@Nullable BooleanReturns the value of thesupportsBatchUpdatesrecord component.@Nullable BooleanReturns the value of thesupportsGetGeneratedKeysrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
UNKNOWN
The metadata used when the JDBC metadata could not be read.
-
-
Constructor Details
-
JdbcBatchMetadata
public JdbcBatchMetadata(@Nullable String databaseProductName, @Nullable String databaseProductVersion, @Nullable String driverName, @Nullable Boolean supportsBatchUpdates, @Nullable Boolean supportsGetGeneratedKeys) Creates the metadata without the driver version.- Parameters:
databaseProductName- The database product namedatabaseProductVersion- The database product versiondriverName- The JDBC driver namesupportsBatchUpdates- Whether the driver reports batch-update supportsupportsGetGeneratedKeys- Whether the driver reports generated-key support
-
JdbcBatchMetadata
public JdbcBatchMetadata(@Nullable String databaseProductName, @Nullable String databaseProductVersion, @Nullable String driverName, @Nullable Boolean supportsBatchUpdates, @Nullable Boolean supportsGetGeneratedKeys, @Nullable Integer driverMajorVersion) Creates an instance of aJdbcBatchMetadatarecord class.- Parameters:
databaseProductName- the value for thedatabaseProductNamerecord componentdatabaseProductVersion- the value for thedatabaseProductVersionrecord componentdriverName- the value for thedriverNamerecord componentsupportsBatchUpdates- the value for thesupportsBatchUpdatesrecord componentsupportsGetGeneratedKeys- the value for thesupportsGetGeneratedKeysrecord componentdriverMajorVersion- the value for thedriverMajorVersionrecord component
-
-
Method Details
-
isOracleDriverReturningBatchGeneratedKeys
public boolean isOracleDriverReturningBatchGeneratedKeys()- Returns:
trueif the connection uses an Oracle JDBC driver that returns the generated keys of every row of a batch- Since:
- 5.3.0
-
isMariaDb
public boolean isMariaDb()- Returns:
trueif the connection is known to target a MariaDB server
-
isMySql
public boolean isMySql()- Returns:
trueif the connection is known to target a MySQL server
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object). -
databaseProductName
Returns the value of thedatabaseProductNamerecord component.- Returns:
- the value of the
databaseProductNamerecord component
-
databaseProductVersion
Returns the value of thedatabaseProductVersionrecord component.- Returns:
- the value of the
databaseProductVersionrecord component
-
driverName
Returns the value of thedriverNamerecord component.- Returns:
- the value of the
driverNamerecord component
-
supportsBatchUpdates
Returns the value of thesupportsBatchUpdatesrecord component.- Returns:
- the value of the
supportsBatchUpdatesrecord component
-
supportsGetGeneratedKeys
Returns the value of thesupportsGetGeneratedKeysrecord component.- Returns:
- the value of the
supportsGetGeneratedKeysrecord component
-
driverMajorVersion
Returns the value of thedriverMajorVersionrecord component.- Returns:
- the value of the
driverMajorVersionrecord component
-