com.github.antelopeframework.mybatis.shard.converter.SqlConverter Maven / Gradle / Ivy
package com.github.antelopeframework.mybatis.shard.converter;
import java.util.Map;
import com.github.antelopeframework.mybatis.shard.ShardContext.ShardOnPair;
import net.sf.jsqlparser.statement.Statement;
/**
* SQL 语句转换.
*
* @author yangzhi.yzh
*
*/
public interface SqlConverter {
/**
* 根据分表分片策略,进行sql转换
*
* @param sqlMapperId MyBatis SQL 映射id
* @param statement
* @param shardOns 分区映射参数<数据库表名, {@link ShardOn}注解及其参数值>
* @return
*/
String convert(String sqlMapperId, Statement statement, Map shardOns);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy