-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(Bigquery): Undelete table sample. #1774
Conversation
Here is the summary of changes. You are about to add 1 region tag.
This comment is generated by snippet-bot.
|
A side comment, do you think adding a php-docs-samples/bigquery/api/test/bigqueryTest.php Lines 437 to 444 in 02086fb
|
LGTM, just fix the few remaining nits and we are good to go. |
@vishwarajanand, As we need to get the |
@yash30201 I was suggesting something like below which would preserve the
|
@vishwarajanand , Oh you meant breaking just the inner loop, then should we do as follows? foreach ($table->rows([]) as $row) {
if (!$foundValue) {
foreach ($row as $column => $value) {
if ($value == $expectedValue) {
$foundValue = true;
break; // here
}
}
}
$numRows++;
} Because apart from matching row, all other rows would be traversed completely in your code suggestion and thus putting a single break won't make much performance difference. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This sample showcases how to restore an accidently deleted table within the time travel window.