當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。