get User Owned Teams

@Query(value = "SELECT DISTINCT t.* " + "FROM " + TEAMS_KEY + " as t INNER JOIN " + MEMBERS_KEY + " ON t." + TEAM_IDENTIFIER_KEY + "=" + MEMBERS_KEY + "." + TEAM_IDENTIFIER_KEY + _WHERE_ + "t." + OWNER_KEY + "=:" + USER_IDENTIFIER_KEY + " ORDER BY " + DATE_KEY + " DESC", nativeQuery = true )
abstract fun getUserOwnedTeams(@Param(value = "user_id") owner: String, pageable: Pageable): List<Team>

Method to execute the query to get the user's owned teams

Return

the user teams as List of Team

Parameters

owner

The identifier of the owner

pageable

The parameters to paginate the query