These are chat archives for Automattic/mongoose
Hey, would anyone know how to use a value of a doc in the query such as
.find().where( 'created + ttl' ).lt( Date.now )
where created and ttl would both be part of the document.
Or should I generate ttl when I save as a timestamp in the future then just check that might be easier?
yeah I guess I will just do it like that.
what about having a tail-able query with an updating time component / comparing on server?
.where('ttl').gte('Get server side Date.now?')
WHERE date+lifetime > now()