function getEventWithAttendeesRaw
getEventWithAttendeesRaw(id: number): Promise<EventWithAttendees | null>

Get event and all attendees in a single database round-trip. Uses batch API to execute both queries together, reducing latency for remote databases like Turso from 2 RTTs to 1. Computes attendee_count from the attendees array.

Parameters

id: number

Return Type

Promise<EventWithAttendees | null>

Usage

import { getEventWithAttendeesRaw } from "docs/database.ts";