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

Support Arithmetic function INDEX #630

Merged
merged 5 commits into from
Feb 13, 2024
Merged

Support Arithmetic function INDEX #630

merged 5 commits into from
Feb 13, 2024

Conversation

jbl428
Copy link
Contributor

@jbl428 jbl428 commented Feb 7, 2024

Motivation

  • Support an arithmetic function INDEX.

Modifications

  • Add jpql model and serializer for INDEX

Commit Convention Rule

Commit type Description
feat New Feature
fix Fix bug
docs Documentation only changed
ci Change CI configuration
refactor Not a bug fix or add feature, just refactoring code
test Add Test case or fix wrong test case
style Only change the code style(ex. white-space, formatting)
chore It refers to minor tasks such as library version upgrade, typo correction, etc.
  • If you want to add some more commit type please describe it on the Pull Request

Result

  • The arithmetic function index is added.

Closes

* Creates an expression that represents the index of the value in an ordered list.
*/
@SinceJdsl("3.4.0")
fun <T, S : Collection<T>> index(path: Pathable<S>): Expression<Int> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that the INDEX function can take an alias of join as a parameter, so shouldn't the type of the parameter be Expressionable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh, you are right 😄

@codecov-commenter
Copy link

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (9da2399) 66.47% compared to head (4fc4eb4) 66.56%.
Report is 12 commits behind head on develop.

Files Patch % Lines
...render/jpql/serializer/impl/JpqlIndexSerializer.kt 83.33% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #630      +/-   ##
===========================================
+ Coverage    66.47%   66.56%   +0.09%     
===========================================
  Files          467      471       +4     
  Lines         4760     4779      +19     
  Branches       277      277              
===========================================
+ Hits          3164     3181      +17     
- Misses        1539     1541       +2     
  Partials        57       57              

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

@shouwn
Copy link
Member

shouwn commented Feb 13, 2024

Thanks for your help!

@shouwn shouwn merged commit ccea406 into line:develop Feb 13, 2024
4 checks passed
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.

4 participants