pgator.db.pq.types.time

PostgreSQL time types binary format.

There are following supported libpq formats: <ul> <li>date - handles year, month, day. Corresponding D type - std.datetime.Date.</li> <li>abstime - unix time in seconds without timezone. Corresponding D type - PGAbsTime wrapper around std.datetime.SysTime.</li> <li>reltime - seconds count positive or negative for representation of time durations. Corresponding D type - PGRelTime wrapper around core.time.Duration. Note that D's duration holds hnsecs count, but reltime precise at least seconds.</li> <li>time - day time without time zone. Corresponding D type - PGTime wrapper around std.datetime.TimeOfDay.</li> <li>time with zone - day time with time zone. Corresponding D type - PGTimeWithZone structure that can be casted to std.datetime.TimeOfDay and std.datetime.SimpleTimeZone.</li> <li>interval - time duration (modern replacement for reltime). Corresponding D time - TimeInterval that handles microsecond, day and month counts.</li> <li>tinterval - interval between two points in time. Consists of two abstime values: begin and end. Correponding D type - PGInterval wrapper around std.datetime.Interval.</li> </ul>

Members

Functions

TIMEROUND
double TIMEROUND(double j)
Undocumented in source. Be warned that the author may not have intended to support it.
TMODULO
void TMODULO(long t, long q, double u)
Undocumented in source. Be warned that the author may not have intended to support it.
TMODULO
void TMODULO(double t, T q, double u)
Undocumented in source. Be warned that the author may not have intended to support it.
convert
Date convert(ubyte[] val)
Undocumented in source. Be warned that the author may not have intended to support it.
convert
PGAbsTime convert(ubyte[] val)
Undocumented in source. Be warned that the author may not have intended to support it.
convert
PGRelTime convert(ubyte[] val)
Undocumented in source. Be warned that the author may not have intended to support it.
convert
PGTime convert(ubyte[] val)
Undocumented in source. Be warned that the author may not have intended to support it.
convert
PGTimeWithZone convert(ubyte[] val)
Undocumented in source. Be warned that the author may not have intended to support it.
convert
TimeInterval convert(ubyte[] val)
Undocumented in source. Be warned that the author may not have intended to support it.
convert
PGInterval convert(ubyte[] val)
Undocumented in source. Be warned that the author may not have intended to support it.
convert
PGTimeStamp convert(ubyte[] val)
Undocumented in source. Be warned that the author may not have intended to support it.
convert
PGTimeStampWithZone convert(ubyte[] val, IConnection conn)
Undocumented in source. Be warned that the author may not have intended to support it.
test
void test(ILogger strictLogger, IConnectionPool pool)
Undocumented in source. Be warned that the author may not have intended to support it.
test
void test(ILogger strictLogger, IConnectionPool pool)
Undocumented in source. Be warned that the author may not have intended to support it.
test
void test(ILogger strictLogger, IConnectionPool pool)
Undocumented in source. Be warned that the author may not have intended to support it.
test
void test(ILogger strictLogger, IConnectionPool pool)
Undocumented in source. Be warned that the author may not have intended to support it.
test
void test(ILogger strictLogger, IConnectionPool pool)
Undocumented in source. Be warned that the author may not have intended to support it.
test
void test(ILogger strictLogger, IConnectionPool pool)
Undocumented in source. Be warned that the author may not have intended to support it.
test
void test(ILogger strictLogger, IConnectionPool pool)
Undocumented in source. Be warned that the author may not have intended to support it.
test
void test(ILogger strictLogger, IConnectionPool pool)
Undocumented in source. Be warned that the author may not have intended to support it.
test
void test(ILogger strictLogger, IConnectionPool pool)
Undocumented in source. Be warned that the author may not have intended to support it.

Structs

PGAbsTime
struct PGAbsTime

Wrapper around SysTime to handle libpq abstime.

PGInterval
struct PGInterval

Wrapper around std.datetime.Interval to handle deserializing acceptable for JSON-RPC and still conform with libpq format.

PGRelTime
struct PGRelTime

Wrapper around Duration to handle libpq reltime.

PGTime
struct PGTime

Wrapper around TimeOfDay to allow serializing to bson.

PGTimeStamp
struct PGTimeStamp

Wrapper around std.datetime.SysTime to handle deserializing of libpq timestamps (without time zone).

PGTimeStampWithZone
struct PGTimeStampWithZone

Wrapper around std.datetime.SysTime to handle deserializing of libpq time stamps with time zone.

PGTimeWithZone
struct PGTimeWithZone

Represents PostgreSQL Time with TimeZone. Time zone is stored as UTC offset in seconds without DST.

TimeInterval
struct TimeInterval

PostgreSQL time interval isn't same with D std.datetime one. It is simple Duration.

Meta

License

Subject to the terms of the MIT license, as written in the included LICENSE file.

Authors

NCrashed <ncrashed@gmail.com>