count Services

@Query(value = ""SELECT COUNT(*) FROM " + SERVICES_KEY + _WHERE_ + "( " + "MATCH(" + NAME_KEY + "," + PID_KEY + ") AGAINST (:" + KEYWORDS_KEY + _IN_BOOLEAN_MODE + ") " + "OR :" + KEYWORDS_KEY + " = ''" + ") " + "AND " + STATUS_KEY + " IN (:" + STATUSES_KEY + ") " + "AND " + HOST_IDENTIFIER_KEY + "=:" + HOST_IDENTIFIER_KEY", nativeQuery = true )
abstract fun countServices(@Param(value = "host_id") hostId: String, @Param(value = "keywords") keywords: String, @Param(value = "statuses") statuses: List<String>): Long

Query used to count the services related to a host

Return

the count of the services related to a host as long

Parameters

hostId

The identifier of the host

keywords

The keywords used to filter the results

statuses

The statuses used to filter the results