Package dev.frostlake.metastore
Class QueryHistory
java.lang.Object
dev.frostlake.metastore.QueryHistory
Represents a single query execution in the query history
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintlongintgetRole()longlonglonglonggetUser()voidmarkFailed(LocalDateTime endTime, String errorMessage) voidmarkSuccess(LocalDateTime endTime) voidmarkSuccess(LocalDateTime endTime, long rowsProduced) voidsetCompilationTimeMs(int compilationTimeMs) voidsetQueryId(String queryId) Set the query ID (should be called with the ID from QueryResultCache)voidsetQueryType(StatementKind queryType) Set the kind from the PARSED statement — the constructor's text sniff stands only for statements the parser refused.voidsetQueuedTimeMs(int queuedTimeMs) voidsetRowsDeleted(long rowsDeleted) voidsetRowsInserted(long rowsInserted) voidsetRowsUpdated(long rowsUpdated) toString()
-
Constructor Details
-
QueryHistory
-
-
Method Details
-
setQueryId
Set the query ID (should be called with the ID from QueryResultCache) -
setQueryType
Set the kind from the PARSED statement — the constructor's text sniff stands only for statements the parser refused. -
markSuccess
-
markSuccess
-
markFailed
-
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
-
getQueryText
-
getDatabase
-
getSchema
-
getWarehouse
-
getUser
-
getRole
-
getStartTime
-
getStartTimeFormatted
-
getEndTime
-
getEndTimeFormatted
-
getStatus
-
getExecutionTimeMs
public long getExecutionTimeMs() -
getRowsProduced
public long getRowsProduced() -
getRowsInserted
public long getRowsInserted() -
getRowsUpdated
public long getRowsUpdated() -
getRowsDeleted
public long getRowsDeleted() -
getErrorMessage
-
getQueryType
-
getCompilationTimeMs
public int getCompilationTimeMs() -
getQueuedTimeMs
public int getQueuedTimeMs() -
toString
-