Ryan Leckey
433aab1e5b
postgres: use RawValue in Decode and implement row-returning simple queries
2020-03-11 01:44:06 -07:00
Ryan Leckey
f462343787
Split Executor into Executor and RefExecutor
...
* Allow `conn.fetch(" ... ")` to be called where `conn` is an owned Connection
* Executor::fetch -> RefExecutor::fetch_by_ref
* Executor::fetch_by_ref -> Executor::fetch
* Move `Connection::describe` to `Executor::describe`
* `Transaction` is no longer a `Connection`
* `Connection` has `Executor` as a super-trait again which greatly simplifies bounds
2020-03-11 01:43:27 -07:00
Ryan Leckey
0afcf33395
rename Executor::execute to Executor::fetch
2020-03-11 01:43:27 -07:00
Ryan Leckey
72b60e8a7d
remove the DB type parameter from HasCursor and push to an associated type; remove Cursor::first
2020-03-11 01:43:27 -07:00
Ryan Leckey
7404708bab
adjust Cursor::map to work through black magic hacks and hope we get GATs soon
2020-03-11 01:43:17 -07:00
Ryan Leckey
a374c18a18
postgres: rewrite protocol in more iterative and lazy fashion
2020-03-11 01:43:17 -07:00
Ryan Leckey
ea1a4fb042
add Cursor and rewrite Executor/Query over it
...
* this breaks a lot internally as-is
* mysql needs a restructure
2020-03-11 01:43:04 -07:00
Ryan Leckey
bb17ebfbbd
make Connect extend Connection to simplify bounds
2020-03-11 01:42:34 -07:00
Austin Bonander
eff7c9e125
fix Pool to remove possibility of "leaking" connections ( #84 )
...
* fix `Pool` to reduce possibility of "leaking" connections
now uses RAII guards to control `SharedPool::size`
* add smoke test for `Pool` to both Postgres and MySQL tests
add `Pool::is_closed()`
* fix documentation re: pool
* refactor pool implementation to not use futures oneshot channels
https://github.com/launchbadge/sqlx/pull/84#issuecomment-580476223
* run cargo fmt
* Pool: remove superfluous guard struct, document some internal methods
2020-01-31 23:33:42 -08:00
Ryan Leckey
809bc3964c
Run rustfmt
2020-01-15 01:34:20 -08:00
Ryan Leckey
92f12e11aa
Add support for Tokio
2020-01-15 01:17:33 -08:00
Ryan Leckey
6ddf3184de
Run rustfmt
2020-01-15 00:27:19 -08:00
Ryan Leckey
b1a27ddac2
Add a Transaction type to simplify dealing with Transactions
2020-01-15 00:22:01 -08:00
Ryan Leckey
28ed854b03
Extract Connection::open into a new trait Connect::connect
2020-01-14 23:58:17 -08:00
Austin Bonander
6682d4dce7
Pool::new(): forward to connection types for string syntax
2020-01-13 20:43:32 -08:00
Ryan Leckey
9b50dccfce
Run rustfmt
2020-01-11 03:52:17 -08:00
Ryan Leckey
fec6101e1a
Use timeout over .timeout to stay off unstable
2020-01-11 03:31:55 -08:00
Ryan Leckey
95fac72abf
Use crossbeam queues to achieve fairness in the pool
2020-01-11 03:26:48 -08:00
Ryan Leckey
03251b719b
Refactor pool to fix liveness and consistently check
2020-01-11 01:02:03 -08:00
Ryan Leckey
132f7b2944
Add test_on_acquire option to the Pool
2020-01-11 01:01:21 -08:00
Andrey Kuznetsov
e7026ce92d
derive Debug for Pool
2020-01-10 23:36:50 +00:00
Ryan Leckey
5e719917c0
Run rustfmt
2019-12-28 03:45:47 -08:00
Austin Bonander
c98c49ad47
fix docs and guarantees for pool
2019-12-28 02:02:29 -08:00
Ryan Leckey
98269ddd20
Fix several nits from Clippy and add back chrono support for MySql
2019-12-27 23:16:13 -08:00
Ryan Leckey
9b0f34b0ce
Fix a couple minor nits with Pool and run rustfmt
2019-12-27 22:47:25 -08:00
Ryan Leckey
d76b1357da
Audit MySql and Postgres protocols
2019-12-27 17:31:01 -08:00
Austin Bonander
b85618e5f8
fix errors from .send_raw() additions that I didn't catch
2019-12-19 23:26:59 -08:00
Austin Bonander
892a179787
set default max_lifetime in pool::Options to 30 minutes and explain why
2019-12-19 23:26:59 -08:00
Austin Bonander
786deecc36
replace bitflags::_core with std
...
for some reason IntelliJ-Rust reaches for this first
2019-12-19 18:46:37 -08:00
Austin Bonander
5192983093
implement Executor::send()
2019-12-19 18:46:37 -08:00
Austin Bonander
56875a8931
finish discussed refactors
2019-12-18 23:02:01 -08:00
Austin Bonander
8aa931356f
WIP implement statement caching for MySQL, perform discussed refactors
2019-12-18 23:02:01 -08:00
Austin Bonander
193e79569a
query refactors
2019-12-04 13:30:19 -08:00
Austin Bonander
acca40c88e
make query!() output anonymous records
2019-12-03 21:30:53 -08:00
Ryan Leckey
f8f71b1b70
Merge remote-tracking branch 'origin/ab/conn-timeout'
2019-11-27 23:31:24 -08:00
Austin Bonander
279e329f27
break up pool.rs into multiple files
2019-11-26 10:12:47 -08:00