当前位置: 首页>>代码示例>>PHP>>正文


PHP LocationTable::mergeRelationsFromTemporalTable方法代码示例

本文整理汇总了PHP中Bitrix\Sale\Location\LocationTable::mergeRelationsFromTemporalTable方法的典型用法代码示例。如果您正苦于以下问题:PHP LocationTable::mergeRelationsFromTemporalTable方法的具体用法?PHP LocationTable::mergeRelationsFromTemporalTable怎么用?PHP LocationTable::mergeRelationsFromTemporalTable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Bitrix\Sale\Location\LocationTable的用法示例。


在下文中一共展示了LocationTable::mergeRelationsFromTemporalTable方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: mergeRebalancedNodes

 private function mergeRebalancedNodes()
 {
     if ($this->rebalanceInserter) {
         $this->logMessage('Finally, MERGE is in progress');
         $this->rebalanceInserter->flush();
         // merge temp table with location table
         // there should be more generalized method
         Location\LocationTable::mergeRelationsFromTemporalTable(self::TREE_REBALANCE_TEMP_TABLE_NAME, false, array('LEFT_MARGIN' => 'L', 'RIGHT_MARGIN' => 'R', 'DEPTH_LEVEL' => 'D', 'ID' => 'I'));
     }
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:10,代码来源:importprocess.php

示例2: insertTreeInfo

 private function insertTreeInfo()
 {
     // We make temporal table, place margins, parent and lang data into it, then perform an update of the old table from the temporal one.
     $this->createTemporalTable(self::TABLE_TEMP_TREE, array('ID' => array('TYPE' => array(self::DB_TYPE_MYSQL => 'int', self::DB_TYPE_MSSQL => 'int', self::DB_TYPE_ORACLE => 'NUMBER(18)')), 'PARENT_ID' => array('TYPE' => array(self::DB_TYPE_MYSQL => 'int', self::DB_TYPE_MSSQL => 'int', self::DB_TYPE_ORACLE => 'NUMBER(18)')), 'TYPE_ID' => array('TYPE' => array(self::DB_TYPE_MYSQL => 'int', self::DB_TYPE_MSSQL => 'int', self::DB_TYPE_ORACLE => 'NUMBER(18)')), 'DEPTH_LEVEL' => array('TYPE' => array(self::DB_TYPE_MYSQL => 'int', self::DB_TYPE_MSSQL => 'int', self::DB_TYPE_ORACLE => 'NUMBER(18)')), 'LEFT_MARGIN' => array('TYPE' => array(self::DB_TYPE_MYSQL => 'int', self::DB_TYPE_MSSQL => 'int', self::DB_TYPE_ORACLE => 'NUMBER(18)')), 'RIGHT_MARGIN' => array('TYPE' => array(self::DB_TYPE_MYSQL => 'int', self::DB_TYPE_MSSQL => 'int', self::DB_TYPE_ORACLE => 'NUMBER(18)'))));
     $handle = new BlockInserter(array('tableName' => self::TABLE_TEMP_TREE, 'exactFields' => array('ID' => array('data_type' => 'integer'), 'PARENT_ID' => array('data_type' => 'integer'), 'TYPE_ID' => array('data_type' => 'integer'), 'DEPTH_LEVEL' => array('data_type' => 'integer'), 'LEFT_MARGIN' => array('data_type' => 'integer'), 'RIGHT_MARGIN' => array('data_type' => 'integer')), 'parameters' => array('mtu' => 9999)));
     // fill temporal table
     if (is_array($this->data['TREE'])) {
         foreach ($this->data['TREE'] as $id => $node) {
             $handle->insert(array('ID' => $id, 'PARENT_ID' => $node['PARENT_ID'], 'TYPE_ID' => $node['TYPE_ID'], 'DEPTH_LEVEL' => $node['DEPTH_LEVEL'], 'LEFT_MARGIN' => $node['LEFT_MARGIN'], 'RIGHT_MARGIN' => $node['RIGHT_MARGIN']));
         }
     }
     $handle->flush();
     // merge temp table with location table
     Location\LocationTable::mergeRelationsFromTemporalTable(self::TABLE_TEMP_TREE, array('TYPE_ID', 'PARENT_ID'));
     $this->dropTable(self::TABLE_TEMP_TREE);
 }
开发者ID:andy-profi,项目名称:bxApiDocs,代码行数:16,代码来源:migrate.php


注:本文中的Bitrix\Sale\Location\LocationTable::mergeRelationsFromTemporalTable方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。