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

spanner: support embedded structs #692

Closed
ghost opened this issue Jul 1, 2017 · 1 comment
Closed

spanner: support embedded structs #692

ghost opened this issue Jul 1, 2017 · 1 comment
Assignees
Labels
api: spanner Issues related to the Spanner API. help wanted We'd love to have community involvement on this issue. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@ghost
Copy link

ghost commented Jul 1, 2017

Hello.

With the spanner package, it is currently impossible to write and retrieve structs that embedded other structs.

For example:

type (
    RecordData struct{
        ID string
        CreatedAt, UpdatedAt time.Time
    }
    User struct{
        RecordData
        FirstName, LastName, Email string
     }
)

Whenever attempting to use the toStruct method of spanner.Row, the spanner package is unable to locate fields from an embedded struct.

The go driver for Mongo DB, here, implemented this feature really well. Can something similar be developed for the spanner package?

@jba jba self-assigned this Jul 3, 2017
@jba jba added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. api: spanner Issues related to the Spanner API. labels Jul 3, 2017
@jba jba added the help wanted We'd love to have community involvement on this issue. label Aug 22, 2017
@jba jba changed the title [SPANNER] Support for embedded structs in spanner package spanner: support embedded structs Aug 22, 2017
@jba
Copy link
Contributor

jba commented Dec 28, 2017

I believe this is fixed. Anyway, I can no longer reproduce.

@jba jba closed this as completed Dec 28, 2017
gopherbot pushed a commit that referenced this issue Jan 3, 2018
Confirm that Row.ToStruct can handle embedded fields.

See #692.

Change-Id: Ib031549f04889d38e61c1b5b618ab32ea693c1bd
Reviewed-on: https://code-review.googlesource.com/21690
Reviewed-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Michael Darakananda <pongad@google.com>
semistrict pushed a commit to semistrict/google-cloud-go that referenced this issue Jun 11, 2018
yoshi-automation added a commit that referenced this issue Dec 21, 2021
This is an auto-generated regeneration of the gapic clients by
cloud.google.com/go/internal/gapicgen. Once the corresponding genproto PR is
submitted, genbot will update this PR with a newer dependency to the newer
version of genproto and assign reviewers to this PR.

If you have been assigned to review this PR, please:

- Ensure that the version of genproto in go.mod has been updated.
- Ensure that CI is passing. If it's failing, it requires your manual attention.
- Approve and submit this PR if you believe it's ready to ship.

Corresponding genproto PR: googleapis/go-genproto#732

Changes:

feat(bigquery/reservation): increase the logical timeout (retry deadline) to 5 minutes
  PiperOrigin-RevId: 417448084
  Source-Link: googleapis/googleapis@489719a

feat(dialogflow): added export documentation method feat: added filter in list documentations request feat: added option to import custom metadata from Google Cloud Storage in reload document request feat: added option to apply partial update to the smart messaging allowlist in reload document request feat: added filter in list knowledge bases request
  PiperOrigin-RevId: 417030293
  Source-Link: googleapis/googleapis@ebef8e6

feat(analytics/admin): add the `AcknowledgeUserDataCollection` operation which acknowledges the terms of user data collection for the specified property feat: add the new resource type `DataStream`, which is planned to eventually replace `WebDataStream`, `IosAppDataStream`, `AndroidAppDataStream` resources fix!: remove `GetEnhancedMeasurementSettings`, `UpdateEnhancedMeasurementSettingsRequest`, `UpdateEnhancedMeasurementSettingsRequest` operations from the API feat: add `CreateDataStream`, `DeleteDataStream`, `UpdateDataStream`, `ListDataStreams` operations to support the new `DataStream` resource feat: add `DISPLAY_VIDEO_360_ADVERTISER_LINK`,  `DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL` fields to `ChangeHistoryResourceType` enum feat: add the `account` field to the `Property` type docs: update the documentation with a new list of valid values for `UserLink.direct_roles` field
  PiperOrigin-RevId: 416888961
  Source-Link: googleapis/googleapis@54861b4

fix(artifactregistry): fix resource pattern ID segment name
  PiperOrigin-RevId: 416140747
  Source-Link: googleapis/googleapis@429d35c

feat(dialogflow): removed OPTIONAL for speech model variant docs: added more docs for speech model variant and improved docs format for participant
  PiperOrigin-RevId: 416079722
  Source-Link: googleapis/googleapis@14b7a25

