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

[backend] add query to fetch documents #962

Merged
merged 7 commits into from
May 26, 2024
Merged

Conversation

Christian-DONGMO
Copy link
Contributor

Proposed changes

Related issues

Checklist

  • [x ] I consider the submitted work as finished
  • I tested the code for its functionality
  • I wrote test cases for the relevant uses case
  • I added/update the relevant documentation (either on github or on notion)
  • [x ] Where necessary I refactored code to improve the overall quality

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

Copy link

codecov bot commented May 24, 2024

Codecov Report

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

Project coverage is 25.00%. Comparing base (48d1105) to head (5fefa77).
Report is 1 commits behind head on master.

Files Patch % Lines
...ain/java/io/openbas/rest/document/DocumentApi.java 0.00% 6 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #962      +/-   ##
============================================
- Coverage     25.32%   25.00%   -0.32%     
+ Complexity      961      956       -5     
============================================
  Files           466      466              
  Lines         10334    10333       -1     
  Branches        497      497              
============================================
- Hits           2617     2584      -33     
- Misses         7657     7690      +33     
+ Partials         60       59       -1     

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


public interface RawDocument {

String getDocument_Id();
Copy link
Member

Choose a reason for hiding this comment

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

Should be getDocument_id

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's done

"left join tags tg on tg.tag_id = tagdoc.tag_id " +
"group by d.document_id " +
"order by document_id desc ", nativeQuery = true )
List<RawDocument> findAllDocuments();
Copy link
Member

Choose a reason for hiding this comment

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

Can you stick to the nomenclature?
rawAllDocuments()

and rawAllDocumentsByUser()

findAll is reserved for Document

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Roger that

@RomuDeuxfois RomuDeuxfois changed the title [backend] add query to fecth documents [backend] add query to fetch documents May 24, 2024
@SamuelHassine SamuelHassine merged commit c78ba1c into master May 26, 2024
6 checks passed
@SamuelHassine SamuelHassine deleted the issue/documents branch May 26, 2024 15:43
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.

3 participants