-
Type: New Feature
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Aggregation Framework
-
Fully Compatible
-
Query 2019-04-08
-
(copied to CRM)
I would like to store aggregate pipelines in a collection, which will make them easier to re-use in my company's multiple applications. We will need to add new aggregates often and this seems like the easiest way to allow each application to programmatically accommodate new aggregates inserted from a single administrative panel.
The main problem I've encountered is specifying the current date within the aggregate itself without injecting it at runtime, which is a little clumsy. '$currentDate' exists to update a document, but there is nothing similar for aggregates.
I'm proposing a '$$NOW' variable that can be used in aggregation expressions to represent the current datetime when evaluated.
- is duplicated by
-
SERVER-37713 Views - Date objects are evaluated at time of CreateView(), not time of Query
- Closed
-
SERVER-31317 createView is interpreting Date object at creation time
- Closed
-
SERVER-29193 Current date/time available in Aggregation pipeline
- Closed
-
SERVER-28144 Allow $currentDate in queries
- Closed
- is related to
-
SERVER-22963 New value type that the server translates to the server date like $CurrentDate
- Closed
- related to
-
COMPASS-3490 "new Date()" support for aggregation pipeline builder
- Closed