peej/php-rest-sql — pull request #6 by bengro (2014-04-19 14:32:32+00:00)
Title: Enhancements and issues fixed

I extended the functionality the current version of php-rest-sql by the following:
* Paging: when tables consist of thousands of rows, it makes sense to use paging to avoid massive responses. By using the GET parameters page and per_page, the data can be retrieved with paging. per_page can be additionally set in the config file. When these parameters are not set, the preset value in config is used.
* Sorting / searching: The table content can now be searched and sorted using GET parameters. E.g. /table?orderby=col1&col1=<1 retrieves all rows for which col1 < 1 ordered by col1 ASC. The supported operators are <, >, =, ~ (LIKE). When there are multiple search criteria, they are concatenated with AND.

In order to facilitate the above enhancements I had to restructure the code dealing with GET method, and add a url parser which parses the URL and returns the comprised directories and GET parameters.

The new features only work with the MySQL adapter; as I cannot do not know / test Postgres and MSSQL. Yet, I made sure the new code does not break the other adapters - the simply do support the new features.

This enhancement resolves issues:
https://github.com/peej/php-rest-sql/issues/1
https://github.com/peej/php-rest-sql/issues/4

I deliberately did not touch the other HTTP methods (POST, PUT, DELETE), or the rendering of the content.