Skip to content
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

Add some more sql syntax tests for Postgres, Oracle, and Sql Server #5923

Merged
merged 24 commits into from May 15, 2024

Conversation

michaelabuckley
Copy link
Contributor

Ensure that queries, sorts, and chained sorts produce valid sql on our major engines.

Also changes DaoTestDataBuilder to cleanup via a transaction bundle to avoid reference conflicts.

lukedegruchy and others added 20 commits April 22, 2024 13:39
* Overhaul bulk export permissions.

* Overhaul bulk export permissions.

* Small tweak to rule builder.

* Cleanup validation.

* Cleanup validation.

* Code review feedback.
* updating parent pids column name

* updating name of the fullTestField Search

* updating name of the fullTestField Search

* fixing typo.

* failing test.

* - Moving FullTextField annotation from getter method and adding it to the newly added VC property of the entity;

- reverting the name of the FullTextField entity to its previous name of 'myParentPids';

- reverting the name of the lucene index to search on in the terminology service.

- updating the changelog;

* making spotless happy

---------

Co-authored-by: peartree <etienne.poirier@smilecdr.com>
…am with a value greater than 200 characters raises an sqlexception) to release rel_7_2 (#5881)

* initial failing test.

* solution

* adding changelog

* spotless

* moving changelog from 7_4_0 to 7_2_0 and deleting 7_4_0 folder.

---------

Co-authored-by: peartree <etienne.poirier@smilecdr.com>
)

* Expose BaseRequestPartitionHelperSvc validate and normalize methods

* Compilation errors

* change mock test to jpa test

* change mock test to jpa test

* validateAndNormalizePartitionIds

* validateAndNormalizePartitionNames

* validateAndNormalizePartitionIds validation + bug fix

* validateAndNormalizePartitionNames validation

* fix test

