getProjects

@Query(value = ""SELECT " + PROJECTS_KEY + ".* FROM " + PROJECTS_KEY + " AS " + PROJECTS_KEY + " INNER JOIN " + PROJECT_MEMBERS_TABLE + " AS " + PROJECT_MEMBERS_TABLE + " ON " + PROJECTS_KEY + "." + IDENTIFIER_KEY + "=" + PROJECT_MEMBERS_TABLE + "." + IDENTIFIER_KEY + " WHERE " + MEMBER_IDENTIFIER_KEY + "=:" + IDENTIFIER_KEY", nativeQuery = true)
abstract fun getProjects(@Param(value = "id") userId: String): List<Project>

Method to execute the query to get the list of Project where the user who made the request is a member

Return

list of projects as List of Project

Parameters

userId

: the identifier of the user