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

feat: add list api #40

Merged
merged 1 commit into from
Mar 14, 2024
Merged

feat: add list api #40

merged 1 commit into from
Mar 14, 2024

Conversation

edwinkys
Copy link
Member

Purpose

This API introduces a new API to the Collection as defined below. This API will return all of the records contain in the collection in the form of a HashMap of the Vector ID as a primitive type of usize and Record which contains vector and metadata.

pub fn list(&self) -> Result<HashMap<usize, Record>, Error> {...}

Approach

Currently, this adds a very barebone approach of doing this without other utility functionality like pagination or return limit.

Testing

  • I have tested this PR locally.
  • I added tests to cover my changes, if not applicable, I have added a reason why.

I have added a test for each cargo test and pytest to test this implementation.

Chore checklist

  • I have updated the documentation accordingly.
  • I have added comments to most of my code, particularly in hard-to-understand areas.

@edwinkys edwinkys added the enhancement New feature or request label Mar 13, 2024
@edwinkys edwinkys self-assigned this Mar 13, 2024
@edwinkys edwinkys linked an issue Mar 13, 2024 that may be closed by this pull request
@edwinkys edwinkys marked this pull request as ready for review March 13, 2024 23:44
@edwinkys edwinkys merged commit 25c91fc into main Mar 14, 2024
3 checks passed
@edwinkys edwinkys deleted the feat-add-list-api branch March 14, 2024 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FEAT: api to get all collection records as map
1 participant