* version bump
…n when processing survivorship rules (#5883)

* Add failing test as well as commented out potential solution.

* Fix for NumberFormatException.

* Add conditional test for survivorship rules.

* Spotless.

* Add changelog.

* Code review feedback.
Co-authored-by: Jens Kristian Villadsen <jenskristianvilladsen@gmail.com>
* Add MDM Transaction Context for further downstream processing giving interceptors a better chance of figuring out what happened.

* Added javadoc

* Cahngelog

* spotless

---------

Co-authored-by: Jens Kristian Villadsen <jenskristianvilladsen@gmail.com>
…e instead of @transaction (#5896)

* Try making ResourceTable.myTags EAGER instead of LAZY and see if it breaks anything.

* Try making ResourceTable.myTags EAGER instead of LAZY and see if it breaks anything.

* Ensure BaseHapiFhirResourceDao#metaGetOperation uses HapiTransactionService instead of @transactional in order to resolve megascale $meta bug.

* Add changelog.

* Update hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_2_0/5898-ld-megascale-meta-operation-fails-hapi-0389.yaml

Commit code reviewer suggestion.

Co-authored-by: Tadgh <garygrantgraham@gmail.com>

---------

Co-authored-by: Tadgh <garygrantgraham@gmail.com>
* Failing test.

* Ensure test cleanup doesn't fail by deleting Patients before Practitioners.

* Implement fix.

* Spotless.

* Clean up unit test and add changelog.  Fix unit test.

* Fix changelog file.

* Apply suggestions from code review

Apply code review suggestions.

Co-authored-by: Michael Buckley <michaelabuckley@gmail.com>

* Spotless

---------

Co-authored-by: Michael Buckley <michaelabuckley@gmail.com>
Co-authored-by: Long Ma <long@smilecdr.com>
* Fixing issues with postgres LOB migration.

* addressing code review comments for audit/transaction logs.

* test and implementation for BinaryStorageEntity migration post code review.

* test and implementation for BinaryStorageEntity migration post code review.

* test and implementation for TermConcept
 migration post code review.

* applying spotless

* test and implementation for TermConceptProperty
 migration post code review.

* test and implementation for TermValueSetConcept
 migration post code review.

* fixing migration version

* fixing migration task

* changelog

* fixing changelog

* Minor renames

* addressing comments and suggestions from second code review.

* passing tests

* fixing more tests

---------

Co-authored-by: peartree <etienne.poirier@smilecdr.com>
Co-authored-by: Tadgh <garygrantgraham@gmail.com>
* Enhance RuleBuilder code to support multiple instances (#5852)

* Overhaul bulk export permissions.

* Overhaul bulk export permissions.

* Small tweak to rule builder.

* Cleanup validation.

* Cleanup validation.

* Code review feedback.

* Postgres terminology service hard coded column names migration (#5866)

* updating parent pids column name

* updating name of the fullTestField Search

* updating name of the fullTestField Search

* fixing typo.

* failing test.

* - Moving FullTextField annotation from getter method and adding it to the newly added VC property of the entity;

- reverting the name of the FullTextField entity to its previous name of 'myParentPids';

- reverting the name of the lucene index to search on in the terminology service.

- updating the changelog;

* making spotless happy

---------

Co-authored-by: peartree <etienne.poirier@smilecdr.com>

* 5879 back porting fix for issue 5877 (attempting to update a tokenparam with a value greater than 200 characters raises an sqlexception) to release rel_7_2 (#5881)

* initial failing test.

* solution

* adding changelog

* spotless

* moving changelog from 7_4_0 to 7_2_0 and deleting 7_4_0 folder.

---------

Co-authored-by: peartree <etienne.poirier@smilecdr.com>

* Expose BaseRequestPartitionHelperSvc validateAndNormalize methods (#5811)

* Expose BaseRequestPartitionHelperSvc validate and normalize methods

* Compilation errors

* change mock test to jpa test

* change mock test to jpa test

* validateAndNormalizePartitionIds

* validateAndNormalizePartitionNames

* validateAndNormalizePartitionIds validation + bug fix

* validateAndNormalizePartitionNames validation

* fix test

* version bump

* Ensure a non-numeric FHIR ID doesn't result in a NumberFormatException when processing survivorship rules (#5883)

* Add failing test as well as commented out potential solution.

* Fix for NumberFormatException.

* Add conditional test for survivorship rules.

* Spotless.

* Add changelog.

* Code review feedback.

* updating documentation (#5889)

* Ensure temp file ends with "." and then suffix. (#5894)

* bugfix to hapifhir/hapi-fhir-jpaserver-starter#675 (#5892)

Co-authored-by: Jens Kristian Villadsen <jenskristianvilladsen@gmail.com>

* Enhance mdm interceptor (#5899)

* Add MDM Transaction Context for further downstream processing giving interceptors a better chance of figuring out what happened.

* Added javadoc

* Cahngelog

* spotless

---------

Co-authored-by: Jens Kristian Villadsen <jenskristianvilladsen@gmail.com>

* Fix BaseHapiFhirResourceDao $meta method to use HapiTransactionService instead of @transaction (#5896)

* Try making ResourceTable.myTags EAGER instead of LAZY and see if it breaks anything.

* Try making ResourceTable.myTags EAGER instead of LAZY and see if it breaks anything.

* Ensure BaseHapiFhirResourceDao#metaGetOperation uses HapiTransactionService instead of @transactional in order to resolve megascale $meta bug.

* Add changelog.

* Update hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_2_0/5898-ld-megascale-meta-operation-fails-hapi-0389.yaml

Commit code reviewer suggestion.

Co-authored-by: Tadgh <garygrantgraham@gmail.com>

---------

Co-authored-by: Tadgh <garygrantgraham@gmail.com>

* Fix query chained on sort bug where we over-filter results (#5903)

* Failing test.

* Ensure test cleanup doesn't fail by deleting Patients before Practitioners.

* Implement fix.

* Spotless.

* Clean up unit test and add changelog.  Fix unit test.

* Fix changelog file.

* Apply suggestions from code review

Apply code review suggestions.

Co-authored-by: Michael Buckley <michaelabuckley@gmail.com>

* Spotless

---------

Co-authored-by: Michael Buckley <michaelabuckley@gmail.com>

* cve fix (#5906)

Co-authored-by: Long Ma <long@smilecdr.com>

* Fixing issues with postgres LOB migration. (#5895)

* Fixing issues with postgres LOB migration.

* addressing code review comments for audit/transaction logs.

* test and implementation for BinaryStorageEntity migration post code review.

* test and implementation for BinaryStorageEntity migration post code review.

* test and implementation for TermConcept
 migration post code review.

* applying spotless

* test and implementation for TermConceptProperty
 migration post code review.

* test and implementation for TermValueSetConcept
 migration post code review.

* fixing migration version

* fixing migration task

* changelog

* fixing changelog

* Minor renames

* addressing comments and suggestions from second code review.

* passing tests

* fixing more tests

---------

Co-authored-by: peartree <etienne.poirier@smilecdr.com>
Co-authored-by: Tadgh <garygrantgraham@gmail.com>

* refactor bulk export rule, add concept of appliestoallpatients, fix tests

* spotless

* Cahgnelog, tests

* more tests

* refactor style checks

---------

Co-authored-by: Luke deGruchy <luke.degruchy@smilecdr.com>
Co-authored-by: Etienne Poirier <33007955+epeartree@users.noreply.github.com>
Co-authored-by: peartree <etienne.poirier@smilecdr.com>
Co-authored-by: Nathan Doef <n.doef@protonmail.com>
Co-authored-by: TipzCM <leif.stawnyczy@gmail.com>
Co-authored-by: dotasek <david.otasek@smilecdr.com>
Co-authored-by: Jens Kristian Villadsen <jenskristianvilladsen@gmail.com>
Co-authored-by: Michael Buckley <michaelabuckley@gmail.com>
Co-authored-by: longma1 <32119004+longma1@users.noreply.github.com>
Co-authored-by: Long Ma <long@smilecdr.com>
* Change sort type on chains

* Change sort type on chains

* Test for MS SQL

* Comments
# Conflicts:
#	hapi-fhir-jpaserver-test-r5/src/test/java/ca/uhn/fhir/jpa/dao/r5/database/BaseDatabaseVerificationIT.java
#	hapi-fhir-storage-test-utilities/src/main/java/ca/uhn/fhir/storage/test/DaoTestDataBuilder.java
Copy link

Formatting check succeeded!

Copy link

codecov bot commented May 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.42%. Comparing base (497b9f2) to head (9b86b23).
Report is 60 commits behind head on master.

❗ Current head 9b86b23 differs from pull request most recent head c6c08a6. Consider uploading reports for the commit c6c08a6 to get more accurate results

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #5923      +/-   ##
============================================
+ Coverage     83.39%   83.42%   +0.03%     
- Complexity    26927    27073     +146     
============================================
  Files          1681     1692      +11     
  Lines        103965   104523     +558     
  Branches      13189    13236      +47     
============================================
+ Hits          86702    87201     +499     
- Misses        11613    11657      +44     
- Partials       5650     5665      +15     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@michaelabuckley michaelabuckley enabled auto-merge (squash) May 13, 2024 23:03
@michaelabuckley michaelabuckley merged commit 0a00990 into master May 15, 2024
64 checks passed
@michaelabuckley michaelabuckley deleted the mb-test-cleanup branch May 15, 2024 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants