count All User Teams

@Query(value = "SELECT COUNT(*) " + "FROM " + TEAMS_KEY + " as t INNER JOIN " + MEMBERS_KEY + " ON t." + TEAM_IDENTIFIER_KEY + "=" + MEMBERS_KEY + "." + TEAM_IDENTIFIER_KEY + _WHERE_ + MEMBERS_KEY + "." + OWNER_KEY + "=:" + USER_IDENTIFIER_KEY + " AND ( " + " MATCH(t." + TITLE_KEY + ", t." + DESCRIPTION_KEY + ") AGAINST (:" + KEYWORDS_KEY + _IN_BOOLEAN_MODE + ") " + " OR :" + KEYWORDS_KEY + " = '' " + ")", nativeQuery = true )
abstract fun countAllUserTeams(@Param(value = "user_id") owner: String, @Param(value = "keywords") keywords: String): Long

Method to count all the user's teams

Return

the count of teams as long

Parameters

owner

The identifier of the owner

keywords

The keywords used to filter the query to retrieve the teams