count
Team
Links
@Query(value = "SELECT COUNT(*) " +
"FROM " + LINKS_KEY + " AS l " +
"INNER JOIN " + TEAMS_LINKS_TABLE + " ON " + TEAMS_LINKS_TABLE + "." + LINK_IDENTIFIER_KEY +
" = l." + LINK_IDENTIFIER_KEY + _WHERE_ +
TEAMS_LINKS_TABLE + "." + TEAM_IDENTIFIER_KEY + "=:" + TEAM_IDENTIFIER_KEY +
" AND dtype = '" + LINK_KEY + "' " +
" AND ( " +
" MATCH(l." + TITLE_KEY + ", l." + DESCRIPTION_KEY + ") AGAINST (:" + KEYWORDS_KEY + _IN_BOOLEAN_MODE + ") " +
" OR :" + KEYWORDS_KEY + " = '' " +
" )",
nativeQuery = true
)
Method to count all the links shared in a team
Return
the count of the team links as long
Parameters
teamId
The identifier of the team from retrieve the links
keywords
The keywords used to filter the query to retrieve the items