get Last Up Event

@Query(value = ""SELECT MAX(" + EVENT_DATE_KEY + ") FROM " + SERVICE_EVENTS_KEY + _WHERE_ + TYPE_KEY + " IN ('RUNNING', 'RESTARTED') AND " + SERVICE_IDENTIFIER_KEY + "=:" + SERVICE_IDENTIFIER_KEY", nativeQuery = true )
abstract fun getLastUpEvent(@Param(value = "service_id") serviceId: String): Long

Query used to get the last RUNNING event

Return

the timestamp of the last RUNNING event as Long

Parameters

serviceId

The identifier of the service