Skip to content

Commit

Permalink
feat: [Spanner] add a last field in the PartialResultSet (#8112)
Browse files Browse the repository at this point in the history
* feat: add a last field in the PartialResultSet
docs: A comment for field `rows` in message `.google.spanner.v1.ResultSet` is changed
docs: A comment for field `stats` in message `.google.spanner.v1.ResultSet` is changed
docs: A comment for field `precommit_token` in message `.google.spanner.v1.ResultSet` is changed
docs: A comment for field `values` in message `.google.spanner.v1.PartialResultSet` is changed
docs: A comment for field `chunked_value` in message `.google.spanner.v1.PartialResultSet` is changed
docs: A comment for field `stats` in message `.google.spanner.v1.PartialResultSet` is changed
docs: A comment for field `precommit_token` in message `.google.spanner.v1.PartialResultSet` is changed
docs: A comment for message `ResultSetMetadata` is changed
docs: A comment for field `row_type` in message `.google.spanner.v1.ResultSetMetadata` is changed
docs: A comment for message `ResultSetStats` is changed
docs: A comment for field `query_plan` in message `.google.spanner.v1.ResultSetStats` is changed
docs: A comment for field `row_count_lower_bound` in message `.google.spanner.v1.ResultSetStats` is changed

PiperOrigin-RevId: 730849734

Source-Link: googleapis/googleapis@fe0fa26

Source-Link: googleapis/googleapis-gen@16051b5
Copy-Tag: eyJwIjoiU3Bhbm5lci8uT3dsQm90LnlhbWwiLCJoIjoiMTYwNTFiNTkxN2I3NWY2MDNjY2I1ZjQ3N2UyYTQ2NDdiYTExZmE4MiJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Feb 26, 2025
1 parent ff9bc52 commit 964eb96
Show file tree
Hide file tree
Showing 7 changed files with 245 additions and 181 deletions.
Binary file modified Spanner/metadata/V1/ResultSet.php
Binary file not shown.
278 changes: 162 additions & 116 deletions Spanner/src/V1/PartialResultSet.php

Large diffs are not rendered by default.

92 changes: 40 additions & 52 deletions Spanner/src/V1/ResultSet.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions Spanner/src/V1/ResultSetMetadata.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 13 additions & 8 deletions Spanner/src/V1/ResultSetStats.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions Spanner/tests/Unit/V1/Client/SpannerClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -661,21 +661,27 @@ public function executeStreamingSqlTest()
// Mock response
$chunkedValue = true;
$resumeToken2 = '90';
$last = true;
$expectedResponse = new PartialResultSet();
$expectedResponse->setChunkedValue($chunkedValue);
$expectedResponse->setResumeToken($resumeToken2);
$expectedResponse->setLast($last);
$transport->addResponse($expectedResponse);
$chunkedValue2 = false;
$resumeToken3 = '91';
$last2 = false;
$expectedResponse2 = new PartialResultSet();
$expectedResponse2->setChunkedValue($chunkedValue2);
$expectedResponse2->setResumeToken($resumeToken3);
$expectedResponse2->setLast($last2);
$transport->addResponse($expectedResponse2);
$chunkedValue3 = true;
$resumeToken4 = '92';
$last3 = true;
$expectedResponse3 = new PartialResultSet();
$expectedResponse3->setChunkedValue($chunkedValue3);
$expectedResponse3->setResumeToken($resumeToken4);
$expectedResponse3->setLast($last3);
$transport->addResponse($expectedResponse3);
// Mock request
$formattedSession = $gapicClient->sessionName('[PROJECT]', '[INSTANCE]', '[DATABASE]', '[SESSION]');
Expand Down Expand Up @@ -1182,21 +1188,27 @@ public function streamingReadTest()
// Mock response
$chunkedValue = true;
$resumeToken2 = '90';
$last = true;
$expectedResponse = new PartialResultSet();
$expectedResponse->setChunkedValue($chunkedValue);
$expectedResponse->setResumeToken($resumeToken2);
$expectedResponse->setLast($last);
$transport->addResponse($expectedResponse);
$chunkedValue2 = false;
$resumeToken3 = '91';
$last2 = false;
$expectedResponse2 = new PartialResultSet();
$expectedResponse2->setChunkedValue($chunkedValue2);
$expectedResponse2->setResumeToken($resumeToken3);
$expectedResponse2->setLast($last2);
$transport->addResponse($expectedResponse2);
$chunkedValue3 = true;
$resumeToken4 = '92';
$last3 = true;
$expectedResponse3 = new PartialResultSet();
$expectedResponse3->setChunkedValue($chunkedValue3);
$expectedResponse3->setResumeToken($resumeToken4);
$expectedResponse3->setLast($last3);
$transport->addResponse($expectedResponse3);
// Mock request
$formattedSession = $gapicClient->sessionName('[PROJECT]', '[INSTANCE]', '[DATABASE]', '[SESSION]');
Expand Down
Loading

0 comments on commit 964eb96

Please sign in to comment.