Package org.apache.jackrabbit.oak.api
Interface Result
-
public interface Result
A result from executing a query.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Result.SizePrecision
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String[]
getColumnNames()
Get the list of column names.String[]
getColumnSelectorNames()
Get the distinct selector names of all columns.Iterable<? extends ResultRow>
getRows()
Get the rows.String[]
getSelectorNames()
Get the list of selector names.long
getSize()
Get the number of rows, if known.long
getSize(Result.SizePrecision precision, long max)
Get the number of rows, if known.
-
-
-
Method Detail
-
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
-
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
long getSize(Result.SizePrecision precision, long max)
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.
-
-