feat(assuredworkloads): EU Regions and Support With Sovereign Controls
  Committer: @Guisin
  PiperOrigin-RevId: 415069787
  Source-Link: googleapis/googleapis@85ffeed

fix(compute): add parameter in compute bazel rules (#692)

  Source-Link: googleapis/googleapis@253807f
yoshi-automation added a commit that referenced this issue Dec 21, 2021
This is an auto-generated regeneration of the gapic clients by
cloud.google.com/go/internal/gapicgen. Once the corresponding genproto PR is
submitted, genbot will update this PR with a newer dependency to the newer
version of genproto and assign reviewers to this PR.

If you have been assigned to review this PR, please:

- Ensure that the version of genproto in go.mod has been updated.
- Ensure that CI is passing. If it's failing, it requires your manual attention.
- Approve and submit this PR if you believe it's ready to ship.

Corresponding genproto PR: googleapis/go-genproto#732

Changes:

feat(bigquery/reservation): increase the logical timeout (retry deadline) to 5 minutes
  PiperOrigin-RevId: 417448084
  Source-Link: googleapis/googleapis@489719a

feat(dialogflow): added export documentation method feat: added filter in list documentations request feat: added option to import custom metadata from Google Cloud Storage in reload document request feat: added option to apply partial update to the smart messaging allowlist in reload document request feat: added filter in list knowledge bases request
  PiperOrigin-RevId: 417030293
  Source-Link: googleapis/googleapis@ebef8e6

feat(analytics/admin): add the `AcknowledgeUserDataCollection` operation which acknowledges the terms of user data collection for the specified property feat: add the new resource type `DataStream`, which is planned to eventually replace `WebDataStream`, `IosAppDataStream`, `AndroidAppDataStream` resources fix!: remove `GetEnhancedMeasurementSettings`, `UpdateEnhancedMeasurementSettingsRequest`, `UpdateEnhancedMeasurementSettingsRequest` operations from the API feat: add `CreateDataStream`, `DeleteDataStream`, `UpdateDataStream`, `ListDataStreams` operations to support the new `DataStream` resource feat: add `DISPLAY_VIDEO_360_ADVERTISER_LINK`,  `DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL` fields to `ChangeHistoryResourceType` enum feat: add the `account` field to the `Property` type docs: update the documentation with a new list of valid values for `UserLink.direct_roles` field
  PiperOrigin-RevId: 416888961
  Source-Link: googleapis/googleapis@54861b4

fix(artifactregistry): fix resource pattern ID segment name
  PiperOrigin-RevId: 416140747
  Source-Link: googleapis/googleapis@429d35c

feat(dialogflow): removed OPTIONAL for speech model variant docs: added more docs for speech model variant and improved docs format for participant
  PiperOrigin-RevId: 416079722
  Source-Link: googleapis/googleapis@14b7a25

feat(assuredworkloads): EU Regions and Support With Sovereign Controls
  Committer: @Guisin
  PiperOrigin-RevId: 415069787
  Source-Link: googleapis/googleapis@85ffeed

fix(compute): add parameter in compute bazel rules (#692)

  Source-Link: googleapis/googleapis@253807f
codyoss pushed a commit that referenced this issue Dec 21, 2021
This is an auto-generated regeneration of the gapic clients by
cloud.google.com/go/internal/gapicgen. Once the corresponding genproto PR is
submitted, genbot will update this PR with a newer dependency to the newer
version of genproto and assign reviewers to this PR.

If you have been assigned to review this PR, please:

- Ensure that the version of genproto in go.mod has been updated.
- Ensure that CI is passing. If it's failing, it requires your manual attention.
- Approve and submit this PR if you believe it's ready to ship.

Corresponding genproto PR: googleapis/go-genproto#732

Changes:

feat(bigquery/reservation): increase the logical timeout (retry deadline) to 5 minutes
  PiperOrigin-RevId: 417448084
  Source-Link: googleapis/googleapis@489719a

feat(dialogflow): added export documentation method feat: added filter in list documentations request feat: added option to import custom metadata from Google Cloud Storage in reload document request feat: added option to apply partial update to the smart messaging allowlist in reload document request feat: added filter in list knowledge bases request
  PiperOrigin-RevId: 417030293
  Source-Link: googleapis/googleapis@ebef8e6

feat(analytics/admin): add the `AcknowledgeUserDataCollection` operation which acknowledges the terms of user data collection for the specified property feat: add the new resource type `DataStream`, which is planned to eventually replace `WebDataStream`, `IosAppDataStream`, `AndroidAppDataStream` resources fix!: remove `GetEnhancedMeasurementSettings`, `UpdateEnhancedMeasurementSettingsRequest`, `UpdateEnhancedMeasurementSettingsRequest` operations from the API feat: add `CreateDataStream`, `DeleteDataStream`, `UpdateDataStream`, `ListDataStreams` operations to support the new `DataStream` resource feat: add `DISPLAY_VIDEO_360_ADVERTISER_LINK`,  `DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL` fields to `ChangeHistoryResourceType` enum feat: add the `account` field to the `Property` type docs: update the documentation with a new list of valid values for `UserLink.direct_roles` field
  PiperOrigin-RevId: 416888961
  Source-Link: googleapis/googleapis@54861b4

fix(artifactregistry): fix resource pattern ID segment name
  PiperOrigin-RevId: 416140747
  Source-Link: googleapis/googleapis@429d35c

feat(dialogflow): removed OPTIONAL for speech model variant docs: added more docs for speech model variant and improved docs format for participant
  PiperOrigin-RevId: 416079722
  Source-Link: googleapis/googleapis@14b7a25

feat(assuredworkloads): EU Regions and Support With Sovereign Controls
  Committer: @Guisin
  PiperOrigin-RevId: 415069787
  Source-Link: googleapis/googleapis@85ffeed

fix(compute): add parameter in compute bazel rules (#692)

  Source-Link: googleapis/googleapis@253807f
BrennaEpp pushed a commit to BrennaEpp/google-cloud-go that referenced this issue Dec 23, 2021
This is an auto-generated regeneration of the gapic clients by
cloud.google.com/go/internal/gapicgen. Once the corresponding genproto PR is
submitted, genbot will update this PR with a newer dependency to the newer
version of genproto and assign reviewers to this PR.

If you have been assigned to review this PR, please:

- Ensure that the version of genproto in go.mod has been updated.
- Ensure that CI is passing. If it's failing, it requires your manual attention.
- Approve and submit this PR if you believe it's ready to ship.

Corresponding genproto PR: googleapis/go-genproto#732

Changes:

feat(bigquery/reservation): increase the logical timeout (retry deadline) to 5 minutes
  PiperOrigin-RevId: 417448084
  Source-Link: googleapis/googleapis@489719a

feat(dialogflow): added export documentation method feat: added filter in list documentations request feat: added option to import custom metadata from Google Cloud Storage in reload document request feat: added option to apply partial update to the smart messaging allowlist in reload document request feat: added filter in list knowledge bases request
  PiperOrigin-RevId: 417030293
  Source-Link: googleapis/googleapis@ebef8e6

feat(analytics/admin): add the `AcknowledgeUserDataCollection` operation which acknowledges the terms of user data collection for the specified property feat: add the new resource type `DataStream`, which is planned to eventually replace `WebDataStream`, `IosAppDataStream`, `AndroidAppDataStream` resources fix!: remove `GetEnhancedMeasurementSettings`, `UpdateEnhancedMeasurementSettingsRequest`, `UpdateEnhancedMeasurementSettingsRequest` operations from the API feat: add `CreateDataStream`, `DeleteDataStream`, `UpdateDataStream`, `ListDataStreams` operations to support the new `DataStream` resource feat: add `DISPLAY_VIDEO_360_ADVERTISER_LINK`,  `DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL` fields to `ChangeHistoryResourceType` enum feat: add the `account` field to the `Property` type docs: update the documentation with a new list of valid values for `UserLink.direct_roles` field
  PiperOrigin-RevId: 416888961
  Source-Link: googleapis/googleapis@54861b4

fix(artifactregistry): fix resource pattern ID segment name
  PiperOrigin-RevId: 416140747
  Source-Link: googleapis/googleapis@429d35c

feat(dialogflow): removed OPTIONAL for speech model variant docs: added more docs for speech model variant and improved docs format for participant
  PiperOrigin-RevId: 416079722
  Source-Link: googleapis/googleapis@14b7a25

feat(assuredworkloads): EU Regions and Support With Sovereign Controls
  Committer: @Guisin
  PiperOrigin-RevId: 415069787
  Source-Link: googleapis/googleapis@85ffeed

fix(compute): add parameter in compute bazel rules (googleapis#692)

  Source-Link: googleapis/googleapis@253807f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the Spanner API. help wanted We'd love to have community involvement on this issue. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

2 participants
@jba and others