java.lang.Object
java.lang.Record
org.firebirdsql.gds.ng.SqlCountHolder
- Record Components:
updateCount- record count affected by an updatedeleteCount- record count affected by a deleteinsertCount- record count affected by an insertselectCount- record count selected
public record SqlCountHolder(long updateCount, long deleteCount, long insertCount, long selectCount)
extends Record
Class for holding the SQL counts (update, delete, select, insert) for a statement execution.
The long values returned from the getLongXXXCount methods should be considered as unsigned.
- Since:
- 3.0
- Author:
- Mark Rotteveel
-
Constructor Summary
ConstructorsConstructorDescriptionSqlCountHolder(long updateCount, long deleteCount, long insertCount, long selectCount) Creates an instance of aSqlCountHolderrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of thedeleteCountrecord component.static SqlCountHolderempty()final booleanIndicates whether some other object is "equal to" this one.intintintintlongDeprecated, for removal: This API element is subject to removal in a future version.longDeprecated, for removal: This API element is subject to removal in a future version.UseinsertCount(), will be removed in Jaybird 7longDeprecated, for removal: This API element is subject to removal in a future version.UseselectCount(), will be removed in Jaybird 7longDeprecated, for removal: This API element is subject to removal in a future version.UseupdateCount(), will be removed in Jaybird 7final inthashCode()Returns a hash code value for this object.longReturns the value of theinsertCountrecord component.longReturns the value of theselectCountrecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of theupdateCountrecord component.
-
Constructor Details
-
SqlCountHolder
public SqlCountHolder(long updateCount, long deleteCount, long insertCount, long selectCount) Creates an instance of aSqlCountHolderrecord class.- Parameters:
updateCount- the value for theupdateCountrecord componentdeleteCount- the value for thedeleteCountrecord componentinsertCount- the value for theinsertCountrecord componentselectCount- the value for theselectCountrecord component
-
-
Method Details
-
getIntegerUpdateCount
public int getIntegerUpdateCount()- Returns:
- Update count as
int, or 0 if the update count was too large. - See Also:
-
getLongUpdateCount
Deprecated, for removal: This API element is subject to removal in a future version.UseupdateCount(), will be removed in Jaybird 7- Returns:
- Number of updated records
- See Also:
-
getIntegerDeleteCount
public int getIntegerDeleteCount()- Returns:
- Delete count as
int, or 0 if the delete count was too large. - See Also:
-
getLongDeleteCount
Deprecated, for removal: This API element is subject to removal in a future version.UsedeleteCount(), will be removed in Jaybird 7- Returns:
- Number of deleted records
- See Also:
-
getIntegerInsertCount
public int getIntegerInsertCount()- Returns:
- Insert count as
int, or 0 if the insert count was too large. - See Also:
-
getLongInsertCount
Deprecated, for removal: This API element is subject to removal in a future version.UseinsertCount(), will be removed in Jaybird 7- Returns:
- Number of inserted records
- See Also:
-
getIntegerSelectCount
public int getIntegerSelectCount()- Returns:
- Select count as
int, or 0 if the select count was too large. - See Also:
-
getLongSelectCount
Deprecated, for removal: This API element is subject to removal in a future version.UseselectCount(), will be removed in Jaybird 7- Returns:
- Number of selected records
- See Also:
-
empty
- Returns:
- a
SqlCountHolderwith all values set to 0, representing empty, or no counts
-
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. All components in this record class are compared with '=='. -
updateCount
public long updateCount()Returns the value of theupdateCountrecord component.- Returns:
- the value of the
updateCountrecord component
-
deleteCount
public long deleteCount()Returns the value of thedeleteCountrecord component.- Returns:
- the value of the
deleteCountrecord component
-
insertCount
public long insertCount()Returns the value of theinsertCountrecord component.- Returns:
- the value of the
insertCountrecord component
-
selectCount
public long selectCount()Returns the value of theselectCountrecord component.- Returns:
- the value of the
selectCountrecord component
-
deleteCount(), will be removed in Jaybird 7