(ids: readonly string[])
| 528 | } |
| 529 | |
| 530 | export async function findManyMessageWithRelations(ids: readonly string[]) { |
| 531 | const start = Date.now(); |
| 532 | const messages = await dbReplica.query.dbMessages.findMany({ |
| 533 | where: inArray(dbMessages.id, ids as string[]), |
| 534 | columns: { |
| 535 | id: true, |
| 536 | content: true, |
| 537 | questionId: true, |
| 538 | serverId: true, |
| 539 | authorId: true, |
| 540 | channelId: true, |
| 541 | parentChannelId: true, |
| 542 | childThreadId: true, |
| 543 | embeds: true, |
| 544 | }, |
| 545 | with: { |
| 546 | author: { |
| 547 | with: { |
| 548 | userServerSettings: true, |
| 549 | }, |
| 550 | }, |
| 551 | attachments: true, |
| 552 | solutions: { |
| 553 | with: { |
| 554 | author: { |
| 555 | with: { |
| 556 | userServerSettings: true, |
| 557 | }, |
| 558 | }, |
| 559 | attachments: true, |
| 560 | }, |
| 561 | columns: { |
| 562 | id: true, |
| 563 | content: true, |
| 564 | questionId: true, |
| 565 | serverId: true, |
| 566 | authorId: true, |
| 567 | channelId: true, |
| 568 | parentChannelId: true, |
| 569 | childThreadId: true, |
| 570 | embeds: true, |
| 571 | }, |
| 572 | }, |
| 573 | reference: { |
| 574 | with: { |
| 575 | author: { |
| 576 | with: { |
| 577 | userServerSettings: true, |
| 578 | }, |
| 579 | }, |
| 580 | attachments: true, |
| 581 | }, |
| 582 | columns: { |
| 583 | id: true, |
| 584 | content: true, |
| 585 | questionId: true, |
| 586 | serverId: true, |
| 587 | authorId: true, |
nothing calls this directly
no test coverage detected