(
label: string,
qualifiedNames: readonly string[],
limit = COMPLEXITY_BATCH_LIMIT
)
| 439 | * which is the sweep this function exists to avoid. |
| 440 | */ |
| 441 | export 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. */ |
| 454 | export const DECLARATION_BATCH_LIMIT = 1000; |
no test coverage detected