feat: add browse-at-scale — date ranges, load more, month navigator
CLI: --month YYYY-MM, --from/--to date range, --limit override API: from/to query params for date range filtering Web: load more button for pagination, month nav (◂/▸) in stream view
This commit is contained in:
@@ -64,6 +64,8 @@ type Entity struct {
|
||||
type ListParams struct {
|
||||
Tag *string
|
||||
Date *string
|
||||
From *string
|
||||
To *string
|
||||
Since *time.Time
|
||||
CardsOnly bool
|
||||
IncludeDeleted bool
|
||||
@@ -192,6 +194,14 @@ func (s *Store) List(params ListParams) ([]*Entity, error) {
|
||||
where = append(where, "date(e.created_at) = ?")
|
||||
args = append(args, *params.Date)
|
||||
}
|
||||
if params.From != nil {
|
||||
where = append(where, "date(e.created_at) >= ?")
|
||||
args = append(args, *params.From)
|
||||
}
|
||||
if params.To != nil {
|
||||
where = append(where, "date(e.created_at) <= ?")
|
||||
args = append(args, *params.To)
|
||||
}
|
||||
if params.Since != nil {
|
||||
where = append(where, "e.created_at >= ?")
|
||||
args = append(args, params.Since.Format(time.RFC3339))
|
||||
|
||||
Reference in New Issue
Block a user