Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-5514

$maxKey and $minKey render as t() in the document list view

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: CRUD
    • Labels:
      None
    • 5

      See examples here:

      https://docs.mongodb.com/manual/reference/mongodb-extended-json/#example

      Or just import this for convenience:

       

      ~/mongo/compass/packages/compass-e2e-tests % cat fixtures/extended-json.json
      [
          {
              "_id": {
                  "$oid": "5d505646cf6d4fe581014ab2"
              },
              "arrayField_canonical": [
                  "hello",
                  {
                      "$numberInt": "10"
                  }
              ],
              "arrayField_relaxed": [
                  "hello",
                  10
              ],
              "dateField_canonical": {
                  "$date": {
                      "$numberLong": "1565546054692"
                  }
              },
              "dateField_relaxed": {
                  "$date": "2019-08-11T17:54:14.692Z"
              },
              "dateBefore1970": {
                  "$date": {
                      "$numberLong": "-1577923200000"
                  }
              },
              "decimal128Field": {
                  "$numberDecimal": "10.99"
              },
              "documentField": {
                  "a": "hello"
              },
              "doubleField_canonical": {
                  "$numberDouble": "10.5"
              },
              "doubleField_relaxed": 10.5,
              "infiniteNumber": {
                  "$numberDouble": "Infinity"
              },
              "int32field_canonical": {
                  "$numberInt": "10"
              },
              "int32field_relaxed": 10,
              "int64Field_canonical": {
                  "$numberLong": "50"
              },
              "int64Field_relaxed": 50,
              "minKeyField": {
                  "$minKey": 1
              },
              "maxKeyField": {
                  "$maxKey": 1
              },
              "regexField": {
                  "$regularExpression": {
                      "pattern": "^H",
                      "options": "i"
                  }
              },
              "timestampField": {
                  "$timestamp": {
                      "t": 1565545664,
                      "i": 1
                  }
              }
          }
      ]
      

       

      This all renders (in the document list view as)

       

            arrayField_canonical: 'Array',
            arrayField_relaxed: 'Array',
            dateBefore1970: '1920-01-01T00:00:00.000+00:00',
            dateField_canonical: '2019-08-11T17:54:14.692+00:00',
            dateField_relaxed: '2019-08-11T17:54:14.692+00:00',
            decimal128Field: '10.99',
            documentField: 'Object',
            doubleField_canonical: '10.5',
            doubleField_relaxed: '10.5',
            infiniteNumber: 'Infinity',
            int32field_canonical: '10',
            int32field_relaxed: '10',
            int64Field_canonical: '50',
            int64Field_relaxed: '50',
            maxKeyField: 't()',
            minKeyField: 't()',
            regexField: '/^H/i',
            timestampField: 'Timestamp({ t: 1565545664, i: 1 })',

      Note maxKeyField and minKeyField.

       

      See also https://github.com/mongodb-js/compass/pull/2795

       

       

            Assignee:
            Unassigned Unassigned
            Reporter:
            leroux.bodenstein@mongodb.com Le Roux Bodenstein
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: