-
Notifications
You must be signed in to change notification settings - Fork 354
Description
Many users expect recent records to appear first when listing data. Currently, data is returned in default order, forcing developers to repeatedly add "ORDER BY created_at DESC" to every query.
Why needed:
Sorting by newest first is the most common pattern for feeds, logs, tasks, events, comments, and versioned records. Currently, every time must implement it manually.
Proposal:
Add a configuration setting to automatically sort records by created_at descending when no explicit order is specified. This keeps full control for advanced use cases while streamlining the majority case.
Implementation idea:
Detect a timestamp or datetime column name (e.g. created_at, createdAt, timestamp, created) when generating or executing queries. If no explicit order is supplied, apply ORDER BY created_at DESC by default. This can be implemented once at the query builder or ORM layer.