Class QueryHistory

java.lang.Object
dev.frostlake.metastore.QueryHistory

public class QueryHistory extends Object
Represents a single query execution in the query history
  • Constructor Details

  • Method Details

    • setQueryId

      public void setQueryId(String queryId)
      Set the query ID (should be called with the ID from QueryResultCache)
    • setQueryType

      public void setQueryType(StatementKind queryType)
      Set the kind from the PARSED statement — the constructor's text sniff stands only for statements the parser refused.
    • markSuccess

      public void markSuccess(LocalDateTime endTime, long rowsProduced)
    • markSuccess

      public void markSuccess(LocalDateTime endTime)
    • markFailed

      public void markFailed(LocalDateTime endTime, String errorMessage)
    • setRowsInserted

      public void setRowsInserted(long rowsInserted)
    • setRowsUpdated

      public void setRowsUpdated(long rowsUpdated)
    • setRowsDeleted

      public void setRowsDeleted(long rowsDeleted)
    • setCompilationTimeMs

      public void setCompilationTimeMs(int compilationTimeMs)
    • setQueuedTimeMs

      public void setQueuedTimeMs(int queuedTimeMs)
    • getQueryId

      public String getQueryId()
    • getQueryText

      public String getQueryText()
    • getDatabase

      public String getDatabase()
    • getSchema

      public String getSchema()
    • getWarehouse

      public String getWarehouse()
    • getUser

      public String getUser()
    • getRole

      public String getRole()
    • getStartTime

      public LocalDateTime getStartTime()
    • getStartTimeFormatted

      public String getStartTimeFormatted()
    • getEndTime

      public LocalDateTime getEndTime()
    • getEndTimeFormatted

      public String getEndTimeFormatted()
    • getStatus

      public String getStatus()
    • getExecutionTimeMs

      public long getExecutionTimeMs()
    • getRowsProduced

      public long getRowsProduced()
    • getRowsInserted

      public long getRowsInserted()
    • getRowsUpdated

      public long getRowsUpdated()
    • getRowsDeleted

      public long getRowsDeleted()
    • getErrorMessage

      public String getErrorMessage()
    • getQueryType

      public String getQueryType()
    • getCompilationTimeMs

      public int getCompilationTimeMs()
    • getQueuedTimeMs

      public int getQueuedTimeMs()
    • toString

      public String toString()
      Overrides:
      toString in class Object