mirror of
https://github.com/diesel-rs/diesel.git
synced 2024-10-04 01:28:13 +03:00
impl FromSqlRow<Timestamptz, Pg> for NaiveDateTime
It looks like I had forgotten a handful of impls when I added the
feature. I intentionally excluded several types from the `FromSql` side,
but it makes sense for us to allow `NaiveDateTime`, and b6b56c97
makes
it sound like I had intended to do so in that commit.
Fixes #539.
This commit is contained in:
parent
59ec87996f
commit
47ccc5fc45
@ -4,6 +4,13 @@ All user visible changes to this project will be documented in this file.
|
||||
This project adheres to [Semantic Versioning](http://semver.org/), as described
|
||||
for Rust libraries in [RFC #1105](https://github.com/rust-lang/rfcs/blob/master/text/1105-api-evolution.md)
|
||||
|
||||
## Unreleased
|
||||
|
||||
### Fixed
|
||||
|
||||
* Added missing impls for loading `chrono::NaiveDateTime` from a column of type
|
||||
`Timestamptz`
|
||||
|
||||
## [0.9.0] - 2016-12-08
|
||||
|
||||
### Added
|
||||
|
@ -15,6 +15,7 @@ expression_impls! {
|
||||
Date -> NaiveDate,
|
||||
Time -> NaiveTime,
|
||||
Timestamp -> NaiveDateTime,
|
||||
Timestamptz -> NaiveDateTime,
|
||||
Timestamptz -> DateTime<UTC>,
|
||||
Timestamptz -> DateTime<FixedOffset>,
|
||||
Timestamptz -> DateTime<Local>,
|
||||
@ -24,6 +25,7 @@ queryable_impls! {
|
||||
Date -> NaiveDate,
|
||||
Time -> NaiveTime,
|
||||
Timestamp -> NaiveDateTime,
|
||||
Timestamptz -> NaiveDateTime,
|
||||
Timestamptz -> DateTime<UTC>,
|
||||
}
|
||||
|
||||
|
@ -107,6 +107,7 @@ mod pg_types {
|
||||
test_round_trip!(naive_time_roundtrips, Time, (u32, u32), mk_naive_time);
|
||||
test_round_trip!(naive_date_roundtrips, Date, u32, mk_naive_date);
|
||||
test_round_trip!(datetime_roundtrips, Timestamptz, (i64, u32), mk_datetime);
|
||||
test_round_trip!(naive_datetime_roundtrips_tz, Timestamptz, (i64, u32), mk_naive_datetime);
|
||||
test_round_trip!(uuid_roundtrips, Uuid, (u32, u16, u16, (u8, u8, u8, u8, u8, u8, u8, u8)), mk_uuid);
|
||||
|
||||
fn mk_uuid(data: (u32, u16, u16, (u8, u8, u8, u8, u8, u8, u8, u8))) -> self::uuid::Uuid {
|
||||
|
Loading…
Reference in New Issue
Block a user