From 1844af73dbc1ab908c31cea8afe689afa2806603 Mon Sep 17 00:00:00 2001 From: Cornel Rautenbach <cornel.rautenbach@gmail.com> Date: Wed, 22 Jan 2025 13:32:42 +0200 Subject: [PATCH] PageAndOrderParams --- db_utils/db_utils.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/db_utils/db_utils.go b/db_utils/db_utils.go index 4abd2d6..e80f5f6 100644 --- a/db_utils/db_utils.go +++ b/db_utils/db_utils.go @@ -82,6 +82,12 @@ func AbsoluteDateStringQuery(absolute string) string { return fmt.Sprintf(" = '%v'", absolute) } +type PageAndOrderParams struct { + PageParams + OrderBy string `json:"order_by,omitempty"` + Order string `json:"order,omitempty"` +} + type PageParams struct { Limit int64 `json:"limit,omitempty"` // Limit number of items returned in list (default: 0 (no limit)) Offset int64 `json:"offset,omitempty"` // Offset in list (default: 0 (no offset)) -- GitLab