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 aSqlCountHolder
record class. -
Method Summary
Modifier and TypeMethodDescriptionlong
Returns the value of thedeleteCount
record component.static SqlCountHolder
empty()
final boolean
Indicates whether some other object is "equal to" this one.int
int
int
int
long
Deprecated, for removal: This API element is subject to removal in a future version.long
Deprecated, for removal: This API element is subject to removal in a future version.UseinsertCount()
, will be removed in Jaybird 7long
Deprecated, for removal: This API element is subject to removal in a future version.UseselectCount()
, will be removed in Jaybird 7long
Deprecated, for removal: This API element is subject to removal in a future version.UseupdateCount()
, will be removed in Jaybird 7final int
hashCode()
Returns a hash code value for this object.long
Returns the value of theinsertCount
record component.long
Returns the value of theselectCount
record component.final String
toString()
Returns a string representation of this record class.long
Returns the value of theupdateCount
record component.
-
Constructor Details
-
SqlCountHolder
public SqlCountHolder(long updateCount, long deleteCount, long insertCount, long selectCount) Creates an instance of aSqlCountHolder
record class.- Parameters:
updateCount
- the value for theupdateCount
record componentdeleteCount
- the value for thedeleteCount
record componentinsertCount
- the value for theinsertCount
record componentselectCount
- the value for theselectCount
record 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
SqlCountHolder
with 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 theupdateCount
record component.- Returns:
- the value of the
updateCount
record component
-
deleteCount
public long deleteCount()Returns the value of thedeleteCount
record component.- Returns:
- the value of the
deleteCount
record component
-
insertCount
public long insertCount()Returns the value of theinsertCount
record component.- Returns:
- the value of the
insertCount
record component
-
selectCount
public long selectCount()Returns the value of theselectCount
record component.- Returns:
- the value of the
selectCount
record component
-
deleteCount()
, will be removed in Jaybird 7