Package org.apache.jackrabbit.oak.api
Interface Result
public interface Result
A result from executing a query.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionString[]Get the list of column names.String[]Get the distinct selector names of all columns.getRows()Get the rows.String[]Get the list of selector names.longgetSize()Get the number of rows, if known.longgetSize(Result.SizePrecision precision, long max) Get the number of rows, if known.
-
Method Details
-
getColumnNames
String[] getColumnNames()Get the list of column names.- Returns:
- the column names
-
getColumnSelectorNames
String[] getColumnSelectorNames()Get the distinct selector names of all columns. The list is ordered as selectors appear in the result. For columns without selector, an empty entry (null) is used.- Returns:
- the distinct selector names
-
getSelectorNames
String[] getSelectorNames()Get the list of selector names.- Returns:
- the selector names
-
getRows
Get the rows.- Returns:
- the rows
-
getSize
long getSize()Get the number of rows, if known. If the size is not known, -1 is returned.- Returns:
- the size or -1 if unknown
-
getSize
Get the number of rows, if known. If the size is not known, -1 is returned.- Parameters:
precision- the required precisionmax- the maximum number that should be returned (Long.MAX_VALUE for unlimited). For EXACT, the cost of the operation is at most O(max). For approximations, the cost of the operation should be at most O(log max).- Returns:
- the (approximate) size. If an implementation does know the exact value, it returns it (even if the value is higher than max). If the implementation does not know the value, and the child node count is higher than max, it returns Long.MAX_VALUE.
-