import type { ID } from '../types'; /** * MySQL/MariaDB inserts do not use RETURNING. Knex reports only the first * auto-increment id of a multi-row INSERT (`[insertId]`), while InnoDB assigns * the rest `auto_increment_increment` apart. Postgres and SQLite already * return one id per row. */ declare const idsFromInsertResult: (chunkResult: unknown, rowCount: number, useReturning: boolean, increment?: number) => ID[]; /** * MySQL only reports the first id of a multi-row insert. The rest are * `auto_increment_increment` apart, which is 1 unless the server is configured * otherwise (Group Replication, Galera). */ declare const readAutoIncrementStep: (connection: { raw: (sql: string) => Promise; }) => Promise; /** * One MySQL statement can be expanded from a single insert id only when every * generated value stays on that sequence. An explicit id greater than the * counter jumps the next generated value, and the driver does not report the * jump. Keep each statement either all explicit or all generated. */ declare const splitByIdSource: (rows: Array>) => Record[][]; /** * Rows that already carry a primary key must keep those ids. MySQL reports * one insert id per statement: the first generated value. Callers pass rows * from `splitByIdSource`, so a statement does not mix the two. */ declare const idsForInsertedRows: (rows: Array>, chunkResult: unknown, useReturning: boolean, increment?: number) => ID[]; export { idsForInsertedRows, idsFromInsertResult, readAutoIncrementStep, splitByIdSource }; //# sourceMappingURL=inserted-ids.d.ts.map