Package nl.cwi.monetdb.embedded.mapping
Class AbstractRowSet
java.lang.Object
nl.cwi.monetdb.embedded.mapping.AbstractRowSet
- Direct Known Subclasses:
QueryResultRowSet
,RowIterator
public abstract class AbstractRowSet extends Object
A row set retrieved from an embedded MonetDB query result. All the values in this set are already mapped
to Java classes a priori.
- Author:
- Pedro Ferreira
-
Field Summary
Fields Modifier and Type Field Description protected MonetDBToJavaMapping[]
mappings
The MonetDB-To-Java mappings of the columns.protected MonetDBRow[]
rows
The rows of this set. -
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractRowSet(AbstractConnectionResult table, Object[][] rows)
-
Method Summary
Modifier and Type Method Description abstract int
getColumnIndexByName(String columnName)
Gets a column index in the result set by name.int
getNumberOfColumns()
Gets the number of columns in this set.AbstractConnectionResult
getQueryResultTable()
Gets the original query result set this row set belongs.
-
Field Details
-
Constructor Details
-
AbstractRowSet
protected AbstractRowSet(AbstractConnectionResult table, Object[][] rows) throws MonetDBEmbeddedException- Throws:
MonetDBEmbeddedException
-
-
Method Details
-
getQueryResultTable
Gets the original query result set this row set belongs.- Returns:
- The original query result set this row set belongs
-
getNumberOfColumns
public int getNumberOfColumns()Gets the number of columns in this set.- Returns:
- The number of columns in this set
-
getColumnIndexByName
Gets a column index in the result set by name.- Parameters:
columnName
- The column name- Returns:
- The index number
- Throws:
MonetDBEmbeddedException
- If an error in the database occurred.
-