Skip to main content

Interface: DatabaseSuccessEventData

Defined in: shared/types/events.ts:175

Payload for database success events.

Remarksโ€‹

Used to track successful database operations for monitoring and performance analysis. Provides metrics about operation performance and cache utilization.

Exampleโ€‹

const event: DatabaseSuccessEventData = {
operation: "query",
duration: 45,
cacheHit: true,
};

Extendsโ€‹

Propertiesโ€‹

timestampโ€‹

timestamp: number

Defined in: shared/types/events.ts:25

The time (in ms since epoch) when the event occurred.

Inherited fromโ€‹

BaseEventData.timestamp


cacheHit?โ€‹

optional cacheHit: boolean

Defined in: shared/types/events.ts:177

Whether this operation was served from cache


duration?โ€‹

optional duration: number

Defined in: shared/types/events.ts:179

Duration of the operation in milliseconds


operationโ€‹

operation: DatabaseOperation

Defined in: shared/types/events.ts:181

The database operation that succeeded


rowCount?โ€‹

optional rowCount: number

Defined in: shared/types/events.ts:183

Number of rows affected/returned