mirror of
https://github.com/launchbadge/sqlx
synced 2024-11-10 06:24:16 +00:00
prepare 0.5.12 release (#1800)
* prepare release 0.5.12 * chore: remove mentions of things happening in 0.6 except one mention that should still be happening in 0.6
This commit is contained in:
parent
6c7006c4cc
commit
2e026cae67
9 changed files with 106 additions and 22 deletions
84
CHANGELOG.md
84
CHANGELOG.md
|
@ -5,6 +5,75 @@ All notable changes to this project will be documented in this file.
|
|||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## 0.5.12 - 2022-04-13
|
||||
[27 pull requests][0.5.12-prs] were merged this release cycle.
|
||||
|
||||
### Added
|
||||
* [[#1641]]: Postgres: Convenient wrapper for advisory locks [[@abonander]]
|
||||
* [[#1675]]: Add function to undo migrations [[@jdrouet]]
|
||||
* [[#1722]]: Postgres: implement `PgHasArrayType` for `serde_json::{Value, RawValue}` [[@abreis]]
|
||||
* [[#1736]]: Derive `Clone` for `MySqlArguments` and `MssqlArguments` [[@0xdeafbeef]]
|
||||
* [[#1748]]: Derive `PgHasArrayType` for `#[sqlx(transparent)]` types [[@carols10cents]]
|
||||
* [[#1754]]: Include affected rows alongside returned rows in query logging [[@david-mcgillicuddy-moixa]]
|
||||
* [[#1757]]: Implement `Type` for `Cow<str>` for MySQL, MSSQL and SQLite [[@ipetkov]]
|
||||
* [[#1769]]: sqlx-cli: add `--source` to migration subcommands [[@pedromfedricci]]
|
||||
* [[#1774]]: Postgres: make `extra_float_digits` settable [[@abonander]]
|
||||
* Can be set to `None` for Postgres or third-party database servers that don't support the option.
|
||||
* [[#1776]]: Implement close-event notification for Pool [[@abonander]]
|
||||
* Also fixes `PgListener` preventing `Pool::close()` from resolving.
|
||||
* [[#1780]]: Implement query builder [[@crajcan]]
|
||||
* See also [[#1790]]: Document and expand query builder [[@abonander]]
|
||||
* [[#1781]]: Postgres: support `NUMERIC[]` using `decimal` feature [[@tm-drtina]]
|
||||
* [[#1784]]: SQLite: add `FromStr`, `Copy`, `PartialEq`, `Eq` impls for options enums [[@andrewwhitehead]]
|
||||
|
||||
### Changed
|
||||
* [[#1625]]: Update RustCrypto crates [[@paolobarbolini]]
|
||||
* [[#1725]]: Update `heck` to 0.4 [[@paolobarbolini]]
|
||||
* [[#1738]]: Update `regex` [[@Dylan-DPC]]
|
||||
* [[#1763]]: SQLite: update `libsqlite3-sys` [[@espindola]]
|
||||
|
||||
|
||||
### Fixed
|
||||
* [[#1719]]: Fix a link in `query!()` docs [[@vbmade2000]]
|
||||
* [[#1731]]: Postgres: fix option passing logic [[@liushuyu]]
|
||||
* [[#1735]]: sqlx-cli: pass `DATABASE_URL` to command spawned in `prepare` [[@LovecraftianHorror]]
|
||||
* [[#1741]]: Postgres: fix typo in `TSTZRANGE` [[@mgrachev]]
|
||||
* [[#1761]]: Fix link from `QueryAs` to `query_as()` in docs [[@mgrachev]]
|
||||
* [[#1786]]: MySQL: silence compile warnings for unused fields [[@andrewwhitehead]]
|
||||
* [[#1789]]: SQLite: fix left-joins breaking `query!()` macros [[@tyrelr]]
|
||||
* [[#1791]]: Postgres: fix newline parsing of `.pgpass` files [[@SebastienGllmt]]
|
||||
* [[#1799]]: `PoolConnection`: don't leak connection permit if drop task fails to run [[@abonander]]
|
||||
|
||||
[#1625]: https://github.com/launchbadge/sqlx/pull/1625
|
||||
[#1641]: https://github.com/launchbadge/sqlx/pull/1641
|
||||
[#1675]: https://github.com/launchbadge/sqlx/pull/1675
|
||||
[#1719]: https://github.com/launchbadge/sqlx/pull/1719
|
||||
[#1722]: https://github.com/launchbadge/sqlx/pull/1722
|
||||
[#1725]: https://github.com/launchbadge/sqlx/pull/1725
|
||||
[#1731]: https://github.com/launchbadge/sqlx/pull/1731
|
||||
[#1735]: https://github.com/launchbadge/sqlx/pull/1735
|
||||
[#1736]: https://github.com/launchbadge/sqlx/pull/1736
|
||||
[#1738]: https://github.com/launchbadge/sqlx/pull/1738
|
||||
[#1741]: https://github.com/launchbadge/sqlx/pull/1741
|
||||
[#1748]: https://github.com/launchbadge/sqlx/pull/1748
|
||||
[#1754]: https://github.com/launchbadge/sqlx/pull/1754
|
||||
[#1757]: https://github.com/launchbadge/sqlx/pull/1757
|
||||
[#1761]: https://github.com/launchbadge/sqlx/pull/1761
|
||||
[#1763]: https://github.com/launchbadge/sqlx/pull/1763
|
||||
[#1769]: https://github.com/launchbadge/sqlx/pull/1769
|
||||
[#1774]: https://github.com/launchbadge/sqlx/pull/1774
|
||||
[#1776]: https://github.com/launchbadge/sqlx/pull/1776
|
||||
[#1780]: https://github.com/launchbadge/sqlx/pull/1780
|
||||
[#1781]: https://github.com/launchbadge/sqlx/pull/1781
|
||||
[#1784]: https://github.com/launchbadge/sqlx/pull/1784
|
||||
[#1786]: https://github.com/launchbadge/sqlx/pull/1786
|
||||
[#1789]: https://github.com/launchbadge/sqlx/pull/1789
|
||||
[#1790]: https://github.com/launchbadge/sqlx/pull/1790
|
||||
[#1791]: https://github.com/launchbadge/sqlx/pull/1791
|
||||
[#1799]: https://github.com/launchbadge/sqlx/pull/1799
|
||||
|
||||
[0.5.12-prs]: https://github.com/launchbadge/sqlx/pulls?q=is%3Apr+is%3Amerged+merged%3A2022-02-19..2022-04-13
|
||||
|
||||
## 0.5.11 - 2022-02-17
|
||||
[20 pull requests][0.5.11-prs] were merged this release cycle.
|
||||
|
||||
|
@ -1179,3 +1248,18 @@ Fix docs.rs build by enabling a runtime feature in the docs.rs metadata in `Carg
|
|||
[@stoically]: https://github.com/stoically
|
||||
[@VersBinarii]: https://github.com/VersBinarii
|
||||
[@cemoktra]: https://github.com/cemoktra
|
||||
[@jdrouet]: https://github.com/jdrouet
|
||||
[@vbmade2000]: https://github.com/vbmade2000
|
||||
[@abreis]: https://github.com/abreis
|
||||
[@0xdeafbeef]: https://github.com/0xdeafbeef
|
||||
[@Dylan-DPC]: https://github.com/Dylan-DPC
|
||||
[@carols10cents]: https://github.com/carols10cents
|
||||
[@david-mcgillicuddy-moixa]: https://github.com/david-mcgillicuddy-moixa
|
||||
[@ipetkov]: https://github.com/ipetkov
|
||||
[@pedromfedricci]: https://github.com/pedromfedricci
|
||||
[@tm-drtina]: https://github.com/tm-drtina
|
||||
[@espindola]: https://github.com/espindola
|
||||
[@mgrachev]: https://github.com/mgrachev
|
||||
[@tyrelr]: https://github.com/tyrelr
|
||||
[@SebastienGllmt]: https://github.com/SebastienGllmt
|
||||
|
||||
|
|
10
Cargo.lock
generated
10
Cargo.lock
generated
|
@ -2343,7 +2343,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "sqlx"
|
||||
version = "0.5.11"
|
||||
version = "0.5.12"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-std",
|
||||
|
@ -2379,7 +2379,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "sqlx-cli"
|
||||
version = "0.5.11"
|
||||
version = "0.5.12"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
|
@ -2401,7 +2401,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "sqlx-core"
|
||||
version = "0.5.11"
|
||||
version = "0.5.12"
|
||||
dependencies = [
|
||||
"ahash",
|
||||
"atoi",
|
||||
|
@ -2542,7 +2542,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "sqlx-macros"
|
||||
version = "0.5.11"
|
||||
version = "0.5.12"
|
||||
dependencies = [
|
||||
"dotenv",
|
||||
"either",
|
||||
|
@ -2562,7 +2562,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "sqlx-rt"
|
||||
version = "0.5.11"
|
||||
version = "0.5.12"
|
||||
dependencies = [
|
||||
"actix-rt",
|
||||
"async-native-tls",
|
||||
|
|
|
@ -18,7 +18,7 @@ members = [
|
|||
|
||||
[package]
|
||||
name = "sqlx"
|
||||
version = "0.5.11"
|
||||
version = "0.5.12"
|
||||
license = "MIT OR Apache-2.0"
|
||||
readme = "README.md"
|
||||
repository = "https://github.com/launchbadge/sqlx"
|
||||
|
@ -132,8 +132,8 @@ bstr = ["sqlx-core/bstr"]
|
|||
git2 = ["sqlx-core/git2"]
|
||||
|
||||
[dependencies]
|
||||
sqlx-core = { version = "0.5.11", path = "sqlx-core", default-features = false }
|
||||
sqlx-macros = { version = "0.5.11", path = "sqlx-macros", default-features = false, optional = true }
|
||||
sqlx-core = { version = "0.5.12", path = "sqlx-core", default-features = false }
|
||||
sqlx-macros = { version = "0.5.12", path = "sqlx-macros", default-features = false, optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
anyhow = "1.0.52"
|
||||
|
|
8
FAQ.md
8
FAQ.md
|
@ -56,7 +56,7 @@ https://github.com/rustls/rustls/issues/893
|
|||
### How can I do a `SELECT ... WHERE foo IN (...)` query?
|
||||
|
||||
|
||||
In 0.6 SQLx will support binding arrays as a comma-separated list for every database,
|
||||
In the future SQLx will support binding arrays as a comma-separated list for every database,
|
||||
but unfortunately there's no general solution for that currently in SQLx itself.
|
||||
You would need to manually generate the query, at which point it
|
||||
cannot be used with the macros.
|
||||
|
@ -96,7 +96,7 @@ See also: [Postgres Manual, Section 9.24: Row and Array Comparisons](https://www
|
|||
-----
|
||||
### How can I bind an array to a `VALUES()` clause? How can I do bulk inserts?
|
||||
|
||||
Like the above, SQLx currently does not support this in the general case right now but will in 0.6.
|
||||
Like the above, SQLx currently does not support this in the general case right now but will in the future.
|
||||
|
||||
However, **Postgres** also has a feature to save the day here! You can pass an array to `UNNEST()` and
|
||||
it will treat it as a temporary table:
|
||||
|
@ -118,7 +118,7 @@ sqlx::query!(
|
|||
|
||||
```rust
|
||||
// this solution currently requires each column to be its own vector
|
||||
// in 0.6 we're aiming to allow binding iterators directly as arrays
|
||||
// in the future we're aiming to allow binding iterators directly as arrays
|
||||
// so you can take a vector of structs and bind iterators mapping to each field
|
||||
let foo_texts: Vec<String> = vec![/* ... */];
|
||||
let foo_bools: Vec<bool> = vec![/* ... */];
|
||||
|
@ -137,7 +137,7 @@ sqlx::query!(
|
|||
.await?;
|
||||
```
|
||||
|
||||
Again, even with comma-expanded lists in 0.6 this will likely still be the most performant way to run bulk inserts
|
||||
Again, even with comma-expanded lists in the future this will likely still be the most performant way to run bulk inserts
|
||||
with Postgres--at least until we get around to implementing an interface for `COPY FROM STDIN`, though
|
||||
this solution with `UNNEST()` will still be more flexible as you can use it in queries that are more complex
|
||||
than just inserting into a table.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "sqlx-cli"
|
||||
version = "0.5.11"
|
||||
version = "0.5.12"
|
||||
description = "Command-line utility for SQLx, the Rust SQL toolkit."
|
||||
edition = "2018"
|
||||
readme = "README.md"
|
||||
|
@ -27,7 +27,7 @@ path = "src/bin/cargo-sqlx.rs"
|
|||
[dependencies]
|
||||
dotenv = "0.15.0"
|
||||
tokio = { version = "1.15.0", features = ["macros", "rt", "rt-multi-thread"] }
|
||||
sqlx = { version = "0.5.11", path = "..", default-features = false, features = [
|
||||
sqlx = { version = "0.5.12", path = "..", default-features = false, features = [
|
||||
"migrate",
|
||||
"any",
|
||||
"offline",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "sqlx-core"
|
||||
version = "0.5.11"
|
||||
version = "0.5.12"
|
||||
repository = "https://github.com/launchbadge/sqlx"
|
||||
description = "Core of SQLx, the rust SQL toolkit. Not intended to be used directly."
|
||||
license = "MIT OR Apache-2.0"
|
||||
|
@ -103,7 +103,7 @@ offline = ["serde", "either/serde"]
|
|||
paste = "1.0.6"
|
||||
ahash = "0.7.6"
|
||||
atoi = "0.4.0"
|
||||
sqlx-rt = { path = "../sqlx-rt", version = "0.5.11"}
|
||||
sqlx-rt = { path = "../sqlx-rt", version = "0.5.12"}
|
||||
base64 = { version = "0.13.0", default-features = false, optional = true, features = ["std"] }
|
||||
bigdecimal_ = { version = "0.2.2", optional = true, package = "bigdecimal" }
|
||||
rust_decimal = { version = "1.19.0", optional = true }
|
||||
|
@ -173,5 +173,5 @@ hkdf = { version = "0.12.0", optional = true }
|
|||
event-listener = "2.5.2"
|
||||
|
||||
[dev-dependencies]
|
||||
sqlx = { version = "0.5.11", path = "..", features = ["postgres", "sqlite", "mysql"] }
|
||||
sqlx = { version = "0.5.12", path = "..", features = ["postgres", "sqlite", "mysql"] }
|
||||
tokio = { version = "1", features = ["rt"] }
|
||||
|
|
|
@ -123,7 +123,7 @@ impl<DB: Database> PoolConnection<DB> {
|
|||
// if an Executor future/stream is dropped during an `.await` call, the connection
|
||||
// is likely to be left in an inconsistent state, in which case it should not be
|
||||
// returned to the pool; also of course, if it was dropped due to an error
|
||||
// this is simply a band-aid as SQLx-next (0.6) connections should be able
|
||||
// this is simply a band-aid as SQLx-next connections should be able
|
||||
// to recover from cancellations
|
||||
if let Err(e) = floating.raw.ping().await {
|
||||
log::warn!(
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "sqlx-macros"
|
||||
version = "0.5.11"
|
||||
version = "0.5.12"
|
||||
repository = "https://github.com/launchbadge/sqlx"
|
||||
description = "Macros for SQLx, the rust SQL toolkit. Not intended to be used directly."
|
||||
license = "MIT OR Apache-2.0"
|
||||
|
@ -84,8 +84,8 @@ heck = { version = "0.4", features = ["unicode"] }
|
|||
either = "1.6.1"
|
||||
once_cell = "1.9.0"
|
||||
proc-macro2 = { version = "1.0.36", default-features = false }
|
||||
sqlx-core = { version = "0.5.11", default-features = false, path = "../sqlx-core" }
|
||||
sqlx-rt = { version = "0.5.11", default-features = false, path = "../sqlx-rt" }
|
||||
sqlx-core = { version = "0.5.12", default-features = false, path = "../sqlx-core" }
|
||||
sqlx-rt = { version = "0.5.12", default-features = false, path = "../sqlx-rt" }
|
||||
serde = { version = "1.0.132", features = ["derive"], optional = true }
|
||||
serde_json = { version = "1.0.73", optional = true }
|
||||
sha2 = { version = "0.10.0", optional = true }
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "sqlx-rt"
|
||||
version = "0.5.11"
|
||||
version = "0.5.12"
|
||||
repository = "https://github.com/launchbadge/sqlx"
|
||||
license = "MIT OR Apache-2.0"
|
||||
description = "Runtime abstraction used by SQLx, the Rust SQL toolkit. Not intended to be used directly."
|
||||
|
|
Loading…
Reference in a new issue