Class CoherenceQueryLanguageEngine
- java.lang.Object
-
- com.tangosol.coherence.rest.query.AbstractQueryEngine
-
- com.tangosol.coherence.rest.query.CoherenceQueryLanguageEngine
-
- All Implemented Interfaces:
QueryEngine
public class CoherenceQueryLanguageEngine extends AbstractQueryEngine
Coherence QL-based implementation ofQueryEngine
.The query expression consumed by this implementation is the "where" predicate of the Coherence Query Language.
Note: Although this query engine supports paging, the current implementation still handles entire result set on the client. That can lead to massive memory consumption (and possible OutOfMemoryErrors) if invoked on large caches with an unrestricted query.
- Author:
- ic 2011.12.04
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.tangosol.coherence.rest.query.AbstractQueryEngine
AbstractQueryEngine.ParsedQuery
-
-
Field Summary
Fields Modifier and Type Field Description static ExtractorBuilder
EXTRACTOR_BUILDER
ExtractorBuilder to use.protected CoherenceQueryLanguage
f_language
static ExtractorBuilder
MVEL_EXTRACTOR_BUILDER
ExtractorBuilder to use if optionalorg.mvel.Mvel2
module is on path.-
Fields inherited from class com.tangosol.coherence.rest.query.AbstractQueryEngine
m_mapParsedQuery
-
Fields inherited from interface com.tangosol.coherence.rest.query.QueryEngine
DEFAULT
-
-
Constructor Summary
Constructors Constructor Description CoherenceQueryLanguageEngine()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Query
prepareQuery(String sQuery, Map<String,Object> mapParams)
Prepares a Query for execution by replacing any parameter placeholders with the appropriate values from the parameter map.-
Methods inherited from class com.tangosol.coherence.rest.query.AbstractQueryEngine
convertList, createBindings, parseQueryString, resolveParameterType
-
-
-
-
Field Detail
-
MVEL_EXTRACTOR_BUILDER
public static final ExtractorBuilder MVEL_EXTRACTOR_BUILDER
ExtractorBuilder to use if optionalorg.mvel.Mvel2
module is on path.
-
EXTRACTOR_BUILDER
public static final ExtractorBuilder EXTRACTOR_BUILDER
ExtractorBuilder to use. If optionalorg.mvel.Mvel2
module is available on path, useMVEL_EXTRACTOR_BUILDER
; otherwise, useUniversalExtractorBuilder
.
-
f_language
protected final CoherenceQueryLanguage f_language
-
-
Method Detail
-
prepareQuery
public Query prepareQuery(String sQuery, Map<String,Object> mapParams)
Prepares a Query for execution by replacing any parameter placeholders with the appropriate values from the parameter map.- Parameters:
sQuery
- query expressionmapParams
- parameter values used to resolve parameters from query expression- Returns:
- a Query instance ready for execution
-
-