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

XMLWordPrintableJSON

    • Query Execution
    • Minor Change
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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:
            Lee Maguire
            Reporter:
            Chris Wolff
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: