* Read many collections by name
(collectionKeys: string[])
| 423 | * Read many collections by name |
| 424 | */ |
| 425 | async readMany(collectionKeys: string[]): Promise<Collection[]> { |
| 426 | if (this.accountability) { |
| 427 | await Promise.all( |
| 428 | collectionKeys.map((collection) => |
| 429 | validateAccess( |
| 430 | { |
| 431 | accountability: this.accountability!, |
| 432 | action: 'read', |
| 433 | collection, |
| 434 | skipCollectionExistsCheck: true, |
| 435 | }, |
| 436 | { |
| 437 | schema: this.schema, |
| 438 | knex: this.knex, |
| 439 | }, |
| 440 | ), |
| 441 | ), |
| 442 | ); |
| 443 | } |
| 444 | |
| 445 | const collections = await this.readByQuery(); |
| 446 | return collections.filter(({ collection }) => collectionKeys.includes(collection)); |
| 447 | } |
| 448 | |
| 449 | /** |
| 450 | * Update a single collection by name |
no test coverage detected