Skip to content

R2DBC connection property names should match the JDBC ones #1614

@ttosta-google

Description

@ttosta-google

Currently the doc r2dbc.md does not specify that the options can be added to the URL. However it can and works.

Example:

r2dbc:gcp:mysql://<DB_USER>:<DB_PASS>@<CLOUD_SQL_CONNECTION_NAME>/<DATABASE_NAME>?TARGET_PRINCIPAL=<IAM_EMAIL>

To make the connection property names match the JDBC ones, we should update GcpConnectionFactoryProvider.java:

  • unixSocketPath
  • ipTypes
  • cloudSqlDelegates
  • cloudSqlTargetPrincipal
  • enableIamAuth

Also update the doc r2dbc.md.

Note: we need to support both the old options TARGET_PRINCIPAL and the common options cloudSqlTargetPrincipal just in case some customers figured out how to use TARGET_PRINCIPAL in the r2dbc url.

Metadata

Metadata

Assignees

Labels

priority: p2Moderately-important priority. Fix may not be included in next release.type: cleanupAn internal cleanup or hygiene concern.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions