APIv4 - Fix setting offset with no limit
authorColeman Watts <coleman@civicrm.org>
Mon, 13 Apr 2020 02:34:32 +0000 (22:34 -0400)
committerColeman Watts <coleman@civicrm.org>
Mon, 13 Apr 2020 02:34:38 +0000 (22:34 -0400)
commitf8bf8e26df5ffb21ef99346cf7efda3d848cff0e
treea3e133a7317ebdc77d207f46825ffda8f3e0e447
parent3d06904f6cd94036982bf67219e3993cc3392430
APIv4 - Fix setting offset with no limit

The API treats 0 as "no limit" but mysql does not.
This allows setting an offset with no limit but applying the maximum possible row count, as mysql does not allow LIMIT NULL.
See https://stackoverflow.com/questions/255517/mysql-offset-infinite-rows
Civi/Api4/Query/Api4SelectQuery.php
tests/phpunit/api/v4/Action/ContactGetTest.php