@Repository public interface TcContextRepository extends SearchRepository<TcContext>
| Modifier and Type | Method and Description |
|---|---|
String |
clearMonitoringData(int clearHours) |
void |
truncateContexts() |
int |
updateStatusContextWithStatusInProgress() |
findByNameAndProjectId, findByProjectIdfindByName, findByNameContainingIgnoreCase, findByNaturalIddeleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAllById, flush, getById, getOne, getReferenceById, saveAll, saveAllAndFlush, saveAndFlushfindAll@Modifying
@Query(value="truncate mb_context cascade",
nativeQuery=true)
void truncateContexts()
@Query(value="select clear_monitoring_data_func(:clear_hours)",
nativeQuery=true)
String clearMonitoringData(@Param(value="clear_hours")
int clearHours)
@Modifying
@Query(value="update mb_context set status = \'STOPPED\', end_time = LOCALTIMESTAMP(3) where \"type\" = \'TcContext\' and status = \'IN_PROGRESS\' and (EXTRACT(epoch from LOCALTIMESTAMP(0)) * 1000 - last_update_time > time_to_live)",
nativeQuery=true)
int updateStatusContextWithStatusInProgress()
Copyright © 2025. All rights reserved.