Structs§
- Casts an array of one type to an array of another type. Does so by casting each element of the first array to the desired inner type and collecting the results into a new array.
- Casts between two list types by casting each element of
a
(“list1”) usingcast_expr
and collecting the results into a new list (“list2”). - Casts between two record types by casting each element of
a
(“record1”) usingcast_expr
and collecting the results into a new record (“record2”). - All Char data is stored in Datum::String with its blank padding removed (i.e. trimmed), so this function provides a means of restoring any removed padding.
Enums§
Functions§
- Converts the time
t
, which is assumed to be in UTC, to the timezonetz
. For example,EST
and17:39:14
would return12:39:14
. - Converts the timestamp
dt
, which is assumed to be in the time of the timezonetz
to a timestamptz in UTC. This operation is fallible because certain timestamps at timezones that observe DST are simply impossible or ambiguous. In case of ambiguity (when a hour repeats) we will prefer the latest variant, and when an hour is impossible, we will attempt to fix it by advancing it. For example,EST
and2020-11-11T12:39:14
would return2020-11-11T17:39:14Z
. A DST observing timezone likeAmerica/New_York
would cause the following DST anomalies:2020-11-01T00:59:59
->2020-11-01T04:59:59Z
and2020-11-01T01:00:00
->2020-11-01T06:00:00Z
2020-03-08T02:59:59
->2020-03-08T07:59:59Z
and2020-03-08T03:00:00
->2020-03-08T07:00:00Z
- Converts the UTC timestamptz
utc
to the local timestamp of the timezonetz
. For example,EST
and2020-11-11T17:39:14Z
would return2020-11-11T12:39:14
.