Skip to content
This repository was archived by the owner on Mar 4, 2026. It is now read-only.

fix: createQueryPartition with query params#2244

Merged
gcf-merge-on-green[bot] merged 3 commits intomainfrom
queryPartitionWithParams
Mar 12, 2025
Merged

fix: createQueryPartition with query params#2244
gcf-merge-on-green[bot] merged 3 commits intomainfrom
queryPartitionWithParams

Conversation

@surbhigarg92
Copy link
Copy Markdown
Contributor

@surbhigarg92 surbhigarg92 commented Mar 6, 2025

Create Query Partition with query params throw error, as params are encoded twice , once while creating partition and once while executing

const query = {
    sql: 'SELECT * FROM Singers where SingerId > @id',
    params: {
      id: 1200,
    },
  };

const [partitions] = await transaction.createQueryPartitions(query);
partitions.forEach(partition => {
    transaction.execute(partition).then(results => {
      const rows = results[0].map(row => row.toJSON());
      row_count += rows.length;
  });
});

BEGIN_COMMIT_OVERRIDE
fix: createQueryPartition with query params
END_COMMIT_OVERRIDE

@surbhigarg92 surbhigarg92 requested review from a team March 6, 2025 07:27
@product-auto-label product-auto-label bot added size: s Pull request size is small. api: spanner Issues related to the googleapis/nodejs-spanner API. labels Mar 6, 2025
@surbhigarg92 surbhigarg92 added the automerge Merge the pull request once unit tests and other checks pass. label Mar 12, 2025
@gcf-merge-on-green gcf-merge-on-green bot merged commit 91f5afd into main Mar 12, 2025
20 of 21 checks passed
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Mar 12, 2025
@gcf-merge-on-green gcf-merge-on-green bot deleted the queryPartitionWithParams branch March 12, 2025 08:18
@sakthivelmanii sakthivelmanii added the release-please:force-run To run release-please label Mar 12, 2025
@release-please release-please bot removed the release-please:force-run To run release-please label Mar 12, 2025
@parthea parthea added the release-please:force-run To run release-please label Mar 13, 2025
@release-please release-please bot removed the release-please:force-run To run release-please label Mar 13, 2025
@parthea parthea added the release-please:force-run To run release-please label Mar 13, 2025
@release-please release-please bot removed the release-please:force-run To run release-please label Mar 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: spanner Issues related to the googleapis/nodejs-spanner API. size: s Pull request size is small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants