Ryan Leckey
fd828fed14
Merge remote-tracking branch 'demurgos/domain-type-description'
2021-04-08 23:59:25 -07:00
Diggory Blake
a3b73f8e08
Remove all listeners before returning a connection to the pool
2021-04-08 23:54:10 -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
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
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
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
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
fd8b2b7f8a
Rename sqlx(rename) attribute to sqlx(type_name)
2021-01-12 03:39:10 -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
Chris Sosnin
9747218ad3
postgres: fix decimal conversions
2020-12-10 22:22:33 +03:00
Chris Sosnin
82b66b29a3
Revert "Fixing BigDecimal conversion for PostgreSQL"
...
This reverts commit a0007b4e98acf683069e360400742ee6934968cc.
2020-12-10 22:02:01 +03:00
alex.berger@nexiot.ch
6ecdb83bc2
Add support for passing in-memory trusted certificates in addition to the already supported path to trusted certificates.
2020-11-27 17:43:24 +01:00
sid
f41551f3ad
reversible migrations for cli
...
- adds a -r flag whihc will create a reversible migration
- add revert subcommand, which reverts the last migration
- add --dry-run flag to migration run command, which list the migrations that will be applied
- updates add migration to check if all migration are of same type, i.e cannot mix and match reversible and simple migrations
2020-11-24 16:04:43 -08:00
Jonas Platte
c1e79d2675
Simplify pattern matching in postgres/type_info.rs
2020-11-19 14:04:07 -08:00
Jonas Platte
3c7c266eac
Fix some clippy lints
2020-11-19 14:04:07 -08:00
Jonas Platte
cd44b5eb43
De-duplicate mysql & postgres TLS code
2020-11-12 07:32:21 -08:00
Jonas Platte
a161bcba05
Rename cargo features in preparation for rustls support
2020-11-12 07:32:21 -08:00
Jakob Truelsen
9d71a7f372
Allow configuring the log level of query logging
2020-11-12 07:06:34 -08:00
Julius de Bruijn
a0007b4e98
Fixing BigDecimal conversion for PostgreSQL
...
Now working properly with numbers, such as `0.01` and `0.012`.
2020-11-04 17:09:01 -08:00
Daniel Stöckel
144dcceb44
fix(postgres): prefer parsing non-localized notice severity field
...
In order to support PostgreSQL <= 9.5, the b'S' field of an error/notice
message was parsed. However, this field can be localized and thus parsing
can fail for instances that use a non-english locale. In version > 9.5,
the b'V' field, that is guaranteed to be in english, was added. However,
even for these versions parsing would fail as the b'S' field was also
parsed. This patch prefers b'V' over b'S' if it exists and uses a default
severity in case b'V' is not present and b'S' could not be parsed.
Fixes #734
2020-10-19 00:03:06 -07:00
Dana Marcuse
d97014f620
feat: correctly handle percent-encoded socket as host for postgres URI
2020-10-18 01:19:11 -07:00
Dana Marcuse
7b1b8c12ba
feat: handle hostaddr postgres URI param and add more tests
2020-10-18 01:19:11 -07:00
Joshua Nelson
20d65a8248
Remove hashbrown dependency
...
Hashbrown is now the hashmap used in the standard library, so no need to
pull in an external dependency. This switches to using `AHashMap`
directly.
2020-10-17 02:44:09 -07:00
Kramer Hampton
d0ccb4d0b2
feat: parse additional parameters: user, password, port, dbname. Also
...
add additional documentation and an example connection string using
parameters.
2020-10-13 09:56:48 -07:00
Ryan Leckey
67099d993c
Merge remote-tracking branch 'frigus02/pg-percent-decode' into master
2020-08-19 18:03:31 -07:00
Stuart Hinson
1ab815cc9b
WIP pg application_name
2020-08-19 17:56:51 -07:00
Jan Kuehle
106a6a8395
Support non-ASCII chars in postgres credentials
...
The `url` crate returns username and password portions of a URL as
percent encoded ASCII strings. In order to use them for the Postgres
connection, we need to decode them.
2020-08-13 15:50:07 +01:00
Chloe Ross
3885ae6ddf
fix: allow queries that select just void to pass through macros as () instead of struct { _1: () }
2020-07-31 04:14:48 -07:00
Jannik Obermann
67142259e4
Fix #580 + Add test
2020-07-31 04:14:32 -07:00
吴翱翔
96f4a43bb8
style: rustfmt
2020-07-29 07:39:31 -07:00
吴翱翔
c6fa9047b9
Remove rust_decimal unnecessary num-traits
2020-07-29 07:39:31 -07:00
Jonas Platte
960e71202b
Don't include postgres OIDs in query cache
2020-07-29 07:28:14 -07:00
Julius de Bruijn
0ed8e3f610
Add missing compatible implementation for Vec<BitVec>
2020-07-27 03:36:44 -07:00
Julius de Bruijn
1a59d3308a
Pg: Implementing BIT and VARBIT using BitVec
2020-07-27 03:36:44 -07:00
Ryan Leckey
7bc3133f70
feat: add an optional query logger (using log)
2020-07-26 23:55:36 -07:00