By using SQL translator in the form of Java API, you can easily integrate into various systems and flexibly customize user requirements.
Class: org.apache.shardingsphere.sqltranslator.api.config.SQLTranslatorRuleConfiguration
Attributes:
name | DataType | Description |
---|---|---|
type | String | SQL translator type |
useOriginalSQLWhenTranslatingFailed (?) | boolean | Whether use original SQL when translating failed |
SQLTranslatorRuleConfiguration ruleConfig = new SQLTranslatorRuleConfiguration("Native", new Properties(), false);
String translatedSQL = new SQLTranslatorRule(ruleConfig).translate();