Commit Graph

2116 Commits

Author SHA1 Message Date
Steven Fackler
d91f9d8407 gut tokio-postgres 2019-07-21 16:09:45 -07:00
Steven Fackler
c0fcf34eb4 Reexport macros from tokio-postgres
Closes #463
2019-07-21 14:06:13 -07:00
Steven Fackler
c41a70ac53
Merge pull request #460 from est31/master
Remove rustc-serialize from README
2019-07-10 15:16:47 -07:00
est31
22484caaca Remove rustc-serialize from README 2019-07-10 22:08:56 +02:00
Steven Fackler
f4f6b41fd3
Merge pull request #458 from sfackler/param-iter
Add methods that take iterators of parameters
2019-07-09 19:19:21 -07:00
Steven Fackler
8192c771c0 Add methods that take iterators of parameters
The existing methods which take slices of parameters work well when
directly passing a temporary slice (e.g. `c.query(s, &[&15, &"hi"])`,
but becomes limiting in other contexts like when programmatically
building up a query. We now offer methods which take iterators, which
are significantly more flexible for these kinds of use cases.

Because of the weird object safety of `ToSql`, we can't be generic over
`Iterator<Item = impl ToSql>`, but instead have to specifically work
with `Iterator<Item = &dyn ToSql>`. This may require a `.map()` or two
but should still work fine.

Closes #265
2019-07-09 19:00:10 -07:00
Steven Fackler
effd4df463 Release postgres-native-tls 0.2.0-rc.1
For real this time
2019-07-05 11:02:09 -07:00
Steven Fackler
904c951ad6 Release postgres v0.16.0-rc.2 2019-06-29 21:43:50 -07:00
Steven Fackler
6464954e07 Release postgres-openssl v0.2.0-rc.1 2019-06-29 21:39:25 -07:00
Steven Fackler
4cc18be35b Release postgres-native-tls v0.2.0-rc.1 2019-06-29 21:32:16 -07:00
Steven Fackler
310f0ebfc6 Release tokio-postgres v0.4.0-rc.3 2019-06-29 21:18:28 -07:00
Steven Fackler
47d83d57a0 Release postgres-protocol v0.4.1 2019-06-29 21:06:23 -07:00
Steven Fackler
e760d82f64 Drop tokio- prefix from TLS crates
They're way too wordy and used with both tokio-postgres and postgres
anyway.
2019-06-29 16:07:56 -07:00
Steven Fackler
3f264027c9 Fix some typos 2019-06-29 12:32:46 -07:00
Steven Fackler
2c204b34ab
Merge pull request #452 from sfackler/block-response
Send response messages in blocks
2019-06-29 09:48:10 -07:00
Steven Fackler
2d2a5dea81 Send response messages in blocks
Our codec implementation originally just parsed single messages out of
the stream buffer. However, if a query returns a bunch of rows, we're
spending a ton of time shipping those individual messages from the
connection back to the Query stream. Instead, collect blocks of unparsed
messages that are as large as possible and send those back.

This cuts the processing time of the following query in half, from ~10
seconds to ~5:
`SELECT s.n, 'name' || s.n FROM generate_series(0, 9999999) AS s(n)`

At this point, almost all of the remainder of the time is spent parsing
the rows.

cc #450
2019-06-27 21:47:13 -07:00
Steven Fackler
eaef62c340
Merge pull request #451 from sfackler/less-copy-copies
Avoid copies in copy_in
2019-06-25 19:27:21 -07:00
Steven Fackler
9dbeb849f8 rustfmt 2019-06-25 19:20:59 -07:00
Steven Fackler
db462eb018 Avoid copies in copy_in
copy_in data was previously copied ~3 times - once into the copy_in
buffer, once more to frame it into a CopyData frame, and once to write
that into the stream.

Our Codec is now a bit more interesting. Rather than just writing out
pre-encoded data, we can also send along unencoded CopyData so they can
be framed directly into the stream output buffer. In the future we can
extend this to e.g. avoid allocating for simple commands like Sync.

This also allows us to directly pass large copy_in input directly
through without rebuffering it.
2019-06-25 18:54:17 -07:00
Steven Fackler
bcb4ca0713
Merge pull request #448 from sfackler/bufer-copy-in
Buffer copy_in messages
2019-06-22 21:27:10 -07:00
Steven Fackler
4a5d30b4c6 Buffer copy_in messages
Otherwise there's a ton of overhead passing tons of tiny messages over
channels.
2019-06-22 21:22:03 -07:00
Steven Fackler
d8842982b0 Include the parameter/column index in type conversion errors
Closes #442
2019-05-20 19:05:54 -07:00
Steven Fackler
1270524df2 Fix new clippy warnings 2019-04-11 19:51:42 -07:00
Steven Fackler
eb18cbd475 Reexport Socket from postgres 2019-04-06 21:26:02 -07:00
Steven Fackler
0c8ecc0240 Release postgres v0.16.0-rc.1 2019-04-06 20:59:01 -07:00
Steven Fackler
956ba12b54 Conversions from INET to IpAddr
We ignore the netmask when deserializing and use /32 or /128 when
serializing.

Closes #430
2019-04-03 21:30:49 -07:00
Steven Fackler
fd3f3feafc Move types tests to their own file 2019-04-03 20:50:41 -07:00
Steven Fackler
6c0ec6a6bf TLS docs for tokio-postgres 2019-04-01 21:56:25 -07:00
Steven Fackler
49c22a8a39 Add postgres examples to TLS crates 2019-04-01 18:51:17 -07:00
Steven Fackler
aaaf8247ec Crate level docs 2019-03-31 21:48:32 -07:00
Steven Fackler
16021d2985 Fix docs 2019-03-30 20:58:01 -07:00
Steven Fackler
aa3aedda56 More docs 2019-03-30 20:57:12 -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
948274533f Config should be Sync + Send 2019-03-25 20:02:24 -07:00
Steven Fackler
d52650a55c Fixup warnings 2019-03-24 13:32:29 -07:00
Steven Fackler
60825d9bef Allow custom executors 2019-03-24 13:22:26 -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
1cbf9a1b8d Fix build 2019-03-10 16:39:10 -07:00
Steven Fackler
3b31551f73 Upgrade fallible-iterator 2019-03-10 16:32:28 -07:00
Steven Fackler
e434aadf04 Release tokio-postgres-native-tls v0.1.0-rc.1 2019-03-06 21:16:21 -08:00
Steven Fackler
e12902a2a5 Document tokio-postgres-native-tls 2019-03-06 21:13:18 -08:00
Steven Fackler
374fadb816 Release tokio-postgres-openssl v0.1.0-rc.1 2019-03-06 21:05:04 -08:00
Steven Fackler
db6dde8c7d Document tokio-postgres-openssl 2019-03-05 22:01:18 -08:00
Steven Fackler
4f084e7b64 Release tokio-postgres v0.4.0-rc.2 2019-03-05 21:49:54 -08:00
Steven Fackler
e549f8d635 Fix features 2019-03-05 21:47:34 -08:00
Steven Fackler
4174eeeecb Release tokio-postgres v0.4.0-rc.1 2019-03-05 21:35:46 -08:00
Steven Fackler
9385bebefc Release postgres-protocol v0.4.0 2019-03-05 19:09:48 -08:00
Steven Fackler
c619c741be Upgrade md5 2019-03-05 18:59:43 -08:00