get Authored Groups Count

@Query(value = "SELECT COUNT(*) FROM " + GROUPS_KEY + " WHERE " + AUTHOR_KEY + "=:" + AUTHOR_KEY + " AND " + NAME_KEY + " LIKE %:" + NAME_KEY + "%", nativeQuery = true )
abstract fun getAuthoredGroupsCount(@Param(value = "author") userId: String, @Param(value = "name") name: String): Long

Method to execute the query to count the total groups where the user is the author of the group

Return

the total numbers of the groups

Parameters

userId

The user identifier

name

The name of the group to use as filter