(
label: string,
filePaths: readonly string[],
limit = DECLARATION_BATCH_LIMIT
)
| 464 | * files is two round trips this way and eighty the other. |
| 465 | */ |
| 466 | export function declarationsInFiles( |
| 467 | label: string, |
| 468 | filePaths: readonly string[], |
| 469 | limit = DECLARATION_BATCH_LIMIT |
| 470 | ): string | undefined { |
| 471 | const predicate = anyOf('n', NODE_PROPS.filePath, filePaths); |
| 472 | if (predicate === undefined) { |
| 473 | return undefined; |
| 474 | } |
| 475 | return `MATCH (n:${label}) WHERE ${predicate} ${ret(COLUMNS.declarations)} LIMIT ${safeLimit(limit)}`; |
| 476 | } |
| 477 | |
| 478 | /** How many callers one batched inbound read returns. */ |
| 479 | export const CALLER_BATCH_LIMIT = 500; |
no test coverage detected