-
Notifications
You must be signed in to change notification settings - Fork 102
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(spanner): add PG.OID support #1948
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(); |
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.
We don't need toString()
as value
type is already string
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.
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
🤖 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).
The PG.OID type is an
int64
value with aPG_OID
type 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.