bitter-soccer-92103
08/10/2022, 3:12 AM{
"$expr": {
"$lte": [
"$createdAt",
{
"$subtract": [
"$$NOW",
2592000000
]
}
]
}
}
But I saw the operations are done manually in the code, I thought there was a mongo memory server running under the hood to allow do any mongo query. And there isn't support for the $expr
operator (it does work outside aggregations). Is there any plan to support relative date to do something like this? E.g $$NOW - number
future-teacher-7046
$expr
might be difficult to implement and cause the size of the SDKs to increase substantially.
For relative time operations, the easiest solution right now is to add a dynamic attribute like daysSinceSignUp
bitter-soccer-92103
08/10/2022, 1:35 PMdaysSinceSignUp
sounds like a nice solution