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

R2DBC: Support Google Cloud Spanner #3757

Open
hfhbd opened this issue Dec 30, 2022 · 1 comment
Open

R2DBC: Support Google Cloud Spanner #3757

hfhbd opened this issue Dec 30, 2022 · 1 comment
Labels

Comments

@hfhbd
Copy link
Collaborator

hfhbd commented Dec 30, 2022

Description

I tried to use Google Cloud Spanner with SqlDelight: https://github.com/hfhbd/sqldelight-spanner-r2dbc
There are 4 problems, two of them are needed to fix somehow in sqldelight:

  1. Known problem with R2DBC driver:
    Spanner R2DBC requires @ as a parameter identifier, no $ nor ? at runtime. So again, we need to generate/replace these identifiers somehow.

  2. Spanner does not support bind(index, value), this throw a UnsupportedOperationException. Instead, you have to use the name of the column: bind(name, value).

Other "problems" unrelated to sqldelight, there is no native Spanner sqldelight dialect and to test the linked demo, a new release of Spanner driver is required (1.2.1)

@hfhbd hfhbd added the feature label Dec 30, 2022
@hfhbd
Copy link
Collaborator Author

hfhbd commented Jan 3, 2023

One option: Split compiler-core into "plugins" so overwriting parts of the compiler is possible. Spanner would implement the query generator and change the relevant parts (named binding and @)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant