Module org.firebirdsql.jaybird
Package org.firebirdsql.gds.ng

# Record Class SqlCountHolder

java.lang.Object
java.lang.Record
org.firebirdsql.gds.ng.SqlCountHolder

Record Components:
  `updateCount` - record count affected by an update
  `deleteCount` - record count affected by a delete
  `insertCount` - record count affected by an insert
  `selectCount` - 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

  Constructors
  Constructor
  Description
  `SqlCountHolder(long updateCount, long deleteCount, long insertCount, long selectCount)`
  Creates an instance of a `SqlCountHolder` record class.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `long`
  `deleteCount()`
  Returns the value of the `deleteCount` record component.
  `static SqlCountHolder`
  `empty()`
  `final boolean`
  `equals(Object o)`
  Indicates whether some other object is "equal to" this one.
  `int`
  `getIntegerDeleteCount()`
  `int`
  `getIntegerInsertCount()`
  `int`
  `getIntegerSelectCount()`
  `int`
  `getIntegerUpdateCount()`
  `long`
  `getLongDeleteCount()`
  Deprecated, for removal: This API element is subject to removal in a future version.
  Use `deleteCount()`, will be removed in Jaybird 7
  `long`
  `getLongInsertCount()`
  Deprecated, for removal: This API element is subject to removal in a future version.
  Use `insertCount()`, will be removed in Jaybird 7
  `long`
  `getLongSelectCount()`
  Deprecated, for removal: This API element is subject to removal in a future version.
  Use `selectCount()`, will be removed in Jaybird 7
  `long`
  `getLongUpdateCount()`
  Deprecated, for removal: This API element is subject to removal in a future version.
  Use `updateCount()`, will be removed in Jaybird 7
  `final int`
  `hashCode()`
  Returns a hash code value for this object.
  `long`
  `insertCount()`
  Returns the value of the `insertCount` record component.
  `long`
  `selectCount()`
  Returns the value of the `selectCount` record component.
  `final String`
  `toString()`
  Returns a string representation of this record class.
  `long`
  `updateCount()`
  Returns the value of the `updateCount` record component.

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### SqlCountHolder

    public SqlCountHolder(long updateCount, long deleteCount, long insertCount, long selectCount)
    Creates an instance of a `SqlCountHolder` record class.
    Parameters:
      `updateCount` - the value for the `updateCount` record component
      `deleteCount` - the value for the `deleteCount` record component
      `insertCount` - the value for the `insertCount` record component
      `selectCount` - the value for the `selectCount` record component

- ## Method Details

  - ### getIntegerUpdateCount

    public int getIntegerUpdateCount()
    Returns:
      Update count as `int`, or 0 if the update count was too large.
    See Also:
      - `updateCount()`

  - ### getLongUpdateCount

    @Deprecated(forRemoval=true, since="6") public long getLongUpdateCount()
    Deprecated, for removal: This API element is subject to removal in a future version.
    Use `updateCount()`, will be removed in Jaybird 7
    Returns:
      Number of updated records
    See Also:
      - `updateCount()`

  - ### getIntegerDeleteCount

    public int getIntegerDeleteCount()
    Returns:
      Delete count as `int`, or 0 if the delete count was too large.
    See Also:
      - `deleteCount()`

  - ### getLongDeleteCount

    @Deprecated(forRemoval=true, since="6") public long getLongDeleteCount()
    Deprecated, for removal: This API element is subject to removal in a future version.
    Use `deleteCount()`, will be removed in Jaybird 7
    Returns:
      Number of deleted records
    See Also:
      - `deleteCount()`

  - ### getIntegerInsertCount

    public int getIntegerInsertCount()
    Returns:
      Insert count as `int`, or 0 if the insert count was too large.
    See Also:
      - `insertCount()`

  - ### getLongInsertCount

    @Deprecated(forRemoval=true, since="6") public long getLongInsertCount()
    Deprecated, for removal: This API element is subject to removal in a future version.
    Use `insertCount()`, will be removed in Jaybird 7
    Returns:
      Number of inserted records
    See Also:
      - `insertCount()`

  - ### getIntegerSelectCount

    public int getIntegerSelectCount()
    Returns:
      Select count as `int`, or 0 if the select count was too large.
    See Also:
      - `selectCount()`

  - ### getLongSelectCount

    @Deprecated(forRemoval=true, since="6") public long getLongSelectCount()
    Deprecated, for removal: This API element is subject to removal in a future version.
    Use `selectCount()`, will be removed in Jaybird 7
    Returns:
      Number of selected records
    See Also:
      - `selectCount()`

  - ### empty

    public static SqlCountHolder empty()
    Returns:
      a `SqlCountHolder` with all values set to 0, representing empty, or no counts

  - ### 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 '=='.
    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.

  - ### updateCount

    public long updateCount()
    Returns the value of the `updateCount` record component.
    Returns:
      the value of the `updateCount` record component

  - ### deleteCount

    public long deleteCount()
    Returns the value of the `deleteCount` record component.
    Returns:
      the value of the `deleteCount` record component

  - ### insertCount

    public long insertCount()
    Returns the value of the `insertCount` record component.
    Returns:
      the value of the `insertCount` record component

  - ### selectCount

    public long selectCount()
    Returns the value of the `selectCount` record component.
    Returns:
      the value of the `selectCount` record component