Commit Graph

9 Commits

Author SHA1 Message Date
Bryan Frimin
d6278da0d6 Fix cursorkey json serialization
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2025-11-20 19:25:29 +01:00
Bryan Frimin
59aa332ab5 Move to vanity import url
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2025-10-31 17:01:52 +01:00
gearnode
7321862ba9 First step of mitigation migration
Signed-off-by: gearnode <bryan@frimin.fr>
2025-03-27 23:34:35 +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
c73e417e5c Refactor model cursor to use orderBy
Signed-off-by: gearnode <bryan@frimin.fr>
2025-03-18 18:16:14 +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
cf12d3966e Replace pgx.NamedArgs to pgx.StrictNamedArgs
Signed-off-by: gearnode <bryan@frimin.fr>
2025-03-02 08:48:52 +01:00
gearnode
743ec49972 Fix pagination
Signed-off-by: gearnode <bryan@frimin.fr>
2025-02-12 14:18:50 -08:00
gearnode
3fcf5e437c Move gid and page pkg
Signed-off-by: gearnode <bryan@frimin.fr>
2025-02-02 11:13:16 -08:00