MCPcopy
hub / github.com/PostHog/posthog / fetchEvents

Method fetchEvents

plugin-server/src/utils/db/db.ts:1222–1227  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1220 // Event (NOTE: not a Django model, stored in ClickHouse table `events`)
1221
1222 public async fetchEvents(): Promise<ClickHouseEvent[]> {
1223 const queryResult = await this.clickhouseQuery<RawClickHouseEvent>(
1224 `SELECT * FROM events ORDER BY timestamp ASC`
1225 )
1226 return queryResult.data.map(parseRawClickHouseEvent)
1227 }
1228
1229 public async fetchDeadLetterQueueEvents(): Promise<DeadLetterQueueEvent[]> {
1230 const result = await this.clickhouseQuery(`SELECT * FROM events_dead_letter_queue ORDER BY _timestamp ASC`)

Callers 15

e2e.buffer.test.tsFile · 0.80
errors.test.tsFile · 0.80
getEventsByPersonFunction · 0.80
processEventFunction · 0.80
captureFunction · 0.80

Calls

no outgoing calls

Tested by 4

getEventsByPersonFunction · 0.64
processEventFunction · 0.64
captureFunction · 0.64