Dear all, I have a query that fetches all records from a collection. Now, these records have a Featured Expiry Timestamp, that marks the date when their 'pro' status expires. Now, I want to fetch the list of records ordered by the expiry timestamp ascending, so that those which are expiring soon will be at the top.
simply doing a Query.orderAsc('timestamp') will also fetch those which have their pro status expired. I just want the ones expiring soon to feature first.
Of course, Query.greaterThan('timestamp', Date.now().toString()) will not work in my scenario since I still want the expired ones to feature after the ones with pro status
My idea is to do these 2 queries each time and merge the results, however, I was wondering if there is a more efficient way. However, it might affect my pagination badly.
What is the best way to approach this?
Recommended threads
- cant resume project
Invalid console fingerprint event i try man time
- Realtime for files() works almost well, ...
I have been trying to make use of realtime, today (14.03.26) I have pulled all the latest versions of docker images, and sdk available. Whats working: - Conn...
- general_route_not_found - Auth Guide
If you’ve just added a subdomain to your project, verified your DNS records, and confirmed your SSL certificate is working, but you're still hitting a `general_...