import type { EntityData, EntityMetadata, FilterQuery } from '../typings.js';
import type { UpsertOptions } from '../drivers/IDatabaseDriver.js';
import { type Raw } from '../utils/RawQueryFragment.js';
/** @internal */
export declare function getOnConflictFields<T>(
  meta: EntityMetadata<T> | undefined,
  data: EntityData<T>,
  uniqueFields: (keyof T)[] | Raw,
  options: UpsertOptions<T>,
): (keyof T)[];
/** @internal */
export declare function getOnConflictReturningFields<T, P extends string>(
  meta: EntityMetadata<T> | undefined,
  data: EntityData<T>,
  uniqueFields: (keyof T)[] | Raw,
  options: UpsertOptions<T, P>,
): (keyof T)[] | '*';
/** @internal */
export declare function getWhereCondition<T extends object>(
  meta: EntityMetadata<T>,
  onConflictFields: (keyof T)[] | Raw | undefined,
  data: EntityData<T>,
  where: FilterQuery<T>,
): {
  where: FilterQuery<T>;
  propIndex: number | false;
};
