This commit is contained in:
Michael Buckley 2024-09-27 17:02:46 -04:00
parent 75f7defc74
commit 40a2a7ceb7
3 changed files with 8 additions and 11 deletions

View File

@ -360,7 +360,7 @@ public class QueryStack {
case STRING:
StringPredicateBuilder stringPredicateBuilder = mySqlBuilder.createStringPredicateBuilder();
addSortCustomJoin(
// fixme switch?
// fixme switch?
resourceLinkPredicateBuilder.getJoinColumnsForTarget(),
stringPredicateBuilder,
stringPredicateBuilder.createHashIdentityPredicate(targetType, theChain));
@ -477,8 +477,7 @@ public class QueryStack {
BaseJoiningPredicateBuilder theFromJoiningPredicateBuilder,
BaseJoiningPredicateBuilder theToJoiningPredicateBuilder,
Condition theCondition) {
addSortCustomJoin(
theFromJoiningPredicateBuilder.getJoinColumns(), theToJoiningPredicateBuilder, theCondition);
addSortCustomJoin(theFromJoiningPredicateBuilder.getJoinColumns(), theToJoiningPredicateBuilder, theCondition);
}
private void addSortCustomJoin(

View File

@ -137,7 +137,7 @@ public class SearchQueryBuilder {
theDialectProvider.getDialect(),
theCountQuery,
new ArrayList<>(),
thePartitionSettings.isPartitionIdsInPrimaryKeys());
thePartitionSettings.isPartitionIdsInPrimaryKeys());
}
/**
@ -365,13 +365,12 @@ public class SearchQueryBuilder {
public ComboCondition createOnCondition(DbColumn[] theSourceColumn, DbColumn[] theTargetColumn) {
ComboCondition onCondition = ComboCondition.and();
for (int i = 0; i < theSourceColumn.length; i+=1) {
for (int i = 0; i < theSourceColumn.length; i += 1) {
onCondition.addCondition(BinaryCondition.equalTo(theSourceColumn[0], theTargetColumn[0]));
}
return onCondition;
}
/**
* Add and return a predicate builder (or a root query if no root query exists yet) for selecting on a <code>:missing</code> search parameter
*/
@ -445,10 +444,10 @@ public class SearchQueryBuilder {
mySelectedPartitionIdColumn = root.getPartitionIdColumn();
// fixme reverse?
mySelect.addColumns(mySelectedPartitionIdColumn, mySelectedResourceIdColumn);
} else {
mySelectedResourceIdColumn = root.getResourceIdColumn();
mySelect.addColumns(mySelectedResourceIdColumn);
}
} else {
mySelectedResourceIdColumn = root.getResourceIdColumn();
mySelect.addColumns(mySelectedResourceIdColumn);
}
}
mySelect.addFromTable(root.getTable());
myFirstPredicateBuilder = root;

View File

@ -21,7 +21,6 @@ package ca.uhn.fhir.jpa.search.builder.sql;
import ca.uhn.fhir.i18n.Msg;
import ca.uhn.fhir.jpa.dao.tx.HapiTransactionService;
import ca.uhn.fhir.jpa.model.dao.JpaPid;
import ca.uhn.fhir.jpa.search.builder.ISearchQueryExecutor;
import ca.uhn.fhir.jpa.util.ScrollableResultsIterator;
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;