Google_TablesServiceResource

The "tables" collection of methods.

Defined (1)

The class is defined in the following location(s).

/inc/google-api-php-client/src/contrib/Google_BigqueryService.php  
  1. class Google_TablesServiceResource extends Google_ServiceResource { 
  2.  
  3.  
  4. /** 
  5. * Creates a new, empty table in the dataset. (tables.insert) 
  6. * @param string $projectId Project ID of the new table 
  7. * @param string $datasetId Dataset ID of the new table 
  8. * @param Google_Table $postBody 
  9. * @param array $optParams Optional parameters. 
  10. * @return Google_Table 
  11. */ 
  12. public function insert($projectId, $datasetId, Google_Table $postBody, $optParams = array()) { 
  13. $params = array('projectId' => $projectId, 'datasetId' => $datasetId, 'postBody' => $postBody); 
  14. $params = array_merge($params, $optParams); 
  15. $data = $this->__call('insert', array($params)); 
  16. if ($this->useObjects()) { 
  17. return new Google_Table($data); 
  18. } else { 
  19. return $data; 
  20. /** 
  21. * Gets the specified table resource by table ID. This method does not return the data in the table,  
  22. * it only returns the table resource, which describes the structure of this table. (tables.get) 
  23. * @param string $projectId Project ID of the requested table 
  24. * @param string $datasetId Dataset ID of the requested table 
  25. * @param string $tableId Table ID of the requested table 
  26. * @param array $optParams Optional parameters. 
  27. * @return Google_Table 
  28. */ 
  29. public function get($projectId, $datasetId, $tableId, $optParams = array()) { 
  30. $params = array('projectId' => $projectId, 'datasetId' => $datasetId, 'tableId' => $tableId); 
  31. $params = array_merge($params, $optParams); 
  32. $data = $this->__call('get', array($params)); 
  33. if ($this->useObjects()) { 
  34. return new Google_Table($data); 
  35. } else { 
  36. return $data; 
  37. /** 
  38. * Lists all tables in the specified dataset. (tables.list) 
  39. * @param string $projectId Project ID of the tables to list 
  40. * @param string $datasetId Dataset ID of the tables to list 
  41. * @param array $optParams Optional parameters. 
  42. * @opt_param string pageToken Page token, returned by a previous call, to request the next page of results 
  43. * @opt_param string maxResults Maximum number of results to return 
  44. * @return Google_TableList 
  45. */ 
  46. public function listTables($projectId, $datasetId, $optParams = array()) { 
  47. $params = array('projectId' => $projectId, 'datasetId' => $datasetId); 
  48. $params = array_merge($params, $optParams); 
  49. $data = $this->__call('list', array($params)); 
  50. if ($this->useObjects()) { 
  51. return new Google_TableList($data); 
  52. } else { 
  53. return $data; 
  54. /** 
  55. * Updates information in an existing table, specified by tableId. (tables.update) 
  56. * @param string $projectId Project ID of the table to update 
  57. * @param string $datasetId Dataset ID of the table to update 
  58. * @param string $tableId Table ID of the table to update 
  59. * @param Google_Table $postBody 
  60. * @param array $optParams Optional parameters. 
  61. * @return Google_Table 
  62. */ 
  63. public function update($projectId, $datasetId, $tableId, Google_Table $postBody, $optParams = array()) { 
  64. $params = array('projectId' => $projectId, 'datasetId' => $datasetId, 'tableId' => $tableId, 'postBody' => $postBody); 
  65. $params = array_merge($params, $optParams); 
  66. $data = $this->__call('update', array($params)); 
  67. if ($this->useObjects()) { 
  68. return new Google_Table($data); 
  69. } else { 
  70. return $data; 
  71. /** 
  72. * Updates information in an existing table, specified by tableId. This method supports patch 
  73. * semantics. (tables.patch) 
  74. * @param string $projectId Project ID of the table to update 
  75. * @param string $datasetId Dataset ID of the table to update 
  76. * @param string $tableId Table ID of the table to update 
  77. * @param Google_Table $postBody 
  78. * @param array $optParams Optional parameters. 
  79. * @return Google_Table 
  80. */ 
  81. public function patch($projectId, $datasetId, $tableId, Google_Table $postBody, $optParams = array()) { 
  82. $params = array('projectId' => $projectId, 'datasetId' => $datasetId, 'tableId' => $tableId, 'postBody' => $postBody); 
  83. $params = array_merge($params, $optParams); 
  84. $data = $this->__call('patch', array($params)); 
  85. if ($this->useObjects()) { 
  86. return new Google_Table($data); 
  87. } else { 
  88. return $data; 
  89. /** 
  90. * Deletes the table specified by tableId from the dataset. If the table contains data, all the data 
  91. * will be deleted. (tables.delete) 
  92. * @param string $projectId Project ID of the table to delete 
  93. * @param string $datasetId Dataset ID of the table to delete 
  94. * @param string $tableId Table ID of the table to delete 
  95. * @param array $optParams Optional parameters. 
  96. */ 
  97. public function delete($projectId, $datasetId, $tableId, $optParams = array()) { 
  98. $params = array('projectId' => $projectId, 'datasetId' => $datasetId, 'tableId' => $tableId); 
  99. $params = array_merge($params, $optParams); 
  100. $data = $this->__call('delete', array($params)); 
  101. return $data;