pREST
Serve a RESTful API from any PostgreSQL database
Postgres version
- 9.4 or higher
Problem
There is PostgREST written in Haskell, but keeping Haskell software in production is not an easy job. With this need pREST was born. Read more.
Category: Golang / Database Drivers |
Watchers: 84 |
Star: 3.2k |
Fork: 234 |
Last update: May 13, 2022 |
Serve a RESTful API from any PostgreSQL database
There is PostgREST written in Haskell, but keeping Haskell software in production is not an easy job. With this need pREST was born. Read more.
Hello everyone
I use the MySQL database. I would like to restructure the pRest project to support other database adpaters in addition to Postgres.
I implemented the restructuring on a fork and will run all the tests as it appears in CONTRIBUTING.md.
After that, can I send the PRs for analysis? Basically they are used to change the direct calls of postegres for calls of the new interface Adapter.
This is my first contribution to open-source, so if you're doing something wrong, please excuse me and correct me.
Signed-off-by: Sarath [email protected]
pREST version (or commit ref): 4.0 pREST endpoint: PostgreSQL version: 10.3 Operating system: Windows 10 (client machine where I have pREST binary) Go version: none Log gist:
Am confused with the installation part and subsequently on how it is working. I have downloaded the binary file and set it with the prest.toml file as mentioned in snap:
Now when i execute the installed binary through cmd.exe, i get the following
Hoping that pREST is running, i tried http://127.0.0.1:8000/databases , http://127.0.0.1:8000/postgres/public/Mytable but am getting the below error
Kindly help as am new to this.
Thanks and Regards AJ
Support external tokens signed with RSA or ECDSA
(Making sure to call jwt.ParseRSAPublicKeyFromPEM() only at startup.)
Currently there are several aggregate (here called "group") functions implemented: https://docs.prestd.com/query-statements/#groupselect-functions-support https://www.postgresql.org/docs/13/functions-aggregate.html
However that is not the complete list of aggregate functions natively supported by postgres.
I would like to add count(columnName|*) here.
maybe one can explore whether some of the other functions are also worth implementing. But I would like to keep the focus on this issue on count(), because I actively need that currently, to do something like:
select column, count(column) from table group by column ;
to have a list of all unique values of "column" with their associated frequency.
Describe the bug Next cannot make a request to the prestd server (api), the request does not arrive at the prestd
We have some problem inside next that won't let the POST out to the prestd API
Access to fetch at 'http://127.0.0.1:3000/prest/public/example_table' from origin 'http://localhost:3001' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request.
To Reproduce Steps to reproduce the behavior:
http://127.0.0.1:3000/prest/public/example_table
- if you are not using the example database contained in the prestd-buildui project access a table from your databaseExpected behavior Should send request to the prestd api with post method to create the record
Desktop (please complete the following information):
main
branch//prest/public/example_table
ghcr.io/prest/prest:beta
14
Additional context:
it could be that the error is in the client prestd node, not in the next
Describe the bug Cannot update an array field(jsonb based).
To Reproduce Steps to reproduce the behavior:
xh PATCH --raw '{"filedA": ["a","b"]}' :6000/demo/public/movies id==27PNJ0q50AkPvNTaT8YXmhVvrNp
{
"error": "pq: invalid input syntax for type json"
}
Expected behavior
fieldA
should be updated with value ["a", "b"]
The fieldA
can be updated by program wrote by golang
Desktop (please complete the following information):
Additional context Add any other context about the problem here.
Hi,
I'm using plugin functionality and I want to return a different status code (such as 401 or 404) with specific message. The only response allowed is a string. I tried to create and throw an error, but it does not worked I got an 500 status code.
Is there any way to change the status code from the response in the plugin?
Thanks in advance!
I would like to be able to execute two update commands (separted by semicolon) in one transaction by using custom queries. For instance,
begin;
update bankaccount set balance = balance + 100;
update cashaccount set balance = balance - 100;
commit;
I've tried, but I'm always getting an error caused by prepared statements... Would be possible to completly disable prepared statements? Would Prestd be able to (or need to) understand I do have two commands?
ref: https://mui.com/components/breadcrumbs/
If I am inside the table page, it should show all the links I have passed through to get there, for example:
databases > schemes > current table
{selectionModel.length === 0 ? null : (
<Badge color="error" badgeContent={selectionModel.length}>
<Fab color="secondary" aria-label="remove" onClick={deleteRows}>
<RemoveIcon />
</Fab>
</Badge>
)}
https://github.com/prest/prestd-buildui/blob/c39b5a1b31d1c16f5b4f10baf233f7d9269d350d/src/pages/%5Bentity%5D/index.tsx#L97-L103