bwgjoseph / mongoose-vs-ottoman

feature comparison between mongoose and ottoman
0 stars 1 forks source link

Support for expiry per document #105

Open bwgjoseph opened 3 years ago

bwgjoseph commented 3 years ago

Hi,

Expanding from #94, is there any way to set the expiry per document instead of per collection? I do have some use-case for it

I mean whatever that is defined in the ModelOptions could be the default expiry for all documents in that collection but if one of my documents has a different expiry than what was declared in the ModelOptions then during the document creation, maybe it could allow me to specify the expiry? Possible?

Thanks

AV25242 commented 3 years ago

We are adding TTL for some operations in next release this way you can set TTL per document.

bwgjoseph commented 2 years ago

Was this feature added in beta.9?

gsi-alejandro commented 2 years ago

hi @bwgjoseph

yes, TTL for documents while using key/value operation is available (maxExpiry for mutations and withExpiry for queries)