reverting commit to PG
@@ -310,52 +310,4 @@ mod tests {
query.get_result::<NaiveDate>(connection)
);
}
-
- #[test]
- fn dummy() {
- let conn = &mut connection();
- crate::table! {
- #[allow(unused_parens)]
- dummy(id) {
- id -> Integer,
- timestamp_with_tz -> Timestamptz,
- }
- }
- use self::chrono::DateTime;
- use crate::deserialize::FromSqlRow;
- use crate::sql_types::Integer;
-
- crate::sql_query(
- "CREATE TABLE IF NOT EXISTS dummy(id INTEGER PRIMARY KEY, timestamp_with_tz TIMESTAMPTZ NOT NULL);",
- )
- .execute(conn)
- .unwrap();
-
- crate::insert_into(dummy::table)
- .values(vec![
- (
- dummy::id.eq(1),
- dummy::timestamp_with_tz.eq(sql::<Timestamptz>("'1970-01-01Z'::timestamptz")),
- ),
- (
- dummy::id.eq(2),
- dummy::timestamp_with_tz.eq(sql::<Timestamptz>("'1970-01-02Z'::timestamptz")),
- ),
- ])
- .execute(conn)
- .unwrap();
-
- let query = dummy::table.select((dummy::id, dummy::timestamp_with_tz));
- let row_iter = conn.load(&query).unwrap();
- for row in row_iter {
- let row = row.unwrap();
- let deserialized =
- <(i32, DateTime<Utc>) as FromSqlRow<(Integer, Timestamptz), _>>::build_from_row(
- &row,
- )
- .unwrap();
- println!("row is {:?}", deserialized);
- }
- assert_eq!(true, false);
- }
}
