Commit Graph

4 Commits

Author SHA1 Message Date
Sacha Al Himdani
8c02c53315 Update copyright headers across all Go files
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-25 17:38:32 +01:00
gearnode
5a1f873d58 Use dedicated type for each order field
Signed-off-by: gearnode <bryan@frimin.fr>
2025-03-19 00:20:05 +01:00
gearnode
709b3363c5 Refactor pagination system with flexible ordering support
This commit overhauls the pagination system to support flexible ordering
beyond the default created_at timestamp:

- Change CursorKey from fixed byte array to structured object with ID and Value
- Add OrderField and OrderDirection types to support different sorting options
- Update SQLFragment to dynamically generate SQL based on field and direction
- Modify cursor navigation logic to consider custom ordering
- Simplify Position type to use string constants instead of numeric values
- Update Page struct to include reference to Cursor

These changes allow paginated queries to be ordered by different fields
(created_at, updated_at, name) in either ascending or descending order
while maintaining consistent cursor-based pagination behavior.

Signed-off-by: gearnode <bryan@frimin.fr>
2025-03-18 16:12:04 +01:00
gearnode
3fcf5e437c Move gid and page pkg
Signed-off-by: gearnode <bryan@frimin.fr>
2025-02-02 11:13:16 -08:00