Josh Triplett
62e58f5b1c
Support the sqlite locking_mode pragma
...
This allows applications that never use a sqlite database concurrently
to avoid using shared memory for the write-ahead log.
2021-04-08 23:52:34 -07:00
Evgeny Nosov
e4dd1c3a1d
Ignore reversing migrations in migrate! macro
2021-04-08 23:50:39 -07:00
Evgeny Nosov
8b866bb23d
Fix migrate! macro
2021-04-08 23:50:39 -07:00
Evgeny Nosov
85ff651ba1
Add ignore_missing parameter
2021-04-08 23:50:39 -07:00
Evgeny Nosov
8950332ca3
Rewrite migration algorithm in order to apply also unapplied migrations
2021-04-08 23:50:39 -07:00
Tom Dohrmann
7463cdaf45
rename test to tests
...
Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com>
2021-04-08 23:47:35 -07:00
Tom Dohrmann
47253d5d20
move pgpass functions into seperate submodule
2021-04-08 23:47:35 -07:00
Tom Dohrmann
88ee528f24
prefer PGPASSFILE over default paths
2021-04-08 23:47:35 -07:00
Tom Dohrmann
ea7cc78445
move tests into submodule
2021-04-08 23:47:35 -07:00
Tom Dohrmann
4c28cd5c50
fix test
2021-04-08 23:47:35 -07:00
Tom Dohrmann
ac4a9c3c1d
run cargo fmt
2021-04-08 23:47:35 -07:00
Tom Dohrmann
9ccf030248
add support for pgpass files
2021-04-08 23:47:35 -07:00
Austin Bonander
5295ff10a5
fix: pool internals improvements
...
* fix `DecrementSizeGuard::drop()` only waking one `Waiter` regardless of whether that waiter was already woken
* fix connect-backoff loop giving up the size guard
* don't cut in line to open a new connection
* have tasks waiting on `acquire()` wake periodically to check if there's a connection in the queue
Signed-off-by: Austin Bonander <austin@launchbadge.com>
2021-04-06 09:04:20 -07:00
crajcan
469c4ac130
Correct Postgres' Length Limit for Bind Parameters ( #1141 )
...
* Bump limit for postgres' bind parameters
* Fix lingering fmt error
2021-03-29 19:39:27 -07:00
Charles Samborski
93b90be9f7
fix(postgres): Add support for domain types description
...
Fix commit updates the `postgres::connection::describe` module to add full support for domain types. Domain types were previously confused with their category which caused invalid oid resolution.
Fixes launchbadge/sqlx#110
2021-03-16 20:23:03 +01:00
Rich Murphey
edcc91c9f2
replace deprecated compare_and_swap() with compare_exchange() ( #1080 )
2021-03-03 08:50:12 -08:00
Nathan Roach
d5f9f08c62
Fixing NaiveTime not including SQLite
2021-02-27 01:24:25 -08:00
Nathan Roach
4b5f41eebe
Fixing format, removing duplicate NaiveDate
2021-02-27 01:24:25 -08:00
Nathan Roach
9d6c5defd4
Adding derivation of any types for chrono types present in all of the featured sql types at compile time
2021-02-27 01:24:25 -08:00
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