gavenpeng opened a new pull request, #18420:
URL: https://github.com/apache/shardingsphere/pull/18420

   Increment feature:support forced route by hint not influenced with sharding 
config
   
   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 sharding rule config.
   
   demo:
   public void demoFunc() {
       
       HintManager hintManager = HintManager.getInstance();
       //force route to config database 
       hintManager.addDatabaseShardingValue("logic_database_name", 
"real_database_name");
       // force route to 
       hintManager.addTableShardingValue("logic_table_name", "real_table_name");
       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]

Reply via email to