zach-com
ee65811272
Avoid unnecessary function call
2020-12-16 15:56:16 -05:00
zach-com
f655c3b74c
Address pull request comments
2020-12-16 15:26:06 -05:00
zach-com
07d9fb2ed6
Support connection validation with timeout
2020-12-11 13:47:39 -05:00
Bernardo Uriarte Blanco
996f063380
map to convert to &dyn ToSql
is not longer necessary
2020-10-27 20:31:15 +01:00
Bernardo Uriarte Blanco
0e494a08a9
change rest of *_raw
methods to use BorrowToSql
2020-10-27 18:08:23 +01:00
Steven Fackler
bc682b3103
Explicitly terminate the connection in sync API
...
Closes #613
2020-07-27 21:42:02 -04:00
Steven Fackler
3c4a0af6ff
Add a notification API to the blocking client
...
This mirrors the implementation in the old 0.15 release, but is quite a
bit simpler now that we're built on the nonblocking API!
2020-03-22 15:22:07 -07:00
Steven Fackler
fd3a99c225
Don't spawn off connection in blocking impl
...
We can now directly return fatal errors, and intercept notifications
2020-03-22 12:05:00 -07:00
Andreas Runfalk
778f278059
Added information on how to use Vec<T> with Client::query_raw ( fixes #567 )
2020-02-06 07:49:59 +01:00
Steven Fackler
4bf40cd1d3
Reorder methods
2020-01-31 14:01:16 -08:00
Steven Fackler
27635a20ca
Clean up GenericClient traits
2020-01-31 13:59:37 -08:00
Steven Fackler
f1ac3bd9d7
Always include Client::configure
2020-01-08 17:29:45 -08:00
Steven Fackler
214413d9dc
Add transaction builders
...
Closes #543
2020-01-08 17:23:28 -08:00
Steven Fackler
a865207ff6
Rename to GenericClient
2020-01-02 20:44:07 -05:00
Colin Maxfield
7ff4b3a2e9
Merge latest master into branch
2020-01-02 10:24:19 -05:00
Nikhil Benesch
33dbbcbee7
Support cancellation in synchronous client
2019-12-29 14:08:17 -05:00
Colin Maxfield
508b430753
Adding generic for execute function for genericconnection
2019-12-28 16:36:56 -05:00
Colin Maxfield
793e83a4ef
Adding in generic for the query function of genericconnection
2019-12-28 16:32:01 -05:00
Colin Maxfield
e8aef6579e
Fixing fmt on the files I changed, forgot to check prior to previous commit
2019-12-20 23:28:32 -05:00
Colin Maxfield
3592e0553e
Adding in generic connection trait back to the lib
2019-12-20 20:35:17 -05:00
Steven Fackler
a254e6e9e9
Blocking binary copy support
2019-12-15 17:01:53 -08:00
Steven Fackler
cc8d8fe734
Unify no-op drop impls
2019-12-15 15:58:50 -08:00
Steven Fackler
5c33bf8b30
Don't take parameters in copy_in and copy_out
...
Postgres doesn't support them, so we may as well not provide the option!
Closes #523
2019-12-04 18:51:59 -08:00
Steven Fackler
09a63d6255
Move to local runtimes per connection
...
This avoids a bunch of context switches and cross-thread
synchronization, which ends up improving the performance of a simple
query by ~20%, from 252us to 216us.
2019-12-03 18:25:29 -08:00
Steven Fackler
b4694471ad
Add query_opt
...
Closes #510
2019-11-30 18:18:50 -05:00
Steven Fackler
ff3ea1c9df
Expose RowIter
2019-11-30 12:13:38 -05:00
Steven Fackler
e5e03b0064
Change the copy_in interface
...
Rather than taking in a Stream and advancing it internally, return a
Sink that can be advanced by the calling code. This significantly
simplifies encoding logic for things like tokio-postgres-binary-copy.
Similarly, the blocking interface returns a Writer.
Closes #489
2019-11-30 11:04:59 -05:00
Steven Fackler
12c2ef79b6
Upgrade to tokio 0.2/futures 0.3
2019-11-26 16:32:36 -08:00
Steven Fackler
31855141d2
Add query_one
2019-10-09 17:45:53 -07:00
Steven Fackler
8c28f8b363
Overhaul simple_query
2019-10-09 17:04:24 -07:00
Steven Fackler
a3f611d609
Overhaul copy_out
2019-10-08 19:01:34 -07:00
Steven Fackler
2517100132
Overhaul query
...
This is the template that we'll use for all other methods taking
parameters. The `foo_raw` variant is the most flexible (but annoying to
use), while `foo` covers the expected common case.
2019-10-08 17:15:41 -07:00
Steven Fackler
0d2d554122
Add a ToStatement trait in tokio-postgres
2019-10-08 19:36:24 -04:00
Steven Fackler
983a71c470
Fix postgres
2019-09-25 18:39:51 -07:00
Steven Fackler
f07ebc7373
Support nested transactions
2019-08-03 18:25:28 -07:00
Steven Fackler
f5a8b1de68
Update postgres
2019-08-03 18:09:27 -07:00
Steven Fackler
3f264027c9
Fix some typos
2019-06-29 12:32:46 -07:00
Steven Fackler
7c9717d764
Finish Client docs
2019-03-28 21:55:42 -07:00
Steven Fackler
2c786587bb
Start on postgres docs
2019-03-27 20:20:15 -07:00
Steven Fackler
52aa260f85
Reexports and config docs
2019-03-25 21:03:22 -07:00
Steven Fackler
2a80118e87
Don't require use of iterators
...
The common case is to simply want a vec of rows to work with, so make
that the main API, wrapping the old version returning an iterator.
2019-03-10 17:27:28 -07:00
Steven Fackler
0de50abc29
Rustfmt
2019-03-04 21:55:37 -08:00
Steven Fackler
31534b5734
Fix serde docs
2019-03-04 21:51:44 -08:00
Steven Fackler
32e09dbb91
Change batch_execute into simple_query
...
Closes #413
2019-01-31 20:35:17 -08:00
Steven Fackler
2d3b9bb1c6
Move the TLS mode into config
2019-01-13 15:07:20 -08:00
Steven Fackler
940cbb8d4b
Remove future from MakeTlsMode
...
It's unlikely to be useful in practice, and just introduces more
complexity.
2019-01-05 22:07:20 -08:00
Steven Fackler
e4bb2aedfb
Rename Client::builder to Client::configure
2018-12-29 21:05:01 -08:00
Steven Fackler
9116147aee
Rename Builder to Config
2018-12-29 21:00:58 -08:00
Steven Fackler
fb027d79db
Move CopyOutReader to its own module
2018-12-28 21:01:10 -08:00
Steven Fackler
5169820d6a
Return iterators from query in sync API
2018-12-28 20:39:32 -08:00