Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions source/reference/method/MongoDBDatabase-createCollection.txt
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,28 @@ Parameters

.. versionadded:: 1.9

* - flags
- integer
- Available for the MMAPv1 storage engine only to set the ``usePowerOf2Sizes`` and
``noPadding`` flags.

The library provides constants that you can combine with a
:php:`bitwise OR operator <language.operators.bitwise>` to set the flag
values:

- ``MongoDB\Operation\CreateCollection::USE_POWER_OF_2_SIZES``: ``1``
- ``MongoDB\Operation\CreateCollection::NO_PADDING``: ``2``

Defaults to ``1``.

MongoDB 3.0 and later ignores the ``usePowerOf2Sizes`` flag. See
:manual:`collMod </reference/command/collMod>` and
:manual:`db.createCollection()
</reference/method/db.createCollection>` for more information.

*Deprecated as of v1.21*: This option is deprecated and will be removed in
{+php-library+} v2.0.

* - indexOptionDefaults
- array|object
- Allows users to specify a default configuration for indexes when
Expand Down
3 changes: 3 additions & 0 deletions source/whats-new.txt
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ improvements, and fixes:
``Database::selectCollection()`` methods will be deprecated and
replaced by these new methods in a future driver release, so consider
changing the usages in your application.

- The ``flags`` field, used for the deprecated MMAPv1 storage engine, is now
deprecated and will be removed in {+library-short+} v2.0.

.. _php-lib-version-1.20:

Expand Down
Loading