postgrest-rs
PostgREST client-side library 🦀. This library provides an ORM interface to PostgREST.
Usage
Add this to your Cargo.toml:
[]
= "1.0"
Simple example:
use Postgrest;
let client = new;
let resp = client
.from
.select
.execute
.await?;
let body = resp
.text
.await?;
Using filters:
let resp = client
.from
.eq
.gte
.select
.execute
.await?;
Updating a table:
let resp = client
.from
.eq
.update
.execute
.await?;
Executing stored procedures:
let resp = client
.rpc
.execute
.await?;
Not enough filters:
let resp = client
.from
.eq // You can filter for equality...
.gt
.lt
.gte
.lte
.like // ...do pattern matching...
.ilike
.is
.in_
.neq
.fts // ...do full text search...
.plfts
.phfts
.wfts
.cs
.cd
.ov
.sl // ...and range operations!
.sr // Find out more about the filters at:
.nxl // https://postgrest.org/en/stable/api.html#operators
.nxr
.adj
.select
.execute
.await?;
Check out the API docs for more info!
Contributing
Contributions are welcome! There might be some features you want in, or some unclear documentation, or a bug—either way, feel free to create an issue, and we'll work it out!
Boring stuff below.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as below, without any additional terms or conditions.
License
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT)
at your option.