MongoDB aggregation $let expression to Java Driver -
i have next $let look :
{ "$let": { "vars": { "h": { "$hour": "$date" } }, "in": { "$cond": { "if": { "$lt": [ "$$h", 6 ] }, "then": "night", "else": { "$cond": { "if": { "$lt": [ "$$h", 12 ] }, "then": "morning", "else": { "$cond": { "if": { "$lt": [ "$$h", 18 ] }, "then": "afternoon", "else": "evening" } } } } } } } }
i unable figure out way convert shell operation java driver version. tried mongodb java driver docs , google unable find way it.
any help on java implementation same.
thank in advance!!!
java mongodb aggregation-framework mongo-java
No comments:
Post a Comment