elersong / fireorm24

ORM for Firebase Firestore 🔥 updated for 2024
MIT License
1 stars 0 forks source link

Implement Pagination Cursors for Firestore #11

Open elersong opened 2 months ago

elersong commented 2 months ago

Description

Firestore supports pagination cursors such as startAt, endAt, and startAfter, which are recommended over using offsets due to performance and cost implications. The current implementation of Fireorm does not fully support these cursors, and there is a need to develop a clean API to handle pagination efficiently. For more information on why offsets are discouraged and how cursors work, refer to the Firestore best practices and Firestore query cursors documentation.

Steps to Reproduce

  1. Attempt to use startAfter or other pagination cursors with the current Fireorm implementation.
  2. Note the lack of support and limitations in extending the existing repository classes.

Expected Behavior

A new or improved API within Fireorm that supports Firestore pagination cursors, allowing for efficient and cost-effective data retrieval without relying on offsets.

Actual Behavior

Current Fireorm implementation does not support Firestore pagination cursors effectively, leading to performance issues and additional costs when using offsets.

Acceptance Criteria

Additional Context

Original Issue