newRelation.limit(1);
Relation filteredRelation = newRelation.immutableSnapshot();
SelectStatementBuilder builder = new SelectStatementBuilder(filteredRelation);
String sql = builder.getSQLStatement();
int contentColumn = builder.getColumnSpecs().indexOf(downloadMap.getContentDownloadColumn()) + 1;
db = filteredRelation.database();
Connection conn = db.connection();
try {
statement = conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
log.debug(sql);