import type { Insertable, InsertNode } from './@types/insert.js';
import type { AnyDB } from './@types/internal-types.js';
import { NonLinkColumnNames } from './@types/query-builder.js';
import { ResolveSelection } from './@types/type-helpers.js';
import { Executor } from './executor.js';
/**
 * A query builder for creating new records in the database.
 * @template DB - The database type.
 * @template TableName - The name of the table to insert into.
 * @template Selection - The type of the selected fields.
 */
export declare class InsertQueryBuilder<DB extends AnyDB, TableName extends keyof DB, Selection = {
    id: number;
}> {
    #private;
    constructor(node: InsertNode, executor: Executor);
    /**
     * The values to insert into the table.
     * @param values - An object or array of objects representing the records to create.
     * @returns The `InsertQueryBuilder` instance for chaining.
     *
     * @example Single Record Insertion
     * ```typescript
     * const newUser = await qb
     *   .insertInto('users')
     *   .values({ name: 'John Doe', email: 'john.doe@example.com' })
     *   .executeTakeFirst();
     * ```
     *
     * @example Multiple Record Insertion
     * ```typescript
     * const newUsers = await qb
     *   .insertInto('users')
     *   .values([{ name: 'John Doe' }, { name: 'Jane Doe' }])
     *   .execute();
     * ```
     */
    values(values: Insertable<DB[TableName]> | Insertable<DB[TableName]>[]): InsertQueryBuilder<DB, TableName, Selection>;
    /**
     * The fields to return after the insert operation.
     * @param fields - An array of field names to return.
     * @returns The `InsertQueryBuilder` instance for chaining.
     *
     * @example
     * ```typescript
     * const newUser = await qb
     *   .insertInto('users')
     *   .values({ name: 'John Doe' })
     *   .returning(['id', 'name'])
     *   .executeTakeFirst();
     * ```
     */
    returning<const TFields extends readonly NonLinkColumnNames<DB[TableName]>[]>(fields: TFields): InsertQueryBuilder<DB, TableName, ResolveSelection<DB, TableName, TFields, object>>;
    /**
     * Executes the insert query.
     * @returns A promise that resolves with an array of the selected fields from the inserted records.
     *
     * @example
     * ```typescript
     * const newUsers = await qb
     *   .insertInto('users')
     *   .values([{ name: 'John Doe' }, { name: 'Jane Doe' }])
     *   .returning(['id', 'name'])
     *   .execute();
     * ```
     */
    execute(): Promise<Selection[]>;
    /**
     * Executes the insert query and returns the first result.
     * @returns A promise that resolves with the first inserted record, or `null` if no records were inserted.
     *
     * @example
     * ```typescript
     * const newUser = await qb
     *   .insertInto('users')
     *   .values({ name: 'John Doe' })
     *   .returning(['id', 'name'])
     *   .executeTakeFirst();
     * ```
     */
    executeTakeFirst(): Promise<Selection | null>;
    compile(): {
        query: string;
        variables: Record<string, any>;
    };
    _prepareMetadata(): any;
}
