Add option to set a default encoder for aggregation pipelines

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 1.21.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • PHP Drivers
    • Needed
    • Hide

      Document the new option "builderEncoder" for the classes Client, Database and Collection.

      Show
      Document the new option "builderEncoder" for the classes Client, Database and Collection.
    • None
    • None
    • None
    • None
    • None
    • None

      • Option can be set on the Client, Database, and Collection classes
      • Option is inherited when selecting a database or collection similarly to typeMap
      • Option is used to encode pipelines passed to various methods
      • Should accept any MongoDB\Codec\Encoder instance, wrong encoders will throw exceptions when encountering unsupported objects
      • Naming suggestions: encoder (very vague), builderEncoder (generic enough to cover aggregation pipelines and queries)
      • Names like aggregationEncoder or pipelineEncoder are too specific
      • Defaults to new MongoDB\Builder\BuilderEncoder

            Assignee:
            Jérôme Tamarelle
            Reporter:
            Andreas Braun
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: