blob: 8ff2771aa78541fa6ca4fae193deb0360aeb2dda [file] [log] [blame]
// Copyright 2015 The Vanadium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package io.v.syncbase.v23.services.syncbase.nosql;
import io.v.v23.vdl.VdlValue;
import io.v.v23.verror.VException;
/**
* An interface for iterating through rows resulting from a
* {@link DatabaseCore#exec DatabaseCore.exec()}.
*/
public interface ResultStream extends Stream {
/**
* Returns an array of column names that matched the query. The number of values returned
* by each call to {@link #result} will match the size of this array.
*/
String[] columnNames();
/**
* Returns the result that was staged by {@link #advance}.
* <p>
* This method does not block.
*
* @throws VException if the value could not be decoded or if {@link #advance} returned
* {@code false} or was not called at all
*/
VdlValue[] result() throws VException;
}