Commit Graph

69 Commits

Author SHA1 Message Date
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
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
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
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
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
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
278ee1cfd7 Drop WrongType variant
Following the tradition of WasNull
2015-12-26 22:05:23 -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
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
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
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
d3182d96a6 Update serde support 2015-11-07 16:32:16 -08:00
Mathieu Rheaume
f5ee8686ae To_String() cleanup for to_owned on method calls 2015-09-28 01:19:02 -04:00
Jonathan Reem
4b545ca466 Implement ToSql for &'a T where T: ToSql
This allows more flexible use of ToSql in generic contexts by allowing
references to be used for encoding.
2015-08-03 13:32:44 -07:00
Steven Fackler
f72bc4303a Hide Type constructor 2015-05-26 21:47:42 -07:00
Steven Fackler
f800835456 Move error types to error module 2015-05-25 22:47:25 -07:00
Steven Fackler
0d63eeba50 Add optional chrono support 2015-05-13 22:25:43 -07:00
Steven Fackler
62459f6944 Support serde's JSON type 2015-04-12 21:48:38 -07:00
Steven Fackler
a8d67a1fe4 Fix for upstream changes 2015-04-02 11:34:42 -07:00
Steven Fackler
3a0e10e5c7 Fix build issues
Also remove the impls for CIDR/INET. No ipv4/ipv6 agnostic type exists
anymore in the standard library, and the old one didn't cover netmasks
anyway.
2015-03-18 20:49:14 -07:00
Steven Fackler
dac4c4f4f1 Port to new IO 2015-02-27 20:03:25 -08:00
Steven Fackler
1767661618 Redesign ToSql and remove RawToSql 2015-02-24 21:39:29 -08:00
Steven Fackler
28ea91f6e5 Turn Rows into an iterable instead of iterator 2015-02-22 22:13:59 -08:00
Steven Fackler
ef0e15b34d Change element_type to kind 2015-02-22 22:13:59 -08:00
Steven Fackler
5ec039bd5d Make time impls opt-in 2015-02-22 22:13:59 -08:00
Steven Fackler
b352b12c48 Make JSON support an optional feature
Even though we currently depend on rustc-serialize, this may not always
be the case. Forcing opt-in for all integration with external crates is
a safer course of action.
2015-02-22 22:13:59 -08:00
Steven Fackler
9ce2b77f26 Fix deprecation warnings 2015-02-20 20:17:47 -08:00
Steven Fackler
a0cca5fa77 Add a Slice adapter type
Until impl specialization exists, we can't define this implementaion
directly on &[T] because of the existing implementation for &[u8].

Closes #92
2015-02-12 22:52:55 -08:00
Steven Fackler
9214a6886d Use Postgres 9.4 on travis 2015-02-07 22:15:32 -08:00
Steven Fackler
8d704f71ce Fix for IO changes 2015-01-28 08:52:33 -08:00
Steven Fackler
6381267267 Fix for upstream changes 2015-01-23 10:44:15 -08:00
Steven Fackler
1779d8c69d Skip jsonb test on Travis 2015-01-21 22:39:47 -08:00
Steven Fackler
bca16fd4c5 Pass Type to raw traits and add jsonb support 2015-01-21 22:31:04 -08:00
Steven Fackler
92a3593d7f Update for upstream changes
String vs Show still needs to be resolved, but it compiles now
2015-01-09 10:50:54 -08:00
Steven Fackler
94e70df6e2 Fix for upstream changes 2015-01-03 13:23:11 -08:00
Steven Fackler
1cee01762a Remove Range support
It now lives in a separate project
2014-12-26 17:01:02 -05:00
Steven Fackler
d0868ed4fd Pull array support out to a separate crate
It's pretty obscure and the API is kind of bad. Pulling it out should
allow it to evolve independently from the main library.
2014-12-24 23:58:27 -05:00
Steven Fackler
c5e7e46f0d Fix deprecation warnings 2014-12-23 12:10:16 -05:00
Steven Fackler
d5c0cc0140 Fix for upstream changes 2014-12-19 10:43:42 -08:00
Steven Fackler
02fdb06762 Support citext and oid types
This ended up involving some pretty major refactors and fixed a bug
where passing extension types as parameters to `execute` broke.

Closes #56
2014-12-14 16:46:22 -08:00
Steven Fackler
d349715061 Support CIDR as well 2014-12-14 12:27:02 -08:00
Steven Fackler
3ac26d4961 Add inet support
It's lossy ATM, since IpAddr doesn't store the netmask.

Closes #88
2014-12-14 11:39:26 -08:00
Steven Fackler
39ad5ff651 Fix for opt in Copy 2014-12-11 20:36:24 -08:00