A fully RESTful API from any existing PostgreSQL database written in Rust
This project is highly inspired on pREST. Then 4 years later, highly inspired from a conversation. Now it’s out of the grave
-
HTTP GET
- Get all DATABASES
- Get all SCHEMAS
- Get all TABLES
- SELECT
/db/sch/tbl?_select=column
- select with all columns
*
- select with specific column
_select=column1,column2
- select with all columns
- WHERE
/db/sch/tbl?column=value
- filter with operators
column=$gt.100
- filter with json/jsonb columns
- filter with operators
- COUNT
/db/sch/tbl?_count=column
- count with all columns
*
- count with specific column
_count=column1,column2
- count with all columns
- ORDER BY
/db/sch/tbl?_order=column
- order by with asc
_order=column
default - order by with desc
_order=-column
- order by with multiple orders
_order=-column1,column2
- order by with asc
- GROUP BY
/db/sch/tbl?_select=column1,column2&_groupby=column1
- group by chunk code with columns
- group by with group functions support
SUM, AVG, MAX, MIN
- group by with having clause
_groupby=column1->>having:sum:column_name:$gt:500