CollectionRemove::limit
PHP function
Edit on GitHub ✎
Limit number of documents to remove
Description
mysql_xdevapi\CollectionRemove::limit(int $rows): mysql_xdevapi\CollectionRemove
Sets the maximum number of documents to remove.
Func
Parameters
rowsThe maximum number of documents to remove.
Return Values
Returns a CollectionRemove object that can be used to execute the command, or to add additional operations.
Examples
mysql_xdevapi\CollectionRemove::limit() example
php
<?php
$res = $coll->remove('job in (\'Barista\', \'Programmatore\', \'Ballerino\', \'Programmatrice\')')->limit(5)->sort(['age desc', 'name asc'])->execute();
?>