get All User Links

@Query(value = "SELECT l.* " + "FROM " + LINKS_KEY + " AS l " + "WHERE l." + OWNER_KEY + " = :" + USER_IDENTIFIER_KEY + " AND dtype = '" + LINK_KEY + "' " + " AND ( " + " MATCH(l." + TITLE_KEY + ", l." + DESCRIPTION_KEY + ") AGAINST (:" + KEYWORDS_KEY + _IN_BOOLEAN_MODE + ") " + " OR :" + KEYWORDS_KEY + " = '' " + " ) " + "UNION " + "SELECT l.* " + "FROM " + LINKS_KEY + " AS l " + "LEFT JOIN " + COLLECTIONS_LINKS_TABLE + " ON " + COLLECTIONS_LINKS_TABLE + "." + LINK_IDENTIFIER_KEY + " = l." + LINK_IDENTIFIER_KEY + " LEFT JOIN " + TEAMS_LINKS_TABLE + " ON " + TEAMS_LINKS_TABLE + "." + LINK_IDENTIFIER_KEY + " = l." + LINK_IDENTIFIER_KEY + " LEFT JOIN " + COLLECTIONS_TEAMS_TABLE + " ON " + COLLECTIONS_TEAMS_TABLE + "." + COLLECTION_IDENTIFIER_KEY + " = " + COLLECTIONS_LINKS_TABLE + "." + COLLECTION_IDENTIFIER_KEY + " LEFT JOIN " + MEMBERS_KEY + " ON " + COLLECTIONS_TEAMS_TABLE + "." + TEAM_IDENTIFIER_KEY + "=" + MEMBERS_KEY + "." + TEAM_IDENTIFIER_KEY + " OR " + TEAMS_LINKS_TABLE + "." + TEAM_IDENTIFIER_KEY + "=" + MEMBERS_KEY + "." + TEAM_IDENTIFIER_KEY + " WHERE " + MEMBERS_KEY + "." + OWNER_KEY + "=:" + USER_IDENTIFIER_KEY + " AND l.dtype = '" + LINK_KEY + "' " + " AND ( " + " MATCH(l." + TITLE_KEY + ", l." + DESCRIPTION_KEY + ") AGAINST (:" + KEYWORDS_KEY + _IN_BOOLEAN_MODE + ") " + " OR :" + KEYWORDS_KEY + " = '' " + " ) " + "ORDER BY " + DATE_KEY + " DESC", nativeQuery = true )
abstract fun getAllUserLinks(    @Param(value = "user_id") userId: String,     @Param(value = "keywords") keywords: String,     pageable: Pageable): List<RefyLink>

Method to execute the query to get all the user's links, included the links shared in the teams and in the collections shared in the teams

Return

the user links as List of RefyLink

Parameters

userId

The identifier of the user

keywords

The keywords used to filter the query to retrieve the items

pageable

The parameters to paginate the query