Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit815a5d3

Browse files
committed
Remove impl forZoned
`Timestamp` already has impl and is semantically accurate for mapping to `timestamptz`, unlike `Zoned`.End users can do their own conversions from `Timestamp` to `Zoned` if desired.
1 parentf00d208 commit815a5d3

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

‎postgres-types/src/jiff_01.rs‎

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -58,27 +58,6 @@ impl ToSql for Timestamp {
5858
to_sql_checked!();
5959
}
6060

61-
impl<'a>FromSql<'a>forZoned{
62-
fnfrom_sql(type_:&Type,raw:&[u8]) ->Result<Zoned,Box<dynError +Sync +Send>>{
63-
Ok(Timestamp::from_sql(type_, raw)?.to_zoned(TimeZone::UTC))
64-
}
65-
66-
accepts!(TIMESTAMPTZ);
67-
}
68-
69-
implToSqlforZoned{
70-
fnto_sql(
71-
&self,
72-
type_:&Type,
73-
w:&mutBytesMut,
74-
) ->Result<IsNull,Box<dynError +Sync +Send>>{
75-
self.timestamp().to_sql(type_, w)
76-
}
77-
78-
accepts!(TIMESTAMPTZ);
79-
to_sql_checked!();
80-
}
81-
8261
impl<'a>FromSql<'a>forDate{
8362
fnfrom_sql(_:&Type,raw:&[u8]) ->Result<Date,Box<dynError +Sync +Send>>{
8463
let jd = types::date_from_sql(raw)?;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp