/** * PostgreSQL Adapter for lazy-render-server * Provides pagination support for PostgreSQL */ import { PaginationParams } from '../index'; export interface PostgresPaginationResult { data: T[]; pagination: { page: number; limit: number; total: number; totalPages: number; hasMore: boolean; nextCursor?: string; prevCursor?: string; }; meta?: { sortBy?: string; sortOrder?: 'asc' | 'desc'; timestamp: string; }; } /** * Paginate PostgreSQL query results * * @param db - Database client (node-postgres) * @param table - Table name * @param params - Pagination parameters * @param where - WHERE clause (optional) * @param orderBy - ORDER BY clause (optional) * @returns Paginated results */ export declare function paginatePostgres(db: any, // node-postgres client table: string, params: PaginationParams, where?: string, orderBy?: string): Promise>; /** * Paginate with custom SQL query * * @param db - Database client * @param params - Pagination parameters * @param sql - Custom SQL query (without LIMIT/OFFSET) * @param countSql - Count query SQL * @param values - Query parameters * @returns Paginated results */ export declare function paginatePostgresCustom(db: any, params: PaginationParams, sql: string, countSql: string, values?: any[]): Promise>; declare const _default: { paginatePostgres: typeof paginatePostgres; paginatePostgresCustom: typeof paginatePostgresCustom; }; export default _default;