Skip to content
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

Database::executePartitionedUpdate() returns string instead of int #7279

Closed
taka-oyama opened this issue May 2, 2024 · 0 comments · Fixed by #7284
Closed

Database::executePartitionedUpdate() returns string instead of int #7279

taka-oyama opened this issue May 2, 2024 · 0 comments · Fixed by #7284
Assignees

Comments

@taka-oyama
Copy link
Contributor

When I updated from 1.75.1 to 1.76.0 the returned value changed from int to string.
PhpDoc says it should return int.

Environment details

  • OS: Alpine Linux 3.18
  • PHP version: 8.2.18
  • Package name and version: cloud-spanner v1.76.0

Steps to reproduce

  1. Run Database::executePartitionedUpdate()
  2. dump result

Code example

$instanceId = getenv('SPANNER_INSTANCE');
$databaseId = getenv('SPANNER_DATABASE');

$client = new SpannerClient();
$database = $client->connect($instanceId, $databaseId);
$database->create(['statements' => [
    'CREATE TABLE `Test` (`id` STRING(36) NOT NULL, `text` STRING(MAX)) PRIMARY KEY (`id`)'],
])->pollUntilComplete();

$statement = "UPDATE `Test` SET `text` = @p0 WHERE `text` = @p1";
$parameters = ['p0' => 'after', 'p1' => 'before'];
$result = $database->executePartitionedUpdate($statement, ['parameters' => $parameters]);
var_dump($result);  // string(1) "0"
@saranshdhingra saranshdhingra added the status: investigating The issue is under investigation, which is determined to be non-trivial. label May 2, 2024
@saranshdhingra saranshdhingra removed the status: investigating The issue is under investigation, which is determined to be non-trivial. label May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants