count
Collection
Links
@Query(value = "SELECT COUNT(*) " +
"FROM " + LINKS_KEY + " AS l " +
"INNER JOIN " + COLLECTIONS_LINKS_TABLE + " ON " + COLLECTIONS_LINKS_TABLE + "." + LINK_IDENTIFIER_KEY +
" = l." + LINK_IDENTIFIER_KEY + _WHERE_ +
COLLECTIONS_LINKS_TABLE + "." + COLLECTION_IDENTIFIER_KEY + "=:" + COLLECTION_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 collection
Return
the count of the collection links as long
Parameters
collectionId
The identifier of the collection from retrieve the links
keywords
The keywords used to filter the query to retrieve the items