Jonas Platte
2b2418c6d1
Add a test for nesting .map
2021-01-31 16:57:29 -08:00
Jonas Platte
7ebd362453
Update issue_104 test to use map instead of try_map
2021-01-31 16:57:29 -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
Florian Hübsch
68cf2f9cdb
Add constraint
method to DatabaseError
trait
...
Override `constraint` method for `PgDatabaseError`.
2021-01-20 22:00:44 -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
a1d562f04b
Remove the Done trait
2021-01-12 14:37:44 +01:00
Jonas Platte
a161bcba05
Rename cargo features in preparation for rustls support
2020-11-12 07:32:21 -08:00
Austin Bonander
fa7981f68a
fix(pool): ignore spurious wakeups when waiting for a connection
...
fixes #622
2020-10-13 10:37:10 -07:00
Stuart Hinson
9b26d45344
application name test
2020-08-19 17:56:51 -07:00
Jannik Obermann
67142259e4
Fix #580 + Add test
2020-07-31 04:14:32 -07:00
Ryan Leckey
e575501a39
feat: add Executor::prepare, a hook into the automatic statement preparation life-cycle
2020-07-24 07:24:23 -07:00
Julius de Bruijn
e8a4c54ac7
Allow setting caching per-query
2020-07-24 07:24:23 -07:00
Julius de Bruijn
c9c11c8302
2-tier cache for Postgres
...
This solves a problem when needing to describe a query before executing
it, in cases where the query is more of a dynamic nature and binding its
parameters require the type info.
In this case, the first describe doesn't know the input parameters, so
the parameter type info is inferred from the database. In cases of
`varchar(10)[]` or `json` column types, the parameter type is inferred
to the column type. Now if we then try to use `text[]` or `jsonb` as the
types, the database has already stored different types for these
parameters for the statement, and will error out.
So we'll now only store the statement to the cache when it comes from an
actual execution of the query.
2020-07-24 07:24:23 -07:00
Julius de Bruijn
0c9bea4ab2
Fixing panics for disabled statement cache
2020-07-24 07:24:23 -07:00
Julius de Bruijn
a27244b3c9
Make the test simpler for easier debug
2020-07-24 07:24:23 -07:00
Julius de Bruijn
a4dc3dfbd7
Add a test showing a bug in describe/execute combo
2020-07-24 07:24:23 -07:00
Ryan Leckey
96b76dc737
update todo examples to 0.4 and use migrations
...
* update tests/x.py
* add examples/x.py
2020-07-18 05:43:16 -07:00
Ryan Leckey
9b956c0d2c
fix(postgres): support the VOID type, as ()
2020-07-15 02:16:08 -07:00
Ryan Leckey
54c857b448
fix some remaining usage of PoolOptions
2020-07-14 06:33:36 -07:00
Ryan Leckey
00137d4a04
feat: add sqlx::Done and return from Executor::execute()
...
+ Done::rows_affected()
+ Done::last_insert_id()
2020-07-14 04:31:25 -07:00
Ryan Leckey
fc682fa991
fix: adjust pool usage in tests and examples
2020-07-12 04:42:48 -07:00
Julius de Bruijn
e3b3806db5
Handle ParameterStatus
in PgStream
2020-07-06 05:56:10 -07:00
Ryan Leckey
3a8dc0e211
fix(tests): prevent postgres::pool_smoke_test from starving executor
2020-07-03 05:59:20 -07:00
Ryan Leckey
33ab2b9049
style: rustfmt
2020-07-02 22:38:23 -07:00
Ryan Leckey
1a7480774b
fix(postgres): after closing a statement, the connection should await CloseComplete
2020-07-02 22:37:04 -07:00
Ryan Leckey
a7117dd71b
feat(any): introduce the Any database driver which enables choosing the database driver at runtime
2020-06-27 04:07:40 -07:00
Julius de Bruijn
2c2a277666
Caching methods in Connection
2020-06-25 10:44:05 +02:00
Julius de Bruijn
5d64310004
LRU caching for PostgreSQL
2020-06-24 19:01:54 +02:00
Ryan Leckey
8800a40979
test: tokio or actix should import tokio in pool_smoke_test
2020-06-21 04:34:29 -07:00
Ryan Leckey
9abdd7e408
style: rustfmt
2020-06-21 04:08:17 -07:00
Ryan Leckey
7c4c185698
chore: update dependencies
2020-06-21 03:55:31 -07:00
Ryan Leckey
e1d22a1840
fix(core): async-stream crate seems to lose the stream if the stream owns the object we are streaming
...
hand-rolled a copy of the idea behind AsyncStream and things seem to work
2020-06-09 02:16:47 -07:00
Ryan Leckey
559169cc79
refactor(mssql): clean up unused imports and other warnings
2020-06-07 02:00:13 -07:00
Austin Bonander
e3dbd58bf2
PgConnection: use more obvious/safer query for ping()
2020-06-05 20:13:20 -07:00
Ryan Leckey
e08f05b879
feat: re-introduce error downcasting
2020-05-30 17:51:56 -07:00
Ryan Leckey
e5b6047009
feat: introduce docker-compose based testing for running locally against many database combinations
2020-05-30 17:51:55 -07:00