Moodle PHP Documentation 4.1
Moodle 4.1.11 (Build: 20240610) (c8c84b4af18)
|
Public Member Functions | |
__construct (string $databaseName, string $collectionName, array $documents, array $options=[]) | |
Constructs an insert command. | |
execute (Server $server) | |
Execute the operation. | |
MongoDB\Operation\InsertMany::__construct | ( | string | $databaseName, |
string | $collectionName, | ||
array | $documents, | ||
array | $options = [] ) |
Constructs an insert command.
Supported options:
comment (mixed): BSON value to attach as a comment to the command(s) associated with this insert.
This is not supported for servers versions < 4.4.
string | $databaseName | Database name |
string | $collectionName | Collection name |
array[] | object[] | $documents | List of documents to insert |
array | $options | Command options |
InvalidArgumentException | for parameter/option parsing errors |
MongoDB\Operation\InsertMany::execute | ( | Server | $server | ) |
Execute the operation.
InsertManyResult |
UnsupportedException | if write concern is used and unsupported |
DriverRuntimeException | for other driver errors (e.g. connection errors) |
Implements MongoDB\Operation\Executable.