Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-91332

Add helpers to SerializationOptions to ask about context: explain, queryStats, etc

    • Query Integration

      Looking at the serialization methods for various document sources, it can be unclear to a new engineer in what contexts a source is serialized, and how attributes of SerializationOptions help to determine that context.

      It seems like the basic rules are:

      • We are serializing for explain If opts.verbosity is not none
      • We are serializing for query stats if opts.literalPolicy != LiteralSerializationPolicy::kUnchanged || opts.transformIdentifiers

      I think it would be helpful to the reader to have convenience methods on SerializationOptions that encapsulates this logic, e.g., opts.serializingForExplain(). Or perhaps some high level comments near the SerializationOptions would be sufficient.

            Assignee:
            Unassigned Unassigned
            Reporter:
            chris.wolff@mongodb.com Chris Wolff
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: