Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add connection options for emulator (#8)
- Adds connection options for the Spanner emulator without the need to set the environment variable SPANNER_EMULATOR_HOST. - Automatically creates the instance and database that is referenced in the connection if the connection is for the emulator. This removes the need to manually create the instance and database on the emulator before you can connect and try out simple queries. - Adds support for DDL statements. Fixes #6 Fixes #7
- Loading branch information
Showing
4 changed files
with
74 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
{ | ||
"ui:order": ["project", "instance", "database", "credentials"], | ||
"credentials": { "ui:widget": "file" } | ||
"ui:order": ["project", "instance", "database", "credentialsKeyFile", "useLocalEmulator"], | ||
"credentialsKeyFile": { "ui:widget": "file", "ui:help": "Credentials file to use to connect to Cloud Spanner. This is only required if the connection should use other credentials than the default credentials of the environment. Ignored for emulator connections." }, | ||
"connectToEmulator": { "ui:help": "Connects to a Spanner emulator instance instead of to Google Cloud. The instance and database specified in the settings above will automatically be created on the emulator if these do not already exist. The emulator must have been started before you can connect to it." }, | ||
"emulatorHost": { "ui:help": "The host name where the emulator is running. Defaults to 'localhost', and is only required if 'Connect to emulator' is enabled and the emulator is not running on localhost." }, | ||
"emulatorPort": { "ui:help": "The port number where the emulator is running. Defaults to '9010', and is only required if 'Connect to emulator' is enabled and the emulator is not running on port 9010 (gRPC)." } | ||
} |