This is an automated email from the ASF dual-hosted git repository. yy2so pushed a commit to branch yy2so-patch-1 in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
commit 10c79651885b39cd589418d9c9056e4d2014c543 Author: Yacine Si Tayeb <[email protected]> AuthorDate: Wed Jan 4 10:23:50 2023 +0800 Update hint.en.md Updating the doc --- .../special-api/readwrite-splitting/hint.en.md | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 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..96dc4258c04 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"; @@ -55,9 +55,9 @@ try (HintManager hintManager = HintManager.getInstance(); ##### Terms of Use -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`. +For the 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"; @@ -93,13 +93,13 @@ try (HintManager hintManager = HintManager.getInstance(); #### Use special SQL comments -##### Terms of Use +##### Terms of Use: Currently, the SQL Hint function only support 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/)
