Class CommandResponse

java.lang.Object
com.clickhouse.client.api.command.CommandResponse
All Implemented Interfaces:
AutoCloseable

public class CommandResponse extends Object implements AutoCloseable
  • Constructor Details

    • CommandResponse

      public CommandResponse(QueryResponse response)
  • Method Details

    • getMetrics

      public OperationMetrics getMetrics()
      Returns the metrics of this operation.
      Returns:
      metrics of this operation
    • getReadRows

      public long getReadRows()
      Returns:
      number of rows read by server from the storage
    • getReadBytes

      public long getReadBytes()
      Returns:
      number of bytes read by server from the storage
    • getWrittenRows

      public long getWrittenRows()
      Returns:
      number of rows written by server to the storage
    • getWrittenBytes

      public long getWrittenBytes()
      Returns:
      number of bytes written by server to the storage
    • getServerTime

      public long getServerTime()
      Returns:
      elapsed time in nanoseconds
    • getServerDisplayName

      public String getServerDisplayName()
      Returns the value of X-ClickHouse-Server-Display-Name response header.
      Returns:
      server display name or null if not present
    • getResponseHeaders

      public Map<String,String> getResponseHeaders()
      Returns all collected response headers as an unmodifiable map. Only whitelisted ClickHouse headers are included.
      Returns:
      map of header name to header value
    • close

      public void close() throws Exception
      Specified by:
      close in interface AutoCloseable
      Throws:
      Exception