Commit Graph

191 Commits

Author SHA1 Message Date
Steven Fackler
243ee557d2 Fix tests 2016-10-01 17:38:18 -07:00
Steven Fackler
ae3cea7de6 Actually fix feature tests 2016-09-21 19:52:24 -07:00
Steven Fackler
f5ec24de78 Use type conversions from protocol crate
This also changes ToSql and FromSql to explicitly deal in byte buffers.
2016-09-14 23:27:33 -07:00
Steven Fackler
bcb104793b Make LazyRows a fallible iterator 2016-09-12 21:39:22 -07:00
Steven Fackler
62cac49e8d Make notification iterators fallible 2016-09-12 21:34:03 -07:00
Steven Fackler
96943d7e10 Switch over to protocol backend parser
We still have to keep our owned Backend enum around since SEME doesn't
work :'(
2016-09-11 21:27:13 -07:00
Steven Fackler
842bdafe1f Pull connect params out to its own module 2016-09-10 11:12:26 -07:00
Steven Fackler
bf1250eb78 Always support unix sockets 2016-09-10 10:31:43 -07:00
Steven Fackler
f2cf6be6bc Rename all features
You can't add dependencies to implicit features, so move them all just
in case.
2016-09-10 10:31:21 -07:00
Steven Fackler
c3aed4457f Remove deprecated set_transaction_isolation 2016-09-10 10:30:47 -07:00
Steven Fackler
2a6889fa0b Rename SslMode to TlsMode
TLS has been a thing since 1999 - time to use it rather than SSL!
2016-09-10 10:30:47 -07:00
Steven Fackler
2e25862a66 Rename ssl stuff 2016-09-10 10:30:47 -07:00
Steven Fackler
1627d62878 Overhaul security framework integration 2016-09-10 10:30:47 -07:00
Steven Fackler
da7407f543 Add a more robust wrapper for OpenSSL support 2016-09-10 10:30:47 -07:00
Steven Fackler
7e48593a54 Check domain for openssl wrapper
Also update the expired certs we were using.
2016-09-10 10:30:47 -07:00
Steven Fackler
4373eff16f Remove back compat reexport 2016-09-10 10:30:47 -07:00
Curtis McEnroe
e8496a8156
Test array params 2016-07-07 14:42:45 -04:00
Alex Gulyás
09ede70a74 Add date and timestamp wrappers that can represent infinity
This patch adds the `types::Date` and `types::Timestamp` enums, which
can represent either a date/timestamp, or positive or negative
infinity.
2016-06-26 18:55:33 +02:00
Steven Fackler
46113ac323 Fix transaction config query generation
Closes #187
2016-06-15 18:29:36 -07:00
Steven Fackler
616b725763 Merge pull request #184 from nvanbenschoten/nvanbenschoten/savepoints
Add savepoint method to Transaction
2016-05-26 21:20:48 -07:00
Nathan VanBenschoten
cf3ead046e Add savepoint method to Transaction
This change creates a `Transaction.savepoint` method, which is equivalent
to `Transaction.transaction`, but takes a custom name for the nested
transaction's savepoint name.
2016-05-25 17:17:36 -04:00
Joshua Miller
0c54f01a0e Handle malformed percent-encoding
Closes #182
2016-05-18 20:33:12 -05:00
Corey Farwell
805a584f5c Bump rust-url to 1.0. 2016-04-25 12:39:55 -04:00
Steven Fackler
d48fa83c19 Only enable unix socket stuff on unix with nightly 2016-03-29 21:24:45 -07:00
Steven Fackler
b0bed6ab4c Add a nightly feature
Currently uses the UnixStream from the standard library
2016-03-27 13:03:19 -07:00
Steven Fackler
bd60ecfc1f Add impls for array types
Turns out the thing I thought was a blocker (the bytea impls) actually
isn't since u8 doesn't implement these traits. Yay for pre-1.0 thinking!
2016-03-27 09:42:21 -07:00
Steven Fackler
6e4afdb377 Use pg_temp instead of a transaction for test 2016-03-05 12:49:00 -08:00
Steven Fackler
5b80b251a6 Finish up transaction config 2016-02-24 22:29:09 -08:00
Steven Fackler
4c46f9fa89 Adjust Type::Enum to carry the variants 2016-02-17 22:22:31 -08:00
Steven Fackler
d5f1bdba4a Composite type support 2016-02-15 23:11:01 -08:00
Steven Fackler
8824d2a43d Enable tests for macaddr 2016-02-13 21:07:02 -08:00
Andrew Baumhauer
b6478d29ab Add tests/types/eui48.rs to excercise MacAddress::parse_str() functionality in canonical form 2016-02-13 21:00:44 -06:00
Steven Fackler
bd67e438c4 Add a Domain Kind
This could break downstream code that expects a domain type to
explicitly be a Simple Kind, but I doubt that exists.

cc #153
2016-01-22 20:01:39 -08:00
Steven Fackler
3ddcf87203 Simplify ConnectError
Same deal as Error
2016-01-02 15:50:11 -08:00
Steven Fackler
bb837bd872 Make the default notifications iterator read nonblocking
It is always super confusing as to when a notification that's been sent
to the client will actually show up in the old version of this iterator,
so it's best to have it see if there's anything waiting in the TCP
buffer.

Closes #149
2015-12-27 10:15:49 -07:00
Steven Fackler
278ee1cfd7 Drop WrongType variant
Following the tradition of WasNull
2015-12-26 22:05:23 -07:00
Steven Fackler
4f37625cd6 Shorten error variant names
No reason to repeat Error
2015-12-25 20:14:09 -07:00
Steven Fackler
fe14c82541 Remove Error::InvalidColumn
Change get_opt to return an Option<Result<T>> as its name would hint
2015-12-25 19:32:51 -07:00
Steven Fackler
8fac512919 Make DbError fields public
All of them are directly exposed via accessors and the internal
representation is never realistically going to change. A single private
field allows for expansion in the future.
2015-12-12 20:30:50 -08:00
Steven Fackler
9d8b009aea Wait for thread termination in cancel_query test 2015-12-06 23:39:40 -08:00
Steven Fackler
47f9a660de Make cancel_query take a ref
Even though CancelData is Copy it's a bit weird for a function to take
ownership when it doesn't need to.
2015-12-06 23:38:26 -08:00
Steven Fackler
7ea10a151e Remove deprecated methods in tests 2015-12-06 23:35:28 -08:00
Steven Fackler
811b0ffde9 Restructure SslMode
This is a large breaking change but makes things make way more sense
2015-12-06 23:35:28 -08:00
Steven Fackler
736f530ae9 Add Connection::query
Same deal as Connection::execute - a bit cheaper than preparing and
executing the statement normally.
2015-12-06 23:35:28 -08:00
Steven Fackler
fcc2768434 Second half of infrastructure for Connection::query
There are weird dropck issues introduced here that require those extra
semicolons in the test code.
2015-12-06 23:35:28 -08:00
Steven Fackler
58bb6c0e9a Remove rows::IntoIter
It's incompatible with Connection::query
2015-12-06 23:35:28 -08:00
Steven Fackler
0e6b03d06b Use a smaller crate for hex stuff
It's really overkill to pull in rustc_serialize just for hex conversions
2015-12-06 14:28:12 -08:00
Steven Fackler
cc4441f958 Cleanup 2015-12-06 13:35:52 -08:00
Steven Fackler
d77577eaaa Support BIT/VARBIT to BitVec
Closes #148
2015-12-06 12:40:12 -08:00
Steven Fackler
a217c5cd00 NegotiateSsl implementation for security_framework 2015-12-05 14:35:17 -08:00