Extract common logic for pagination
- Create new
util::db::query_by_connection
function to call aquery_all
function limited by pagination - Simplify
getProfiles
andgetUsers
by usingquery_by_connection
util::db::query_by_connection
function to call a query_all
function limited by paginationgetProfiles
and getUsers
by using query_by_connection