From 238793b4a47c2d0ccd05e9dfb0bedcc08560d900 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Wed, 25 Oct 2023 06:44:11 +1100 Subject: [PATCH] rename union to unionAll --- .../main/java/org/hl7/fhir/r5/utils/sql/Runner.java | 4 ++-- .../main/java/org/hl7/fhir/r5/utils/sql/Validator.java | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/sql/Runner.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/sql/Runner.java index 1e1a7671f..5087a497d 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/sql/Runner.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/sql/Runner.java @@ -135,7 +135,7 @@ public class Runner implements IEvaluationContext { focus.add(b); } -// } else if (select.has("union")) { +// } else if (select.has("unionAll")) { // focus.addAll(executeUnion(select, b)); List> tempRows = new ArrayList<>(); @@ -149,7 +149,7 @@ public class Runner implements IEvaluationContext { executeColumn(column, f, rowsToAdd); } - for (JsonObject sub : select.getJsonObjects("union")) { + for (JsonObject sub : select.getJsonObjects("unionAll")) { executeSelect(sub, f, rowsToAdd); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/sql/Validator.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/sql/Validator.java index ba5b90db6..7aa5cc8f9 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/sql/Validator.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/sql/Validator.java @@ -106,8 +106,8 @@ public class Validator { checkForEach(path, viewDefinition, viewDefinition.get("forEach"), t); } else if (viewDefinition.has("forEachOrNull")) { checkForEachOrNull(path, viewDefinition, viewDefinition.get("forEachOrNull"), t); - } else if (viewDefinition.has("union")) { - checkUnion(path, viewDefinition, viewDefinition.get("union"), t); + } else if (viewDefinition.has("unionAll")) { + checkUnion(path, viewDefinition, viewDefinition.get("unionAll"), t); } else { i = 0; if (checkAllObjects(path, viewDefinition, "select")) { @@ -135,8 +135,8 @@ public class Validator { if (t != null) { boolean content = false; - if (select.has("union")) { - content = checkUnion(path, select, select.get("union"), t); + if (select.has("unionAll")) { + content = checkUnion(path, select, select.get("unionAll"), t); } if (select.has("column")) { @@ -181,7 +181,7 @@ public class Validator { private boolean checkUnion(String path, JsonObject focus, JsonElement expression, TypeDetails t) { - JsonElement a = focus.get("union"); + JsonElement a = focus.get("unionAll"); if (!(a instanceof JsonArray)) { error(path+".union", a, "union is not an array", IssueType.INVALID); return false;