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 get document by id #602

Merged
merged 25 commits into from
Aug 9, 2023
Merged

support get document by id #602

merged 25 commits into from
Aug 9, 2023

Conversation

imotai
Copy link
Contributor

@imotai imotai commented Aug 9, 2023


PR-Codex overview

This PR focuses on adding a new getDoc function to the SDK and implementing the corresponding API endpoint in the IndexerNode service.

Detailed summary

  • Added getDoc function to the SDK to retrieve a document by its ID.
  • Implemented the GetDoc API endpoint in the IndexerNode service.
  • Updated the db_store_v2.rs file to handle the getDoc request.
  • Added tests for the getDoc function in the SDK and doc_store module.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@codecov-commenter
Copy link

Codecov Report

Merging #602 (3dd1521) into main (bb44ae3) will increase coverage by 0.53%.
The diff coverage is 83.33%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##             main     #602      +/-   ##
==========================================
+ Coverage   61.70%   62.24%   +0.53%     
==========================================
  Files           9        9              
  Lines         470      482      +12     
  Branches       69       71       +2     
==========================================
+ Hits          290      300      +10     
- Misses        180      182       +2     
Flag Coverage Δ
rust 62.24% <83.33%> (+0.53%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
sdk/src/store/document_v2.ts 84.61% <66.66%> (-2.35%) ⬇️
sdk/src/provider/indexer_provider.ts 75.60% <100.00%> (+4.18%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@imotai imotai merged commit 2e27ee2 into main Aug 9, 2023
@imotai imotai changed the title Feat/get support get document by id Aug 14, 2023
@imotai
Copy link
Contributor Author

imotai commented Aug 14, 2023

@qa-agent

@dbpunk-labs dbpunk-labs deleted a comment from qa-agent Aug 14, 2023
@qa-agent
Copy link

Unit Test Analysis

🎯level:Important
📣explanation:The pull request introduces a new function getDoc that retrieves a document from the database by its ID. This is an important functionality that needs to be thoroughly tested to ensure its correctness.

Existing Test Cases

Summary Category File
Test that the new function is called successfully and returns the correct document. positive testing sdk/tests/client_v2.test.ts
Test that the new function throws an error when the document is not found. negative testing sdk/tests/client_v2.test.ts

Recommended Test Cases

Summary Category
Test that the new function is called with invalid inputs, such as null ID or non-existent collection. edge testing

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