io.github.icodegarden.commons.lang.query.MysqlTableDataCountCollector Maven / Gradle / Ivy
package io.github.icodegarden.commons.lang.query;
import java.util.List;
import java.util.Set;
import javax.sql.DataSource;
import io.github.icodegarden.commons.lang.dao.MysqlJdbcDatabase;
/**
*
* @author Fangfang.Xu
*
*/
public class MysqlTableDataCountCollector extends AbstractTableDataCountCollector {
private final MysqlJdbcDatabase database;
public MysqlTableDataCountCollector(DataSource dataSource) {
this(dataSource, null);
}
public MysqlTableDataCountCollector(DataSource dataSource, Set whiteListTables) {
super(whiteListTables);
this.database = new MysqlJdbcDatabase(dataSource);
}
@Override
public String version() {
return database.version();
}
@Override
public List doListTables() {
return database.listTables();
}
@Override
public long countTable(String tableName) {
return database.countTable(tableName);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy