PHP 클래스 Google\Cloud\BigQuery\InsertResponse

This class should be not instantiated directly, but as a result of calling {@see \Google\Cloud\BigQuery\Table::insertRow()} or {@see \Google\Cloud\BigQuery\Table::insertRows()}.
파일 보기 프로젝트 열기: GoogleCloudPlatform/gcloud-php 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( array $info, array $rows )
failedRows ( ) : array Returns the rows which failed to insert along with their associated errors and index in the original data set.
info ( ) : array Retrieves the full API response.
isSuccessful ( ) : boolean Determines if the request was successful.

메소드 상세

__construct() 공개 메소드

public __construct ( array $info, array $rows )
$info array The API response.
$rows array The rows provided in the original request.

failedRows() 공개 메소드

Example: $rows = $insertResponse->failedRows(); foreach ($rows as $row) { print_r($row['rowData']) . PHP_EOL; foreach ($row['errors'] as $error) { echo $error['reason'] . ': ' . $error['message'] . PHP_EOL; } }
또한 보기: https://cloud.google.com/bigquery/docs/reference/v2/tabledata/insertAll#response Tabledata insertAll API response documentation.
public failedRows ( ) : array
리턴 array

info() 공개 메소드

Example: $info = $insertResponse->info(); print_r($info['insertErrors']);
또한 보기: https://cloud.google.com/bigquery/docs/reference/v2/tabledata/insertAll#response Tabledata insertAll API response documentation.
public info ( ) : array
리턴 array

isSuccessful() 공개 메소드

Example: if (!$insertResponse->isSuccessful()) { print_r($insertResponse->failedRows()); }
public isSuccessful ( ) : boolean
리턴 boolean