MCPcopy Index your code
hub / github.com/AnswerOverflow/AnswerOverflow / findManyMessageWithRelations

Function findManyMessageWithRelations

packages/core/src/message.ts:530–621  ·  view source on GitHub ↗
(ids: readonly string[])

Source from the content-addressed store, hash-verified

528}
529
530export 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,

Callers

nothing calls this directly

Calls 5

addFlagsToChannelFunction · 0.90
stripPrivateServerDataFunction · 0.90
addFlagsToServerFunction · 0.90
stripPrivateChannelDataFunction · 0.90

Tested by

no test coverage detected