io.github.jinghui70.rainbow.dbaccess.Sql Maven / Gradle / Ivy
package io.github.jinghui70.rainbow.dbaccess;
import io.github.jinghui70.rainbow.dbaccess.mapper.MapRowMapper;
import org.springframework.dao.DataAccessException;
import java.util.List;
import java.util.Map;
/**
* 封装了一个Sql的内容对象
*
* @author lijinghui
*/
public class Sql extends GeneralSql {
protected Sql() {
super();
}
public Sql(String str) {
super(str);
}
public Sql(Dba dba) {
super(dba);
}
public ObjectSql from(Class queryClass) {
return new ObjectSql<>(dba, queryClass).append(getSql()).from(DbaUtil.tableName(queryClass));
}
public List