This is an automated email from the ASF dual-hosted git repository. yy2so pushed a commit to branch yy2so-patch-2 in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
commit 61a65b1531bf5e5c09a8f53b207be1c3cf007ffd Author: Yacine Si Tayeb <[email protected]> AuthorDate: Wed Jan 4 10:27:30 2023 +0800 Update hint.en.md Updating the doc --- .../special-api/readwrite-splitting/hint.en.md | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/special-api/readwrite-splitting/hint.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/special-api/readwrite-splitting/hint.en.md index e16d3a8e0d7..b302a06667b 100644 --- a/docs/document/content/user-manual/shardingsphere-jdbc/special-api/readwrite-splitting/hint.en.md +++ b/docs/document/content/user-manual/shardingsphere-jdbc/special-api/readwrite-splitting/hint.en.md @@ -5,10 +5,10 @@ weight = 1 ## Background -Apache ShardingSphere uses ThreadLocal to manage primary database routing marks for mandatory routing. A primary database routing mark can be added to HintManager through programming, and this value is valid only in the current thread. +Apache ShardingSphere uses `ThreadLocal` to manage primary database routing marks for mandatory routing. A primary database routing mark can be added to `HintManager` through programming, and this value is valid only in the current thread. Apache ShardingSphere can also route the primary database by adding comments to SQL. -Hint is mainly used to perform mandatory data operations in the primary database under the read/write splitting scenarios. +`Hint` is mainly used to perform mandatory data operations in the primary database for read/write splitting scenarios. ## Procedure @@ -25,7 +25,7 @@ Hint is mainly used to perform mandatory data operations in the primary database ##### Get HintManager -Be the same as sharding based on hint. +The same as sharding based on hint. ##### Configure Primary Database Route @@ -33,9 +33,9 @@ Be the same as sharding based on hint. ##### Clean Hint Value -Be the same as data sharding based on hint. +The same as data sharding based on hint. -##### Codes: +##### Code: ```java String sql = "SELECT * FROM t_order"; @@ -57,7 +57,7 @@ try (HintManager hintManager = HintManager.getInstance(); For SQL Hint function, the comment format only supports `/* */` for now. The content needs to start with `SHARDINGSPHERE_HINT:`, and the attribute name needs to be `WRITE_ROUTE_ONLY`. -##### Codes: +##### Code: ```sql /* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */ SELECT * FROM t_order; @@ -69,13 +69,13 @@ SELECT * FROM t_order; ##### Get HintManager -Be the same as sharding based on hint. +The same as sharding based on hint. ##### Configure Database Route - Use `hintManager.setDataSourceName` to configure database route. -##### Codes: +##### Code: ```java String sql = "SELECT * FROM t_order"; @@ -95,11 +95,11 @@ try (HintManager hintManager = HintManager.getInstance(); ##### Terms of Use -Currently, the SQL Hint function only support routing to one data source. +Currently, the SQL Hint function only supports routing to one data source. The comment format only supports `/* */` for now. The content needs to start with `SHARDINGSPHERE_HINT:`, and the attribute name needs to be `DATA_SOURCE_NAME`. Client connections using `MySQL` need to add the `-c` option to preserve comments, because the client defaults to `--skip-comments` to filter comments. -##### Codes: +##### Code: ```sql /* SHARDINGSPHERE_HINT: DATA_SOURCE_NAME=ds_0 */ SELECT * FROM t_order; @@ -107,5 +107,5 @@ SELECT * FROM t_order; ## Related References -- [Core Feature: Readwrite Splitting](/en/features/readwrite-splitting/) -- [Developer Guide: Readwrite Splitting](/en/dev-manual/readwrite-splitting/) +- [Core Feature: Read/write Splitting](/en/features/readwrite-splitting/) +- [Developer Guide: Read/write Splitting](/en/dev-manual/readwrite-splitting/)
