Does MongoDBDriverCursor obtain the result set in the form of an associated array?

Source: Internet
Author: User
During the upgrade of PHP 7, the old mongo. so extensions are no longer supported, but only mongodb can be used. so, there are many differences between the two cursor objects. the old version of the cursor object after iteraor_to_array returns an associated array with the _ id as the key. Can the new version only return the number of numeric indexes... during the upgrade of PHP 7, the old mongo. so extensions are no longer supported, but only mongodb can be used. so, there are many differences between the two cursor objects. the old version of the cursor object returns an associated array with _ id as the key after iteraor_to_array. Can the new version only return a numeric index array, is there any solution?

Reply content:

During the upgrade of PHP 7, the old mongo. so extensions are no longer supported, but only mongodb can be used. so, there are many differences between the two cursor objects. the old version of the cursor object returns an associated array with _ id as the key after iteraor_to_array. Can the new version only return a numeric index array, is there any solution?

In useMongoDBDriverBulkWrite ()ClassInsertOperation will returnOid = uniq_random_words. This should be its key.
During the query operation, the queried data will also containOidThis field can be used as the key in the associated array, right ?? I am also learning mongodb. if you verify that this is not what I said, sorry.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.