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

Method batchResolveAliases

server/src/db/catalog-db.ts:729–742  ·  view source on GitHub ↗
(rids: string[])

Source from the content-addressed store, hash-verified

727 }
728
729 private async batchResolveAliases(rids: string[]): Promise<Map<string, string>> {
730 if (rids.length === 0) return new Map();
731
732 const result = await query<{ alias_rid: string; canonical_rid: string }>(
733 `SELECT alias_rid, canonical_rid FROM catalog_aliases WHERE alias_rid = ANY($1)`,
734 [rids]
735 );
736
737 const map = new Map<string, string>();
738 for (const row of result.rows) {
739 map.set(row.alias_rid, row.canonical_rid);
740 }
741 return map;
742 }
743
744 /**
745 * Batch classification lookup — single query for all identifiers.

Callers 1

resolveIdentifiersMethod · 0.95

Calls 1

setMethod · 0.45

Tested by

no test coverage detected