Class CommandComplete

java.lang.Object
io.r2dbc.postgresql.message.backend.CommandComplete
All Implemented Interfaces:
BackendMessage

public final class CommandComplete extends Object implements BackendMessage
The CommandComplete message.
  • Constructor Details

    • CommandComplete

      public CommandComplete(String command, @Nullable Integer rowId, @Nullable Long rows)
      Create a new message.
      Parameters:
      command - the command that was completed
      rowId - the object ID of the inserted row
      rows - the number of rows affected by the command
      Throws:
      IllegalArgumentException - if command is null
  • Method Details

    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • getCommand

      public String getCommand()
      Returns the command that was completed.
      Returns:
      the command that was completed
    • getRowId

      @Nullable public Integer getRowId()
      Returns the object ID of the inserted row if a single row is inserted the target table has OIDs. Otherwise is 0.
      Returns:
      the object ID of the inserted row
    • getRows

      @Nullable public Long getRows()
      Returns the number of rows affected by the command.
      Returns:
      the number of rows affected by the command
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object