get Last Up Event

@Query(value = ""SELECT MAX(" + EVENT_DATE_KEY + ") FROM " + HOST_EVENTS_KEY + _WHERE_ + TYPE_KEY + " IN ('ONLINE', 'RESTARTED') AND " + HOST_IDENTIFIER_KEY + "=:" + HOST_IDENTIFIER_KEY", nativeQuery = true )
abstract fun getLastUpEvent(@Param(value = "host_id") hostId: String): Long

Query used to get the last ONLINE event

Return

the timestamp of the last ONLINE event as Long

Parameters

hostId

The identifier of the host