Bitrix API

AddMergeTrait uses \Bitrix\Main\ORM\Data\AddStrategy\Internal\BaseMergeTrait

Tags
mixin

Table of Contents

Methods

addMerge()  : AddResult
Adds row to entity table, for details @see DataManager::add
addMergeMulti()  : AddResult
Adds several rows to entity table, for details @see DataManager::addMulti

Methods

addMerge()

Adds row to entity table, for details @see DataManager::add

public final static addMerge(array<string|int, mixed> $data) : AddResult

This method adds a new row to the DB EXCEPT there is already a row that contains the same primary/unique field value. In this case, the existing row will be updated to hold the same data. Think of it as using an 'INSERT ... ON DUPLICATE KEY UPDATE' SQL statement. Events are not supported and are never fired.

Parameters
$data : array<string|int, mixed>
Return values
AddResult

addMergeMulti()

Adds several rows to entity table, for details @see DataManager::addMulti

public final static addMergeMulti(array<string|int, mixed> $rows) : AddResult

This method adds a new row to the DB EXCEPT there is already a row that contains the same primary/unique field value. In this case, the existing row will be updated to hold the same data. Think of it as using an 'INSERT ... ON DUPLICATE KEY UPDATE' SQL statement. Events are not supported and are never fired.

Parameters
$rows : array<string|int, mixed>
Return values
AddResult

        
On this page

Search results