function enforceTransactionRoundTripGuard
enforceTransactionRoundTripGuard(
count: number,
sql: string,
): void

Count a statement within one interactive transaction and fire once, exactly when the running count crosses the threshold. Only enforced inside a request scope — startup migrations rebuild tables in one big transaction outside any request, so they are never counted. count is the running per-transaction statement count.

Parameters

count: number
sql: string

Return Type

void

Usage

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