typeorm
Version:
Data-Mapper ORM for TypeScript and ES2021+. Supports MySQL/MariaDB, PostgreSQL, MS SQL Server, Oracle, SAP HANA, SQLite, MongoDB databases.
19 lines (18 loc) • 655 B
TypeScript
import { UpsertType } from "../driver/types/UpsertType";
import { Brackets } from "./Brackets";
import { ObjectLiteral } from "../common/ObjectLiteral";
export type InsertOrUpdateOptions = {
/**
* If true, postgres will skip the update if no values would be changed (reduces writes)
*/
skipUpdateIfNoValuesChanged?: boolean;
/**
* If included, postgres will apply the index predicate to a conflict target (partial index)
*/
indexPredicate?: string;
upsertType?: UpsertType;
overwriteCondition?: {
where: string | Brackets | ObjectLiteral | ObjectLiteral[];
parameters?: ObjectLiteral;
};
};