Class AqlQueryRepository
java.lang.Object
org.ehrbase.openehr.aqlengine.repository.AqlQueryRepository
Executes ASL queries as SQL, and converts the results
-
Constructor Summary
ConstructorsConstructorDescriptionAqlQueryRepository(SystemService systemService, KnowledgeCacheService knowledgeCache, AqlSqlQueryBuilder queryBuilder) -
Method Summary
Modifier and TypeMethodDescriptionexecuteQuery(PreparedQuery preparedQuery) Executes the givenPreparedQueryin its own read only transaction.explainQuery(boolean analyze, PreparedQuery preparedQuery) Explains the with optional analyse the givenPreparedQueryin its own read only transaction.prepareQuery(AslRootQuery aslQuery, List<SelectWrapper> selects) Prepares the full SQL query.
-
Constructor Details
-
AqlQueryRepository
public AqlQueryRepository(SystemService systemService, KnowledgeCacheService knowledgeCache, AqlSqlQueryBuilder queryBuilder)
-
-
Method Details
-
prepareQuery
Prepares the full SQL query. Build the structure from AQL and selects postprocess based on the givenselects.- Parameters:
aslQuery- to create the actual SQL query from.selects- to obtainAqlSqlResultPostprocessorfor.- See Also:
-
executeQuery
Executes the givenPreparedQueryin its own read only transaction.- Parameters:
preparedQuery- to execute- Returns:
- resultSet
-
explainQuery
@Transactional(readOnly=true) public String explainQuery(boolean analyze, PreparedQuery preparedQuery) Explains the with optional analyse the givenPreparedQueryin its own read only transaction.- Parameters:
analyze- also run analysepreparedQuery- to explain and analyse if needed- Returns:
- result in serialized Json format
-