Uploaded image for project: 'PHP Driver: Library'
  1. PHP Driver: Library
  2. PHPLIB-1505

Add option to set a default encoder for aggregation pipelines

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 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.

      • 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:
            jerome.tamarelle@mongodb.com Jérôme Tamarelle
            Reporter:
            andreas.braun@mongodb.com Andreas Braun
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: