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


PHP DynamoDbClient::deleteTable方法代碼示例

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


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

示例1: deleteTable

 /**
  * Delete the table
  *
  * @param boolean $wait  Wait until the table is deleted
  */
 protected static function deleteTable($wait = false)
 {
     self::$dynamodb->deleteTable(['TableName' => self::TABLE_NAME]);
     if (!$wait) {
         return;
     }
     self::$dynamodb->waitUntil('TableNotExists', ['TableName' => self::TABLE_NAME, 'waiter.interval' => 1, 'waiter.max_attempts' => 5]);
 }
開發者ID:sven4ask,項目名稱:config,代碼行數:13,代碼來源:DynamoDBLoaderTest.php

示例2: deleteTable

 public function deleteTable($tablename)
 {
     $args = ['TableName' => $tablename];
     $result = $this->db->deleteTable($args);
     if (isset($result['TableDescription']) && $result['TableDescription']) {
         return true;
     } else {
         return false;
     }
 }
開發者ID:oasmobile,項目名稱:php-aws-wrappers,代碼行數:10,代碼來源:DynamoDbManager.php

示例3: deleteTable

 /**
  * Delete table via the delete_table call
  * @param string $table The name of the table
  * @return Table\TableDescription
  */
 public function deleteTable($table)
 {
     if (null !== $this->logger) {
         $this->log('Delete table ' . $table);
     }
     $parameters = array('TableName' => $table);
     if (null !== $this->logger) {
         $this->log('DeleteTable request paramaters : ' . print_r($parameters, true), Logger::DEBUG);
     }
     $response = $this->connector->deleteTable($parameters);
     if (null !== $this->logger) {
         $this->log('DeleteTable request response : ' . print_r($response, true), Logger::DEBUG);
     }
 }
開發者ID:16hands,項目名稱:riverline-dynamodb,代碼行數:19,代碼來源:Connection.php

示例4: deleteDynamoDb

 private function deleteDynamoDb(\Aws\DynamoDb\DynamoDbClient $client, $prefix = null, $waitForDeletion = false)
 {
     $tablesList = explode(' ', 'oauth_access_tokens oauth_authorization_codes oauth_clients oauth_jwt oauth_public_keys oauth_refresh_tokens oauth_scopes oauth_users');
     $nbTables = count($tablesList);
     // Delete all table.
     foreach ($tablesList as $key => $table) {
         try {
             $client->deleteTable(array('TableName' => $prefix . $table));
         } catch (\Aws\DynamoDb\Exception\DynamoDbException $e) {
             // Table does not exist : nothing to do
         }
     }
     // Wait for deleting
     if ($waitForDeletion) {
         $retries = 5;
         $nbTableDeleted = 0;
         while ($nbTableDeleted != $nbTables) {
             $nbTableDeleted = 0;
             foreach ($tablesList as $key => $table) {
                 try {
                     $result = $client->describeTable(array('TableName' => $prefix . $table));
                 } catch (\Aws\DynamoDb\Exception\DynamoDbException $e) {
                     // Table does not exist : nothing to do
                     $nbTableDeleted++;
                 }
             }
             if ($nbTableDeleted != $nbTables) {
                 if ($retries < 0) {
                     // we are tired of waiting
                     return false;
                 }
                 sleep(5);
                 echo "Sleeping 5 seconds for DynamoDB ({$retries} more retries)...\n";
                 $retries--;
             }
         }
     }
     return true;
 }
開發者ID:johnmicahmiguel,項目名稱:yodaphp,代碼行數:39,代碼來源:Bootstrap.php

示例5: testDeleteIndexedTable

 /**
  * @depends testQueryWithLocalSecondaryIndexes
  */
 public function testDeleteIndexedTable()
 {
     $this->client->deleteTable(array('TableName' => 'Orders'));
 }
開發者ID:sunil-kavali,項目名稱:AWS-ImageProcess-WebApp,代碼行數:7,代碼來源:DynamoDb_20120810_Test.php

示例6: deleteTable

 /**
  * Executes the DeleteTable operation.
  *
  * @param string $tableName Name of the table to delete
  *
  * @return Guzzle\Service\Resource\Model
  *
  * @see http://docs.aws.amazon.com/aws-sdk-php/latest/class-Aws.DynamoDb.DynamoDbClient.html#_deleteTable
  */
 public function deleteTable($tableName)
 {
     return $this->client->deleteTable(['TableName' => $tableName]);
 }
開發者ID:m6web,項目名稱:aws-bundle,代碼行數:13,代碼來源:Client.php

示例7: deleteTable

 /**
  * Delete the test table after tests complete.
  */
 protected static function deleteTable()
 {
     self::$client->deleteTable(['TableName' => self::$tableName]);
     self::$client->waitUntil('TableNotExists', ['TableName' => self::$tableName]);
 }
開發者ID:gdbots,項目名稱:pbj-php,代碼行數:8,代碼來源:DynamoDbTest.php


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