GoogleCloudPlatform / GoogleCloudPlatform/cloud-sql-jdbc-socket-factory
R2DBC connection property names should match the JDBC ones
- Dominant language
- Java
- Stars
- 255
- Forks
- 117
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 4
Description
Currently the doc [r2dbc.md](https://github.com/GoogleCloudPlatform/cloud-sql-jdbc-socket-factory/blob/main/docs/r2dbc.md) does not specify that the options can be added to the URL. However it can and works.
Example:
`r2dbc:gcp:mysql://:@/?TARGET_PRINCIPAL=`
To make the connection property names match the JDBC ones, we should update [GcpConnectionFactoryProvider.java](https://github.com/GoogleCloudPlatform/cloud-sql-jdbc-socket-factory/blob/e56d6eebf2e3d21c393deb229d4f49ce8d626ea0/r2dbc/core/src/main/java/com/google/cloud/sql/core/GcpConnectionFactoryProvider.java#L45):
* unixSocketPath
* ipTypes
* cloudSqlDelegates
* cloudSqlTargetPrincipal
* enableIamAuth
Also update the doc [r2dbc.md](https://github.com/GoogleCloudPlatform/cloud-sql-jdbc-socket-factory/blob/main/docs/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.
Contributor guide
Assessment
This issue has not been assessed yet.