![]() |
C Driver API 3.0.0
API for the NuoDB C Driver Library
|
Data structure used to represent temporal information. More...
#include <temporal.h>
Data Fields | |
int64_t(* | getMilliSeconds )(NuoDB_Temporal *_this) |
Return the value of the corresponding NuoDB_Temporal data structure as milliseconds. | |
int32_t(* | getNanoSeconds )(NuoDB_Temporal *_this) |
Return the value of the fractional part of the corresponding NuoDB_Temporal data structure as nanoseconds. | |
NuoDB_Status(* | getTimestamp )(NuoDB_Temporal *_this, struct tm *utc_time) |
Populate the utc_time struct with the value from this timestamp based on the UTC time zone (versus the local time zone). | |
NuoDB_Status(* | getTimestampNuoDBTimezone )(NuoDB_Temporal *_this, const NuoDB_Timezone *timeZone, struct tm *tz_time) |
Populate the tm time struct with the value from this timestamp based on the time zone being passed in. | |
NuoDB_Status(* | getTimestampTZ )(NuoDB_Temporal *_this, const char *timeZoneId, struct tm *tz_time) |
Populate the tm time struct with the value from this timestamp based on the time zone being passed in. | |
int(* | getType )(NuoDB_Temporal *_this) |
Return the SQL type for the NuoDB_Temporal data structure. | |
int64_t | milliseconds |
int32_t | nanoseconds |
void(* | setMilliSeconds )(NuoDB_Temporal *_this, int64_t millis) |
Set the NuoDB_Temporal data structure with the specified number of milliseconds. | |
void(* | setNanoSeconds )(NuoDB_Temporal *_this, int32_t nanos) |
Set the fractions of a second in the NuoDB_Temporal data structure with the specified number of nanoseconds. | |
NuoDB_Status(* | setTimestamp )(NuoDB_Temporal *_this, struct tm *utc_time) |
Set this timestamp from the time specified in utc_time. | |
NuoDB_Status(* | setTimestampNuoDBTimezone )(NuoDB_Temporal *_this, const NuoDB_Timezone *timeZone, struct tm *tz_time) |
Set this timestamp from the time specified in tz_time using the time zone being passed in. | |
NuoDB_Status(* | setTimestampTZ )(NuoDB_Temporal *_this, const char *timeZoneId, struct tm *tz_time) |
Set this timestamp from the time specified in tz_time using the time zone being passed in. | |
NuoDB_Temporal_Type | type |
Data structure used to represent temporal information.
The NuoDB_Temporal data structure can be used to store and retrieve any NuoDB Temporal information (SQL DATE, SQL TIME, SQL TIMESTAMP or SQL TIMESTAMP WITHOUT TIME ZONE).
int64_t(* NuoDB_Temporal::getMilliSeconds) (NuoDB_Temporal *_this) |
Return the value of the corresponding NuoDB_Temporal data structure as milliseconds.
The milliseconds returned will be UTC milliseconds since the common (UNIX) epoch, Jan 1, 1970.
[in] | _this | a pointer to the current (this) data structure. |
int32_t(* NuoDB_Temporal::getNanoSeconds) (NuoDB_Temporal *_this) |
Return the value of the fractional part of the corresponding NuoDB_Temporal data structure as nanoseconds.
[in] | _this | a pointer to the current (this) data structure. |
NuoDB_Status(* NuoDB_Temporal::getTimestamp) (NuoDB_Temporal *_this, struct tm *utc_time) |
Populate the utc_time struct with the value from this timestamp based on the UTC time zone (versus the local time zone).
[in] | _this | a pointer to the current (this) data structure. |
[out] | utc_time | C standard tm time struct (<time.h>) |
NuoDB_Status(* NuoDB_Temporal::getTimestampNuoDBTimezone) (NuoDB_Temporal *_this, const NuoDB_Timezone *timeZone, struct tm *tz_time) |
Populate the tm time struct with the value from this timestamp based on the time zone being passed in.
[in] | _this | a pointer to the current (this) data structure. |
[in] | timeZone | pointer to an initialized timezone |
[out] | tm_time | C standard tm time struct (<time.h>) |
NuoDB_Status(* NuoDB_Temporal::getTimestampTZ) (NuoDB_Temporal *_this, const char *timeZoneId, struct tm *tz_time) |
Populate the tm time struct with the value from this timestamp based on the time zone being passed in.
[in] | _this | a pointer to the current (this) data structure. |
[in] | timeZoneId | NuoDB uses ICU for timezone conversions. timezoneId is an id for a time zone, such as "America/Los_Angeles", or a custom ID such as "GMT-8:00". It is passed as an argument to icu::TimeZone::createTimeZone(). |
[out] | tm_time | C standard tm time struct (<time.h>) |
int(* NuoDB_Temporal::getType) (NuoDB_Temporal *_this) |
Return the SQL type for the NuoDB_Temporal data structure.
The NuoDB_Temporal data structure can be used to store and retrieve a SQL DATE, SQL TIME, SQL TIMESTAMP or SQL TIMESTAMP WITHOUT TIME ZONE. This function returns the SQL type.
[in] | _this | a pointer to the current (this) data structure. |
void(* NuoDB_Temporal::setMilliSeconds) (NuoDB_Temporal *_this, int64_t millis) |
Set the NuoDB_Temporal data structure with the specified number of milliseconds.
[in] | _this | a pointer to the current (this) data structure. |
[in] | millis | a 64-bit integer specifying the number of milliseconds since the common (UNIX) epoch, January 1, 1970 |
void(* NuoDB_Temporal::setNanoSeconds) (NuoDB_Temporal *_this, int32_t nanos) |
Set the fractions of a second in the NuoDB_Temporal data structure with the specified number of nanoseconds.
[in] | _this | a pointer to the current (this) data structure. |
[in] | nanos | a 32-bit integer specifying the fractional part of one second in nanoseconds. |
NuoDB_Status(* NuoDB_Temporal::setTimestamp) (NuoDB_Temporal *_this, struct tm *utc_time) |
Set this timestamp from the time specified in utc_time.
[in] | _this | a pointer to the current (this) data structure. |
[in] | utc_time | C standard tm struct (<time.h>) |
NuoDB_Status(* NuoDB_Temporal::setTimestampNuoDBTimezone) (NuoDB_Temporal *_this, const NuoDB_Timezone *timeZone, struct tm *tz_time) |
Set this timestamp from the time specified in tz_time using the time zone being passed in.
[in] | _this | a pointer to the current (this) data structure. |
[in] | timeZone | pointer to an initialized timezone |
[in] | tz_time | C standard tm struct (<time.h>) |
NuoDB_Status(* NuoDB_Temporal::setTimestampTZ) (NuoDB_Temporal *_this, const char *timeZoneId, struct tm *tz_time) |
Set this timestamp from the time specified in tz_time using the time zone being passed in.
[in] | _this | a pointer to the current (this) data structure. |
[in] | timeZoneId | NuoDB uses ICU for timezone conversions. timezoneId is an id for a time zone, such as "America/Los_Angeles", or a custom ID such as "GMT-8:00". It is passed as an argument to icu::TimeZone::createTimeZone(). |
[in] | tz_time | C standard tm struct (<time.h>) |