import { type Knex } from "knex"; import { type DatabaseSchemaExtend } from "../types/types"; import { type DBPreset } from "./db"; import { Puri } from "./puri"; import { type ColumnKeys, type IdType, type OmitInternalTypeKeys, type PuriTable } from "./puri.types"; import { type InsertOnlyOptions, type UBRef, type UpsertBuilder, type UpsertOptions } from "./upsert-builder"; type TableName = Extract; export type TransactionalOptions = { isolation?: Exclude; dbPreset?: DBPreset; readOnly?: boolean; }; export declare class PuriWrapper { knex: Knex; upsertBuilder: UpsertBuilder; constructor(knex: Knex, upsertBuilder: UpsertBuilder); raw(sql: string): Knex.Raw; from(tableName: TTable): Puri>, OmitInternalTypeKeys>>; from(spec: { [K in TAlias]: TTable; }): Puri>, OmitInternalTypeKeys>>; from(spec: { [K in TAlias]: Puri; }): Puri>, OmitInternalTypeKeys>>; table(tableName: TTable): Puri>, OmitInternalTypeKeys>>; table(spec: { [K in TAlias]: TTable; }): Puri>, OmitInternalTypeKeys>>; table(spec: { [K in TAlias]: Puri; }): Puri>, OmitInternalTypeKeys>>; transaction(callback: (trx: PuriTransactionWrapper) => Promise, options?: TransactionalOptions): Promise; ubRegister>(tableName: TTable, row: Partial<{ [K in ColumnKeys]: TSchema[TTable][K] | UBRef; }>): UBRef; ubUpsert & keyof DatabaseSchemaExtend>(tableName: TTable, options?: UpsertOptions): Promise[]>; ubInsertOnly & keyof DatabaseSchemaExtend>(tableName: TTable, options?: InsertOnlyOptions): Promise[]>; ubUpsertOrInsert & keyof DatabaseSchemaExtend>(tableName: TTable, mode: "upsert" | "insert", options?: UpsertOptions): Promise[]>; ubUpdateBatch(tableName: TableName, options?: { chunkSize?: number; where?: string | string[]; }): Promise; debugTransaction(): Promise; private getTransactionInfo; } export declare class PuriTransactionWrapper extends PuriWrapper { trx: Knex.Transaction; upsertBuilder: UpsertBuilder; constructor(trx: Knex.Transaction, upsertBuilder: UpsertBuilder); rollback(): Promise; commit(): Promise; } export {}; //# sourceMappingURL=puri-wrapper.d.ts.map