|
The MongoDB\Driver\Command classはじめにThe MongoDB\Driver\Command class is a value object that represents a database command.
To provide クラス概要MongoDB\Driver\Command
final
class MongoDB\Driver\Command
{
/* メソッド */
final public __construct(arrayobject
}$document , arraynull $commandOptions = null )例例1 Composing MongoDB\Driver\Command to provide a helper to create collections
上の例の出力は以下となります。 object(MongoDB\Driver\Command)#3 (1) { ["command"]=> array(3) { ["create"]=> string(16) "cappedCollection" ["capped"]=> bool(true) ["size"]=> int(65536) } } array(1) { ["ok"]=> float(1) } array(16) { ["ns"]=> string(29) "databaseName.cappedCollection" ["count"]=> int(0) ["size"]=> int(0) ["numExtents"]=> int(1) ["storageSize"]=> int(65536) ["nindexes"]=> int(1) ["lastExtentSize"]=> float(65536) ["paddingFactor"]=> float(1) ["paddingFactorNote"]=> string(101) "paddingFactor is unused and unmaintained in 2.8. It remains hard coded to 1.0 for compatibility only." ["userFlags"]=> int(0) ["capped"]=> bool(true) ["max"]=> int(9223372036854775807) ["maxSize"]=> int(65536) ["totalIndexSize"]=> int(8176) ["indexSizes"]=> object(stdClass)#4 (1) { ["_id_"]=> int(8176) } ["ok"]=> float(1) }
|