limit number of returned rows on link query by default to 100

This commit is contained in:
Ralf Becker 2020-12-07 14:30:52 +01:00
parent db29014538
commit ed657aa533

View File

@ -769,6 +769,11 @@ class Link extends Link\Storage
return $apps;
}
/**
* Default number of returned rows for Link::query()
*/
const DEFAULT_NUM_ROWS = 100;
/**
* Searches for a $pattern in the entries of $app
*
@ -790,6 +795,8 @@ class Link extends Link\Storage
echo "<p>Link::query('$app','$pattern') => '$method'</p>\n";
echo "Options: "; _debug_array($options);
}
// limit number of returned rows by default to 100, if no limit is set
if (!isset($options['num_rows'])) $options['num_rows'] = self::DEFAULT_NUM_ROWS;
$result = self::exec($method, array($pattern, &$options));