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

feat: create standalone samples that run against emulator #30

Merged
merged 8 commits into from
Sep 6, 2021

Conversation

olavloite
Copy link
Collaborator

@olavloite olavloite commented Aug 19, 2021

Adds a Hello World sample that can run independently without the need for any setup. The sample includes:

  • EmulatorRunner: A tool that will automatically run the Spanner emulator in a Docker container and create an instance and a sample database in the emulator. The runner is generic and can be used to create multiple standalone samples.
  • HelloWorld sample: The simplest possible sample for how to use the go-sql driver. The sample opens a database connection and selects the string Hello World! and prints this to the console.
  • Transactions sample: The existing transactions sample has been refactored to also use the emulator so it can be executed, and example table has been changed to the standard Singers example.
  • The existing 'hello' sample has been removed.

@olavloite olavloite requested review from hengfengli and larkee August 19, 2021 17:38
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Aug 19, 2021
Copy link
Collaborator

@hengfengli hengfengli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@olavloite olavloite merged commit 22b127e into main Sep 6, 2021
@olavloite olavloite deleted the standalone-examples branch September 6, 2021 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants