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 compiler validations for custom foreign key fields #274

Merged
merged 15 commits into from
Mar 11, 2024

Conversation

hasathcharu
Copy link
Contributor

@hasathcharu hasathcharu commented Mar 1, 2024

Purpose

To support the newly added sql:Relation annotation to allow definition of custom foreign keys.

Fixes: ballerina-platform/ballerina-library/issues/6068

Checklist

  • Linked to an issue
  • Updated the specification
  • Updated the changelog
  • Added tests
  • Checked native-image compatibility

Copy link

codecov bot commented Mar 1, 2024

Codecov Report

Attention: Patch coverage is 57.44681% with 20 lines in your changes are missing coverage. Please review.

Project coverage is 87.09%. Comparing base (02872be) to head (ac75229).

Files Patch % Lines
...ballerina/stdlib/persist/compiler/utils/Utils.java 5.55% 16 Missing and 1 partial ⚠️
...sist/compiler/PersistModelDefinitionValidator.java 94.73% 0 Missing and 1 partial ⚠️
...allerina/stdlib/persist/compiler/model/Entity.java 66.66% 1 Missing ⚠️
...stdlib/persist/compiler/model/SimpleTypeField.java 66.66% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #274      +/-   ##
============================================
- Coverage     88.49%   87.09%   -1.41%     
- Complexity      343      346       +3     
============================================
  Files            30       30              
  Lines          1113     1147      +34     
  Branches        135      141       +6     
============================================
+ Hits            985      999      +14     
- Misses           76       94      +18     
- Partials         52       54       +2     

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

Bhashinee
Bhashinee previously approved these changes Mar 8, 2024
daneshk
daneshk previously approved these changes Mar 10, 2024
@hasathcharu hasathcharu dismissed stale reviews from daneshk and Bhashinee via 70f3beb March 11, 2024 09:01
Copy link

Quality Gate Passed Quality Gate passed

Issues
2 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@hasathcharu hasathcharu changed the title Compiler validations and diagnostics for newly added advanced annotations Add compiler validations for custom foreign key fields Mar 11, 2024
@daneshk daneshk merged commit 561b857 into ballerina-platform:main Mar 11, 2024
7 of 8 checks passed
@hasathcharu hasathcharu deleted the new-fixes-wip branch March 14, 2024 05:31
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.

Add persist compiler plugin support for the new advanced SQL database annotations
3 participants