Results of 1 - 3 of about 3 for capped (0.001 sec.)
- The MongoDB\Driver\Command class | PHP 8.3 10808
- The MongoDB\Driver\Command class (mongodb >=1.0.0) はじめに The MongoDB\Driver\Command class is a value object that represents a database command. To provide Command Helpers the MongoDB\Driver\Command object should be composed. クラス概要 f
... = 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 | PHP 8.3 10398
- The MongoDB\Driver\Cursor class (mongodb >=1.0.0) はじめに The MongoDB\Driver\Cursor class encapsulates the results of a MongoDB command or query and may be returned by MongoDB\Driver\Manager::executeCommand() or MongoDB\Driver\Manager::exe
... 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
- MongoDB\Driver\Query::__construct — Create a new Query | PHP 8.3 6678
- MongoDB\Driver\Query::__construct (mongodb >=1.0.0) MongoDB\Driver\Query::__construct — Create a new Query 説明 final public function MongoDB\Driver\Query::__construct ( array | object $filter , ? array $queryOptions = null ) Constructs a n
... 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