* implement for &serde_json::RawValue
* sqlx::types::Json<T> is a common type that all JSON-compatible databases can implement for,
postgres implements Json<T> as JSONB
* sqlx::postgres::types::PgJson<T> resolves to JSON
* sqlx::postgres::types::PgJsonB<T> resolves to JSONB
This introduces two new wrapper types `Json` and `Jsonb`, currently
exported by `sqlx::postgres::{Json, Jsonb}` and adds serde and
serde_json as optional dependencies, under the feature flag `json`.
Wrapping types in `Json[b]` that implement `serde::Deserialize` and
`serde::Serialize` allows them to be decoded and encoded respectivly.
This changeset introduces an interface for using PostgreSQL's LISTEN
functionality from within sqlx.
The listen interface is implemented over the PgConnection, PgPool & the
PgPoolConnection types for ease of use. In the case of PgPool, a new
connection is acquired, and is then used for LISTEN functionality.
Closes#87
- Remove `hex` from root `Cargo.toml`
- Make `hmac` crate optional
- Clean up checking mechanisms for "SCRAM-SHA-256"
- Use `str::from_utf8` instead of `String::from_utf8_lossyf
- Update `Sasl*Response` structs be tuple structs
- Factor out `len` in `SaslInitialResponse.encode()`
- Use `protocol_err` instead of `expect` when constructing `Hmacf
instances
- Remove `it_connects_to_database_user` test as it was too fragile
- Move `sasl_auth` function into `postgres/connection` as it more
related to `Connection` rather than `protocl`
- Return an error when decoding base64 salt rather than panicing
in `Authentication::SaslContinue`