Package cool.scx.jdbc.sql
Record Class UpdateResult
java.lang.Object
java.lang.Record
cool.scx.jdbc.sql.UpdateResult
数据库更新结果
- Version:
- 0.0.1
- Author:
- scx567888
-
Constructor Summary
ConstructorsConstructorDescriptionUpdateResult(long affectedItemsCount, List<Long> generatedKeys) Creates an instance of aUpdateResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of theaffectedItemsCountrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thegeneratedKeysrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
UpdateResult
Creates an instance of aUpdateResultrecord class.- Parameters:
affectedItemsCount- the value for theaffectedItemsCountrecord componentgeneratedKeys- the value for thegeneratedKeysrecord component
-
-
Method Details
-
firstGeneratedKey
-
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. -
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. -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
affectedItemsCount
public long affectedItemsCount()Returns the value of theaffectedItemsCountrecord component.- Returns:
- the value of the
affectedItemsCountrecord component
-
generatedKeys
Returns the value of thegeneratedKeysrecord component.- Returns:
- the value of the
generatedKeysrecord component
-