MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / complexityOf

Function complexityOf

graph-ui/src/provider/cypher.ts:441–451  ·  view source on GitHub ↗
(
    label: string,
    qualifiedNames: readonly string[],
    limit = COMPLEXITY_BATCH_LIMIT
)

Source from the content-addressed store, hash-verified

439 * which is the sweep this function exists to avoid.
440 */
441export function complexityOf(
442 label: string,
443 qualifiedNames: readonly string[],
444 limit = COMPLEXITY_BATCH_LIMIT
445): string | undefined {
446 const predicate = anyOf('n', NODE_PROPS.qualifiedName, qualifiedNames);
447 if (predicate === undefined) {
448 return undefined;
449 }
450 return `MATCH (n:${label}) WHERE ${predicate} ${ret(COLUMNS.hotspots)} LIMIT ${safeLimit(limit)}`;
451}
452
453/** How many declarations one batched file read returns. */
454export const DECLARATION_BATCH_LIMIT = 1000;

Callers 1

getComplexityMethod · 0.90

Calls 3

anyOfFunction · 0.85
retFunction · 0.85
safeLimitFunction · 0.85

Tested by

no test coverage detected