All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sfm.datastax.impl.ResultSetEnumarable Maven / Gradle / Ivy

There is a newer version: 8.2.3
Show newest version
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 - 2024 Weber Informatics LLC | Privacy Policy