ReadonlyoperationUnique identifier for this operation (UUID v4).
Use for correlation in logs and traces.
ReadonlystartTimestamp when operation started (ms since epoch).
ReadonlyadapterAdapter kind (e.g., 'better-sqlite3', 'indexeddb', 'postgres').
OptionalmetadataCustom metadata attached to this operation.
Hooks can read and modify this to pass data between hooks or to the calling code.
ReadonlyoperationOperation type (write operations only).
SQL statement being executed.
Hooks can modify this to transform mutations.
OptionalparametersParameters for parameterized statements.
Hooks can modify this to transform parameters.
OptionalaffectedTables being modified by this write.
Used for cache invalidation and tracking.
Optional ReadonlyinWhether this write is part of a transaction.
Context for write operations (run, batch).
Example