Schema generation, select document which comes under date range


Poster null  Post time 1620293793918
Keywords OnceDB 
1- I need this mongodb schema to be converted to Oncedb.
2 - Also what will be the query in oncedb to find all those document which has the date range in licenseInfo array of objects. I  want to query the documents on the date range. 

Thanks in advance.


{
    "_id": 96731,
    "licenseInfo": [
        {
            "_id": 1412053,
            "channel": {
                "_id": 80,
                "name": "PDL Contract Licence",
                "abbr": "PLIC"
            },
            "offerStart": {
                "$date": "2015-12-01T00:00:00.000Z"
            },
            "offerEnd": {
                "$date": "2021-05-29T00:00:00.000Z"
            },
            "dllCode": 84943,
            "isVisited": false,
            "userFields": {
                "pdlGroup": "ABC Studios"
            }
        },
        {
            "_id": 1412062,
            "channel": {
                "_id": 97,
                "name": "On Demand Extra",
                "abbr": "ODE"
            },
            "offerStart": {
                "$date": "2015-12-01T00:00:00.000Z"
            },
            "offerEnd": {
                "$date": "2021-05-29T00:00:00.000Z"
            },
            "dllCode": 84943,
            "isVisited": false,
            "userFields": {
                "pdlGroup": "ABC Studios"
            }
        }
    ]
}




Reply (1)
  • #
  • #1 gh_newghost 1626836761880

    Thanks for your suggestion and will consider it.

 Keywords
OnceDB