Record Class StatementExecution

java.lang.Object
java.lang.Record
com.kingsrook.qqq.backend.core.instrumentation.StatementExecution
Record Components:
backendName - the QQQ backend's name
tableName - the QQQ table the action was on (may be null)
operation - the action's kind
sql - the statement as sent, with bind placeholders; parameter values are never included
elapsedNanos - time from just before execution to completion (including reading results)
rowCount - rows read or affected when known, else null
succeeded - false when the statement threw
unitOfWork - the outermost open unit of work on the thread, or null
processName - the outermost process on the thread's action stack, or null

public record StatementExecution(String backendName, String tableName, StatementOperation operation, String sql, long elapsedNanos, Integer rowCount, boolean succeeded, UnitOfWork unitOfWork, String processName) extends Record
One statement a backend module ran on behalf of a table action.
  • Constructor Details

    • StatementExecution

      public StatementExecution(String backendName, String tableName, StatementOperation operation, String sql, long elapsedNanos, Integer rowCount, boolean succeeded, UnitOfWork unitOfWork, String processName)
      Creates an instance of a StatementExecution record class.
      Parameters:
      backendName - the value for the backendName record component
      tableName - the value for the tableName record component
      operation - the value for the operation record component
      sql - the value for the sql record component
      elapsedNanos - the value for the elapsedNanos record component
      rowCount - the value for the rowCount record component
      succeeded - the value for the succeeded record component
      unitOfWork - the value for the unitOfWork record component
      processName - the value for the processName record component
  • Method Details

    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      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.
    • backendName

      public String backendName()
      Returns the value of the backendName record component.
      Returns:
      the value of the backendName record component
    • tableName

      public String tableName()
      Returns the value of the tableName record component.
      Returns:
      the value of the tableName record component
    • operation

      public StatementOperation operation()
      Returns the value of the operation record component.
      Returns:
      the value of the operation record component
    • sql

      public String sql()
      Returns the value of the sql record component.
      Returns:
      the value of the sql record component
    • elapsedNanos

      public long elapsedNanos()
      Returns the value of the elapsedNanos record component.
      Returns:
      the value of the elapsedNanos record component
    • rowCount

      public Integer rowCount()
      Returns the value of the rowCount record component.
      Returns:
      the value of the rowCount record component
    • succeeded

      public boolean succeeded()
      Returns the value of the succeeded record component.
      Returns:
      the value of the succeeded record component
    • unitOfWork

      public UnitOfWork unitOfWork()
      Returns the value of the unitOfWork record component.
      Returns:
      the value of the unitOfWork record component
    • processName

      public String processName()
      Returns the value of the processName record component.
      Returns:
      the value of the processName record component