Skip to content

Commit

Permalink
Update data-source.en.md (apache#19351)
Browse files Browse the repository at this point in the history
  • Loading branch information
Swastyy authored Jul 19, 2022
1 parent 3ded5df commit c16f1ac
Showing 1 changed file with 77 additions and 48 deletions.
125 changes: 77 additions & 48 deletions docs/document/content/dev-manual/data-source.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,51 +5,80 @@ weight = 4
chapter = true
+++

## SPI Interface

| SPI Name | Description |
| ---------------------------- | ------------------------------------------- |
| DatabaseType | Supported database types |
| DialectTableMetaDataLoader | Use SQL dialect to load meta data rapidly |
| DataSourcePoolMetaData | Data source connection pool metadata |
| DataSourcePoolActiveDetector | Data source connection pool active detector |

## Sample

### DatabaseType

| *Implementation Class* | *Description* |
| ---------------------- | ----------------------- |
| SQL92DatabaseType | SQL92 database type |
| MySQLDatabaseType | MySQL database |
| MariaDBDatabaseType | MariaDB database |
| PostgreSQLDatabaseType | PostgreSQL database |
| OracleDatabaseType | Oracle database |
| SQLServerDatabaseType | SQLServer database |
| H2DatabaseType | H2 database |
| OpenGaussDatabaseType | OpenGauss database |

### DialectTableMetaDataLoader

| *Implementation Class* | *Description* |
| ---------------------------- | ----------------------------------------- |
| MySQLTableMetaDataLoader | Use MySQL dialect to load meta data |
| OracleTableMetaDataLoader | Use Oracle dialect to load meta data |
| PostgreSQLTableMetaDataLoader| Use PostgreSQL dialect to load meta data |
| SQLServerTableMetaDataLoader | Use SQLServer dialect to load meta data |
| H2TableMetaDataLoader | Use H2 dialect to load meta data |
| OpenGaussTableMetaDataLoader | Use OpenGauss dialect to load meta data |

### DataSourcePoolMetaData

| *Implementation Class* | *Description* |
|------------------------------|-----------------------------------|
| DBCPDataSourcePoolMetaData | DBCP data source pool meta data |
| HikariDataSourcePoolMetaData | Hikari data source pool meta data |

### DataSourcePoolActiveDetector

| *Implementation Class* | *Description* |
| ----------------------------------- | ---------------------------------------- |
| DefaultDataSourcePoolActiveDetector | Default data source pool active detector |
| HikariDataSourcePoolActiveDetector | Hikari data source pool active detector |
## DatabaseType

### Fully-qualified class name

[`org.apache.shardingsphere.infra.database.type.DatabaseType`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/type/DatabaseType.java)

### Definition

Supported database types definition

### Implementation classes

| *Configuration Type* | *Description* | *Fully-qualified class name* |
| -------------------- | ----------------------------------------- | ---------------------------- |
| SQL92 | SQL92 database type | [`org.apache.shardingsphere.infra.database.type.dialect.SQL92DatabaseType`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/type/dialect/SQL92DatabaseType.java) |
| MySQL | MySQL database | [`org.apache.shardingsphere.infra.database.type.dialect.MySQLDatabaseType`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/type/dialect/MySQLDatabaseType.java) |
| MariaDB | MariaDB database | [`org.apache.shardingsphere.infra.database.type.dialect.MariaDBDatabaseType`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/type/dialect/MariaDBDatabaseType.java) |
| PostgreSQL | PostgreSQL database | [`org.apache.shardingsphere.infra.database.type.dialect.PostgreSQLDatabaseType`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/type/dialect/PostgreSQLDatabaseType.java) |
| Oracle | Oracle database | [`org.apache.shardingsphere.infra.database.type.dialect.OracleDatabaseType`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/type/dialect/OracleDatabaseType.java) |
| SQLServer | SQLServer database | [`org.apache.shardingsphere.infra.database.type.dialect.SQLServerDatabaseType`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/type/dialect/SQLServerDatabaseType.java) |
| H2 | H2 database | [`org.apache.shardingsphere.infra.database.type.dialect.H2DatabaseType`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/type/dialect/H2DatabaseType.java) |
| openGauss | OpenGauss database | [`org.apache.shardingsphere.infra.database.type.dialect.OpenGaussDatabaseType`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/type/dialect/OpenGaussDatabaseType.java) |

## DialectSchemaMetaDataLoader

### Fully-qualified class name

[`org.apache.shardingsphere.infra.metadata.database.schema.loader.spi.DialectSchemaMetaDataLoader`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/loader/spi/DialectSchemaMetaDataLoader.java)

### Definition

Use SQL dialect to load meta data rapidly

### Implementation classes

| *Configuration Type* | *Description* | *Fully-qualified class name* |
| -------------------- | ----------------------------------------- | ---------------------------- |
| MySQL | Use MySQL dialect to load meta data | [`org.apache.shardingsphere.infra.metadata.database.schema.loader.dialect.MySQLSchemaMetaDataLoader`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/loader/dialect/MySQLSchemaMetaDataLoader.java) |
| Oracle | Use Oracle dialect to load meta data | [`org.apache.shardingsphere.infra.metadata.database.schema.loader.dialect.OracleSchemaMetaDataLoader`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/loader/dialect/OracleSchemaMetaDataLoader.java) |
| PostgreSQL | Use PostgreSQL dialect to load meta data | [`org.apache.shardingsphere.infra.metadata.database.schema.loader.dialect.PostgreSQLSchemaMetaDataLoader`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/loader/dialect/PostgreSQLSchemaMetaDataLoader.java) |
| SQLServer | Use SQLServer dialect to load meta data | [`org.apache.shardingsphere.infra.metadata.database.schema.loader.dialect.SQLServerSchemaMetaDataLoader`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/loader/dialect/SQLServerSchemaMetaDataLoader.java) |
| H2 | Use H2 dialect to load meta data | [`org.apache.shardingsphere.infra.metadata.database.schema.loader.dialect.H2SchemaMetaDataLoader`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/loader/dialect/H2SchemaMetaDataLoader.java) |
| openGauss | Use OpenGauss dialect to load meta data | [`org.apache.shardingsphere.infra.metadata.database.schema.loader.dialect.OpenGaussSchemaMetaDataLoader`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/loader/dialect/OpenGaussSchemaMetaDataLoader.java) |

## DataSourcePoolMetaData

### Fully-qualified class name

[`org.apache.shardingsphere.infra.datasource.pool.metadata.DataSourcePoolMetaData`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/datasource/pool/metadata/DataSourcePoolMetaData.java)

### Definition

Data source connection pool metadata

### Implementation classes

| *Configuration Type* | *Description* | *Fully-qualified class name* |
| -------------------- | ----------------------------------------- | ---------------------------- |
| DBCPDataSourcePoolMetaData | DBCP data source pool meta data | [`org.apache.shardingsphere.infra.datasource.pool.metadata.type.dbcp.DBCPDataSourcePoolMetaData`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/datasource/pool/metadata/type/dbcp/DBCPDataSourcePoolMetaData.java) |
| HikariDataSourcePoolMetaData | Hikari data source pool meta data | [`org.apache.shardingsphere.infra.datasource.pool.metadata.type.hikari.HikariDataSourcePoolMetaData`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/datasource/pool/metadata/type/hikari/HikariDataSourcePoolMetaData.java) |

## DataSourcePoolActiveDetector

### Fully-qualified class name

[`org.apache.shardingsphere.infra.datasource.pool.destroyer.detector.DataSourcePoolActiveDetector`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/datasource/pool/destroyer/detector/DataSourcePoolActiveDetector.java)

### Definition

Data source connection pool active detector

### Implementation classes

| *Configuration Type* | *Description* | *Fully-qualified class name* |
| -------------------- | ----------------------------------------- | ---------------------------- |
| Default | Default data source pool active detector | [`org.apache.shardingsphere.infra.datasource.pool.destroyer.detector.type.DefaultDataSourcePoolActiveDetector`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/datasource/pool/destroyer/detector/type/DefaultDataSourcePoolActiveDetector.java) |
| HikariDataSourcePoolActiveDetector | Hikari data source pool active detector | [`org.apache.shardingsphere.infra.datasource.pool.destroyer.detector.type.HikariDataSourcePoolActiveDetector`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/datasource/pool/destroyer/detector/type/HikariDataSourcePoolActiveDetector.java) |

0 comments on commit c16f1ac

Please sign in to comment.