// SPDX-FileCopyrightText: 2025-2026 Vasyl Zakharchenko // SPDX-License-Identifier: MIT import { AsyncLocalStorage } from "node:async_hooks"; export type OperationType = "DML" | "DDL"; export type OperationTypeQueryContext = { operationType: OperationType; }; export const operationTypeQueryContext = new AsyncLocalStorage(); export async function getOperationType(): Promise { return operationTypeQueryContext.getStore()?.operationType ?? "DML"; }