import { type SQLWrapper } from "drizzle-orm"; import type { AnyPgTable } from "drizzle-orm/pg-core"; import type { DrizzleClient } from "../types.js"; export type KeysetPage = { rows: T[]; nextCursor?: string; }; type KeysetQuery = PromiseLike & { limit(limit: number): KeysetQuery; orderBy(orderExpr: SQLWrapper): KeysetQuery; where(condition: SQLWrapper): KeysetQuery; }; export declare function keysetPaginate>(db: DrizzleClient, queryBuilder: (db: DrizzleClient) => KeysetQuery, orderExpr: SQLWrapper, getCursor: (row: TRow) => string | Date, cursorValue?: string, limit?: number): Promise>; export declare function batchInsert(db: DrizzleClient, table: TTable, values: Array, chunkSize?: number): Promise; type TransactionFor = Parameters[0] extends (tx: infer TTransaction, ...args: never[]) => Promise ? TTransaction : never; export declare function withTransaction(db: TDb, run: (tx: TransactionFor) => Promise): Promise; export {}; //# sourceMappingURL=index.d.ts.map