UNPKG

slonik-trpc

Version:
14 lines (13 loc) 526 B
import { QuerySqlToken } from 'slonik'; import { LoadParameters } from '../makeQueryLoader'; import type { Plugin } from './types'; export declare type SlowQueryNotification = { query: QuerySqlToken; duration: number; result: any; args: LoadParameters<any, any, any, any, string, string, boolean>; }; export declare const useSlowQueryPlugin: ({ slowQueryThreshold, callback }?: { slowQueryThreshold?: number | undefined; callback?: ((options: SlowQueryNotification) => void) | undefined; }) => Plugin;