|
|
@ -58,18 +58,22 @@ Powered by popular node packages : ([express](https://github.com/expressjs/expre |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Features |
|
|
|
# Features |
|
|
|
* Generates API for **ANY** MySql database |
|
|
|
* Rest API Usual Suspects |
|
|
|
* Serves APIs irrespective of naming conventions of primary keys, foreign keys, tables etc |
|
|
|
* CRUD, List, Count, Exists |
|
|
|
* CRUD : Usual suspects |
|
|
|
|
|
|
|
* Relations |
|
|
|
* Relations |
|
|
|
* Support for composite primary keys |
|
|
|
|
|
|
|
* Pagination |
|
|
|
* Pagination |
|
|
|
* Sorting |
|
|
|
* Sorting |
|
|
|
|
|
|
|
* Xmysql Rest API - Start of cool things |
|
|
|
|
|
|
|
* Generates API for **ANY** MySql database |
|
|
|
|
|
|
|
* Serves APIs irrespective of naming conventions of primary keys, foreign keys, tables etc |
|
|
|
|
|
|
|
* Support for composite primary keys |
|
|
|
* Column filtering - Fields |
|
|
|
* Column filtering - Fields |
|
|
|
* Row filtering - Where |
|
|
|
* Row filtering - Where |
|
|
|
* Group By, Having (as query params) |
|
|
|
* Group By, Having (as query params) |
|
|
|
* Group By, Having (as a separate route) |
|
|
|
* Group By, Having (as a separate route) |
|
|
|
* Aggregate functions |
|
|
|
* Aggregate functions |
|
|
|
|
|
|
|
* Union of many group by statements [ AWESOME ALERT ] |
|
|
|
|
|
|
|
* Prototyping (features available with only local MySql server) |
|
|
|
* Run dynamic queries |
|
|
|
* Run dynamic queries |
|
|
|
* Upload single file |
|
|
|
* Upload single file |
|
|
|
* Upload multiple files |
|
|
|
* Upload multiple files |
|
|
@ -98,13 +102,19 @@ Root URL (localhost:3000/) returns all REST API urls for each table in schema. |
|
|
|
* GET /api/tableName/findOne |
|
|
|
* GET /api/tableName/findOne |
|
|
|
* GET /api/tableName/count |
|
|
|
* GET /api/tableName/count |
|
|
|
* GET /api/tableName/:id/exists |
|
|
|
* GET /api/tableName/:id/exists |
|
|
|
* GET /api/tableName/groupby |
|
|
|
|
|
|
|
* GET /api/tableName/aggregate |
|
|
|
|
|
|
|
* GET /api/parentTable/:id/childTable |
|
|
|
* GET /api/parentTable/:id/childTable |
|
|
|
* DELETE /api/tableName/:id |
|
|
|
* DELETE /api/tableName/:id |
|
|
|
* POST /dynamic |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Other APIS |
|
|
|
## Cool features |
|
|
|
|
|
|
|
* GET /api/tableName/groupby |
|
|
|
|
|
|
|
* GET /api/tableName/aggregate |
|
|
|
|
|
|
|
* GET /api/tableName/groups |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Only in Prototyping |
|
|
|
|
|
|
|
* POST /dynamic |
|
|
|
|
|
|
|
* GET /upload |
|
|
|
|
|
|
|
* GET /uploads |
|
|
|
|
|
|
|
* GET /download |
|
|
|
* GET /api/tableName/describe |
|
|
|
* GET /api/tableName/describe |
|
|
|
* GET /api/tables |
|
|
|
* GET /api/tables |
|
|
|
|
|
|
|
|
|
|
@ -295,7 +305,7 @@ eg: SELECT country,city,count(*) FROM offices GROUP BY country,city ORDER BY cit |
|
|
|
eg: SELECT country,city,count(*) FROM offices GROUP BY country,city ORDER BY city ASC, country DESC |
|
|
|
eg: SELECT country,city,count(*) FROM offices GROUP BY country,city ORDER BY city ASC, country DESC |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Aggregate functions :jack_o_lantern: :sunglasses: |
|
|
|
## Aggregate functions |
|
|
|
|
|
|
|
|
|
|
|
``` |
|
|
|
``` |
|
|
|
http://localhost:3000/api/payments/aggregate?_fields=amount |
|
|
|
http://localhost:3000/api/payments/aggregate?_fields=amount |
|
|
@ -339,6 +349,21 @@ response body |
|
|
|
|
|
|
|
|
|
|
|
eg: retrieves numeric aggregate can be done for multiple columns too |
|
|
|
eg: retrieves numeric aggregate can be done for multiple columns too |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Union of many group by statements |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Group by multiple columns in one API call using _fields query params |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
``` |
|
|
|
|
|
|
|
http://localhost:3000/api/offices/ugroupby?_fields=country,city,state |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
response body |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
"country":[{"Australia":1},{"France":1},{"Japan":1},{"UK":1},{"USA":3}], |
|
|
|
|
|
|
|
"state":[{"":3},{"CA":1},{"Chiyoda-Ku":1},{"MA":1},{"NY":1}] |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Run dynamic queries |
|
|
|
## Run dynamic queries |
|
|
|