Commit graph

298 commits

Author SHA1 Message Date
Utkarsh Gupta
003878698e
chore(sqlx-postgres): replace dirs with home & etcetera (#2485) 2023-05-04 13:12:54 -07:00
Austin Bonander
aa6c6d9752 fix(docs): update README for 0.7.0, note alpha cycle 2023-03-16 17:03:14 -07:00
Coda Hale
bce16a5c1d fix: drop old time 0.1.44 dep
chrono 0.4's default features include the `oldtime` feature which pulls in time 0.1.44.
This is an unmaintained version with soundness issues (time-rs/time#293) and is rarely needed.
If downstream users require this dependency, they can enable the feature themselves.
2023-03-14 18:07:52 -07:00
Sergei Ivankov
21c2660062 Disable rustls crate logging feature by default 2023-03-01 19:17:35 -08:00
Craig Bester
96c8b12485 feat(prepare): move to one-file-per-query for offline mode
Co-authored-by: Jonas Platte <jonas@lumeo.com>
2023-03-01 19:17:21 -08:00
Paolo Barbolini
c17c59fc4c Update dependencies 2023-02-22 15:49:46 -08:00
Austin Bonander
eade49cfb0
0.7.0-alpha.1 release 2023-02-21 14:56:54 -08:00
Anthony Dodd
3440440564 Set whoami default-features to false (#2319)
* Fixed typo. (#2156)

* Set whoami default-features to false

Otherwise, whoami pulls in web-sys, wasm-bindgen and a BUNCH of
additional dependencies. This is really unnecessary, and if
someone has an actual use case where they are attempting to connect
to postgres from a browser, well ... they've probably already been
pwned by now. If it is deemed necessary, then add an additional
activation feature for that specific slew of deps.

---------

Co-authored-by: Chris Foster <cdbfoster@gmail.com>
2023-02-21 13:25:25 -08:00
Trangar
ad8ef8d608 Added regexp support in sqlite (#2189)
* CHANGELOG: mention that users should upgrade CLI

* Added regexp support in sqlite

* Added a with_regexp function to sqliteconnectoptions

* Fixed tests

* Undo CHANGELOG.md change

---------

Co-authored-by: Austin Bonander <austin.bonander@gmail.com>
Co-authored-by: Victor Koenders <victor.koenders@qrtech.se>
2023-02-21 13:25:25 -08:00
CosmicHorror
acaee75a30 Initial work to switch to tracing (#2185)
* Add tracing dep

* Switch over basic events

* Switch over dynamically enabled events

* Fix missing SocketAddr formatting

* More format fixing

* refactor: Apply tracing changes to new crate structure
2023-02-21 13:25:25 -08:00
Austin Bonander
b5312c3b6f Break drivers out into separate crates, clean up some technical debt (#2039)
* WIP rt refactors

* refactor: break drivers out into separate crates

also cleans up significant technical debt
2023-02-21 13:25:25 -08:00
Pekka Enberg
d23be3bfa8 Update libsqlite3-sys to 0.25.1 (#2094) 2023-02-21 13:25:25 -08:00
Austin Bonander
b6cddcd014
prepare 0.6.2 release (#2092) 2022-09-14 15:23:06 -07:00
stoically
26f60d9525
chore: Switch to sha1 crate (#2056) 2022-08-16 17:51:29 -07:00
Austin Bonander
ad594ce5cb
Add FAQ and discussions links 2022-08-15 17:36:53 -07:00
Austin Bonander
cb52c7c62b chore: prep 0.6.1 release 2022-08-02 19:16:32 -07:00
Austin Bonander
054f61980a
feat: implement testing utilities (#2001) 2022-08-02 14:38:12 -07:00
Rob Ede
7adbb7fefc
refactor: remove direct actix-rt support (#1679)
actix- runtime feature flags are now aliases for tokio- flags
2022-08-01 21:48:40 -07:00
Austin Bonander
a2eceec33b
chore: replace dotenv with dotenvy (#2003)
* chore: replace `dotenv` with `dotenvy`

The former appears to be unmaintained and the latter is a drop-in replacement.

* chore: fix all warnings
2022-07-28 14:33:44 -07:00
Marco Neumann
05d64fb722
fix: agree one a single default runtime for the whole workspace (#1988)
This fixes `cargo check --workspace` and rust-analyzer.

Also see <https://github.com/launchbadge/sqlx/discussions/1956>.
2022-07-28 13:15:40 -07:00
Joey McKenzie
d6c4eff81a
Add example with external query files (#1967)
* feat(examples): add files example for postgres

* fix(examples): add missing deps
2022-07-13 14:45:34 -07:00
Austin Bonander
6de3e09816
fix(postgres): don't panic if S or V Notice fields are not UTF-8 (#1968)
* fix(postgres): don't panic if `S` or `V` Notice fields are not UTF-8

* fix: run `cargo update` to rotate cache key

for some reason there's some bad compiler artifacts cached
2022-07-12 17:23:13 -07:00
LovecraftianHorror
2c67e2a29e
Try avoiding a full clean in cargo sqlx prepare --merged (#1802)
* refactor(sqlx-cli): Try avoiding a full clean with `--merged`

* docs(sqlx-cli): Sprinkle some comments on the metadata changes

* refactor(sqlx-cli): Make the new recompiltion setup unit-testable

* fix(sqlx-cli): Only pass in `$RUSTFLAGS` when set when using `--merged`

* refactor(sqlx-cli): `cargo clean -p` works by name so rip out pkgid code

* chore(sqlx-cli): Remove unused imports
2022-07-12 14:29:41 -07:00
Austin Bonander
326964d717
benches: add sqlite_fetch_all benchmark
adapted code from https://github.com/launchbadge/sqlx/issues/266#issuecomment-921722399
2022-06-23 17:20:27 -07:00
Austin Bonander
17cebde64a
preparing 0.6.0 release (#1911)
* preparing 0.6.0 release

* run `cargo update` (not `upgrade`)
2022-06-16 15:53:09 -07:00
Austin Bonander
1f91724927
feat(cli): add --connect-timeout (#1889) 2022-06-08 15:48:04 -07:00
Dirkjan Ochtman
fa5c436918
Update crc to 3 (#1831) 2022-05-02 12:44:16 -07:00
Paolo Barbolini
ec15f6b30c
Update uuid crate to v1 (#1821) 2022-04-20 12:48:29 -07:00
Paolo Barbolini
b934f82440
Bump remanining dependencies (#1807)
Co-authored-by: Austin Bonander <austin@launchbadge.com>
2022-04-15 14:34:48 -07:00
Valentin
c7478dcc66
Update BigDecimal dependency (#1529)
* Update BigDecimal dependency

* rebase onto master

Co-authored-by: Austin Bonander <austin@launchbadge.com>
2022-04-14 16:12:15 -07:00
Atkins
17760d0f83
Move server_version_num from trait to impl (#1384)
* refactor(core): move `fn server_version_num` from `trait PgConnectionInfo` to impl

Signed-off-by: Atkins Chang <atkinschang@gmail.com>

* fix rebase issues

Co-authored-by: Austin Bonander <austin@launchbadge.com>
2022-04-14 16:02:08 -07:00
Paolo Barbolini
17fde443be
Bump ipnetwork to 0.19 (#1426)
* Bump ipnetwork to 0.18

* Bump ipnetwork to 0.19
2022-04-14 15:11:58 -07:00
Paolo Barbolini
ba123e62fa
Update time to 0.3.2 (#1455)
Co-authored-by: Tyler Hill <tyhi@tyhi.rs>
2022-04-14 15:11:46 -07:00
Paolo Barbolini
08296a28a0
Upgrade rustls to 0.20 (#1505)
* Upgrade rustls to 0.20

* Rustls 0.20.1 is out

* Fix merge conflict mistake

* Bump rustls-pemfile to 0.3

* Resync Cargo.lock

* Bump rustls-pemfile to v1

Co-authored-by: Austin Bonander <austin@launchbadge.com>
2022-04-14 15:11:17 -07:00
Austin Bonander
2e026cae67
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
2022-04-14 14:21:15 -07:00
Paolo Barbolini
ccbbe102b2
Update RustCrypto crates (#1625)
* Update RustCrypto crates

* rsa bump

* rsa dump

* rsa bump

* Bump rsa to 0.6.0-pre crates.io release

* Bump hkdf

* Resync Cargo.lock

* Bump rsa to 0.6.0
2022-04-11 11:24:09 -07:00
Austin Bonander
f1c635d739
feat(pool): implement close-event notification (#1776)
fix(postgres): integrate pool close-event into `PgListener`

closes #1764
2022-04-05 16:17:35 -07:00
Rafael Ávila de Espíndola
d3093d0b70
Update libsqlite3-sys (#1763) 2022-03-28 15:04:49 -07:00
Austin Bonander
e1817f0a9d
feat: convenient wrapper for Postgres advisory locks (#1641) 2022-03-24 17:38:24 -07:00
Paolo Barbolini
5b85a034da
Update heck to 0.4 (#1725) 2022-02-28 15:51:50 -08:00
Austin Bonander
eaf41fd092
prepare 0.5.11 release (#1715) 2022-02-18 13:49:06 -08:00
05storm26
8bccd53346
Allow converting AnyConnectOptions to a specific ConnectOptions (#1610) 2022-02-17 14:57:48 -08:00
stoically
45854a4246
docs: Acquire examples and alternative (#1687) 2022-02-17 14:55:38 -08:00
Marcin Puc
313cc69988
Simplify cargo-sqlx cmdline definition (#1626)
* Simplify cargo-sqlx cmdline definition

* Add note about the parser definition for cargo-sqlx

* Fix formatting
2022-02-15 20:13:42 -08:00
Paolo Barbolini
bcb2d8e604
Remove unused dependencies (#1605) 2022-01-03 16:56:01 -08:00
Austin Bonander
fdbfc5dfc3
Prepare 0.5.10 release (#1603)
* fix(cli): change new `rustls` and `native-tls` features to use correct runtime feature

* chore: upgrade SQLx crates to 0.5.10, upgrade all dependencies to latest versions

chore(cli): upgraded `clap` to `3.0.0-rc.9`

* fix(tests/sqlite): ignore `issue_1467()` as spuriously failing

I'm well aware of the principle that a spuriously failing test is a failing test, but even though I have it outputting the seed used with a reproducible PRNG, I can't reproduce the failures locally, so 🤷.

* chore: add CHANGELOG entry for 0.5.10
2021-12-29 17:25:49 -08:00
Austin Bonander
63ca2ccc6c
refactor(sqlite): make background thread responsible for all FFI calls (#1551) 2021-12-29 15:23:02 -08:00
Paolo Barbolini
fca866d0bc
Update itoa and dirs (#1601) 2021-12-29 11:56:58 -08:00
Paolo Barbolini
ce572bcee4
Update rsa crate to 0.5 (#1572)
* Update rsa crate to 0.5

* Don't do pem decoding ourselves
2021-12-20 17:58:37 -08:00
David Yamnitsky
8299687878
bump libsqlite3-sys to 0.23.1 (#1535) 2021-11-12 14:37:19 -08:00
Austin Bonander
9abe9b3ac5
prepare 0.5.9 hotfix release (#1469) 2021-10-01 15:52:52 -07:00
Austin Bonander
1b5dd6514b
preparing 0.5.8 release (#1466)
* preparing 0.5.8 release

* fix warnings before release
2021-10-01 14:45:25 -07:00
Paolo Barbolini
c2e04a1f3c
Upgrade hmac to 0.11 (#1443) 2021-09-23 12:05:31 -07:00
Austin Bonander
8b30f3059b
Fix a panic in the worker thread when dropping the connection while SqliteRows still exist (#1450)
* chore(sqlite): add repro for #1419

* fix(sqlite): hold a reference to the connection in `SqliteRow`

fixes #1419
2021-09-22 16:55:22 -07:00
Paolo Barbolini
efd08cc4b3
Reduce futures-util features (#1427)
* Reduce futures-util features

* Remove unused futures crate from sqlx-macros
2021-09-08 12:36:05 -07:00
David James
ad81e35f28
Use promptly instead of dialoguer (#1410)
See #1409

Co-authored-by: David James <davidcjames@gmail.com>
2021-08-30 14:10:53 -07:00
Austin Bonander
3749e0ea37
chore: prepare 0.5.7 (hotfix) release (#1394) 2021-08-20 17:14:42 -07:00
Austin Bonander
6bb1c716bd
preparing 0.5.6 release (#1382)
* fix(pool): reenable connection reaper

* fix warnings

* chore: bump published crates to 0.5.6

* chore: update CHANGELOG.md for 0.5.6
2021-08-17 12:44:24 -07:00
Austin Bonander
38435ca647
fix(cli): pin clap_derive version (#1381)
When `clap_derive 3.0.0-beta.4` released, new invocations of `cargo install sqlx-cli` would try to compile that against `clap 3.0.0-beta.2` which caused some breakages.

Until `clap 3.0.0` proper is released, we need to pin both versions to insure against potential breakages from automatic upgrades.

closes #1378
2021-08-16 16:51:31 -07:00
Rafael Epplée
e77219f7c7
Add docs for fetch_all, example for postgres transactions (#1255)
* reference fetch_all() in query macros

* add example for using transactions in postgres
2021-08-16 16:33:42 -07:00
Atkins
55c603e9e7
build(deps): bump git2 from 0.13.19 to 0.13.20 (#1362)
Signed-off-by: Atkins Chang <atkinschang@gmail.com>
2021-08-07 01:48:10 -07:00
Austin Bonander
531740550f
fix(pool): reimplement pool internals with futures-intrusive (#1320) 2021-07-21 16:28:44 -07:00
nomick
be189bd11e
Support MACADDR in Postgres (#1329) 2021-07-19 16:55:53 -07:00
Akhil Velagapudi
0abbcc510f
Update crc 1.8.1 -> 2.0.0 (#1256) 2021-07-16 15:25:32 -07:00
Ryan Leckey
694a2ac478 release: v0.5.5 2021-05-24 09:34:34 -07:00
Ryan Leckey
5d9c292132 release: v0.5.4 2021-05-22 16:38:54 -07:00
Eamon Caton
b391d4878e Revert webpki version bump to keep compatability with tokio-rustls feature 2021-05-22 11:03:01 -07:00
Ryan Leckey
13f7c7124a release: v0.5.3 2021-05-21 17:27:15 -07:00
Ryan Leckey
f7775f7fde release: 0.5.2 2021-04-15 18:40:46 -07:00
Ryan Leckey
633a662752 chore: update dependencies 2021-04-09 00:31:07 -07:00
Ryan Leckey
98cd619157 style: rustfmt 2021-04-09 00:24:14 -07:00
Ryan Leckey
cbe820760f
release: 0.5.1 2021-02-04 09:16:11 -08:00
Ryan Leckey
efccd6c9b8
chore: update sqlx-rt to 0.3 2021-02-04 09:15:00 -08:00
Ryan Leckey
d07ab853ba
chore: update lockfile 2021-02-04 06:33:54 -08:00
Ryan Leckey
a23013e9e5
chore: update lockfile 2021-02-04 05:54:20 -08:00
Rob Ede
1803020650 update lockfile 2021-02-04 04:51:22 -08:00
Rob Ede
e197d5b0e2 rt: update to actix-rt v2 2021-02-04 04:51:22 -08:00
Jonas Platte
9f8f0650c0 rt: Disable macros in actix and tokio runtimes 2021-01-20 21:49:46 -08:00
Jonas Platte
3a8c89babf Upgrade actix-rt to 2.0.0-beta.2 2021-01-20 21:49:46 -08:00
Jonas Platte
cdafc8ae17 Upgrade async runtime dependencies
Co-authored-by: Josh Toft <joshtoft@gmail.com>
Co-authored-by: Philip A Reimer <antreimer@gmail.com>
2021-01-20 21:49:46 -08:00
Jonas Platte
0758ffd10e Remove cargo_metadata dependency
It was not pulling its weight.

Just look at that Cargo.lock diff!
2021-01-13 23:05:56 -08:00
Jonas Platte
5d564167ca sqlx-macros: Replace lazy_static by once_cell 2021-01-13 23:05:56 -08:00
Ryan Leckey
565d0a91a3
release: v0.4.2 2020-12-19 01:07:50 -08:00
Ryan Leckey
46d30d2b5c
fix: rollback another update for async-rustls 2020-12-19 00:41:43 -08:00
Ryan Leckey
2d3b9e4909
fix: rollback (another) update to rustls 2020-12-19 00:37:45 -08:00
Ryan Leckey
7bbf89c301
fix: rollback a couple package updates (forgot to check tokio) 2020-12-19 00:34:10 -08:00
Ryan Leckey
c410f88bcd
chore: update several dependencies 2020-12-19 00:26:06 -08:00
Ryan Leckey
4cf1f304f9
chore: update lockfile 2020-12-19 00:08:39 -08:00
Ryan Leckey
c24460d906
chore: update lockfile 2020-12-18 21:58:12 -08:00
Ryan Leckey
107d0ff870
Merge branch 'joshtriplett-types' 2020-12-18 21:57:48 -08:00
Ryan Leckey
716517a84f
chore: add bstr and git2 to "all-types" feature 2020-12-18 21:56:12 -08:00
Matt Paul
b070aae909
Write test 2020-12-18 21:33:53 -08:00
Matt Paul
9cdbab2d1c
Implement TodoRepo trait 2020-12-18 21:33:52 -08:00
Matt Paul
012d72464e
Make mockable-todos example compile 2020-12-18 21:33:52 -08:00
Ryan Leckey
214d5db494
chore: update lockfile 2020-12-18 21:33:51 -08:00
Joe Grund
21661c2c9c
Support workspaces for offline feature
This patch enables having a top-level `sqlx-data.json` file within a
workspace.

It does this by using a full clean / check instead of `cargo rustc`
which fails on a workspace.

A `--merged` flag is introduced to switch to the workspace behavior

Fixes #353.

Signed-off-by: Joe Grund <jgrund@whamcloud.io>
2020-12-18 21:33:29 -08:00
Matt Paul
0b45dd9e3f Write test 2020-12-19 05:31:21 +00:00
Matt Paul
a5cede500e Implement TodoRepo trait 2020-12-19 05:31:21 +00:00
Matt Paul
6f363cf4ea Make mockable-todos example compile 2020-12-19 05:31:21 +00:00
Ryan Leckey
5e263b2f7a
chore: update lockfile 2020-12-18 21:26:21 -08:00