Public member functions documentation

NzaeTimeField addInterval(const NzaeIntervalField &x) const
Constructs a TimeField by adding an interval.
Parameters
NzaeIntervalField x
The NzaeIntevalField value.
Returns
NzaeTimeField
The TimeField consisting of Interval plus Time.
void decodeTime(uint8_t *hour, uint8_t *minute, uint8_t *second, uint32_t *mcrs, bool *errorFlag=NULL) const
Converts a Netezza-encoded Time value to h:m:s:micros.
Parameters
hour
The hour, 0 to 23 inclusive.
minute
The minute, 0 to 59 inclusive.
second
The second, 0 to 59 inclusive.
mcrs
The microsecond, 0 to 999,999 inclusive.
errorFlag
If not NULL, *set to TRUE if isValidTime(encodedTime) is FALSE; *set to FALSE otherwise.
Exceptions
NzaeException
void encodeTime(uint32_t hour, uint32_t minute, uint32_t second, uint32_t mcrs, bool *error-Flag=NULL)
Converts a h:m:s:micros Time value to a Netezza-encoded Time.
Parameters
hour
The hour, 0 to 23 inclusive.
minute
The minute, 0 to 59 inclusive.
second
The second, 0 to 59 inclusive.
mcrs
The microsecond, 0 to 999,999 inclusive.
errorFlag
If not NULL, *set to TRUE if isValidTime(encodedTime) is FALSE; *set to FALSE otherwise.
Exceptions
NzaeException
void fromString(std::string str)
Constructs the field from the string.
Parameters
str
The string to assign from.
bool isValidTime() const
Specifies whether a Netezza-encoded Time value is valid and within range.
Returns
FALSE if encodedTime<ENC_TIME_MIN, or encodedTime>ENC_TIME_MAX. TRUE otherwise.
NzaeTimeField(const NzaeTimeField &field)
Constructs a time field with value field.
Parameters
NzaeTimeField field
The NzaeTimeField value.
NzaeTimeField(const NzaeTimeTzField &field)
Constructs a time field with value field.
Parameters
NzaeTimeField field
The NzaeTimeField value.
NzaeTimeField()
Constructs a NULL time field.
NzaeTimeField(const NzaeTimestampField &field)
Constructs a time field with value field.
Parameters
NzaeTimestampField field
The NzaeTimestampField value.
NzaeTimeField(int64_t val)
Constructs a time field with value val
Parameters
val
The encoded time value.
void offsetTime(int32_t sqlOffset, bool *errorFlag=NULL)
Applies an offset to the Netezza Time. If nzTime with offset runs over 23:59:59.999999, it' wraps around' back at zero. For example, applying '+120 minutes' to the encoded equivalent of '23:00:00' returns the encoded equivalent of '01:00:00'.
Parameters
sqlOffset
The time offset, in minutes, SQL_OFFSET_MIN to SQL_OFFSET_MAX inclusive.
errorFlag
If not NULL, *set to TRUE if isValidSqlOffset(sqlOffset) is FALSE or isValidTime(nzTime) is FALSE; FALSE otherwise.
Exceptions
NzaeException
operator int64_t() const
Returns the encoded field value.
Returns
The encoded value.
operator NzaeIntervalField() const
Returns the interval field value.
Returns
The timestamp value converted from time.
operator NzaeTimeTzField() const
Returns the timetz field value.
Returns
The timestamp value converted from time.
NzaeTimeField& operator=(const NzaeTimestampField &field)
Assigns the value of the argument to a field object.
Parameters
NzaeTimestampField field
The field to assign.
Returns
NzaeTimeField
NzaeTimeField& operator=(NzaeField &field)
Assigns the value of the argument to a field object.
Parameters
NzaeField field
The field to assign.
Returns
NzaeTimeField
The field argument may be a different type, so long as it is compatible.
NzaeTimeField& operator=(const NzaeTimeTzField &field)
Assigns the value of the argument to a field object.
Parameters
NzaeTimeTzField field
The field to assign.
Returns
NzaeTimeField
NzaeTimeField& operator=(int64_t val)
Assigns the value of the argument to a field object.
Parameters
val
The encoded value to assign.
Returns
NzaeTimeField
NzaeTimeField& operator=(const NzaeTimeField &field)
Assigns the value of the argument to a field object.
Parameters
NzaeTimeField field
The field to assign.
Returns
NzaeTimeField
NzaeTimeField subInterval(const NzaeIntervalField &x) const
Constructs a TimeField by subtracting interval.
Parameters
NzaeIntervalField field x
The NzaeIntervalField value.
Returns
NzaeTimeField
The TimeField, consisting of Time minus interval.
NzaeIntervalField subTime(const NzaeTimeField &x) const
Constructs an IntervalField by subtracting time.
Parameters
NzaeTimeField x
The NzaeTimeField value.
Returns
NzaeIntervalField
The IntervalField, consisting of Time minus Time.
std::string toString() const
Returns the string representation of the field.
Returns
The string representation.
virtual NzaeDataTypes::Types type() const

Returns the type of the field.

Returns
Types
The field type.