Introduce MongoExtensionExecutableAggregationStage to the Extensions API

XMLWordPrintableJSON

    • Query Integration
    • None
    • 3
    • TBD
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      1) As part of this ticket, introduce MongoExtensionExecutableAggregationStage to the Extensions API. 

      MongoExtensionExecutableAggregationStage has the following vtable:

      Function Name Return Type Parameters Description
      destroy
      •  
      •  
      Destroys object and frees related resources.
      get_next
      • MongoExtensionStatus*
      • MongoExtensionGetNextResultCode** (output)
      • MongoExtensionByteBuf** (output)
      Pulls the next result from the stage executor. On success: * Populates the MongoExtensionGetNextResultCode pointer with a code indicating whether or not a document has been returned by the function.
      Populates the MongoExtensionByteBuf pointer with the resulting document as a byte buffer. Ownership of the buffer is transferred to the Host.
      dispose
      • MongoExtensionStatus*
      •  
      Informs the stage that it is no longer needed and can release its resources.
      After dispose() is called the stage must still be able to handle calls to get_next(), but can return kEOF.

       

      2) As part of this ticket, also introduce MongoExtensionGetNextResultCode :

      /** * Code indicating the result of a getNext() call. */
      enum MongoExtensionGetNextResultCode {    
      /**     * getNext() yielded a document.     */    
      kAdvanced = 0,    
      /**     * getNext() did not yield a document and will never yield another document.     */    
      kEOF = -1,    /**     * getNext() did not yield a document, but may yield another document in the future.     */    
      kPauseExecution = -2,};

      3) Implement the C++ SDK Boundary object (i.e adapter), as well as provide a base class for extensions to implement their own executable stage.

      4) Implement the C++ Host Adapter.

      5) Write unit tests for the C++ SDK Boundary object, as well as the host adapter.

       

            Assignee:
            Unassigned
            Reporter:
            Santiago Roche
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: