PHP Class Phalcon\Db\Adapter\MongoDB\Operation\DatabaseCommand

See also: MongoDB\Database::command()
Inheritance: implements Phalcon\Db\Adapter\MongoDB\Operation\Executable
Show file Open project: phalcon/incubator Class Usage Examples

Public Methods

Method Description
__construct ( string $databaseName, array | object $command, array $options = [] ) Constructs a command.
execute ( MongoDB\Driver\Server $server ) : integer Execute the operation.

Method Details

__construct() public method

Supported options: * readPreference (MongoDB\Driver\ReadPreference): The read preference to use when executing the command. This may be used when issuing the command to a replica set or mongos node to ensure that the driver sets the wire protocol accordingly or adds the read preference to the command document, respectively. * typeMap (array): Type map for BSON deserialization. This will be applied to the returned Cursor (it is not sent to the server).
public __construct ( string $databaseName, array | object $command, array $options = [] )
$databaseName string Database name
$command array | object Command document
$options array Options for command execution

execute() public method

Execute the operation.
See also: Executable::execute()
public execute ( MongoDB\Driver\Server $server ) : integer
$server MongoDB\Driver\Server
return integer