Jonas Platte
e8f4eebdbe
Make re-exports from other crates show up as such
...
… in `types` and sub-modules.
2021-02-27 01:22:22 -08:00
mareq
111265b5ab
doc: Add information on the required structure of the migration scripts
2021-02-27 01:06:17 -08:00
Austin Bonander
0ed524d65c
fix(pool): always ping connection on release to see if it's still viable
...
Signed-off-by: Austin Bonander <austin@launchbadge.com>
2021-02-27 00:56:08 -08:00
Austin Bonander
1a9e0d9a52
ban Ord::{min, max}
with Clippy as it's too easy to misread
...
It is *much* too easy to misread `x.min(y)` as "`x` should be *at least* `y`" when in fact it means the *exact* opposite, and same with `x.max(y)`. This has bitten us in the gluteus maximus a number of times both in SQLx and in private projects.
Signed-off-by: Austin Bonander <austin@launchbadge.com>
2021-02-05 13:30:35 -08: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
94d0baeb52
release: 0.5
2021-02-04 06:32:50 -08:00
Ryan Leckey
2fd26b5504
sqlite: remove support for u64
...
see https://github.com/launchbadge/sqlx/pull/919#discussion_r557106441
2021-02-04 06:17:17 -08:00
wuaoxiang
31abe22e34
fix(sqlite): GROUP BY in query! cause infinite loop at compile time
2021-01-31 16:58:48 -08:00
Jonas Platte
6fea00304e
Remove any::AnyType
...
It was not actually used in a meaningful way.
2021-01-31 16:56:37 -08:00
Jonas Platte
1b217cfac4
Make impl Acquire for &'_ Pool<DB> more general
2021-01-31 16:54:22 -08:00
Jonas Platte
77238108cf
Require Acquire::Connection to be Send
2021-01-31 16:54:22 -08:00
Ryan Leckey
df393128f8
style: rustfmt
2021-01-20 22:29:05 -08:00
Austin Bonander
89305873b0
fix(postgres): patch nullable inference in Postgres using EXPLAIN
...
BREAKING CHANGE: some columns in `query!()` et. al. output will change from `T` to `Option<T>`
breakage should be minimal in practice as
these columns will need to have been manually
overridden anyway to avoid runtime errors
Signed-off-by: Austin Bonander <austin@launchbadge.com>
2021-01-20 22:27:44 -08:00
Austin Bonander
5e452d9e86
fix(sqlite): remove errant println!()
in sqlite/explain.rs
2021-01-20 22:26:43 -08:00
Austin Bonander
7c32928ebc
feat(macros): implement query_scalar!()
and variants
...
Signed-off-by: Austin Bonander <austin@launchbadge.com>
2021-01-20 22:23:04 -08:00
Ryan Leckey
b0c430ed18
feat(sqlite): track nullable through left joins
2021-01-20 22:22:26 -08:00
Sho Nakatani
0c0dd6936a
feat: Adds Debug, Clone
auto-derive to SqliteArguments
2021-01-20 22:15:48 -08:00
William Hammond
25858fc42a
Improves error handling in the case of missing type
2021-01-20 22:10:03 -08:00
Ryan Leckey
e03c31adcd
Merge branch 'feature/inline-certificates' of https://github.com/alex-berger/sqlx into alex-berger-feature/inline-certificates
2021-01-20 22:08:26 -08:00
Florian Hübsch
68cf2f9cdb
Add constraint
method to DatabaseError
trait
...
Override `constraint` method for `PgDatabaseError`.
2021-01-20 22:00:44 -08:00
Ryan Leckey
d5e0f1b92b
refactor: rename DbOutcome to DbQueryResult
2021-01-20 21:57:26 -08:00
Jonas Platte
c5d43db312
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:50:45 -08:00
Ryan Leckey
de4a7decfb
fix(sqlite): i64 -> u64 in type docs
2021-01-20 21:50:45 -08:00
dignifiedquire
1d87b6cc8d
feat: implement unsigned int support for sqlite
2021-01-20 21:50:45 -08:00
Takeru Ohta
a6aef7817b
fix to read just 20 bytes for AuthSwitchRequest data
2021-01-20 21:50:44 -08:00
Jonas Platte
08a76f45ae
Rename DbDone to DbOutcome
2021-01-12 14:45:01 +01:00
Jonas Platte
a1d562f04b
Remove the Done trait
2021-01-12 14:37:44 +01:00
Jonas Platte
e2f7aa2eca
Restore support for sqlx(rename) on types, with a deprecation warning
2021-01-12 03:39:10 -08:00
Jonas Platte
fd8b2b7f8a
Rename sqlx(rename) attribute to sqlx(type_name)
2021-01-12 03:39:10 -08:00
Jonas Platte
74835bfe58
Allow chaining map / try_map on queries
...
To support `.map()` / `.try_map()` on `query!()` (and `query_as!()`).
2021-01-05 23:50:27 -08:00
Jonas Platte
9eca6413fe
Remove TryMapRow and MapRow
...
These traits were a workaround for a bug in rustc that an earlier
revision of the API triggered, but the API has since been changed.
2021-01-05 23:50:23 -08:00
Chloe Ross
2890d154a3
doc: use the fancy new intra-crate doc links everywhere
2021-01-04 18:39:03 -08:00
Austin Bonander
ef6c73c985
doc: add tables describing the right method to call on query!()
et al
...
Signed-off-by: Austin Bonander <austin@launchbadge.com>
2021-01-04 12:03:42 -08:00
up9cloud
e7eaed6220
remove unnecessary Fut
2021-01-04 09:31:47 -08:00
Austin Bonander
93ba3d59e7
fix(logging): make query logging obey level setting for sqlx::query
target
...
Signed-off-by: Austin Bonander <austin@launchbadge.com>
2020-12-29 15:28:06 -08:00
Kirill Bulatov
24c85d20d6
Add a way to disable query logging programmatically
2020-12-29 11:30:34 -08:00
Jakob Truelsen
9146929575
Do not attempt to reconnect on every Io error.
...
Io errors can describe a lot of things, when connecting to a database in general only
ECONNREFUSED can be hoped to be resolved by waiting. Other errors will require
user intervention
2020-12-25 19:36:54 -08:00
Jakob Truelsen
46f9f44d41
Do not call connect it a bussy loop on connection refused.
...
If the connection to the database is refused, it is not helpfull to hammer it with connection
attempts, instead we should wait a bit before connecting again. Here we start waiting 10ms,
doubling the wait time for every attempt before setteling out at 2s
2020-12-25 19:36:54 -08:00
Brandon
b8839c6d90
Convert to intra-crate links
2020-12-23 18:49:39 -08:00
Brandon
cbc1deb363
Fix broken link in Transaction docs
2020-12-23 18:49:39 -08:00
Jakob Truelsen
c7cf104a8f
Handle dropping wait_for_conn
...
If wait_for_conn is dropped before completing, release will call
wake on a waker that noone is listining on. This leads to a state where
waiting will gro indefinitly while all connections are idle.
To fix this we turn waiting into a queue of unique Weak pointers.
This way if wait_for_conn is dropped the pointer in waiting cannot
be upgraded, we can use this as a signal that we shoud wake the
next one instead.
2020-12-22 20:13:40 -08:00
Ryan Leckey
565d0a91a3
release: v0.4.2
2020-12-19 01:07:50 -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
e9e1dcf78e
style: rustfmt
2020-12-19 00:08:29 -08:00
Ryan Leckey
00d3211f03
add runtime-async-std-native-tls to docs.rs feature in sqlx-core
2020-12-18 23:30:29 -08:00
Ryan Leckey
405553cc43
Merge branch 'slumber-another-fix-for-decimals' of https://github.com/slumber/sqlx into slumber-slumber-another-fix-for-decimals
2020-12-18 23:23:06 -08:00
Mike Cronce
376ea3f596
sqlx-core/src/mysql/types/str.rs: + COLLATE_UTF8MB4_GENERAL_CI
2020-12-19 07:17:28 +00:00