gavenpeng opened a new pull request, #18611:
URL: https://github.com/apache/shardingsphere/pull/18611
Increment feature: support forced route use hint not influenced with
sharding strategy
Changes proposed in this pull request:
support force routing by hint with in code mode,as long as the thread
context has the force-routing flag,may be route
to config database or config table,not influenced by standard sharding
strategy config.
demoļ¼
```
public void demoFunc() {
HintManager hintManager = HintManager.getInstance();
//force route to config database
hintManager.addDatabaseShardingValue("logic_table_name", "sharding-value");
// force route to
hintManager.addTableShardingValue("logic_table_name", "sharding-value");
try {
//your code
} catch (Throwable e) {
xxxxxxx
} finally {
// this is must
hintManager.close();
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]