forked from mtusi2026/mtusi2026lab2
test(api): cover persistence, cache consistency and dependency failures
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
export async function messageEpoch(prisma, chatId) {
|
||||
const [row] = await prisma.$queryRawUnsafe(
|
||||
'SELECT COALESCE(SUM(epoch), 0)::bigint AS epoch FROM public.chat_message_epochs WHERE chat_id = $1::uuid',
|
||||
chatId,
|
||||
);
|
||||
return row.epoch;
|
||||
}
|
||||
Reference in New Issue
Block a user