Refactor _id extraction for insert documents

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • PHP Drivers
    • None
    • None
    • None
    • None
    • None
    • None

      introduced an internal phongo_bwc_extract_id method based on php_phongo_bulkwrite_extract_id. This can be refactored to use a common utility function.

      Additionally, the original approach in php_phongo_bulkwrite_extract_id that converts the entire document can be rewritten to iterate BSON and use phongo_bson_value_to_zval.

      Targeting this change for 2.0 would mean that we need not prefer phongo_bson_value_to_zval_legacy for the original php_phongo_bulkwrite_extract_id code path. It would be acceptable to return document values for _id as a Document instance instead of stdClass (admittedly an edge case).

            Assignee:
            Jeremy Mikola
            Reporter:
            Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: