strongduanmu opened a new issue, #21481:
URL: https://github.com/apache/shardingsphere/issues/21481
## Feature Request
### Is your feature request related to a problem?
No.
### Describe the feature you would like.
Currently, in issue#17619, we have implemented basic heterogeneous database
gateway feature. Users can use the MySQL protocol to access the backend
PostgreSQL database. But it will require that the databases in the same logic
database must be of the same type, otherwise an exception will be thrown.
In a real heterogeneous database scenario, the backend storage in the same
logical database may be a mix of databases such as MySQL and PostgreSQL.
Therefore, we need to implement heterogeneous support at the data source level,
allowing users to mix different databases for storage.
In order to achieve this goal, we first need to adjust the metadata to
support the database type judgment at the data source level.
```java
/**
* ShardingSphere resources.
*/
public final class ShardingSphereResources {
private final Map<String, ShardingSphereResource> resources;
...
}
public final class ShardingSphereResource {
private final DataSource dataSource;
// 每一个 DataSource 对应一个 databaseType
private final DatabaseType databaseType;
@Getter(AccessLevel.NONE)
private final DataSourceMetaData dataSourceMetaData;
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail:
[email protected]
For queries about this service, please contact Infrastructure at:
[email protected]