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

Function findManyChannelMessagesCounts

packages/core/src/channel.ts:146–156  ·  view source on GitHub ↗
(channelIds: string[])

Source from the content-addressed store, hash-verified

144}
145
146export async function findManyChannelMessagesCounts(channelIds: string[]) {
147 if (channelIds.length === 0) return Promise.resolve([]);
148 return dbReplica
149 .select({
150 channelId: dbMessages.channelId,
151 count: sql<number>`count(*)`,
152 })
153 .from(dbMessages)
154 .where(inArray(dbMessages.channelId, channelIds))
155 .groupBy(dbMessages.channelId);
156}
157
158export async function findLatestThreads(args: { take: number }) {
159 const data = await dbReplica.query.dbChannels.findMany({

Callers 2

findManyChannelsByIdFunction · 0.85
channel.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected