golang-samples icon indicating copy to clipboard operation
golang-samples copied to clipboard

feat: Create a few code snippets as examples for using Spanner Graph in golang

Open bharadwajvr opened this issue 1 year ago • 5 comments

Add a few code snippets to illustrate how to use Spanner Graph functionality in Golang. These examples resemble other snippets for how various other Spanner features can be used.

Fixes #4312

Checklist

  • [x] I have followed Contributing Guidelines from CONTRIBUTING.MD
  • [x] Tests pass: go test -v ./.. (see Testing)
  • [x] Code formatted: gofmt (see Formatting)
  • [x] Vetting pass: go vet (see Formatting)
  • [ ] These samples need a new API enabled in testing projects to pass (let us know which ones)
  • [ ] These samples need a new/updated env vars in testing projects set to pass (let us know which ones)
  • [ ] This sample adds a new sample directory, and I updated the CODEOWNERS file with the codeowners for this sample
  • [ ] This sample adds a new Product API, and I updated the Blunderbuss issue/PR auto-assigner with the codeowners for this sample
  • [x] Please merge this PR for me once it is approved

bharadwajvr avatar Aug 08 '24 03:08 bharadwajvr

Here is the summary of changes.

You are about to add 9 region tags.

This comment is generated by snippet-bot. If you find problems with this result, please file an issue at: https://github.com/googleapis/repo-automation-bots/issues. To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • [ ] Refresh this comment

snippet-bot[bot] avatar Aug 08 '24 03:08 snippet-bot[bot]

🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use automerge label. Good luck human!

-- conventional-commit-lint bot https://conventionalcommits.org/

The new graph_snippet.go models spanner/spanner_snippets/snippet.go. I have tested this manually, but I am not sure where test code for the code in snippet.go is written, and similarly how graph_snippet.go should be set up with tests. Looking for some guidance on this. Thanks!

bharadwajvr avatar Aug 08 '24 03:08 bharadwajvr

Gentle ping

bharadwajvr avatar Aug 15 '24 14:08 bharadwajvr

Before we continue with this review, please verify that these samples are needed.

See the list of existing samples here: https://cloud.google.com/docs/samples?language=golang&product=cloudspanner

These samples address a new feature of Spanner - the ability to create and query property graphs.

bharadwajvr avatar Aug 21 '24 22:08 bharadwajvr