This repository was archived by the owner on Mar 4, 2026. It is now read-only.
feat(spanner): add PG.OID support#1948
Merged
surbhigarg92 merged 7 commits intogoogleapis:mainfrom Feb 14, 2024
Merged
Conversation
PiperOrigin-RevId: 577053414 Source-Link: googleapis/googleapis@727c286 Source-Link: googleapis/googleapis-gen@2015275 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjAxNTI3NWE3ZGRhMmFkM2QxNjA5ZjA2YzQyMDgxMjVjN2RlOGE5ZCJ9
| value: string; | ||
| constructor(value: string) { | ||
| super(); | ||
| this.value = value.toString(); |
Contributor
There was a problem hiding this comment.
We don't need toString() as value type is already string
Contributor
Author
There was a problem hiding this comment.
I thought this would work but it actually makes the behaviour different. I'm not sure I understand why. But this logic is the same as how we represent the Int type on line 144.
a32b39c to
92f86e8
Compare
surbhigarg92
approved these changes
Feb 14, 2024
gcf-merge-on-green bot
pushed a commit
that referenced
this pull request
Feb 23, 2024
🤖 I have created a release *beep* *boop* --- ## [7.4.0](https://togithub.com/googleapis/nodejs-spanner/compare/v7.3.0...v7.4.0) (2024-02-23) ### Features * **spanner:** Add PG.OID support ([#1948](https://togithub.com/googleapis/nodejs-spanner/issues/1948)) ([cf9df7a](https://togithub.com/googleapis/nodejs-spanner/commit/cf9df7a54c21ac995bbea9ad82c3544e4aff41b6)) * Untyped param types ([#1869](https://togithub.com/googleapis/nodejs-spanner/issues/1869)) ([6ef44c3](https://togithub.com/googleapis/nodejs-spanner/commit/6ef44c383a90bf6ae95de531c83e21d2d58da159)) * Update TransactionOptions to include new option exclude_txn_from_change_streams ([#1998](https://togithub.com/googleapis/nodejs-spanner/issues/1998)) ([937a7a1](https://togithub.com/googleapis/nodejs-spanner/commit/937a7a13f8c7660e21d34ebbaecad426b2bacd99)) ### Bug Fixes * **deps:** Update dependency google-gax to v4.3.1 ([#1995](https://togithub.com/googleapis/nodejs-spanner/issues/1995)) ([bed4832](https://togithub.com/googleapis/nodejs-spanner/commit/bed4832445e72c7116fe5495c79d989664220b38)) * Only reset pending value with resume token ([#2000](https://togithub.com/googleapis/nodejs-spanner/issues/2000)) ([f337089](https://togithub.com/googleapis/nodejs-spanner/commit/f337089567d7d92c9467e311be7d72b0a7dc8047)), closes [#1959](https://togithub.com/googleapis/nodejs-spanner/issues/1959) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The PG.OID type is an
int64value with aPG_OIDtype annotation, mostly used by pg_catalog tables. This PR adds support for encoding/decoding PG.OID values.Tests are added for being able to query a PG.OID value, with and without parameters.
User tables can't be created with PG.OID as a column type so no tests were added for DML or mutations. Since the currently available set of pg_catalog tables don't have PG.OID columns, we also don't test being able to read a PG.OID from a table.