org.sfm.datastax.impl.ResultSetEnumarable Maven / Gradle / Ivy
package org.sfm.datastax.impl;
import com.datastax.driver.core.ResultSet;
import com.datastax.driver.core.Row;
import org.sfm.utils.Enumarable;
public class ResultSetEnumarable implements Enumarable {
private final ResultSet resultSet;
private Row currentRow;
public ResultSetEnumarable(ResultSet resultSet) {
this.resultSet = resultSet;
}
@Override
public boolean next() {
if (resultSet.isExhausted()) return false;
currentRow = resultSet.one();
return true;
}
@Override
public Row currentValue() {
return currentRow;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy