18 public static function merge(array $insertFields, array $updateFields, ?array $uniqueFields =
null)
20 $entity = static::getEntity();
21 $conn = $entity->getConnection();
22 $primary = $uniqueFields ===
null ? $entity->getPrimaryArray() : $uniqueFields;
24 $sql = $conn->getSqlHelper()->prepareMerge(static::getTableName(), $primary, $insertFields, $updateFields);
26 $conn->queryExecute(current($sql));