MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / getConnectionCount

Method getConnectionCount

server/src/db/community-db.ts:618–626  ·  view source on GitHub ↗
(userId: string)

Source from the content-addressed store, hash-verified

616 }
617
618 async getConnectionCount(userId: string): Promise<number> {
619 const result = await query<{ count: string }>(
620 `SELECT COUNT(*) as count FROM connections
621 WHERE (requester_user_id = $1 OR recipient_user_id = $1)
622 AND status = 'accepted'`,
623 [userId]
624 );
625 return parseInt(result.rows[0]?.count || '0', 10);
626 }
627
628 async getPendingRequestCount(userId: string): Promise<number> {
629 const result = await query<{ count: string }>(

Callers 2

checkAndAwardBadgesMethod · 0.95
getHubDataMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected