This is an automated email from the ASF dual-hosted git repository.
yx9o pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new e1ba5366ee9 Add optional component doc for Doris FE, MS SQL Server,
and H2 (#37740)
e1ba5366ee9 is described below
commit e1ba5366ee96f5316c5a06185590509919e0b264
Author: Ling Hengqian <[email protected]>
AuthorDate: Thu Jan 15 09:09:57 2026 +0800
Add optional component doc for Doris FE, MS SQL Server, and H2 (#37740)
---
.../optional-plugins/clickhouse/_index.cn.md | 12 +-
.../optional-plugins/clickhouse/_index.en.md | 12 +-
.../{presto => doris-fe}/_index.cn.md | 116 ++++++-----
.../optional-plugins/doris-fe/_index.en.md | 223 +++++++++++++++++++++
.../optional-plugins/firebird/_index.cn.md | 8 +-
.../optional-plugins/firebird/_index.en.md | 8 +-
.../optional-plugins/{presto => h2}/_index.cn.md | 114 +++--------
.../optional-plugins/h2/_index.en.md | 155 ++++++++++++++
.../optional-plugins/hiveserver2/_index.cn.md | 38 ++--
.../optional-plugins/hiveserver2/_index.en.md | 38 ++--
.../{presto => ms-sql-server}/_index.cn.md | 107 ++++------
.../optional-plugins/ms-sql-server/_index.en.md | 184 +++++++++++++++++
.../optional-plugins/presto/_index.cn.md | 12 +-
.../optional-plugins/presto/_index.en.md | 12 +-
.../special-api/transaction/seata.cn.md | 6 +-
.../special-api/transaction/seata.en.md | 6 +-
.../jdbc-driver/known-implementation/_index.cn.md | 12 +-
.../jdbc-driver/known-implementation/_index.en.md | 12 +-
.../optional-plugins/seata-at/_index.cn.md | 4 +-
.../optional-plugins/seata-at/_index.en.md | 4 +-
20 files changed, 784 insertions(+), 299 deletions(-)
diff --git
a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/clickhouse/_index.cn.md
b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/clickhouse/_index.cn.md
index 2371713b7a6..57ef9f09d36 100644
---
a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/clickhouse/_index.cn.md
+++
b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/clickhouse/_index.cn.md
@@ -10,7 +10,7 @@ ShardingSphere 对 ClickHouse JDBC Driver 的支持位于可选模块中。
## 前提条件
-要在 ShardingSphere 的配置文件为数据节点使用类似 `jdbc:ch://localhost:8123/demo_ds_0` 的
`standardJdbcUrl`,
+要在 ShardingSphere 的配置文件为数据节点使用类似 `jdbc:ch://localhost:8123/demo_ds_0` 的
`jdbcUrl`,
可能的 Maven 依赖关系如下,
```xml
@@ -56,7 +56,7 @@ sudo snap install dbeaver-ce --classic
snap run dbeaver-ce
```
-在 DBeaver Community 内,使用 `jdbc:ch://localhost:8123/default` 的
`standardJdbcUrl`,`default` 的`username` 连接至 ClickHouse,
+在 DBeaver Community 内,使用 `jdbc:ch://localhost:8123/default` 的
`jdbcUrl`,`default` 的`username` 连接至 ClickHouse,
`password` 留空。
执行如下 SQL,
@@ -68,7 +68,7 @@ CREATE DATABASE demo_ds_2;
```
分别使用 `jdbc:ch://localhost:8123/demo_ds_0` ,
-`jdbc:ch://localhost:8123/demo_ds_1` 和 `jdbc:ch://localhost:8123/demo_ds_2` 的
`standardJdbcUrl` 连接至 ClickHouse 来执行如下 SQL,
+`jdbc:ch://localhost:8123/demo_ds_1` 和 `jdbc:ch://localhost:8123/demo_ds_2` 的
`jdbcUrl` 连接至 ClickHouse 来执行如下 SQL,
```sql
-- noinspection SqlNoDataSourceInspectionForFile
@@ -129,19 +129,19 @@ dataSources:
ds_0:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: com.clickhouse.jdbc.ClickHouseDriver
- standardJdbcUrl: jdbc:ch://localhost:8123/demo_ds_0
+ jdbcUrl: jdbc:ch://localhost:8123/demo_ds_0
username: default
password:
ds_1:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: com.clickhouse.jdbc.ClickHouseDriver
- standardJdbcUrl: jdbc:ch://localhost:8123/demo_ds_1
+ jdbcUrl: jdbc:ch://localhost:8123/demo_ds_1
username: default
password:
ds_2:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: com.clickhouse.jdbc.ClickHouseDriver
- standardJdbcUrl: jdbc:ch://localhost:8123/demo_ds_2
+ jdbcUrl: jdbc:ch://localhost:8123/demo_ds_2
username: default
password:
rules:
diff --git
a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/clickhouse/_index.en.md
b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/clickhouse/_index.en.md
index cc3a166ccc1..bcf4045061b 100644
---
a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/clickhouse/_index.en.md
+++
b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/clickhouse/_index.en.md
@@ -10,7 +10,7 @@ ShardingSphere's support for ClickHouse JDBC Driver is in the
optional module.
## Prerequisites
-To use a `standardJdbcUrl` like `jdbc:ch://localhost:8123/demo_ds_0` for the
data node in the ShardingSphere configuration file,
+To use a `jdbcUrl` like `jdbc:ch://localhost:8123/demo_ds_0` for the data node
in the ShardingSphere configuration file,
the possible Maven dependencies are as follows,
```xml
@@ -56,7 +56,7 @@ sudo snap install dbeaver-ce --classic
snap run dbeaver-ce
```
-In DBeaver Community, use `standardJdbcUrl` of
`jdbc:ch://localhost:8123/default`, `username` of `default` to connect to
ClickHouse,
+In DBeaver Community, use `jdbcUrl` of `jdbc:ch://localhost:8123/default`,
`username` of `default` to connect to ClickHouse,
and leave `password` blank.
Execute the following SQL,
@@ -67,7 +67,7 @@ CREATE DATABASE demo_ds_1;
CREATE DATABASE demo_ds_2;
```
-Use `standardJdbcUrl` of `jdbc:ch://localhost:8123/demo_ds_0`,
+Use `jdbcUrl` of `jdbc:ch://localhost:8123/demo_ds_0`,
`jdbc:ch://localhost:8123/demo_ds_1` and `jdbc:ch://localhost:8123/demo_ds_2`
to connect to ClickHouse and execute the following SQL.
@@ -130,19 +130,19 @@ dataSources:
ds_0:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: com.clickhouse.jdbc.ClickHouseDriver
- standardJdbcUrl: jdbc:ch://localhost:8123/demo_ds_0
+ jdbcUrl: jdbc:ch://localhost:8123/demo_ds_0
username: default
password:
ds_1:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: com.clickhouse.jdbc.ClickHouseDriver
- standardJdbcUrl: jdbc:ch://localhost:8123/demo_ds_1
+ jdbcUrl: jdbc:ch://localhost:8123/demo_ds_1
username: default
password:
ds_2:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: com.clickhouse.jdbc.ClickHouseDriver
- standardJdbcUrl: jdbc:ch://localhost:8123/demo_ds_2
+ jdbcUrl: jdbc:ch://localhost:8123/demo_ds_2
username: default
password:
rules:
diff --git
a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/presto/_index.cn.md
b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/doris-fe/_index.cn.md
similarity index 53%
copy from
docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/presto/_index.cn.md
copy to
docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/doris-fe/_index.cn.md
index 71985bbe10b..291c4d14d3f 100644
---
a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/presto/_index.cn.md
+++
b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/doris-fe/_index.cn.md
@@ -1,62 +1,53 @@
+++
-title = "Presto"
+title = "Doris FE"
weight = 6
+++
## 背景信息
-ShardingSphere 默认情况下不提供对 `com.facebook.presto.jdbc.PrestoDriver` 的
`driverClassName` 的支持。
-ShardingSphere 对 Presto JDBC Driver 的支持位于可选模块中。
+ShardingSphere 默认情况下不提供对 `com.mysql.cj.jdbc.Driver` 的 `driverClassName` 的支持。
+ShardingSphere 对 Doris FE 的支持位于可选模块中。
## 前提条件
-要在 ShardingSphere 的配置文件为数据节点使用类似
`jdbc:presto://localhost:8080/iceberg/demo_ds_0` 的 `standardJdbcUrl`,
+要在 ShardingSphere 的配置文件为数据节点使用类似 `jdbc:mysql://localhost:9030/demo_ds_0` 的
`jdbcUrl`,
可能的 Maven 依赖关系如下,
```xml
<dependencies>
<dependency>
<groupId>org.apache.shardingsphere</groupId>
- <artifactId>shardingsphere-jdbc-dialect-presto</artifactId>
+ <artifactId>shardingsphere-jdbc-dialect-mysql</artifactId>
<version>${shardingsphere.version}</version>
</dependency>
<dependency>
- <groupId>com.facebook.presto</groupId>
- <artifactId>presto-jdbc</artifactId>
- <version>0.296</version>
+ <groupId>com.mysql</groupId>
+ <artifactId>mysql-connector-j</artifactId>
+ <version>9.4.0</version>
</dependency>
</dependencies>
```
## 配置示例
-### 启动 Presto
+### 启动 Doris FE 和 Doris BE
-编写 Docker Compose 文件来启动 Presto。这将启动一个既为协调器又为工作节点的 Presto 节点,并为该节点配置 Iceberg
连接器。
-此外,此 Iceberg 连接器将使用本地文件系统目录启动 Hive Metastore Server。
+编写 Docker Compose 文件来启动 Doris FE 和 Doris BE。
```yaml
services:
- presto:
- image: prestodb/presto:0.296
+ doris:
+ image: dyrnq/doris:4.0.0
+ environment:
+ RUN_MODE: standalone
+ SKIP_CHECK_ULIMIT: true
ports:
- - "8080:8080"
- volumes:
- - ./iceberg.properties:/opt/presto-server/etc/catalog/iceberg.properties
+ - "9030:9030"
```
-同级文件夹包含文件 `iceberg.properties`,内容如下,
+### 创建业务相关的库和表
-```properties
-connector.name=iceberg
-iceberg.catalog.type=hive
-hive.metastore=file
-hive.metastore.catalog.dir=file:/home/iceberg_data
-```
-
-### 创建业务相关的 schema 和表
-
-通过第三方工具在 Presto 内创建业务相关的 schema 和表。
+通过第三方工具在 Doris FE 内创建业务相关的库和表。
以 DBeaver Community 为例,若使用 Ubuntu 24.04,可通过 Snapcraft 快速安装,
```shell
@@ -65,30 +56,29 @@ sudo snap install dbeaver-ce --classic
snap run dbeaver-ce
```
-在 DBeaver Community 内,使用 `jdbc:presto://localhost:8080/iceberg` 的
`standardJdbcUrl`,`test` 的`username` 连接至 Presto,
+在 DBeaver Community 内,使用 `jdbc:mysql://localhost:9030/` 的 `jdbcUrl`,`root`
的`username` 连接至 Doris FE,
`password` 留空。
执行如下 SQL,
```sql
-- noinspection SqlNoDataSourceInspectionForFile
-CREATE SCHEMA iceberg.demo_ds_0;
-CREATE SCHEMA iceberg.demo_ds_1;
-CREATE SCHEMA iceberg.demo_ds_2;
+CREATE DATABASE demo_ds_0;
+CREATE DATABASE demo_ds_1;
+CREATE DATABASE demo_ds_2;
```
-分别使用 `jdbc:presto://localhost:8080/iceberg/demo_ds_0` ,
-`jdbc:presto://localhost:8080/iceberg/demo_ds_1` 和
`jdbc:presto://localhost:8080/iceberg/demo_ds_2` 的 `standardJdbcUrl` 连接至 Presto
来执行如下 SQL,
+分别使用 `jdbc:mysql://localhost:9030/demo_ds_0` ,
+`jdbc:mysql://localhost:9030/demo_ds_1` 和
`jdbc:mysql://localhost:9030/demo_ds_2` 的 `jdbcUrl` 连接至 Doris FE 来执行如下 SQL,
```sql
-- noinspection SqlNoDataSourceInspectionForFile
CREATE TABLE IF NOT EXISTS t_order (
- order_id BIGINT NOT NULL,
- order_type INTEGER,
- user_id INTEGER NOT NULL,
+ order_id BIGINT NOT NULL AUTO_INCREMENT,
+ order_type INT(11),
+ user_id INT NOT NULL,
address_id BIGINT NOT NULL,
status VARCHAR(50)
-);
-truncate table t_order;
+) UNIQUE KEY (order_id) DISTRIBUTED BY HASH(order_id) PROPERTIES
('replication_num' = '1');
```
### 在业务项目创建 ShardingSphere 数据源
@@ -134,19 +124,19 @@ truncate table t_order;
dataSources:
ds_0:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.facebook.presto.jdbc.PrestoDriver
- standardJdbcUrl: jdbc:presto://localhost:8080/iceberg/demo_ds_0
- username: test
+ driverClassName: com.mysql.cj.jdbc.Driver
+ jdbcUrl: jdbc:mysql://localhost:9030/demo_ds_0
+ username: root
ds_1:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.facebook.presto.jdbc.PrestoDriver
- standardJdbcUrl: jdbc:presto://localhost:8080/iceberg/demo_ds_1
- username: test
+ driverClassName: com.mysql.cj.jdbc.Driver
+ jdbcUrl: jdbc:mysql://localhost:9030/demo_ds_1
+ username: root
ds_2:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.facebook.presto.jdbc.PrestoDriver
- standardJdbcUrl: jdbc:presto://localhost:8080/iceberg/demo_ds_2
- username: test
+ driverClassName: com.mysql.cj.jdbc.Driver
+ jdbcUrl: jdbc:mysql://localhost:9030/demo_ds_2
+ username: root
rules:
- !SHARDING
tables:
@@ -187,6 +177,7 @@ public class ExampleUtils {
try (HikariDataSource dataSource = new HikariDataSource(config);
Connection connection = dataSource.getConnection();
Statement statement = connection.createStatement()) {
+ statement.execute("TRUNCATE TABLE t_order");
statement.execute("INSERT INTO t_order (user_id, order_type,
address_id, status) VALUES (1, 1, 1, 'INSERT_TEST')");
statement.executeQuery("SELECT * FROM t_order");
statement.execute("DELETE FROM t_order WHERE user_id=1");
@@ -200,14 +191,33 @@ public class ExampleUtils {
### SQL 限制
-ShardingSphere JDBC DataSource 尚不支持执行 Presto 的 `create table` 和 `truncate
table` 语句。
+ShardingSphere JDBC DataSource 尚不支持执行 Doris FE 的 `create table` 语句。
### 事务限制
-Presto 不支持 ShardingSphere 集成级别的本地事务,XA 事务或 Seata 的 AT 模式事务。
-Presto 自身的事务支持存在问题,参考 https://github.com/prestodb/presto/issues/25204 。
+Doris FE 不支持 ShardingSphere 集成级别的本地事务,XA 事务或 Seata 的 AT 模式事务。
+Doris FE 自身的事务支持存在问题,参考
https://doris.apache.org/docs/4.x/data-operate/transaction#failed-statements-within-a-transaction
。
+对于 Doris FE,当事务中的某个语句执行失败时,这个操作已经自动回滚。然而,事务中其它执行成功的语句不会被自动回滚。
+
+### 实验性模块限制
+
+ShardingSphere 存在可选模块为
`org.apache.shardingsphere:shardingsphere-jdbc-dialect-doris`,用于支持 Doris FE
的特有数据库方言。可能的 Maven 依赖关系如下,
+
+```xml
+<dependencies>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-jdbc-dialect-doris</artifactId>
+ <version>${shardingsphere.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.mysql</groupId>
+ <artifactId>mysql-connector-j</artifactId>
+ <version>9.4.0</version>
+ </dependency>
+</dependencies>
+```
-### 连接器限制
+`org.apache.shardingsphere:shardingsphere-jdbc-dialect-doris` 并未完全支持 Doris
数据库方言。对于未支持的 SQL 语法,以
https://github.com/apache/shardingsphere/issues?q=is%3Aissue%20state%3Aopen%20label%3A%22db%3A%20Doris%22%20label%3A%22in%3A%20SQL%20parse%22
的未关闭 issue 为准。
-受 https://github.com/prestodb/presto/issues/23226 影响,Presto Memory
连接器的健康检查存在已知问题,
-不应在 ShardingSphere 的配置文件内连接至 Presto Memory 连接器。
+受 https://github.com/apache/shardingsphere/issues/36081 影响,对于同一 Maven 模块,若同时引入
`org.apache.shardingsphere:shardingsphere-jdbc-dialect-doris` 和
`org.apache.shardingsphere:shardingsphere-jdbc-dialect-mysql`,则向 Doris FE 执行的所有
SQL 均通过 MySQL 数据库方言解析。这将导致特定于 Doris 数据库方言的语法无法在 ShardingSphere 的逻辑数据库下使用。
diff --git
a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/doris-fe/_index.en.md
b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/doris-fe/_index.en.md
new file mode 100644
index 00000000000..02a116b5f14
--- /dev/null
+++
b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/doris-fe/_index.en.md
@@ -0,0 +1,223 @@
++++
+title = "Doris FE"
+weight = 6
++++
+
+## Background Information
+
+ShardingSphere does not provide support for `driverClassName` of
`com.mysql.cj.jdbc.Driver` by default.
+ShardingSphere's support for Doris FE is located in an optional module.
+
+## Prerequisites
+
+To use a `jdbcUrl` like `jdbc:mysql://localhost:9030/demo_ds_0` for data nodes
in the ShardingSphere configuration file, the possible Maven dependencies are
as follows:
+
+```xml
+<dependencies>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-jdbc-dialect-mysql</artifactId>
+ <version>${shardingsphere.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.mysql</groupId>
+ <artifactId>mysql-connector-j</artifactId>
+ <version>9.4.0</version>
+ </dependency>
+</dependencies>
+```
+
+## Configuration Example
+
+### Start Doris FE and Doris BE
+
+Write a Docker Compose file to start Doris FE and Doris BE.
+
+```yaml
+services:
+ doris:
+ image: dyrnq/doris:4.0.0
+ environment:
+ RUN_MODE: standalone
+ SKIP_CHECK_ULIMIT: true
+ ports:
+ - "9030:9030"
+```
+
+### Create business-related databases and tables
+
+Create business-related databases and tables within Doris FE using third-party
tools.
+For example, DBeaver Community can be quickly installed via Snapcraft on
Ubuntu 24.04.
+
+```shell
+sudo apt update && sudo apt upgrade -y
+sudo snap install dbeaver-ce --classic
+snap run dbeaver-ce
+```
+
+Within the DBeaver Community, use `jdbcUrl` (`jdbc:mysql://localhost:9030/`)
and `username` (`root`) to connect to Doris FE, leaving the `password` blank.
+
+Execute the following SQL:
+
+```sql
+-- noinspection SqlNoDataSourceInspectionForFile
+CREATE DATABASE demo_ds_0;
+CREATE DATABASE demo_ds_1;
+CREATE DATABASE demo_ds_2;
+```
+
+Connect to Doris FE using `jdbcUrl` from
`jdbc:mysql://localhost:9030/demo_ds_0`,
`jdbc:mysql://localhost:9030/demo_ds_1`, and
`jdbc:mysql://localhost:9030/demo_ds_2` respectively to execute the following
SQL:
+
+```sql
+-- noinspection SqlNoDataSourceInspectionForFile
+CREATE TABLE IF NOT EXISTS t_order (
+ order_id BIGINT NOT NULL AUTO_INCREMENT,
+ order_type INT(11),
+ user_id INT NOT NULL,
+ address_id BIGINT NOT NULL,
+ status VARCHAR(50)
+) UNIQUE KEY (order_id) DISTRIBUTED BY HASH(order_id) PROPERTIES
('replication_num' = '1');
+```
+
+### Creating ShardingSphere data source in business project
+
+After including the dependencies related to `Prerequisites` in the business
project, add the following dependencies:
+
+```xml
+<dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-jdbc</artifactId>
+ <version>${shardingsphere.version}</version>
+</dependency>
+<dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-infra-data-source-pool-hikari</artifactId>
+ <version>${shardingsphere.version}</version>
+</dependency>
+<dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-infra-url-classpath</artifactId>
+ <version>${shardingsphere.version}</version>
+</dependency>
+<dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-standalone-mode-repository-memory</artifactId>
+ <version>${shardingsphere.version}</version>
+</dependency>
+<dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-sharding-core</artifactId>
+ <version>${shardingsphere.version}</version>
+</dependency>
+<dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-authority-simple</artifactId>
+ <version>${shardingsphere.version}</version>
+</dependency>
+```
+
+Write the ShardingSphere data source configuration file `demo.yaml` on the
classpath of your business project.
+
+```yaml
+dataSources:
+ ds_0:
+ dataSourceClassName: com.zaxxer.hikari.HikariDataSource
+ driverClassName: com.mysql.cj.jdbc.Driver
+ jdbcUrl: jdbc:mysql://localhost:9030/demo_ds_0
+ username: root
+ ds_1:
+ dataSourceClassName: com.zaxxer.hikari.HikariDataSource
+ driverClassName: com.mysql.cj.jdbc.Driver
+ jdbcUrl: jdbc:mysql://localhost:9030/demo_ds_1
+ username: root
+ ds_2:
+ dataSourceClassName: com.zaxxer.hikari.HikariDataSource
+ driverClassName: com.mysql.cj.jdbc.Driver
+ jdbcUrl: jdbc:mysql://localhost:9030/demo_ds_2
+ username: root
+rules:
+ - !SHARDING
+ tables:
+ t_order:
+ actualDataNodes: <LITERAL>ds_0.t_order, ds_1.t_order, ds_2.t_order
+ keyGenerateStrategy:
+ column: order_id
+ keyGeneratorName: snowflake
+ defaultDatabaseStrategy:
+ standard:
+ shardingColumn: user_id
+ shardingAlgorithmName: inline
+ shardingAlgorithms:
+ inline:
+ type: INLINE
+ props:
+ algorithm-expression: ds_${user_id % 2}
+ keyGenerators:
+ snowflake:
+ type: SNOWFLAKE
+```
+
+### Enjoy Integration
+
+Create ShardingSphere data source to enjoy integration.
+
+```java
+import com.zaxxer.hikari.HikariConfig;
+import com.zaxxer.hikari.HikariDataSource;
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.sql.Statement;
+public class ExampleUtils {
+ void test() throws SQLException {
+ HikariConfig config = new HikariConfig();
+ config.setJdbcUrl("jdbc:shardingsphere:classpath:demo.yaml");
+
config.setDriverClassName("org.apache.shardingsphere.driver.ShardingSphereDriver");
+ try (HikariDataSource dataSource = new HikariDataSource(config);
+ Connection connection = dataSource.getConnection();
+ Statement statement = connection.createStatement()) {
+ statement.execute("TRUNCATE TABLE t_order");
+ statement.execute("INSERT INTO t_order (user_id, order_type,
address_id, status) VALUES (1, 1, 1, 'INSERT_TEST')");
+ statement.executeQuery("SELECT * FROM t_order");
+ statement.execute("DELETE FROM t_order WHERE user_id=1");
+ statement.execute("DROP TABLE IF EXISTS t_order");
+ }
+ }
+}
+```
+
+## Usage Limitations
+
+### SQL Limitations
+
+ShardingSphere JDBC DataSource does not yet support executing `create table`
statements in Doris FE.
+
+### Transaction Limitations
+
+Doris FE does not support ShardingSphere integration-level native
transactions, XA transactions, or Seata AT mode transactions.
+
+Doris FE itself has issues with transaction support; see
https://doris.apache.org/docs/4.x/data-operate/transaction#failed-statements-within-a-transaction
.
+
+For Doris FE, when a statement in a transaction fails, the operation is
automatically rolled back. However, other statements in the transaction that
execute successfully are not automatically rolled back.
+
+### Experimental Module Limitations
+
+ShardingSphere has an optional module,
`org.apache.shardingsphere:shardingsphere-jdbc-dialect-doris`, to support Doris
FE's specific database dialect. Possible Maven dependencies are as follows:
+
+```xml
+<dependencies>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-jdbc-dialect-doris</artifactId>
+ <version>${shardingsphere.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.mysql</groupId>
+ <artifactId>mysql-connector-j</artifactId>
+ <version>9.4.0</version>
+ </dependency>
+</dependencies>
+```
+
+`org.apache.shardingsphere:shardingsphere-jdbc-dialect-doris` does not fully
support the Doris database dialect. For unsupported SQL syntax, refer to the
open issue at
https://github.com/apache/shardingsphere/issues?q=is%3Aissue%20state%3Aopen%20label%3A%22db%3A%20Doris%22%20label%3A%22in%3A%20SQL%20parse%22
.
+
+Due to the issue mentioned in
https://github.com/apache/shardingsphere/issues/36081 , if both
`org.apache.shardingsphere:shardingsphere-jdbc-dialect-doris` and
`org.apache.shardingsphere:shardingsphere-jdbc-dialect-mysql` are included in
the same Maven module, all SQL executed towards Doris FE will be parsed using
the MySQL database dialect. This will cause Doris-specific database dialect
syntax to be unusable in ShardingSphere's logical databases.
diff --git
a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/firebird/_index.cn.md
b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/firebird/_index.cn.md
index 8c769c6b181..ec2266a1629 100644
---
a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/firebird/_index.cn.md
+++
b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/firebird/_index.cn.md
@@ -10,7 +10,7 @@ ShardingSphere 对 Firebird JDBC Driver 的支持位于可选模块中。
## 前提条件
-要在 ShardingSphere 的配置文件为数据节点使用类似
`jdbc:firebird://localhost:3050//var/lib/firebird/data/demo_ds_0.fdb` 的
`standardJdbcUrl`,
+要在 ShardingSphere 的配置文件为数据节点使用类似
`jdbc:firebird://localhost:3050//var/lib/firebird/data/demo_ds_0.fdb` 的
`jdbcUrl`,
可能的 Maven 依赖关系如下,
```xml
@@ -121,19 +121,19 @@ dataSources:
ds_0:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: org.firebirdsql.jdbc.FBDriver
- standardJdbcUrl:
jdbc:firebird://localhost:3050//var/lib/firebird/data/demo_ds_0.fdb
+ jdbcUrl:
jdbc:firebird://localhost:3050//var/lib/firebird/data/demo_ds_0.fdb
username: alice
password: masterkey
ds_1:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: org.firebirdsql.jdbc.FBDriver
- standardJdbcUrl:
jdbc:firebird://localhost:3050//var/lib/firebird/data/demo_ds_1.fdb
+ jdbcUrl:
jdbc:firebird://localhost:3050//var/lib/firebird/data/demo_ds_1.fdb
username: alice
password: masterkey
ds_2:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: org.firebirdsql.jdbc.FBDriver
- standardJdbcUrl:
jdbc:firebird://localhost:3050//var/lib/firebird/data/demo_ds_2.fdb
+ jdbcUrl:
jdbc:firebird://localhost:3050//var/lib/firebird/data/demo_ds_2.fdb
username: alice
password: masterkey
rules:
diff --git
a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/firebird/_index.en.md
b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/firebird/_index.en.md
index b164bbebbda..bf15441414a 100644
---
a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/firebird/_index.en.md
+++
b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/firebird/_index.en.md
@@ -10,7 +10,7 @@ ShardingSphere's support for Firebird JDBC Driver is in an
optional module.
## Prerequisites
-To use a `standardJdbcUrl` like
`jdbc:firebird://localhost:3050//var/lib/firebird/data/demo_ds_0.fdb` for the
data node in the ShardingSphere configuration file,
+To use a `jdbcUrl` like
`jdbc:firebird://localhost:3050//var/lib/firebird/data/demo_ds_0.fdb` for the
data node in the ShardingSphere configuration file,
the possible Maven dependencies are as follows,
```xml
@@ -121,19 +121,19 @@ dataSources:
ds_0:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: org.firebirdsql.jdbc.FBDriver
- standardJdbcUrl:
jdbc:firebird://localhost:3050//var/lib/firebird/data/demo_ds_0.fdb
+ jdbcUrl:
jdbc:firebird://localhost:3050//var/lib/firebird/data/demo_ds_0.fdb
username: alice
password: masterkey
ds_1:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: org.firebirdsql.jdbc.FBDriver
- standardJdbcUrl:
jdbc:firebird://localhost:3050//var/lib/firebird/data/demo_ds_1.fdb
+ jdbcUrl:
jdbc:firebird://localhost:3050//var/lib/firebird/data/demo_ds_1.fdb
username: alice
password: masterkey
ds_2:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: org.firebirdsql.jdbc.FBDriver
- standardJdbcUrl:
jdbc:firebird://localhost:3050//var/lib/firebird/data/demo_ds_2.fdb
+ jdbcUrl:
jdbc:firebird://localhost:3050//var/lib/firebird/data/demo_ds_2.fdb
username: alice
password: masterkey
rules:
diff --git
a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/presto/_index.cn.md
b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/h2/_index.cn.md
similarity index 52%
copy from
docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/presto/_index.cn.md
copy to
docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/h2/_index.cn.md
index 71985bbe10b..24d72ea9422 100644
---
a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/presto/_index.cn.md
+++
b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/h2/_index.cn.md
@@ -1,96 +1,35 @@
+++
-title = "Presto"
+title = "H2"
weight = 6
+++
## 背景信息
-ShardingSphere 默认情况下不提供对 `com.facebook.presto.jdbc.PrestoDriver` 的
`driverClassName` 的支持。
-ShardingSphere 对 Presto JDBC Driver 的支持位于可选模块中。
+ShardingSphere 默认情况下不提供对 `org.h2.Driver` 的 `driverClassName` 的支持。
+ShardingSphere 对 H2 JDBC Driver 的支持位于可选模块中。
## 前提条件
-要在 ShardingSphere 的配置文件为数据节点使用类似
`jdbc:presto://localhost:8080/iceberg/demo_ds_0` 的 `standardJdbcUrl`,
+要在 ShardingSphere 的配置文件为数据节点使用类似
`jdbc:h2:mem:demo_ds_0;MODE=MYSQL;IGNORECASE=TRUE;CASE_INSENSITIVE_IDENTIFIERS=TRUE`
的 `jdbcUrl`,
可能的 Maven 依赖关系如下,
```xml
<dependencies>
<dependency>
<groupId>org.apache.shardingsphere</groupId>
- <artifactId>shardingsphere-jdbc-dialect-presto</artifactId>
+ <artifactId>shardingsphere-jdbc-dialect-mysql</artifactId>
<version>${shardingsphere.version}</version>
</dependency>
<dependency>
- <groupId>com.facebook.presto</groupId>
- <artifactId>presto-jdbc</artifactId>
- <version>0.296</version>
+ <groupId>com.h2database</groupId>
+ <artifactId>h2</artifactId>
+ <version>2.2.224</version>
</dependency>
</dependencies>
```
## 配置示例
-### 启动 Presto
-
-编写 Docker Compose 文件来启动 Presto。这将启动一个既为协调器又为工作节点的 Presto 节点,并为该节点配置 Iceberg
连接器。
-此外,此 Iceberg 连接器将使用本地文件系统目录启动 Hive Metastore Server。
-
-```yaml
-services:
- presto:
- image: prestodb/presto:0.296
- ports:
- - "8080:8080"
- volumes:
- - ./iceberg.properties:/opt/presto-server/etc/catalog/iceberg.properties
-```
-
-同级文件夹包含文件 `iceberg.properties`,内容如下,
-
-```properties
-connector.name=iceberg
-iceberg.catalog.type=hive
-hive.metastore=file
-hive.metastore.catalog.dir=file:/home/iceberg_data
-```
-
-### 创建业务相关的 schema 和表
-
-通过第三方工具在 Presto 内创建业务相关的 schema 和表。
-以 DBeaver Community 为例,若使用 Ubuntu 24.04,可通过 Snapcraft 快速安装,
-
-```shell
-sudo apt update && sudo apt upgrade -y
-sudo snap install dbeaver-ce --classic
-snap run dbeaver-ce
-```
-
-在 DBeaver Community 内,使用 `jdbc:presto://localhost:8080/iceberg` 的
`standardJdbcUrl`,`test` 的`username` 连接至 Presto,
-`password` 留空。
-执行如下 SQL,
-
-```sql
--- noinspection SqlNoDataSourceInspectionForFile
-CREATE SCHEMA iceberg.demo_ds_0;
-CREATE SCHEMA iceberg.demo_ds_1;
-CREATE SCHEMA iceberg.demo_ds_2;
-```
-
-分别使用 `jdbc:presto://localhost:8080/iceberg/demo_ds_0` ,
-`jdbc:presto://localhost:8080/iceberg/demo_ds_1` 和
`jdbc:presto://localhost:8080/iceberg/demo_ds_2` 的 `standardJdbcUrl` 连接至 Presto
来执行如下 SQL,
-
-```sql
--- noinspection SqlNoDataSourceInspectionForFile
-CREATE TABLE IF NOT EXISTS t_order (
- order_id BIGINT NOT NULL,
- order_type INTEGER,
- user_id INTEGER NOT NULL,
- address_id BIGINT NOT NULL,
- status VARCHAR(50)
-);
-truncate table t_order;
-```
-
### 在业务项目创建 ShardingSphere 数据源
在业务项目引入`前提条件`涉及的依赖后,额外引入如下依赖,
@@ -134,19 +73,22 @@ truncate table t_order;
dataSources:
ds_0:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.facebook.presto.jdbc.PrestoDriver
- standardJdbcUrl: jdbc:presto://localhost:8080/iceberg/demo_ds_0
- username: test
+ driverClassName: org.h2.Driver
+ jdbcUrl:
jdbc:h2:mem:demo_ds_0;MODE=MYSQL;IGNORECASE=TRUE;CASE_INSENSITIVE_IDENTIFIERS=TRUE
+ username: sa
+ password:
ds_1:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.facebook.presto.jdbc.PrestoDriver
- standardJdbcUrl: jdbc:presto://localhost:8080/iceberg/demo_ds_1
- username: test
+ driverClassName: org.h2.Driver
+ jdbcUrl:
jdbc:h2:mem:demo_ds_1;MODE=MYSQL;IGNORECASE=TRUE;CASE_INSENSITIVE_IDENTIFIERS=TRUE
+ username: sa
+ password:
ds_2:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.facebook.presto.jdbc.PrestoDriver
- standardJdbcUrl: jdbc:presto://localhost:8080/iceberg/demo_ds_2
- username: test
+ driverClassName: org.h2.Driver
+ jdbcUrl:
jdbc:h2:mem:demo_ds_2;MODE=MYSQL;IGNORECASE=TRUE;CASE_INSENSITIVE_IDENTIFIERS=TRUE
+ username: sa
+ password:
rules:
- !SHARDING
tables:
@@ -187,6 +129,8 @@ public class ExampleUtils {
try (HikariDataSource dataSource = new HikariDataSource(config);
Connection connection = dataSource.getConnection();
Statement statement = connection.createStatement()) {
+ statement.execute("CREATE TABLE IF NOT EXISTS t_order (order_id
BIGINT NOT NULL AUTO_INCREMENT,order_type INT(11),user_id INT NOT
NULL,address_id BIGINT NOT NULL,status VARCHAR(50),PRIMARY KEY (order_id))");
+ statement.execute("TRUNCATE TABLE t_order");
statement.execute("INSERT INTO t_order (user_id, order_type,
address_id, status) VALUES (1, 1, 1, 'INSERT_TEST')");
statement.executeQuery("SELECT * FROM t_order");
statement.execute("DELETE FROM t_order WHERE user_id=1");
@@ -198,16 +142,14 @@ public class ExampleUtils {
## 使用限制
-### SQL 限制
+### 数据库方言限制
-ShardingSphere JDBC DataSource 尚不支持执行 Presto 的 `create table` 和 `truncate
table` 语句。
+由于 `org.apache.shardingsphere:shardingsphere-database-connector-h2` 的 SPI
实现将通过 H2 JDBC Driver 执行的 SQL 路由至 MySQL 方言,当前需要为 H2 JDBC Driver 的 JDBC URL 添加参数为
`;MODE=MYSQL;IGNORECASE=TRUE;CASE_INSENSITIVE_IDENTIFIERS=TRUE`,以使用 H2 的 MySQL
Compatibility Mode。
-### 事务限制
+如果开发者需要使用 H2 的原生 SQL 方言,或使用 H2 针对其他数据库的 Compatibility Mode,则应该排除所有 Maven 依赖中的
`org.apache.shardingsphere:shardingsphere-database-connector-h2`,并自行实现缺少的 SPI。
-Presto 不支持 ShardingSphere 集成级别的本地事务,XA 事务或 Seata 的 AT 模式事务。
-Presto 自身的事务支持存在问题,参考 https://github.com/prestodb/presto/issues/25204 。
+### 功能限制
-### 连接器限制
+为 H2 的数据库同时使用 ShardingSphere 的 `!SHARDING` 和 `!READWRITE_SPLITTING` 功能,将使
ShardingSphere 解析到错误的数据库元数据,并导致执行部分 SQL 时获得错误的结果。
-受 https://github.com/prestodb/presto/issues/23226 影响,Presto Memory
连接器的健康检查存在已知问题,
-不应在 ShardingSphere 的配置文件内连接至 Presto Memory 连接器。
+若需要同时使用 ShardingSphere 的 `!SHARDING` 和 `!READWRITE_SPLITTING` 功能,则应切换使用 MySQL
等数据库。可通过 `testcontainers-java` 以在测试环境启动真实的 MySQL 数据库。
diff --git
a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/h2/_index.en.md
b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/h2/_index.en.md
new file mode 100644
index 00000000000..6c5a8a61161
--- /dev/null
+++
b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/h2/_index.en.md
@@ -0,0 +1,155 @@
++++
+title = "H2"
+weight = 6
++++
+
+## Background Information
+
+ShardingSphere does not provide support for `driverClassName` of
`org.h2.Driver` by default.
+
+ShardingSphere support for H2 JDBC Drivers is located in an optional module.
+
+## Prerequisites
+
+To use a `jdbcUrl` like
`jdbc:h2:mem:demo_ds_0;MODE=MYSQL;IGNORECASE=TRUE;CASE_INSENSITIVE_IDENTIFIERS=TRUE`
for data nodes in your ShardingSphere configuration file, the following Maven
dependencies are required:
+
+```xml
+<dependencies>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-jdbc-dialect-mysql</artifactId>
+ <version>${shardingsphere.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.h2database</groupId>
+ <artifactId>h2</artifactId>
+ <version>2.2.224</version>
+ </dependency>
+</dependencies>
+```
+
+## Configuration Example
+
+### Creating a ShardingSphere Data Source in a Business Project
+
+After including the dependencies involved in the `Prerequisites` section in
the business project, additionally include the following dependencies:
+
+```xml
+<dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-jdbc</artifactId>
+ <version>${shardingsphere.version}</version>
+</dependency>
+<dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-infra-data-source-pool-hikari</artifactId>
+ <version>${shardingsphere.version}</version>
+</dependency>
+<dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-infra-url-classpath</artifactId>
+ <version>${shardingsphere.version}</version>
+</dependency>
+<dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-standalone-mode-repository-memory</artifactId>
+ <version>${shardingsphere.version}</version>
+</dependency>
+<dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-sharding-core</artifactId>
+ <version>${shardingsphere.version}</version>
+</dependency>
+<dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-authority-simple</artifactId>
+ <version>${shardingsphere.version}</version>
+</dependency>
+```
+
+Write the ShardingSphere data source configuration file `demo.yaml` on the
classpath of your business project.
+
+```yaml
+dataSources:
+ ds_0:
+ dataSourceClassName: com.zaxxer.hikari.HikariDataSource
+ driverClassName: org.h2.Driver
+ jdbcUrl:
jdbc:h2:mem:demo_ds_0;MODE=MYSQL;IGNORECASE=TRUE;CASE_INSENSITIVE_IDENTIFIERS=TRUE
+ username: sa
+ password:
+ ds_1:
+ dataSourceClassName: com.zaxxer.hikari.HikariDataSource
+ driverClassName: org.h2.Driver
+ jdbcUrl:
jdbc:h2:mem:demo_ds_1;MODE=MYSQL;IGNORECASE=TRUE;CASE_INSENSITIVE_IDENTIFIERS=TRUE
+ username: sa
+ password:
+ ds_2:
+ dataSourceClassName: com.zaxxer.hikari.HikariDataSource
+ driverClassName: org.h2.Driver
+ jdbcUrl:
jdbc:h2:mem:demo_ds_2;MODE=MYSQL;IGNORECASE=TRUE;CASE_INSENSITIVE_IDENTIFIERS=TRUE
+ username: sa
+ password:
+rules:
+ - !SHARDING
+ tables:
+ t_order:
+ actualDataNodes: <LITERAL>ds_0.t_order, ds_1.t_order, ds_2.t_order
+ keyGenerateStrategy:
+ column: order_id
+ keyGeneratorName: snowflake
+ defaultDatabaseStrategy:
+ standard:
+ shardingColumn: user_id
+ shardingAlgorithmName: inline
+ shardingAlgorithms:
+ inline:
+ type: INLINE
+ props:
+ algorithm-expression: ds_${user_id % 2}
+ keyGenerators:
+ snowflake:
+ type: SNOWFLAKE
+```
+
+### Enjoy Integration
+
+Create a ShardingSphere data source to enjoy integration.
+
+```java
+import com.zaxxer.hikari.HikariConfig;
+import com.zaxxer.hikari.HikariDataSource;
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.sql.Statement;
+public class ExampleUtils {
+ void test() throws SQLException {
+ HikariConfig config = new HikariConfig();
+ config.setJdbcUrl("jdbc:shardingsphere:classpath:demo.yaml");
+
config.setDriverClassName("org.apache.shardingsphere.driver.ShardingSphereDriver");
+ try (HikariDataSource dataSource = new HikariDataSource(config);
+ Connection connection = dataSource.getConnection();
+ Statement statement = connection.createStatement()) {
+ statement.execute("CREATE TABLE IF NOT EXISTS t_order (order_id
BIGINT NOT NULL AUTO_INCREMENT,order_type INT(11),user_id INT NOT
NULL,address_id BIGINT NOT NULL,status VARCHAR(50),PRIMARY KEY (order_id))");
+ statement.execute("TRUNCATE TABLE t_order");
+ statement.execute("INSERT INTO t_order (user_id, order_type,
address_id, status) VALUES (1, 1, 1, 'INSERT_TEST')");
+ statement.executeQuery("SELECT * FROM t_order");
+ statement.execute("DELETE FROM t_order WHERE user_id=1");
+ statement.execute("DROP TABLE IF EXISTS t_order");
+ }
+ }
+}
+```
+
+## Usage Restrictions
+
+### Database Dialect Restrictions
+
+Because the SPI implementation of
`org.apache.shardingsphere:shardingsphere-database-connector-h2` routes SQL
executed via the H2 JDBC Driver to the MySQL dialect, the parameter
`;MODE=MYSQL;IGNORECASE=TRUE;CASE_INSENSITIVE_IDENTIFIERS=TRUE` needs to be
added to the JDBC URL of the H2 JDBC Driver to use H2's MySQL Compatibility
Mode.
+
+If developers need to use H2's native SQL dialect, or use H2's Compatibility
Mode for other databases, they should exclude
`org.apache.shardingsphere:shardingsphere-database-connector-h2` from all Maven
dependencies and implement the missing SPI themselves.
+
+### Functionality Limitations
+
+Using ShardingSphere's `!SHARDING` and `!READWRITE_SPLITTING` features
simultaneously with an H2 database will cause ShardingSphere to resolve
incorrect database metadata, resulting in incorrect results when executing some
SQL statements.
+
+If you need to use ShardingSphere's `!SHARDING` and `!READWRITE_SPLITTING`
features simultaneously, you should switch to a database such as MySQL. A live
MySQL database can be started in a test environment using `testcontainers-java`.
diff --git
a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/hiveserver2/_index.cn.md
b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/hiveserver2/_index.cn.md
index 1b1ce7e386c..871330d07f6 100644
---
a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/hiveserver2/_index.cn.md
+++
b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/hiveserver2/_index.cn.md
@@ -10,7 +10,7 @@ ShardingSphere 对 HiveServer2 JDBC Driver 的支持位于可选模块中。
## 前提条件
-要在 ShardingSphere 的配置文件为数据节点使用类似 `jdbc:hive2://localhost:10000/` 的
`standardJdbcUrl`,
+要在 ShardingSphere 的配置文件为数据节点使用类似 `jdbc:hive2://localhost:10000/` 的 `jdbcUrl`,
可能的 Maven 依赖关系如下,
```xml
@@ -80,9 +80,9 @@ services:
- "10000:10000"
```
-### 创建业务表
+### 创建业务库
-通过第三方工具在 HiveServer2 内创建业务库与业务表。
+通过第三方工具在 HiveServer2 内创建业务库。
以 DBeaver Community 为例,若使用 Ubuntu 24.04,可通过 Snapcraft 快速安装,
```shell
@@ -91,7 +91,7 @@ sudo snap install dbeaver-ce --classic
snap run dbeaver-ce
```
-在 DBeaver Community 内,使用 `jdbc:hive2://localhost:10000/` 的 `standardJdbcUrl`
连接至 HiveServer2,`username` 和 `password` 留空。
+在 DBeaver Community 内,使用 `jdbc:hive2://localhost:10000/` 的 `jdbcUrl` 连接至
HiveServer2,`username` 和 `password` 留空。
执行如下 SQL,
```sql
@@ -145,15 +145,15 @@ dataSources:
ds_0:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: org.apache.hive.jdbc.HiveDriver
- standardJdbcUrl: jdbc:hive2://localhost:10000/demo_ds_0
+ jdbcUrl: jdbc:hive2://localhost:10000/demo_ds_0
ds_1:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: org.apache.hive.jdbc.HiveDriver
- standardJdbcUrl: jdbc:hive2://localhost:10000/demo_ds_1
+ jdbcUrl: jdbc:hive2://localhost:10000/demo_ds_1
ds_2:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: org.apache.hive.jdbc.HiveDriver
- standardJdbcUrl: jdbc:hive2://localhost:10000/demo_ds_2
+ jdbcUrl: jdbc:hive2://localhost:10000/demo_ds_2
rules:
- !SHARDING
tables:
@@ -209,7 +209,7 @@ public class ExampleUtils {
### 连接至开启 ZooKeeper Service Discovery 的 HiveServer2
-ShardingSphere 配置文件中的 `standardJdbcUrl` 可配置连接至开启 ZooKeeper Service Discovery 的
HiveServer2。
+ShardingSphere 配置文件中的 `jdbcUrl` 可配置连接至开启 ZooKeeper Service Discovery 的
HiveServer2。
引入讨论,假设存在如下 Docker Compose 文件来启动开启 ZooKeeper Service Discovery 的 HiveServer2。
@@ -236,7 +236,7 @@ services:
```
在 DBeaver Community 内,
-使用
`jdbc:hive2://127.0.0.1:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2`
的 `standardJdbcUrl` 连接至 HiveServer2,
+使用
`jdbc:hive2://127.0.0.1:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2`
的 `jdbcUrl` 连接至 HiveServer2,
`username` 和 `password` 留空。
执行如下 SQL,
@@ -289,15 +289,15 @@ dataSources:
ds_0:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: org.apache.hive.jdbc.HiveDriver
- standardJdbcUrl:
jdbc:hive2://127.0.0.1:2181/demo_ds_0;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2
+ jdbcUrl:
jdbc:hive2://127.0.0.1:2181/demo_ds_0;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2
ds_1:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: org.apache.hive.jdbc.HiveDriver
- standardJdbcUrl:
jdbc:hive2://127.0.0.1:2181/demo_ds_1;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2
+ jdbcUrl:
jdbc:hive2://127.0.0.1:2181/demo_ds_1;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2
ds_2:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: org.apache.hive.jdbc.HiveDriver
- standardJdbcUrl:
jdbc:hive2://127.0.0.1:2181/demo_ds_2;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2
+ jdbcUrl:
jdbc:hive2://127.0.0.1:2181/demo_ds_2;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2
rules:
- !SHARDING
tables:
@@ -371,7 +371,7 @@ networks:
```
在 DBeaver Community 内,
-使用
`jdbc:hive2://127.0.0.1:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2`
的 `standardJdbcUrl` 连接至 HiveServer2,
+使用
`jdbc:hive2://127.0.0.1:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2`
的 `jdbcUrl` 连接至 HiveServer2,
`username` 和 `password` 留空。
执行如下 SQL,
@@ -444,15 +444,15 @@ dataSources:
ds_0:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: org.apache.hive.jdbc.HiveDriver
- standardJdbcUrl:
jdbc:hive2://localhost:10000/demo_ds_0;initFile=/tmp/init.sql
+ jdbcUrl: jdbc:hive2://localhost:10000/demo_ds_0;initFile=/tmp/init.sql
ds_1:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: org.apache.hive.jdbc.HiveDriver
- standardJdbcUrl:
jdbc:hive2://localhost:10000/demo_ds_0;initFile=/tmp/init.sql
+ jdbcUrl: jdbc:hive2://localhost:10000/demo_ds_0;initFile=/tmp/init.sql
ds_2:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: org.apache.hive.jdbc.HiveDriver
- standardJdbcUrl:
jdbc:hive2://localhost:10000/demo_ds_0;initFile=/tmp/init.sql
+ jdbcUrl: jdbc:hive2://localhost:10000/demo_ds_0;initFile=/tmp/init.sql
```
`/tmp/init.sql` 的可能内容如下,
@@ -477,15 +477,15 @@ dataSources:
ds_0:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: org.apache.hive.jdbc.HiveDriver
- standardJdbcUrl: $${fixture.hive.ds0.jdbc-url::}
+ jdbcUrl: $${fixture.hive.ds0.jdbc-url::}
ds_1:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: org.apache.hive.jdbc.HiveDriver
- standardJdbcUrl: $${fixture.hive.ds1.jdbc-url::}
+ jdbcUrl: $${fixture.hive.ds1.jdbc-url::}
ds_2:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: org.apache.hive.jdbc.HiveDriver
- standardJdbcUrl: $${fixture.hive.ds2.jdbc-url::}
+ jdbcUrl: $${fixture.hive.ds2.jdbc-url::}
```
此时使用 ShardingSphere JDBC Driver 时可以通过拼接字符串的手段传入业务项目的 classpath 上的文件的绝对路径。
diff --git
a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/hiveserver2/_index.en.md
b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/hiveserver2/_index.en.md
index 74c6d356331..db9c7aa76f8 100644
---
a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/hiveserver2/_index.en.md
+++
b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/hiveserver2/_index.en.md
@@ -11,7 +11,7 @@ ShardingSphere's support for HiveServer2 JDBC Driver is in
the optional module.
## Prerequisites
-To use a `standardJdbcUrl` like `jdbc:hive2://localhost:10000/` for the data
node in the ShardingSphere configuration file,
+To use a `jdbcUrl` like `jdbc:hive2://localhost:10000/` for the data node in
the ShardingSphere configuration file,
The possible Maven dependencies are as follows.
```xml
@@ -82,9 +82,9 @@ services:
- "10000:10000"
```
-### Create business tables
+### Creating Business Database
-Use a third-party tool to create some business databases and business tables
in HiveServer2.
+Create business database within HiveServer2 using a third-party tool.
Taking DBeaver Community as an example, if you use Ubuntu 24.04, you can
quickly install it through Snapcraft.
```shell
@@ -93,7 +93,7 @@ sudo snap install dbeaver-ce --classic
snap run dbeaver-ce
```
-In DBeaver Community, use the `standardJdbcUrl` of
`jdbc:hive2://localhost:10000/` to connect to HiveServer2,
+In DBeaver Community, use the `jdbcUrl` of `jdbc:hive2://localhost:10000/` to
connect to HiveServer2,
and leave `username` and `password` blank.
Execute the following SQL,
@@ -148,15 +148,15 @@ dataSources:
ds_0:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: org.apache.hive.jdbc.HiveDriver
- standardJdbcUrl: jdbc:hive2://localhost:10000/demo_ds_0
+ jdbcUrl: jdbc:hive2://localhost:10000/demo_ds_0
ds_1:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: org.apache.hive.jdbc.HiveDriver
- standardJdbcUrl: jdbc:hive2://localhost:10000/demo_ds_1
+ jdbcUrl: jdbc:hive2://localhost:10000/demo_ds_1
ds_2:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: org.apache.hive.jdbc.HiveDriver
- standardJdbcUrl: jdbc:hive2://localhost:10000/demo_ds_2
+ jdbcUrl: jdbc:hive2://localhost:10000/demo_ds_2
rules:
- !SHARDING
tables:
@@ -212,7 +212,7 @@ public class ExampleUtils {
### Connect to HiveServer2 with ZooKeeper Service Discovery enabled
-`standardJdbcUrl` in the ShardingSphere configuration file can be configured
to connect to HiveServer2 with ZooKeeper Service Discovery enabled.
+`jdbcUrl` in the ShardingSphere configuration file can be configured to
connect to HiveServer2 with ZooKeeper Service Discovery enabled.
For discussion, assume that there is the following Docker Compose file to
start HiveServer2 with ZooKeeper Service Discovery.
@@ -239,7 +239,7 @@ services:
```
In DBeaver Community,
-use `standardJdbcUrl` of
`jdbc:hive2://127.0.0.1:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2`
to connect to HiveServer2,
+use `jdbcUrl` of
`jdbc:hive2://127.0.0.1:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2`
to connect to HiveServer2,
leave `username` and `password` blank.
Execute the following SQL,
@@ -292,15 +292,15 @@ dataSources:
ds_0:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: org.apache.hive.jdbc.HiveDriver
- standardJdbcUrl:
jdbc:hive2://127.0.0.1:2181/demo_ds_0;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2
+ jdbcUrl:
jdbc:hive2://127.0.0.1:2181/demo_ds_0;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2
ds_1:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: org.apache.hive.jdbc.HiveDriver
- standardJdbcUrl:
jdbc:hive2://127.0.0.1:2181/demo_ds_1;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2
+ jdbcUrl:
jdbc:hive2://127.0.0.1:2181/demo_ds_1;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2
ds_2:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: org.apache.hive.jdbc.HiveDriver
- standardJdbcUrl:
jdbc:hive2://127.0.0.1:2181/demo_ds_2;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2
+ jdbcUrl:
jdbc:hive2://127.0.0.1:2181/demo_ds_2;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2
rules:
- !SHARDING
tables:
@@ -374,7 +374,7 @@ networks:
```
In DBeaver Community,
-use `standardJdbcUrl` of
`jdbc:hive2://127.0.0.1:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2`
to connect to HiveServer2,
+use `jdbcUrl` of
`jdbc:hive2://127.0.0.1:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2`
to connect to HiveServer2,
leave `username` and `password` blank.
Execute the following SQL,
@@ -449,15 +449,15 @@ dataSources:
ds_0:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: org.apache.hive.jdbc.HiveDriver
- standardJdbcUrl:
jdbc:hive2://localhost:10000/demo_ds_0;initFile=/tmp/init.sql
+ jdbcUrl: jdbc:hive2://localhost:10000/demo_ds_0;initFile=/tmp/init.sql
ds_1:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: org.apache.hive.jdbc.HiveDriver
- standardJdbcUrl:
jdbc:hive2://localhost:10000/demo_ds_0;initFile=/tmp/init.sql
+ jdbcUrl: jdbc:hive2://localhost:10000/demo_ds_0;initFile=/tmp/init.sql
ds_2:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: org.apache.hive.jdbc.HiveDriver
- standardJdbcUrl:
jdbc:hive2://localhost:10000/demo_ds_0;initFile=/tmp/init.sql
+ jdbcUrl: jdbc:hive2://localhost:10000/demo_ds_0;initFile=/tmp/init.sql
```
The possible contents of `/tmp/init.sql` are as follows,
@@ -482,15 +482,15 @@ dataSources:
ds_0:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: org.apache.hive.jdbc.HiveDriver
- standardJdbcUrl: $${fixture.hive.ds0.jdbc-url::}
+ jdbcUrl: $${fixture.hive.ds0.jdbc-url::}
ds_1:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: org.apache.hive.jdbc.HiveDriver
- standardJdbcUrl: $${fixture.hive.ds1.jdbc-url::}
+ jdbcUrl: $${fixture.hive.ds1.jdbc-url::}
ds_2:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: org.apache.hive.jdbc.HiveDriver
- standardJdbcUrl: $${fixture.hive.ds2.jdbc-url::}
+ jdbcUrl: $${fixture.hive.ds2.jdbc-url::}
```
When using ShardingSphere JDBC Driver,
diff --git
a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/presto/_index.cn.md
b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/ms-sql-server/_index.cn.md
similarity index 56%
copy from
docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/presto/_index.cn.md
copy to
docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/ms-sql-server/_index.cn.md
index 71985bbe10b..6242fc2b9c8 100644
---
a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/presto/_index.cn.md
+++
b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/ms-sql-server/_index.cn.md
@@ -1,62 +1,53 @@
+++
-title = "Presto"
+title = "MS SQL Server"
weight = 6
+++
## 背景信息
-ShardingSphere 默认情况下不提供对 `com.facebook.presto.jdbc.PrestoDriver` 的
`driverClassName` 的支持。
-ShardingSphere 对 Presto JDBC Driver 的支持位于可选模块中。
+ShardingSphere 默认情况下不提供对 `com.microsoft.sqlserver.jdbc.SQLServerDriver` 的
`driverClassName` 的支持。
+ShardingSphere 对 MS SQL Server 的支持位于可选模块中。
## 前提条件
-要在 ShardingSphere 的配置文件为数据节点使用类似
`jdbc:presto://localhost:8080/iceberg/demo_ds_0` 的 `standardJdbcUrl`,
+要在 ShardingSphere 的配置文件为数据节点使用类似
`jdbc:sqlserver://localhost:1433;databaseName=demo_ds_0;encrypt=false;` 的
`jdbcUrl`,
可能的 Maven 依赖关系如下,
```xml
<dependencies>
<dependency>
<groupId>org.apache.shardingsphere</groupId>
- <artifactId>shardingsphere-jdbc-dialect-presto</artifactId>
+ <artifactId>shardingsphere-jdbc-dialect-sqlserver</artifactId>
<version>${shardingsphere.version}</version>
</dependency>
<dependency>
- <groupId>com.facebook.presto</groupId>
- <artifactId>presto-jdbc</artifactId>
- <version>0.296</version>
+ <groupId>com.microsoft.sqlserver</groupId>
+ <artifactId>mssql-jdbc</artifactId>
+ <version>12.10.2.jre8</version>
</dependency>
</dependencies>
```
## 配置示例
-### 启动 Presto
+### 启动 MS SQL Server
-编写 Docker Compose 文件来启动 Presto。这将启动一个既为协调器又为工作节点的 Presto 节点,并为该节点配置 Iceberg
连接器。
-此外,此 Iceberg 连接器将使用本地文件系统目录启动 Hive Metastore Server。
+编写 Docker Compose 文件来启动 MS SQL Server。
```yaml
services:
- presto:
- image: prestodb/presto:0.296
+ ms-sql-server:
+ image: mcr.microsoft.com/mssql/server:2025-RTM-ubuntu-22.04
+ environment:
+ ACCEPT_EULA: Y
+ MSSQL_SA_PASSWORD: A_Str0ng_Required_Password
ports:
- - "8080:8080"
- volumes:
- - ./iceberg.properties:/opt/presto-server/etc/catalog/iceberg.properties
+ - "1433:1433"
```
-同级文件夹包含文件 `iceberg.properties`,内容如下,
+### 创建业务库
-```properties
-connector.name=iceberg
-iceberg.catalog.type=hive
-hive.metastore=file
-hive.metastore.catalog.dir=file:/home/iceberg_data
-```
-
-### 创建业务相关的 schema 和表
-
-通过第三方工具在 Presto 内创建业务相关的 schema 和表。
+通过第三方工具在 MS SQL Server 内创建业务库。
以 DBeaver Community 为例,若使用 Ubuntu 24.04,可通过 Snapcraft 快速安装,
```shell
@@ -65,30 +56,14 @@ sudo snap install dbeaver-ce --classic
snap run dbeaver-ce
```
-在 DBeaver Community 内,使用 `jdbc:presto://localhost:8080/iceberg` 的
`standardJdbcUrl`,`test` 的`username` 连接至 Presto,
-`password` 留空。
+在 DBeaver Community 内,使用 `jdbc:sqlserver://localhost:1433;encrypt=false;` 的
`jdbcUrl`,`sa` 的`username`,`A_Str0ng_Required_Password` 的 `password` 连接至 MS SQL
Server。
执行如下 SQL,
```sql
-- noinspection SqlNoDataSourceInspectionForFile
-CREATE SCHEMA iceberg.demo_ds_0;
-CREATE SCHEMA iceberg.demo_ds_1;
-CREATE SCHEMA iceberg.demo_ds_2;
-```
-
-分别使用 `jdbc:presto://localhost:8080/iceberg/demo_ds_0` ,
-`jdbc:presto://localhost:8080/iceberg/demo_ds_1` 和
`jdbc:presto://localhost:8080/iceberg/demo_ds_2` 的 `standardJdbcUrl` 连接至 Presto
来执行如下 SQL,
-
-```sql
--- noinspection SqlNoDataSourceInspectionForFile
-CREATE TABLE IF NOT EXISTS t_order (
- order_id BIGINT NOT NULL,
- order_type INTEGER,
- user_id INTEGER NOT NULL,
- address_id BIGINT NOT NULL,
- status VARCHAR(50)
-);
-truncate table t_order;
+CREATE DATABASE demo_ds_0;
+CREATE DATABASE demo_ds_1;
+CREATE DATABASE demo_ds_2;
```
### 在业务项目创建 ShardingSphere 数据源
@@ -134,19 +109,22 @@ truncate table t_order;
dataSources:
ds_0:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.facebook.presto.jdbc.PrestoDriver
- standardJdbcUrl: jdbc:presto://localhost:8080/iceberg/demo_ds_0
- username: test
+ driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
+ jdbcUrl:
jdbc:sqlserver://localhost:1433;databaseName=demo_ds_0;encrypt=false;
+ username: sa
+ password: A_Str0ng_Required_Password
ds_1:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.facebook.presto.jdbc.PrestoDriver
- standardJdbcUrl: jdbc:presto://localhost:8080/iceberg/demo_ds_1
- username: test
+ driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
+ jdbcUrl:
jdbc:sqlserver://localhost:1433;databaseName=demo_ds_1;encrypt=false;
+ username: sa
+ password: A_Str0ng_Required_Password
ds_2:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.facebook.presto.jdbc.PrestoDriver
- standardJdbcUrl: jdbc:presto://localhost:8080/iceberg/demo_ds_2
- username: test
+ driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
+ jdbcUrl:
jdbc:sqlserver://localhost:1433;databaseName=demo_ds_2;encrypt=false;
+ username: sa
+ password: A_Str0ng_Required_Password
rules:
- !SHARDING
tables:
@@ -187,10 +165,12 @@ public class ExampleUtils {
try (HikariDataSource dataSource = new HikariDataSource(config);
Connection connection = dataSource.getConnection();
Statement statement = connection.createStatement()) {
+ statement.execute("CREATE TABLE [t_order] (order_id bigint NOT
NULL,order_type int,user_id int NOT NULL,address_id bigint NOT NULL,status
varchar(50),PRIMARY KEY (order_id))");
+ statement.execute("TRUNCATE TABLE t_order");
statement.execute("INSERT INTO t_order (user_id, order_type,
address_id, status) VALUES (1, 1, 1, 'INSERT_TEST')");
statement.executeQuery("SELECT * FROM t_order");
statement.execute("DELETE FROM t_order WHERE user_id=1");
- statement.execute("DROP TABLE IF EXISTS t_order");
+ statement.execute("DROP TABLE t_order");
}
}
}
@@ -200,14 +180,5 @@ public class ExampleUtils {
### SQL 限制
-ShardingSphere JDBC DataSource 尚不支持执行 Presto 的 `create table` 和 `truncate
table` 语句。
-
-### 事务限制
-
-Presto 不支持 ShardingSphere 集成级别的本地事务,XA 事务或 Seata 的 AT 模式事务。
-Presto 自身的事务支持存在问题,参考 https://github.com/prestodb/presto/issues/25204 。
-
-### 连接器限制
-
-受 https://github.com/prestodb/presto/issues/23226 影响,Presto Memory
连接器的健康检查存在已知问题,
-不应在 ShardingSphere 的配置文件内连接至 Presto Memory 连接器。
+ShardingSphere JDBC DataSource 支持执行 MS SQL Server 的 `DROP TABLE` 语句,
+但尚不支持执行 MS SQL Server 的 `DROP TABLE IF EXISTS` 语句。
diff --git
a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/ms-sql-server/_index.en.md
b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/ms-sql-server/_index.en.md
new file mode 100644
index 00000000000..088b07f5937
--- /dev/null
+++
b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/ms-sql-server/_index.en.md
@@ -0,0 +1,184 @@
++++
+title = "MS SQL Server"
+weight = 6
++++
+
+## Background Information
+
+ShardingSphere does not provide support for `driverClassName` of
`com.microsoft.sqlserver.jdbc.SQLServerDriver` by default.
+
+ShardingSphere support for MS SQL Server is located in an optional module.
+
+## Prerequisites
+
+To use a `jdbcUrl` like
`jdbc:sqlserver://localhost:1433;databaseName=demo_ds_0;encrypt=false;` for
data nodes in the ShardingSphere configuration file, the following Maven
dependencies are required:
+
+```xml
+<dependencies>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-jdbc-dialect-sqlserver</artifactId>
+ <version>${shardingsphere.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.microsoft.sqlserver</groupId>
+ <artifactId>mssql-jdbc</artifactId>
+ <version>12.10.2.jre8</version>
+ </dependency>
+</dependencies>
+```
+
+## Configuration Example
+
+### Starting MS SQL Server
+
+Write a Docker Compose file to start MS SQL Server.
+
+```yaml
+services:
+ ms-sql-server:
+ image: mcr.microsoft.com/mssql/server:2025-RTM-ubuntu-22.04
+ environment:
+ ACCEPT_EULA: Y
+ MSSQL_SA_PASSWORD: A_Str0ng_Required_Password
+ ports:
+ - "1433:1433"
+```
+
+### Creating Business Database
+
+Create business database within MS SQL Server using a third-party tool.
+Taking DBeaver Community as an example, if using Ubuntu 24.04, it can be
quickly installed via Snapcraft:
+
+```shell
+sudo apt update && sudo apt upgrade -y
+sudo snap install dbeaver-ce --classic
+snap run dbeaver-ce
+```
+
+Within DBeaver Community, connect to MS SQL Server using
`jdbc:sqlserver://localhost:1433;encrypt=false;`'s `jdbcUrl`, `sa`'s
`username`, and `A_Str0ng_Required_Password`'s `password`.
+Execute the following SQL:
+
+```sql
+-- noinspection SqlNoDataSourceInspectionForFile
+CREATE DATABASE demo_ds_0;
+CREATE DATABASE demo_ds_1;
+CREATE DATABASE demo_ds_2;
+```
+
+### Creating ShardingSphere Data Source in a Business Project
+
+After including the dependencies involved in the `Prerequisites` section in
the business project, additionally include the following dependencies:
+
+```xml
+<dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-jdbc</artifactId>
+ <version>${shardingsphere.version}</version>
+</dependency>
+<dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-infra-data-source-pool-hikari</artifactId>
+ <version>${shardingsphere.version}</version>
+</dependency>
+<dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-infra-url-classpath</artifactId>
+ <version>${shardingsphere.version}</version>
+</dependency>
+<dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-standalone-mode-repository-memory</artifactId>
+ <version>${shardingsphere.version}</version>
+</dependency>
+<dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-sharding-core</artifactId>
+ <version>${shardingsphere.version}</version>
+</dependency>
+<dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-authority-simple</artifactId>
+ <version>${shardingsphere.version}</version>
+</dependency>
+```
+
+Write the ShardingSphere data source configuration file `demo.yaml` on the
classpath of your business project.
+
+```yaml
+dataSources:
+ ds_0:
+ dataSourceClassName: com.zaxxer.hikari.HikariDataSource
+ driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
+ jdbcUrl:
jdbc:sqlserver://localhost:1433;databaseName=demo_ds_0;encrypt=false;
+ username: sa
+ password: A_Str0ng_Required_Password
+ ds_1:
+ dataSourceClassName: com.zaxxer.hikari.HikariDataSource
+ driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
+ jdbcUrl:
jdbc:sqlserver://localhost:1433;databaseName=demo_ds_1;encrypt=false;
+ username: sa
+ password: A_Str0ng_Required_Password
+ ds_2:
+ dataSourceClassName: com.zaxxer.hikari.HikariDataSource
+ driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
+ jdbcUrl:
jdbc:sqlserver://localhost:1433;databaseName=demo_ds_2;encrypt=false;
+ username: sa
+ password: A_Str0ng_Required_Password
+rules:
+ - !SHARDING
+ tables:
+ t_order:
+ actualDataNodes: <LITERAL>ds_0.t_order, ds_1.t_order, ds_2.t_order
+ keyGenerateStrategy:
+ column: order_id
+ keyGeneratorName: snowflake
+ defaultDatabaseStrategy:
+ standard:
+ shardingColumn: user_id
+ shardingAlgorithmName: inline
+ shardingAlgorithms:
+ inline:
+ type: INLINE
+ props:
+ algorithm-expression: ds_${user_id % 2}
+ keyGenerators:
+ snowflake:
+ type: SNOWFLAKE
+```
+
+### Enjoy Integration
+
+Create ShardingSphere data source to enjoy integration.
+
+```java
+import com.zaxxer.hikari.HikariConfig;
+import com.zaxxer.hikari.HikariDataSource;
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.sql.Statement;
+public class ExampleUtils {
+ void test() throws SQLException {
+ HikariConfig config = new HikariConfig();
+ config.setJdbcUrl("jdbc:shardingsphere:classpath:demo.yaml");
+
config.setDriverClassName("org.apache.shardingsphere.driver.ShardingSphereDriver");
+ try (HikariDataSource dataSource = new HikariDataSource(config);
+ Connection connection = dataSource.getConnection();
+ Statement statement = connection.createStatement()) {
+ statement.execute("CREATE TABLE [t_order] (order_id bigint NOT
NULL,order_type int,user_id int NOT NULL,address_id bigint NOT NULL,status
varchar(50),PRIMARY KEY (order_id))");
+ statement.execute("TRUNCATE TABLE t_order");
+ statement.execute("INSERT INTO t_order (user_id, order_type,
address_id, status) VALUES (1, 1, 1, 'INSERT_TEST')");
+ statement.executeQuery("SELECT * FROM t_order");
+ statement.execute("DELETE FROM t_order WHERE user_id=1");
+ statement.execute("DROP TABLE t_order");
+ }
+ }
+}
+```
+
+## Usage Restrictions
+
+### SQL Restrictions
+
+ShardingSphere JDBC DataSource supports executing the MS SQL Server `DROP
TABLE` statement,
+but does not yet support executing the MS SQL Server `DROP TABLE IF EXISTS`
statement.
diff --git
a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/presto/_index.cn.md
b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/presto/_index.cn.md
index 71985bbe10b..e16dacd1064 100644
---
a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/presto/_index.cn.md
+++
b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/presto/_index.cn.md
@@ -10,7 +10,7 @@ ShardingSphere 对 Presto JDBC Driver 的支持位于可选模块中。
## 前提条件
-要在 ShardingSphere 的配置文件为数据节点使用类似
`jdbc:presto://localhost:8080/iceberg/demo_ds_0` 的 `standardJdbcUrl`,
+要在 ShardingSphere 的配置文件为数据节点使用类似
`jdbc:presto://localhost:8080/iceberg/demo_ds_0` 的 `jdbcUrl`,
可能的 Maven 依赖关系如下,
```xml
@@ -65,7 +65,7 @@ sudo snap install dbeaver-ce --classic
snap run dbeaver-ce
```
-在 DBeaver Community 内,使用 `jdbc:presto://localhost:8080/iceberg` 的
`standardJdbcUrl`,`test` 的`username` 连接至 Presto,
+在 DBeaver Community 内,使用 `jdbc:presto://localhost:8080/iceberg` 的
`jdbcUrl`,`test` 的`username` 连接至 Presto,
`password` 留空。
执行如下 SQL,
@@ -77,7 +77,7 @@ CREATE SCHEMA iceberg.demo_ds_2;
```
分别使用 `jdbc:presto://localhost:8080/iceberg/demo_ds_0` ,
-`jdbc:presto://localhost:8080/iceberg/demo_ds_1` 和
`jdbc:presto://localhost:8080/iceberg/demo_ds_2` 的 `standardJdbcUrl` 连接至 Presto
来执行如下 SQL,
+`jdbc:presto://localhost:8080/iceberg/demo_ds_1` 和
`jdbc:presto://localhost:8080/iceberg/demo_ds_2` 的 `jdbcUrl` 连接至 Presto 来执行如下
SQL,
```sql
-- noinspection SqlNoDataSourceInspectionForFile
@@ -135,17 +135,17 @@ dataSources:
ds_0:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: com.facebook.presto.jdbc.PrestoDriver
- standardJdbcUrl: jdbc:presto://localhost:8080/iceberg/demo_ds_0
+ jdbcUrl: jdbc:presto://localhost:8080/iceberg/demo_ds_0
username: test
ds_1:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: com.facebook.presto.jdbc.PrestoDriver
- standardJdbcUrl: jdbc:presto://localhost:8080/iceberg/demo_ds_1
+ jdbcUrl: jdbc:presto://localhost:8080/iceberg/demo_ds_1
username: test
ds_2:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: com.facebook.presto.jdbc.PrestoDriver
- standardJdbcUrl: jdbc:presto://localhost:8080/iceberg/demo_ds_2
+ jdbcUrl: jdbc:presto://localhost:8080/iceberg/demo_ds_2
username: test
rules:
- !SHARDING
diff --git
a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/presto/_index.en.md
b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/presto/_index.en.md
index 68e59a6d543..84f30a0231a 100644
---
a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/presto/_index.en.md
+++
b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/presto/_index.en.md
@@ -10,7 +10,7 @@ ShardingSphere's support for Presto JDBC Driver is in an
optional module.
## Prerequisites
-To use a `standardJdbcUrl` like
`jdbc:presto://localhost:8080/iceberg/demo_ds_0` for the data node in the
ShardingSphere configuration file,
+To use a `jdbcUrl` like `jdbc:presto://localhost:8080/iceberg/demo_ds_0` for
the data node in the ShardingSphere configuration file,
Possible Maven dependencies are as follows,
```xml
@@ -66,7 +66,7 @@ sudo snap install dbeaver-ce --classic
snap run dbeaver-ce
```
-In DBeaver Community, use `standardJdbcUrl` of
`jdbc:presto://localhost:8080/iceberg`, `username` of `test` to connect to
Presto, and leave `password` blank.
+In DBeaver Community, use `jdbcUrl` of `jdbc:presto://localhost:8080/iceberg`,
`username` of `test` to connect to Presto, and leave `password` blank.
Execute the following SQL,
```sql
@@ -76,7 +76,7 @@ CREATE SCHEMA iceberg.demo_ds_1;
CREATE SCHEMA iceberg.demo_ds_2;
```
-Use the `standardJdbcUrl` of `jdbc:presto://localhost:8080/iceberg/demo_ds_0`,
+Use the `jdbcUrl` of `jdbc:presto://localhost:8080/iceberg/demo_ds_0`,
`jdbc:presto://localhost:8080/iceberg/demo_ds_1` and
`jdbc:presto://localhost:8080/iceberg/demo_ds_2` to connect to Presto and
execute the following SQL,
```sql
@@ -135,17 +135,17 @@ dataSources:
ds_0:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: com.facebook.presto.jdbc.PrestoDriver
- standardJdbcUrl: jdbc:presto://localhost:8080/iceberg/demo_ds_0
+ jdbcUrl: jdbc:presto://localhost:8080/iceberg/demo_ds_0
username: test
ds_1:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: com.facebook.presto.jdbc.PrestoDriver
- standardJdbcUrl: jdbc:presto://localhost:8080/iceberg/demo_ds_1
+ jdbcUrl: jdbc:presto://localhost:8080/iceberg/demo_ds_1
username: test
ds_2:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: com.facebook.presto.jdbc.PrestoDriver
- standardJdbcUrl: jdbc:presto://localhost:8080/iceberg/demo_ds_2
+ jdbcUrl: jdbc:presto://localhost:8080/iceberg/demo_ds_2
username: test
rules:
- !SHARDING
diff --git
a/docs/document/content/user-manual/shardingsphere-jdbc/special-api/transaction/seata.cn.md
b/docs/document/content/user-manual/shardingsphere-jdbc/special-api/transaction/seata.cn.md
index 36de4994ed7..100e75b8df2 100644
---
a/docs/document/content/user-manual/shardingsphere-jdbc/special-api/transaction/seata.cn.md
+++
b/docs/document/content/user-manual/shardingsphere-jdbc/special-api/transaction/seata.cn.md
@@ -248,19 +248,19 @@ dataSources:
ds_0:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: com.mysql.cj.jdbc.Driver
- standardJdbcUrl: jdbc:mysql://localhost:3306/demo_ds_0?sslMode=REQUIRED
+ jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_0?sslMode=REQUIRED
username: root
password: example
ds_1:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: com.mysql.cj.jdbc.Driver
- standardJdbcUrl: jdbc:mysql://localhost:3306/demo_ds_1?sslMode=REQUIRED
+ jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_1?sslMode=REQUIRED
username: root
password: example
ds_2:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: com.mysql.cj.jdbc.Driver
- standardJdbcUrl: jdbc:mysql://localhost:3306/demo_ds_2?sslMode=REQUIRED
+ jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_2?sslMode=REQUIRED
username: root
password: example
rules:
diff --git
a/docs/document/content/user-manual/shardingsphere-jdbc/special-api/transaction/seata.en.md
b/docs/document/content/user-manual/shardingsphere-jdbc/special-api/transaction/seata.en.md
index 52e757f8312..ca613b42aad 100644
---
a/docs/document/content/user-manual/shardingsphere-jdbc/special-api/transaction/seata.en.md
+++
b/docs/document/content/user-manual/shardingsphere-jdbc/special-api/transaction/seata.en.md
@@ -259,19 +259,19 @@ dataSources:
ds_0:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: com.mysql.cj.jdbc.Driver
- standardJdbcUrl: jdbc:mysql://localhost:3306/demo_ds_0?sslMode=REQUIRED
+ jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_0?sslMode=REQUIRED
username: root
password: example
ds_1:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: com.mysql.cj.jdbc.Driver
- standardJdbcUrl: jdbc:mysql://localhost:3306/demo_ds_1?sslMode=REQUIRED
+ jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_1?sslMode=REQUIRED
username: root
password: example
ds_2:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: com.mysql.cj.jdbc.Driver
- standardJdbcUrl: jdbc:mysql://localhost:3306/demo_ds_2?sslMode=REQUIRED
+ jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_2?sslMode=REQUIRED
username: root
password: example
rules:
diff --git
a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/jdbc-driver/known-implementation/_index.cn.md
b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/jdbc-driver/known-implementation/_index.cn.md
index 15f054ca472..266c6183126 100644
---
a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/jdbc-driver/known-implementation/_index.cn.md
+++
b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/jdbc-driver/known-implementation/_index.cn.md
@@ -91,7 +91,7 @@ chapter = true
ds_1:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: $${FIXTURE_DRIVER_CLASS_NAME::org.h2.Driver}
- standardJdbcUrl: $${FIXTURE_JDBC_URL::jdbc:h2:mem:foo_ds_do_not_use}
+ jdbcUrl: $${FIXTURE_JDBC_URL::jdbc:h2:mem:foo_ds_do_not_use}
username: $${FIXTURE_USERNAME::}
password: $${FIXTURE_PASSWORD::}
```
@@ -102,7 +102,7 @@ ds_1:
ds_1:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: org.h2.Driver
- standardJdbcUrl:
jdbc:h2:mem:foo_ds_1;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MySQL
+ jdbcUrl:
jdbc:h2:mem:foo_ds_1;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MySQL
username: sa
password:
```
@@ -128,7 +128,7 @@ ds_1:
ds_1:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: $${fixture.config.driver.driver-class-name::org.h2.Driver}
- standardJdbcUrl:
$${fixture.config.driver.jdbc-url::jdbc:h2:mem:foo_ds_do_not_use}
+ jdbcUrl: $${fixture.config.driver.jdbc-url::jdbc:h2:mem:foo_ds_do_not_use}
username: $${fixture.config.driver.username::}
password: $${fixture.config.driver.password::}
```
@@ -139,7 +139,7 @@ ds_1:
ds_1:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: org.h2.Driver
- standardJdbcUrl:
jdbc:h2:mem:foo_ds_1;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MySQL
+ jdbcUrl:
jdbc:h2:mem:foo_ds_1;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MySQL
username: sa
password:
```
@@ -195,7 +195,7 @@ public class ExampleUtils {
ds_1:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: $${FIXTURE_DRIVER_CLASS_NAME::com.mysql.cj.jdbc.Driver}
- standardJdbcUrl:
jdbc:mysql://$${FIXTURE_HOST::}:$${FIXTURE_PORT::}/$${FIXTURE_DATABASE::}?sslMode=REQUIRED
+ jdbcUrl:
jdbc:mysql://$${FIXTURE_HOST::}:$${FIXTURE_PORT::}/$${FIXTURE_DATABASE::}?sslMode=REQUIRED
username: $${FIXTURE_USERNAME::}
password: $${FIXTURE_PASSWORD::}
```
@@ -206,7 +206,7 @@ ds_1:
ds_1:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: com.mysql.cj.jdbc.Driver
- standardJdbcUrl: jdbc:mysql://127.0.0.1:3306/test?sslMode=REQUIRED
+ jdbcUrl: jdbc:mysql://127.0.0.1:3306/test?sslMode=REQUIRED
username: sa
password:
```
diff --git
a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/jdbc-driver/known-implementation/_index.en.md
b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/jdbc-driver/known-implementation/_index.en.md
index 0d770949d50..33322009382 100644
---
a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/jdbc-driver/known-implementation/_index.en.md
+++
b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/jdbc-driver/known-implementation/_index.en.md
@@ -107,7 +107,7 @@ Then for the intercepted fragment of the following YAML
file,
ds_1:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: $${FIXTURE_DRIVER_CLASS_NAME::org.h2.Driver}
- standardJdbcUrl: $${FIXTURE_JDBC_URL::jdbc:h2:mem:foo_ds_do_not_use}
+ jdbcUrl: $${FIXTURE_JDBC_URL::jdbc:h2:mem:foo_ds_do_not_use}
username: $${FIXTURE_USERNAME::}
password: $${FIXTURE_PASSWORD::}
```
@@ -118,7 +118,7 @@ This YAML snippet will be parsed as,
ds_1:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: org.h2.Driver
- standardJdbcUrl:
jdbc:h2:mem:foo_ds_1;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MySQL
+ jdbcUrl:
jdbc:h2:mem:foo_ds_1;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MySQL
username: sa
password:
```
@@ -144,7 +144,7 @@ Then for the intercepted fragment of the following YAML
file,
ds_1:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: $${fixture.config.driver.driver-class-name::org.h2.Driver}
- standardJdbcUrl:
$${fixture.config.driver.jdbc-url::jdbc:h2:mem:foo_ds_do_not_use}
+ jdbcUrl: $${fixture.config.driver.jdbc-url::jdbc:h2:mem:foo_ds_do_not_use}
username: $${fixture.config.driver.username::}
password: $${fixture.config.driver.password::}
```
@@ -155,7 +155,7 @@ This YAML snippet will be parsed as,
ds_1:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: org.h2.Driver
- standardJdbcUrl:
jdbc:h2:mem:foo_ds_1;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MySQL
+ jdbcUrl:
jdbc:h2:mem:foo_ds_1;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MySQL
username: sa
password:
```
@@ -213,7 +213,7 @@ Then for the intercepted fragment of the following YAML
file,
ds_1:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: $${FIXTURE_DRIVER_CLASS_NAME::com.mysql.cj.jdbc.Driver}
- standardJdbcUrl:
jdbc:mysql://$${FIXTURE_HOST::}:$${FIXTURE_PORT::}/$${FIXTURE_DATABASE::}?sslMode=REQUIRED
+ jdbcUrl:
jdbc:mysql://$${FIXTURE_HOST::}:$${FIXTURE_PORT::}/$${FIXTURE_DATABASE::}?sslMode=REQUIRED
username: $${FIXTURE_USERNAME::}
password: $${FIXTURE_PASSWORD::}
```
@@ -224,7 +224,7 @@ This YAML snippet will be parsed as,
ds_1:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: com.mysql.cj.jdbc.Driver
- standardJdbcUrl: jdbc:mysql://127.0.0.1:3306/test?sslMode=REQUIRED
+ jdbcUrl: jdbc:mysql://127.0.0.1:3306/test?sslMode=REQUIRED
username: sa
password:
```
diff --git
a/docs/document/content/user-manual/shardingsphere-proxy/optional-plugins/seata-at/_index.cn.md
b/docs/document/content/user-manual/shardingsphere-proxy/optional-plugins/seata-at/_index.cn.md
index c068943dc55..ba77109b232 100644
---
a/docs/document/content/user-manual/shardingsphere-proxy/optional-plugins/seata-at/_index.cn.md
+++
b/docs/document/content/user-manual/shardingsphere-proxy/optional-plugins/seata-at/_index.cn.md
@@ -285,7 +285,7 @@ sudo snap install dbeaver-ce --classic
snap run dbeaver-ce
```
-在 DBeaver Community 内,使用 `jdbc:postgresql://127.0.0.1:3308/postgres` 的
`standardJdbcUrl` 连接至 ShardingSphere Proxy,
+在 DBeaver Community 内,使用 `jdbc:postgresql://127.0.0.1:3308/postgres` 的
`jdbcUrl` 连接至 ShardingSphere Proxy,
username 和 password 均为 `root`。所需的 JDBC Driver 与 ShardingSphere Proxy 设置的
`proxy-frontend-database-protocol-type` 对应。
执行如下 SQL,
@@ -294,7 +294,7 @@ username 和 password 均为 `root`。所需的 JDBC Driver 与
ShardingSphere P
CREATE DATABASE sharding_db;
```
-在 DBeaver Community 内,使用 `jdbc:postgresql://127.0.0.1:3308/sharding_db` 的
`standardJdbcUrl` 连接至 ShardingSphere Proxy,
+在 DBeaver Community 内,使用 `jdbc:postgresql://127.0.0.1:3308/sharding_db` 的
`jdbcUrl` 连接至 ShardingSphere Proxy,
username 和 password 均为 `root`。
执行如下 SQL,
diff --git
a/docs/document/content/user-manual/shardingsphere-proxy/optional-plugins/seata-at/_index.en.md
b/docs/document/content/user-manual/shardingsphere-proxy/optional-plugins/seata-at/_index.en.md
index ed4c7daebbf..c805aa02659 100644
---
a/docs/document/content/user-manual/shardingsphere-proxy/optional-plugins/seata-at/_index.en.md
+++
b/docs/document/content/user-manual/shardingsphere-proxy/optional-plugins/seata-at/_index.en.md
@@ -289,7 +289,7 @@ sudo snap install dbeaver-ce --classic
snap run dbeaver-ce
```
-In DBeaver Community, use the `standardJdbcUrl` of
`jdbc:postgresql://127.0.0.1:3308/postgres` to connect to ShardingSphere Proxy,
+In DBeaver Community, use the `jdbcUrl` of
`jdbc:postgresql://127.0.0.1:3308/postgres` to connect to ShardingSphere Proxy,
and the username and password are both `root`.
The required JDBC Driver corresponds to the
`proxy-frontend-database-protocol-type` set by ShardingSphere Proxy.
Execute the following SQL,
@@ -299,7 +299,7 @@ Execute the following SQL,
CREATE DATABASE sharding_db;
```
-In DBeaver Community, use the `standardJdbcUrl` of
`jdbc:postgresql://127.0.0.1:3308/sharding_db` to connect to ShardingSphere
Proxy,
+In DBeaver Community, use the `jdbcUrl` of
`jdbc:postgresql://127.0.0.1:3308/sharding_db` to connect to ShardingSphere
Proxy,
and the username and password are both `root`. Execute the following SQL,
```sql