Query shape should serialize its command first for readability

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Integration
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Currently, during serialization, a query shape serializes its let component first and then its command. This happens to most of the query shapes:

      The result looks like:

      {
          "cmdNs": {
              "db": "testDB",
              "coll": "testColl"
          },
          "let": {
              "x": "?number",
              "y": "?string"
          },
          "command": "update",
          "q": {
              "x": {
                  "$eq": "?number"
              }
          },
          "u": "?object",
          "multi": false,
          "upsert": true
      }
      

      For readability, we should serialize its command and command arguments first before serializing the let.

            Assignee:
            Unassigned
            Reporter:
            Chi-I Huang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: