3#ifndef _NuoDB_TEMPORAL_H_
4#define _NuoDB_TEMPORAL_H_ 1
12#ifndef _NUODB_STRUCTS_H_
enum NuoDB_Status_enum NuoDB_Status
Status codes used by the C Driver.
Definition error.h:130
Data structure used to represent temporal information.
Definition temporal.h:59
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...
Definition temporal.h:177
NuoDB_Status(* setTimestamp)(NuoDB_Temporal *_this, struct tm *utc_time)
Set this timestamp from the time specified in utc_time.
Definition temporal.h:130
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.
Definition temporal.h:160
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 nanos...
Definition temporal.h:109
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.
Definition temporal.h:190
int32_t(* getNanoSeconds)(NuoDB_Temporal *_this)
Return the value of the fractional part of the corresponding NuoDB_Temporal data structure as nanosec...
Definition temporal.h:119
void(* setMilliSeconds)(NuoDB_Temporal *_this, int64_t millis)
Set the NuoDB_Temporal data structure with the specified number of milliseconds.
Definition temporal.h:86
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 th...
Definition temporal.h:143
int64_t(* getMilliSeconds)(NuoDB_Temporal *_this)
Return the value of the corresponding NuoDB_Temporal data structure as milliseconds.
Definition temporal.h:99
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...
Definition temporal.h:203
int(* getType)(NuoDB_Temporal *_this)
Return the SQL type for the NuoDB_Temporal data structure.
Definition temporal.h:75
NUODB_CAPI NuoDB_Temporal *NUODB_CAPICALL NuoDB_Temporal_create(NuoDB_Temporal_Type temporalType)
Create a NuoDB_Temporal data structure for the specified SQL type.
NUODB_CAPI void NUODB_CAPICALL NuoDB_Timezone_free(const NuoDB_Timezone *timezone)
Free the NuoDB_Timezone data structure.
NuoDB_Temporal_Type_enum
Enum defining constant temporal types used by NuoDB_Temporal.
Definition temporal.h:27
@ NUODB_TEMPORAL_TIMESTAMP_NO_TZ
SQL TIMESTAMP WITHOUT TIME ZONE type.
Definition temporal.h:46
@ NUODB_TEMPORAL_TIME
SQL TIME type.
Definition temporal.h:36
@ NUODB_TEMPORAL_DATE
SQL DATE type.
Definition temporal.h:31
@ NUODB_TEMPORAL_TIMESTAMP
SQL TIMESTAMP type.
Definition temporal.h:41
NUODB_CAPI void NUODB_CAPICALL NuoDB_Temporal_free(NuoDB_Temporal *temporal)
Free the NuoDB_Temporal data structure.
enum NuoDB_Temporal_Type_enum NuoDB_Temporal_Type
Constant temporal types used by NuoDB_Temporal.
Definition temporal.h:51
NUODB_CAPI const NuoDB_Timezone *NUODB_CAPICALL NuoDB_Timezone_create(const char *timezoneId)
Create a NuoDB_Timezone data structure for the specified timezone id.
NUODB_CAPI void NUODB_CAPICALL NuoDB_Temporal_init(NuoDB_Temporal *tm, NuoDB_Temporal_Type temporalType)
Initialize a NuoDB_Temporal data structure with the specified SQL type.