-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues 2728, 2878, and 2879 - Remove old query builder, update tests, and fix issues #2881
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - just one comment to update user's guide
...rsistence-jdbc/src/main/java/com/ibm/fhir/persistence/jdbc/impl/FHIRPersistenceJDBCImpl.java
Show resolved
Hide resolved
I also removed the older-style `addXCacheCandidate` methods from the ParameterDAO and ResourceDAO interfaces and reduced their visibility in the implementation classes. Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
should be cosine, not arccosine Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
for (int i=0; i<expectedBindVariables.size(); i++) { | ||
Object expectedValue = expectedBindVariables.get(i); | ||
BindMarkerNode bindMarker = collectBindMarkersInto.get(i); | ||
|
||
if (!bindMarker.checkTypeAndValue(expectedValue)) { | ||
StringBuilder msg = new StringBuilder(); | ||
msg.append("BIND[").append(i).append("] ") | ||
.append("EXPECTED=").append(expectedValue) | ||
.append("; ACTUAL=").append(bindMarker.toValueString("~")); | ||
fail(msg.toString()); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
common code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for sure. and its actually common across multiple tests, but maybe we settle on a private helper in each one for now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nm, i went ahead an normalized them all. lots of deleted lines, so i think it was worth it
@@ -257,7 +266,8 @@ public void testPrecisionWithExact() throws Exception { | |||
|
|||
} | |||
|
|||
@Test | |||
// the new query builder cannot generate a where fragment that starts with AND |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just start the whereFragment with 1=1 before handing it to the behavior impl?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, good idea. and i think i can encapsulate it in the runTest helper methods so that the individual test cases can look clean
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
After removing the old xParmBehaviorUtil classes, I realized that we never updated their corresponding tests to the new builders. In the process of doing that, I discovered and fixed #2878 and #2879.
After this one, we still need to do some work if we want to remove the older-style jdbc cache implementations because they are still being used in places.