Moodle PHP Documentation 4.1
Moodle 4.1.11 (Build: 20240610) (c8c84b4af18)
|
Public Member Functions | |
__construct (string $databaseName, string $collectionName, $filter, array $options=[]) | |
Constructs a delete command. | |
execute (Server $server) | |
Execute the operation. | |
getCommandDocument (Server $server) | |
Returns the command document for this operation. | |
MongoDB\Operation\DeleteOne::__construct | ( | string | $databaseName, |
string | $collectionName, | ||
$filter, | |||
array | $options = [] ) |
Constructs a delete command.
Supported options:
comment (mixed): BSON value to attach as a comment to this command.
This is not supported for servers versions < 4.4.
hint (string|document): The index to use. Specify either the index name as a string or the index key pattern as a document. If specified, then the query system will only consider plans using the hinted index.
This is not supported for server versions < 4.4 and will result in an exception at execution time if used.
string | $databaseName | Database name |
string | $collectionName | Collection name |
array | object | $filter | Query by which to delete documents |
array | $options | Command options |
InvalidArgumentException | for parameter/option parsing errors |
MongoDB\Operation\DeleteOne::execute | ( | Server | $server | ) |
Execute the operation.
DeleteResult |
UnsupportedException | if collation is used and unsupported |
DriverRuntimeException | for other driver errors (e.g. connection errors) |
Implements MongoDB\Operation\Executable.
MongoDB\Operation\DeleteOne::getCommandDocument | ( | Server | $server | ) |
Returns the command document for this operation.
array |
Implements MongoDB\Operation\Explainable.