Commit Graph

265 Commits

Author SHA1 Message Date
Nicolas Guiard
c4b1f5ab5c Fix unix socket location in docs (/var/run/postgresql instead of /var/lib/postgresql) 2020-11-11 11:14:28 +01: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
5e065c36cd Release v0.18.1 2020-10-19 20:02:01 -04:00
Steven Fackler
db90323b08 Make postgres::Client Send again
Closes #677
2020-10-19 19:58:41 -04:00
Steven Fackler
cc77ad18d5 Release postgres v0.18.0 2020-10-17 15:16:56 -04:00
Steven Fackler
12e2f03b53 Release tokio-postgres v0.6.0 2020-10-17 15:06:10 -04:00
Steven Fackler
2689070d19 Upgrade to tokio 0.3 2020-10-17 09:49:45 -04:00
Nikhil Benesch
4af6fcd911 Permit configuring the notice callback
Right now the behavior is hardcoded to log any received notices at the
info level. Add a `notice_callback` configuration option that permits
installing an arbitrary callback to handle any received notices.

As discussed in #588.
2020-09-21 20:04:35 -04:00
Steven Fackler
bc682b3103 Explicitly terminate the connection in sync API
Closes #613
2020-07-27 21:42:02 -04:00
Steven Fackler
f6620e6a24 Release postgres v0.17.5 2020-07-19 13:27:27 -06:00
Steven Fackler
a4a68d543d Ensure transactions roll back immediately on drop
Closes #635
2020-07-19 13:24:46 -06:00
Steven Fackler
27b36f53e2 Release postgres v0.17.3 2020-07-03 15:23:33 -04:00
Jakub Wieczorek
5d9acb1eb1 Add support for the 0.6 version of geo_types.
This change drops the support for the 0.5 version by renaming the feature,
as no version of `postgres` with it included has ever been released.
2020-06-24 12:28:21 +02:00
Steven Fackler
3e67dbb773 Fix clippy 2020-06-10 16:54:07 -07:00
Jakub Wieczorek
887be86816 Add support for geo-types=0.5
Support for geo-types=0.4 (via the `with-geo-types_04` feature) has been preserved for convenience.
2020-05-25 13:45:17 +02:00
Naim A
a1efddd64a fix typo 2020-05-12 13:48:01 +03:00
Steven Fackler
f9ba58967b Release postgres v0.17.3 2020-05-01 16:15:31 -07:00
Nathan VanBenschoten
64d6e97eff Re-add savepoint method to Transaction
Revives #184.

The rewrite for async/await and Tokio accidentally lost functionality
that allowed users to assign specific names to savepoints when using
nested transactions. This functionality had originally been added
in #184 and had been updated in #374.

This commit revives this functionality using a similar scheme to the
one that existed before. This should allow CockroachDB users to update
to the next patch release of version `0.17`.
2020-05-01 12:55:48 -04:00
Nikhil Benesch
dd0c39e041
Don't accidentally return early from CopyOutReader
The COPY OUT protocol allows sending CopyData packets that have no data.
The (synchronous) CopyOutReader needs to be careful not to return an
empty slice in this case, but instead request more data, since an empty
slice is taken to mean EOF.
2020-04-01 14:17: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
Michael P. Jung
b10f964a1b Add documentation for crate features
This closes #544
2020-03-16 15:10:25 +01:00
Steven Fackler
ff36ce993d Release postgres v0.17.2 2020-03-05 17:13:32 -08:00
Aaron Loucks
2082d4f781 Add support for time-0.2 types 2020-02-28 18:05:51 -05: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
cc9b8232a8 Release postgres v0.17.1 2020-01-31 18:04:59 -08: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
a54ee29704 Allow opt-out of transaction settings
If you changed the default transaction settings of the session, you may
need an explicit opt-out.
2020-01-10 17:49:18 -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
3ba416ded6 Add tokio_postgres::GenericClient
We have to make the trait methods differ from the normal methods a bit
by adding Sync + Send bounds to the ToStatement parameter which is a bit
unfortunate, but necessary until GATs async_trait unnecessary.

Closes #357
2020-01-02 21:01:47 -05: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
Steven Fackler
7bd21b492e
Merge pull request #531 from benesch/synchronous-cancel
Support cancellation in synchronous client
2019-12-30 21:09:19 -05:00
Nikhil Benesch
b73ec018b7
Expose accessors on Config object
Fix #534.
2019-12-29 15:15:48 -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
Steven Fackler
a8fa2a42c0 Use batch_execute in example 2019-12-24 12:43:23 -08:00
Steven Fackler
69412cf7e3 Released postgres v0.17.0 2019-12-23 15:52:16 -08:00
Steven Fackler
1f773f08e3 Release tokio-postgres v0.5.0 2019-12-23 15:40:49 -08:00
Steven Fackler
869f2d7e47 Remove stray dev dependency 2019-12-21 04:21:14 -08: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
37d0a83434 remove uuid 0.7 support 2019-12-19 16:41:26 -08:00
Steven Fackler
309b647bdb Publicly reexport fallible-iterator from postgres
Closes #520
2019-12-15 17:49:50 -08:00
Steven Fackler
3c85532a76 Fix docs 2019-12-15 17:34:11 -08:00
Steven Fackler
584aca4c17 rustfmt 2019-12-15 17:11:39 -08:00