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

Trait based implementation & better Error handling #11

Closed Srylax closed 1 year ago

Srylax commented 1 year ago

Linked Items

Fixes #10

Description

Instead of always creating a Cursor to make a paginated search, this implementation tries to get closer to the mongodb implementation and add the new function find_paginated to the collection. This is the first step to more natural interaction with the Crate. In Future this might get even more improved by using Streams like the mongodb crate.

Behaviour changes

Old: For every query, one had to create a PaginatedCursor and pass the collection.

New: You can now directly make a paginated find on the collection.

Category

This is related to a:

Tests