SQL Translator
Background
By using SQL translator in the form of Java API, you can easily integrate into various systems and flexibly customize user requirements.
Parameters
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 |
Procedure
- Set SQL translator type.
- Set useOriginalSQLWhenTranslatingFailed to decide whether use original SQL when translating failed.
Sample
SQLTranslatorRuleConfiguration ruleConfig = new SQLTranslatorRuleConfiguration("Native", new Properties(), false);
String translatedSQL = new SQLTranslatorRule(ruleConfig).translate();
Related References
当前内容版权归 ShardingSphere 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 ShardingSphere .