API 参考
    正在准备搜索索引...

    接口 UpsertOptions<Entity>

    Special options passed to Repository#upsert

    interface UpsertOptions<Entity> {
        conflictPaths: string[] | { [P in string | number | symbol]?: true };
        indexPredicate?: string;
        overwriteCondition?: {
            parameters?: ObjectLiteral;
            where: string | ObjectLiteral | ObjectLiteral[] | Brackets;
        };
        returning?: ReturningOption;
        skipUpdateIfNoValuesChanged?: boolean;
        upsertType?: UpsertType;
    }

    类型参数

    • Entity

    层级

    • InsertOrUpdateOptions
      • UpsertOptions
    索引

    属性

    conflictPaths: string[] | { [P in string | number | symbol]?: true }
    indexPredicate?: string

    If included, postgres will apply the index predicate to a conflict target (partial index)

    overwriteCondition?: {
        parameters?: ObjectLiteral;
        where: string | ObjectLiteral | ObjectLiteral[] | Brackets;
    }
    returning?: ReturningOption

    Allows selecting custom RETURNING / OUTPUT clause. Works only on drivers with returning support.

    skipUpdateIfNoValuesChanged?: boolean

    If true, postgres will skip the update if no values would be changed (reduces writes)

    upsertType?: UpsertType

    Define the type of upsert to use (currently, CockroachDB only).

    If none provided, it will use the default for the database (first one in the list)