feat: add dialect for spanner using pg adapter#900
Open
matdurand wants to merge 1 commit intopressly:mainfrom
Open
feat: add dialect for spanner using pg adapter#900matdurand wants to merge 1 commit intopressly:mainfrom
matdurand wants to merge 1 commit intopressly:mainfrom
Conversation
matdurand
commented
Feb 3, 2025
| @@ -0,0 +1,9 @@ | |||
| //go:build !no_spannerpg | |||
Author
There was a problem hiding this comment.
I wasn't sure about this file, since Spanner PG would use the regular Postgres PGX driver, so should we just use "no_postgres" for both postgres and spanner?
| goose vertica "vertica://user:password@localhost:5433/dbname?connection_load_balance=1" status | ||
| goose ydb "grpcs://localhost:2135/local?go_query_mode=scripting&go_fake_tx=scripting&go_query_bind=declare,numeric" status | ||
| goose starrocks "user:password@/dbname?parseTime=true&interpolateParams=true" status | ||
| goose spannerpg "user=postgres dbname=postgres sslmode=disable" status |
Author
There was a problem hiding this comment.
This assume the PGAdapter is running locally on the default postgres port.
| @@ -0,0 +1,44 @@ | |||
| package dialectquery | |||
Author
There was a problem hiding this comment.
Spanner via PGAdapter only has partial support for current_schema, and we can only query it directly via select current_schema but not in a where clause. For this reason, I removed the Exists to use the fallback method like the mssql dialect does.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adding support for Google Spanner but only when using their PGAdapter, which uses postgres drivers to talk to Spanner.