io.github.jinghui70.rainbow.dbaccess.Sql Maven / Gradle / Ivy
The newest version!
package io.github.jinghui70.rainbow.dbaccess;
import io.github.jinghui70.rainbow.dbaccess.mapper.MapRowMapper;
import io.github.jinghui70.rainbow.dbaccess.object.ObjectSql;
import org.springframework.dao.DataAccessException;
import java.util.List;
import java.util.Map;
/**
* 封装了一个Sql的内容对象
*
* @author lijinghui
*/
public class Sql extends GeneralSql {
public 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