Results of 1 - 6 of about 6 for capped (0.002 sec.)
- The MongoDB\Driver\Command class 11589
- « MongoDB\Driver\Manager::startSession MongoDB\Driver\Command::__construct » PHP Manual MongoDB\Driver The MongoDB\Driver\Command class 検索 The MongoDB\Driver\Command class (mongodb >=1.0.0) はじめに The MongoDB\Driver\Command class is a v
... = array(); function __construct ( $collectionName ) { $this -> cmd [ "create" ] = (string) $collectionName ; } function setCappedCollection ( $maxBytes , $maxDocuments = false ) { $this -> cmd [ "capped" ] = true ; $this -> cmd [ "size" ] = (int) $maxB ... ]; } } $manager = new MongoDB\Driver\Manager ( "mongodb://localhost:27017" ); $createCollection = new CreateCollection ( "cappedCollection" ); $createCollection -> setCappedCollection ( 64 * 1024 ); try { $command = $createCollection -> getCommand (); ... ?> 上の例の出力は以下となります。 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 ...
-
https://man.mtool.work/php/8.3/class.mongodb-driver-command.html
- The MongoDB\Driver\Command class 10053
- « MongoDB\Driver\Manager::startSession MongoDB\Driver\Command::__construct » PHP Manual MongoDB\Driver The MongoDB\Driver\Command class 検索 The MongoDB\Driver\Command class (mongodb >=1.0.0) はじめに The MongoDB\Driver\Command class is a v
... = array(); function __construct ( $collectionName ) { $this -> cmd [ "create" ] = (string) $collectionName ; } function setCappedCollection ( $maxBytes , $maxDocuments = false ) { $this -> cmd [ "capped" ] = true ; $this -> cmd [ "size" ] = (int) $maxB ... ]; } } $manager = new MongoDB\Driver\Manager ( "mongodb://localhost:27017" ); $createCollection = new CreateCollection ( "cappedCollection" ); $createCollection -> setCappedCollection ( 64 * 1024 ); try { $command = $createCollection -> getCommand (); ... ?> 上の例の出力は以下となります。 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 ...
-
https://man.mtool.work/php/8.3/class.mongodb-driver-command.html
- The MongoDB\Driver\Cursor class 9889
- « MongoDB\Driver\ReadConcern::isDefault MongoDB\Driver\Cursor::__construct » PHP Manual MongoDB\Driver The MongoDB\Driver\Cursor class 検索 The MongoDB\Driver\Cursor class (mongodb >=1.0.0) はじめに The MongoDB\Driver\Cursor class encapsula
... e client to read some results and then wait until more documents become available. These cursors are primarily used with » Capped Collections and » Change Streams . While normal cursors can be iterated once with foreach , that approach will not work wi ... tailable cursor in action, two scripts will be used: a "producer" and a "consumer". The producer script will create a new capped collection using the » create command and proceed to insert a new document into that collection each second. <?php $manage ... ew MongoDB\Driver\Manager ; $manager -> executeCommand ( 'test' , new MongoDB\Driver\Command ([ 'create' => 'asteroids' , 'capped' => true , 'size' => 1048576 , ])); while ( true ) { $bulkWrite = new MongoDB\Driver\BulkWrite ; $bulkWrite -> insert ([ ' ...
-
https://man.mtool.work/php/8.3/class.mongodb-driver-cursor.html
- The MongoDB\Driver\Cursor class 9889
- « MongoDB\Driver\ReadConcern::isDefault MongoDB\Driver\Cursor::__construct » PHP Manual MongoDB\Driver The MongoDB\Driver\Cursor class 検索 The MongoDB\Driver\Cursor class (mongodb >=1.0.0) はじめに The MongoDB\Driver\Cursor class encapsula
... e client to read some results and then wait until more documents become available. These cursors are primarily used with » Capped Collections and » Change Streams . While normal cursors can be iterated once with foreach , that approach will not work wi ... tailable cursor in action, two scripts will be used: a "producer" and a "consumer". The producer script will create a new capped collection using the » create command and proceed to insert a new document into that collection each second. <?php $manage ... ew MongoDB\Driver\Manager ; $manager -> executeCommand ( 'test' , new MongoDB\Driver\Command ([ 'create' => 'asteroids' , 'capped' => true , 'size' => 1048576 , ])); while ( true ) { $bulkWrite = new MongoDB\Driver\BulkWrite ; $bulkWrite -> insert ([ ' ...
-
https://man.mtool.work/php/8.3/class.mongodb-driver-cursor.html
- Create a new Query 6671
- « MongoDB\Driver\Query MongoDB\Driver\BulkWrite » PHP Manual MongoDB\Driver\Query Create a new Query 検索 MongoDB\Driver\Query::__construct (mongodb >=1.0.0) MongoDB\Driver\Query::__construct — Create a new Query 説明 final public function
... results. Falls back to the deprecated "$orderby" modifier if not specified. tailable bool Returns a tailable cursor for a capped collection. エラー / 例外 Throws MongoDB\Driver\Exception\InvalidArgumentException on argument parsing errors. 変更履歴 バ ...
-
https://man.mtool.work/php/8.3/mongodb-driver-query.construct.html
- Create a new Query 6671
- « MongoDB\Driver\Query MongoDB\Driver\BulkWrite » PHP Manual MongoDB\Driver\Query Create a new Query 検索 MongoDB\Driver\Query::__construct (mongodb >=1.0.0) MongoDB\Driver\Query::__construct — Create a new Query 説明 final public function
... results. Falls back to the deprecated "$orderby" modifier if not specified. tailable bool Returns a tailable cursor for a capped collection. エラー / 例外 Throws MongoDB\Driver\Exception\InvalidArgumentException on argument parsing errors. 変更履歴 バ ...
-
https://man.mtool.work/php/8.3/mongodb-driver-query.construct.html
PREV
1
NEXT