Package | Description |
---|---|
org.modeshape.jcr.query |
The Query API provides a mechanism for building and executing queries.
|
org.modeshape.jcr.query.engine |
This package contains several fully-functional query engine implementations.
|
org.modeshape.jcr.query.engine.process |
When executing a query, the processing phase involves "running" each branch in the optimized query plan, determining
the set of nodes that satisfies each branch, and then joining each branch into a single result.
|
Modifier and Type | Method and Description |
---|---|
static NodeSequence |
NodeSequence.append(NodeSequence first,
NodeSequence second)
Create a sequence of nodes that contains the nodes from the first sequence followed by the second sequence.
|
static NodeSequence |
NodeSequence.emptySequence(int width)
Get an empty node sequence.
|
static NodeSequence |
NodeSequence.filter(NodeSequence sequence,
NodeSequence.RowFilter filter)
Create a sequence of nodes that all satisfy the supplied filter.
|
NodeSequence |
QueryResults.getRows()
Get the rows that make up these query results.
|
static NodeSequence |
NodeSequence.limit(NodeSequence sequence,
Limit limitAndOffset)
Create a sequence of nodes that skips a specified number of nodes before returning any nodes and that limits the number of
nodes returned.
|
static NodeSequence |
NodeSequence.limit(NodeSequence sequence,
long maxRows)
Create a sequence of nodes that returns at most the supplied number of rows.
|
static NodeSequence |
NodeSequence.merging(NodeSequence first,
NodeSequence second,
int totalWidth)
Create a sequence of nodes that merges the two supplied sequences.
|
protected NodeSequence |
JcrQueryResult.sequence() |
static NodeSequence |
NodeSequence.skip(NodeSequence sequence,
int skip)
Create a sequence of nodes that skips a specified number of rows before returning any rows.
|
static NodeSequence |
NodeSequence.withBatch(NodeSequence.Batch sequence)
Create a sequence of nodes that returns the supplied single batch of nodes.
|
static NodeSequence |
NodeSequence.withBatches(Collection<NodeSequence.Batch> batches,
int width)
Create a sequence of nodes that iterates over the supplied batches of nodes.
|
static NodeSequence |
NodeSequence.withBatches(Iterator<NodeSequence.Batch> batches,
int width,
long rowCount)
Create a sequence of nodes that iterates over the supplied batches of nodes.
|
static NodeSequence |
NodeSequence.withNode(CachedNode node,
int width,
float score,
String workspaceName) |
static NodeSequence |
NodeSequence.withNodeKeys(Collection<NodeKey> keys,
float score,
String workspaceName,
NodeCache cache)
Create a sequence of nodes that iterates over the supplied node keys.
|
static NodeSequence |
NodeSequence.withNodeKeys(Collection<NodeKey> keys,
float score,
String workspaceName,
RepositoryCache repository)
Create a sequence of nodes that iterates over the supplied node keys.
|
static NodeSequence |
NodeSequence.withNodeKeys(Iterator<NodeKey> keys,
long keyCount,
float score,
String workspaceName,
NodeCache cache)
Create a sequence of nodes that iterates over the supplied node keys.
|
static NodeSequence |
NodeSequence.withNodeKeys(Iterator<NodeKey> keys,
long keyCount,
float score,
String workspaceName,
RepositoryCache repository)
Create a sequence of nodes that iterates over the supplied node keys.
|
static NodeSequence |
NodeSequence.withNodes(Collection<CachedNode> nodes,
float score,
String workspaceName)
Create a sequence of nodes that iterates over the supplied nodes.
|
static NodeSequence |
NodeSequence.withNodes(Iterator<CachedNode> nodes,
long nodeCount,
float score,
String workspaceName)
Create a sequence of nodes that iterates over the supplied nodes.
|
Modifier and Type | Method and Description |
---|---|
static NodeSequence |
NodeSequence.append(NodeSequence first,
NodeSequence second)
Create a sequence of nodes that contains the nodes from the first sequence followed by the second sequence.
|
static NodeSequence |
NodeSequence.filter(NodeSequence sequence,
NodeSequence.RowFilter filter)
Create a sequence of nodes that all satisfy the supplied filter.
|
static NodeSequence |
NodeSequence.limit(NodeSequence sequence,
Limit limitAndOffset)
Create a sequence of nodes that skips a specified number of nodes before returning any nodes and that limits the number of
nodes returned.
|
static NodeSequence |
NodeSequence.limit(NodeSequence sequence,
long maxRows)
Create a sequence of nodes that returns at most the supplied number of rows.
|
static NodeSequence |
NodeSequence.merging(NodeSequence first,
NodeSequence second,
int totalWidth)
Create a sequence of nodes that merges the two supplied sequences.
|
static NodeSequence |
NodeSequence.skip(NodeSequence sequence,
int skip)
Create a sequence of nodes that skips a specified number of rows before returning any rows.
|
Constructor and Description |
---|
JcrQueryResult.QueryResultIterator(JcrQueryContext context,
NodeSequence sequence) |
JcrQueryResult.QueryResultNodeIterator(JcrQueryContext context,
NodeSequence sequence,
int defaultSelectorIndex) |
JcrQueryResult.QueryResultRowIterator(JcrQueryContext context,
String query,
NodeSequence sequence,
QueryResults.Columns columns) |
JcrQueryResult.SingleSelectorQueryResultRowIterator(JcrQueryContext context,
String query,
NodeSequence sequence,
QueryResults.Columns columns) |
Modifier and Type | Method and Description |
---|---|
NodeSequence |
QuerySources.allNodes(float score,
long nodeCount)
Obtain a
NodeSequence that returns all (queryable) nodes in the workspace, where each node is assigned the given
score. |
NodeSequence |
QuerySources.childNodes(Path parentPath,
float score)
Obtain a
NodeSequence that returns the (queryable) children of the node at the given path in the workspace, where
each child node is assigned the given score. |
protected NodeSequence |
ScanningQueryEngine.createNodeSequence(QueryCommand originalQuery,
org.modeshape.jcr.query.engine.ScanningQueryEngine.ScanQueryContext context,
PlanNode plan,
QueryResults.Columns columns,
QuerySources sources)
Create a node sequence containing the results of the original query as defined by the supplied plan.
|
protected NodeSequence |
ScanningQueryEngine.createNodeSequenceForSource(QueryCommand originalQuery,
QueryContext context,
PlanNode sourceNode,
IndexPlan index,
QueryResults.Columns columns,
QuerySources sources)
Create a node sequence for the given index
|
protected NodeSequence |
IndexQueryEngine.createNodeSequenceForSource(QueryCommand originalQuery,
QueryContext context,
PlanNode sourceNode,
IndexPlan indexPlan,
QueryResults.Columns columns,
QuerySources sources) |
protected NodeSequence |
ScanningQueryEngine.createNodeSequenceForSource(QueryCommand originalQuery,
QueryContext context,
PlanNode sourceNode,
QueryResults.Columns columns,
QuerySources sources)
Create a node sequence for the given source.
|
NodeSequence |
QuerySources.descendantNodes(Path ancestorPath,
float score)
Obtain a
NodeSequence that returns the (queryable) descendants of the node at the given path in the workspace,
where each descendant node is assigned the given score. |
NodeSequence |
QuerySources.fromIndex(QueryIndex index,
Collection<Constraint> constraints,
Map<String,Object> parameters,
int batchSize)
Obtain a
NodeSequence that uses the supplied index to find the node that satisfy the given constraints. |
NodeSequence |
Results.getRows() |
NodeSequence |
QuerySources.singleNode(Path path,
float score)
Obtain a
NodeSequence that returns the (queryable) node at the given path in the workspace, where the node is
assigned the given score. |
Constructor and Description |
---|
Results(QueryResults.Columns columns,
QueryResults.Statistics statistics,
NodeSequence rows,
CachedNodeSupplier cachedNodes,
Problems problems,
String plan)
Create a results object for the supplied context, command, and result columns and with the supplied tuples.
|
Modifier and Type | Class and Description |
---|---|
class |
BufferingSequence |
class |
CountableSequence
A sequence that will return an accurate size for a given NodeSequence by buffering and counting the nodes and then accessing
the buffered sequence.
|
class |
DelegatingSequence |
class |
DependentQuery
A node sequence implementation that performs an independent query to find results that are required for a dependent query.
|
class |
DistinctSequence
A
NodeSequence that wraps another NodeSequence and returns only those rows that are seen for the first time. |
class |
HashJoinSequence
A
NodeSequence implementation that performs an equijoin of two delegate sequences. |
class |
JoinSequence
A
NodeSequence implementation that performs a join of two delegate sequences. |
class |
PartialMemoryCountableSequence
A sequence that will return an accurate size for a given NodeSequence by buffering and counting the nodes and then accessing
the buffered sequence.
|
class |
RestartableSequence
A
NodeSequence that captures the buffers as they are used (or all at once) so that the sequence can be restarted. |
class |
SortingSequence |
Modifier and Type | Field and Description |
---|---|
protected NodeSequence |
DelegatingSequence.delegate |
protected NodeSequence |
JoinSequence.left |
protected NodeSequence |
RestartableSequence.original |
Modifier and Type | Method and Description |
---|---|
protected long |
PartialMemoryCountableSequence.loadAll(NodeSequence sequence,
BufferManager.QueueBuffer<BufferedRows.BufferedRow> buffer,
AtomicLong batchSize) |
protected long |
CountableSequence.loadAll(NodeSequence sequence,
BufferManager.QueueBuffer<BufferedRows.BufferedRow> buffer,
AtomicLong batchSize)
Load all of the rows from the supplied sequence into the buffer.
|
protected long |
CountableSequence.loadAll(NodeSequence sequence,
BufferManager.QueueBuffer<BufferedRows.BufferedRow> buffer,
AtomicLong batchSize,
Queue<NodeSequence.Batch> inMemoryBatches,
int numRowsInMemory)
Load all of the rows from the supplied sequence into the buffer.
|
protected int |
BufferingSequence.loadAll(NodeSequence sequence,
RowExtractors.ExtractFromRow extractor,
BufferManager.DistinctBuffer<BufferedRows.BufferedRow> rowsWithNullKey)
Load all of the rows from the supplied sequence into the buffer.
|
Constructor and Description |
---|
BufferingSequence(String workspaceName,
NodeSequence delegate,
RowExtractors.ExtractFromRow extractor,
BufferManager bufferMgr,
CachedNodeSupplier nodeCache,
boolean pack,
boolean useHeap,
boolean allowDuplicates) |
CountableSequence(String workspaceName,
NodeSequence original,
BufferManager bufferMgr,
CachedNodeSupplier nodeCache,
boolean useHeap) |
DelegatingSequence(NodeSequence delegate) |
DependentQuery(NodeSequence independentQuery,
RowExtractors.ExtractFromRow independentQueryValueExtractor,
TypeSystem.TypeFactory<?> expectedType,
NodeSequence dependentQuery,
String variableName,
Map<String,Object> variables) |
DistinctSequence(NodeSequence delegate,
TypeSystem types,
BufferManager bufferMgr,
boolean useHeap)
Create a new distinct sequence given the type system and buffer manager.
|
HashJoinSequence(String workspaceName,
NodeSequence left,
NodeSequence right,
RowExtractors.ExtractFromRow leftExtractor,
RowExtractors.ExtractFromRow rightExtractor,
JoinType joinType,
BufferManager bufferMgr,
CachedNodeSupplier nodeCache,
JoinSequence.RangeProducer<?> rangeProducer,
boolean pack,
boolean useHeap) |
JoinSequence(String workspaceName,
NodeSequence left,
NodeSequence right,
RowExtractors.ExtractFromRow leftExtractor,
RowExtractors.ExtractFromRow rightExtractor,
JoinType joinType,
BufferManager bufferMgr,
CachedNodeSupplier nodeCache,
boolean pack,
boolean useHeap,
boolean allowDuplicates) |
PartialMemoryCountableSequence(String workspaceName,
NodeSequence original,
BufferManager bufferMgr,
CachedNodeSupplier nodeCache,
int numRowsInMemory) |
RestartableSequence(String workspaceName,
NodeSequence original,
BufferManager bufferMgr,
CachedNodeSupplier nodeCache,
int numRowsInMemory) |
SortingSequence(String workspaceName,
NodeSequence delegate,
RowExtractors.ExtractFromRow extractor,
BufferManager bufferMgr,
CachedNodeSupplier nodeCache,
boolean pack,
boolean useHeap,
boolean allowDuplicates,
NullOrder nullOrder) |
Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.