當前位置: 首頁>>代碼示例>>PHP>>正文


PHP IDBConnection::dropTable方法代碼示例

本文整理匯總了PHP中OCP\IDBConnection::dropTable方法的典型用法代碼示例。如果您正苦於以下問題:PHP IDBConnection::dropTable方法的具體用法?PHP IDBConnection::dropTable怎麽用?PHP IDBConnection::dropTable使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在OCP\IDBConnection的用法示例。


在下文中一共展示了IDBConnection::dropTable方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: run

 /**
  * Run repair step.
  * Must throw exception on error.
  *
  * @throws \Exception in case of failure
  */
 public function run()
 {
     foreach ($this->oldDatabaseTables() as $tableName) {
         if ($this->connection->tableExists($tableName)) {
             $this->emit('\\OC\\Repair', 'info', [sprintf('Table %s has been deleted', $tableName)]);
             $this->connection->dropTable($tableName);
         }
     }
 }
開發者ID:evanjt,項目名稱:core,代碼行數:15,代碼來源:dropoldtables.php

示例2: run

 /**
  * Run repair step.
  * Must throw exception on error.
  *
  * @throws \Exception in case of failure
  */
 public function run(IOutput $output)
 {
     $tables = $this->oldDatabaseTables();
     $output->startProgress(count($tables));
     foreach ($this->oldDatabaseTables() as $tableName) {
         if ($this->connection->tableExists($tableName)) {
             $this->connection->dropTable($tableName);
         }
         $output->advance(1, "Drop old database table: {$tableName}");
     }
     $output->finishProgress();
 }
開發者ID:GitHubUser4234,項目名稱:core,代碼行數:18,代碼來源:DropOldTables.php

示例3: testDropTable

 /**
  * @depends testTableExists
  */
 public function testDropTable()
 {
     $this->makeTestTable();
     $this->assertTableExist('table');
     $this->connection->dropTable('table');
     $this->assertTableNotExist('table');
 }
開發者ID:rchicoli,項目名稱:owncloud-core,代碼行數:10,代碼來源:ConnectionTest.php

示例4: testSetValuesOverWritePrecondition

 public function testSetValuesOverWritePrecondition()
 {
     $this->makeTestTable();
     $this->connection->setValues('table', ['integerfield' => 1], ['textfield' => 'foo', 'booleanfield' => true, 'clobfield' => 'not_null']);
     $this->connection->setValues('table', ['integerfield' => 1], ['textfield' => 'bar'], ['booleanfield' => true]);
     $this->assertEquals('bar', $this->getTextValueByIntergerField(1));
     $this->connection->dropTable('table');
 }
開發者ID:gvde,項目名稱:core,代碼行數:8,代碼來源:connection.php

示例5: dropTable

 /**
  * Drop a table from the database if it exists
  *
  * @param string $table table name without the prefix
  */
 public function dropTable($table)
 {
     $this->connection->dropTable($table);
 }
開發者ID:farukuzun,項目名稱:core-1,代碼行數:9,代碼來源:db.php

示例6: tearDown

 public function tearDown()
 {
     $this->db->dropTable('contacts_addressbooks');
     $this->db->dropTable('contacts_cards');
     parent::tearDown();
 }
開發者ID:farukuzun,項目名稱:core-1,代碼行數:6,代碼來源:addressbookadaptertest.php


注:本文中的OCP\IDBConnection::dropTable方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。