Srylax / mongodb-cursor-pagination

Provides cursor based pagination for the native MongoDB driver in Rust.
https://docs.rs/mongodb-cursor-pagination/
MIT License
2 stars 4 forks source link

Fix some issues #13

Closed George-Miao closed 1 month ago

George-Miao commented 2 months ago

Linked Items

## Description This PR fixes two problems: - `CursorError` is not accessible from outside the crate due to a duplicated import - `juniper` implementation is broken after bumping dependency version ## Behaviour changes Old: `CursorError` cannot be used by lib user New: It now can ## Category This is related to a: - [x] Bugfix - [ ] Feature - [ ] Packaging - [ ] Docs - [ ] Code Quality - [ ] Refactoring - [ ] Miscellaneous ## Tests - [ ] Unit-Tests were created - [x] Code is already covered by Unit-Tests - [ ] No tests required
Srylax commented 2 months ago

What is the target version? Do you want this released on 1.0.0 or do you need a backport?

George-Miao commented 2 months ago

1.0.0 is good enough. This wasn't a problem back in old version.

Srylax commented 1 month ago

@George-Miao could you test the current version on master?

douggynix commented 1 month ago

@George-Miao @Srylax I am using this lib for pagination features recently on a project. I see this merge request has been opened one year ago. is it intended to be finally merged or abandonned?

Srylax commented 1 month ago

@douggynix I'm sorry for the confusion I created with my force push. This pr has been created only a month ago. The changes are already merged into master. I forgot to close the pr. @George-Miao would you be so kind and test the changes? The 1.0.0 has not been released yet, because I am working on an API that allows to opt-out of the maybe unwanted extra information (has_next_page etc). Because each extra information is an additional Query.

@douggynix are you requiring any specific feature?

douggynix commented 1 month ago

@douggynix I'm sorry for the confusion I created with my force push. This pr has been created only a month ago. The changes are already merged into master. I forgot to close the pr. @George-Miao would you be so kind and test the changes? The 1.0.0 has not been released yet, because I am working on an API that allows to opt-out of the maybe unwanted extra information (has_next_page etc). Because each extra information is an additional Query.

@douggynix are you requiring any specific feature?

@Srylax Thanks for making this crystal clear to me. That's a good idea to avoid extra queries because pagination may have to handle millions of rows depending on use cases. Thanks for putting effort to do this work both of you. I am using version 0.3.2 so far. Not the Release candidate. Having that 1.0.0 as a stable version delivered would be great. on my side, i handle the aggregation query pagination a custom house solution. The pagination for aggregation pipeline is very tricky as you have multiple filter stages that may render any kind of data, going from count to projection, or using geoindex. I understand why you let this aside for the moment. But your work has been a foundational base for me to implement my house cursor index for my aggregation pipeline.

George-Miao commented 1 month ago

@George-Miao would you be so kind and test the changes?

Yep everything looks fine.