/** * Generic paginated query helper. * * Wraps COUNT + SELECT in a single transaction so the pool connection * is acquired only once instead of two separate acquire/release cycles. */ import type { PaginatedResult, PaginateOptions } from './dashboard_types.js'; import type { Knex } from 'knex'; /** * Clamp a raw perPage value to a safe range (1..200) to prevent DoS via * unbounded result sets on the single sqlite connection. */ export declare function clampPerPage(value: number): number; /** * Execute a paginated query within a transaction. */ export declare function executePaginate(db: Knex, opts: PaginateOptions): Promise>>;