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


PHP DbHelper::deleteArchiveTables方法代码示例

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


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

示例1: deleteArchiveTables

 /**
  * Drops all archive tables.
  */
 public static function deleteArchiveTables()
 {
     DbHelper::deleteArchiveTables();
 }
开发者ID:mgou-net,项目名称:piwik,代码行数:7,代码来源:SystemTestCase.php

示例2: onEnvironmentBootstrapped

 public function onEnvironmentBootstrapped()
 {
     if (empty($_GET['ignoreClearAllViewDataTableParameters'])) {
         // TODO: should use testingEnvironment variable, not query param
         try {
             \Piwik\ViewDataTable\Manager::clearAllViewDataTableParameters();
         } catch (\Exception $ex) {
             // ignore (in case DB is not setup)
         }
     }
     if ($this->vars->optionsOverride) {
         try {
             foreach ($this->vars->optionsOverride as $name => $value) {
                 Option::set($name, $value);
             }
         } catch (\Exception $ex) {
             // ignore (in case DB is not setup)
         }
     }
     \Piwik\Plugins\CoreVisualizations\Visualizations\Cloud::$debugDisableShuffle = true;
     \Piwik\Visualization\Sparkline::$enableSparklineImages = false;
     \Piwik\Plugins\ExampleUI\API::$disableRandomness = true;
     if ($this->vars->deleteArchiveTables && !$this->vars->_archivingTablesDeleted) {
         $this->vars->_archivingTablesDeleted = true;
         DbHelper::deleteArchiveTables();
     }
 }
开发者ID:FluentDevelopment,项目名称:piwik,代码行数:27,代码来源:TestingEnvironmentManipulator.php

示例3: testPurgeDataDeleteLogsNoData

 /**
  * Test that purgeData works when there's no data.
  */
 public function testPurgeDataDeleteLogsNoData()
 {
     DbHelper::truncateAllTables();
     DbHelper::deleteArchiveTables();
     // get purge data prediction
     $prediction = PrivacyManager::getPurgeEstimate();
     // perform checks on prediction
     $expectedPrediction = array();
     $this->assertEquals($expectedPrediction, $prediction);
     // purge data
     $this->_setTimeToRun();
     $this->assertTrue($this->instance->deleteLogData());
     $this->assertTrue($this->instance->deleteReportData());
     // perform checks
     $this->assertEquals(0, $this->_getTableCount('log_visit'));
     $this->assertEquals(0, $this->_getTableCount('log_conversion'));
     $this->assertEquals(0, $this->_getTableCount('log_link_visit_action'));
     $this->assertEquals(0, $this->_getTableCount('log_conversion_item'));
     $archiveTables = self::_getArchiveTableNames();
     $this->assertFalse($this->_tableExists($archiveTables['numeric'][0]));
     // January
     $this->assertFalse($this->_tableExists($archiveTables['numeric'][1]));
     // February
     $this->assertFalse($this->_tableExists($archiveTables['blob'][0]));
     // January
     $this->assertFalse($this->_tableExists($archiveTables['blob'][1]));
     // February
 }
开发者ID:FluentDevelopment,项目名称:piwik,代码行数:31,代码来源:DataPurgingTest.php


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