ValueTimestampTimeZone

Implementation of the TIMESTAMP WITH TIME ZONE data type.

Methods
static ValueTimestampTimeZone fromDateValueAndNanos(long dateValue, long timeNanos, short timeZoneOffsetMins)
Get or create a date value for the given date.
static ValueTimestampTimeZone fromDateValueAndNanos(long dateValue, long timeNanos, short timeZoneOffsetMins)
Get or create a date value for the given date.
Parameters:
dateValue - the date value, a bit field with bits for the year, month, and day
timeNanos - the nanoseconds since midnight
timeZoneOffsetMins - the timezone offset in minutes
Returns:
the value
static ValueTimestampTimeZone get(TimestampWithTimeZone timestamp)
Get or create a timestamp value for the given timestamp.
static ValueTimestampTimeZone get(TimestampWithTimeZone timestamp)
Get or create a timestamp value for the given timestamp.
Parameters:
timestamp - the timestamp
Returns:
the value
static int getDisplaySize(int scale)
Get display size for the specified scale.
static int getDisplaySize(int scale)
Get display size for the specified scale.
Parameters:
scale - scale
Returns:
display size
static ValueTimestampTimeZone parse(String s)
Parse a string to a ValueTimestamp.
static ValueTimestampTimeZone parse(String s)
Parse a string to a ValueTimestamp. This method supports the format +/-year-month-day hour:minute:seconds.fractional and an optional timezone part.
Parameters:
s - the string to parse
Returns:
the date
Value add(Value v)
Value add(Value v)
boolean checkPrecision(long precision)
boolean checkPrecision(long precision)
int compareSecure(Value o, CompareMode mode)
int compareSecure(Value o, CompareMode mode)
Value convertScale(boolean onlyToSmallerScale, int targetScale)
Value convertScale(boolean onlyToSmallerScale, int targetScale)
boolean equals(Object other)
boolean equals(Object other)
long getDateValue()
A bit field with bits for the year, month, and day (see DateTimeUtils for encoding).
long getDateValue()
A bit field with bits for the year, month, and day (see DateTimeUtils for encoding).
Returns:
the data value
int getDisplaySize()
int getDisplaySize()
Object getObject()
Object getObject()
long getPrecision()
long getPrecision()
String getSQL()
String getSQL()
int getScale()
int getScale()
String getString()
String getString()
long getTimeNanos()
The nanoseconds since midnight.
long getTimeNanos()
The nanoseconds since midnight.
Returns:
the nanoseconds
short getTimeZoneOffsetMins()
The timezone offset in minutes.
short getTimeZoneOffsetMins()
The timezone offset in minutes.
Returns:
the offset
Timestamp getTimestamp()
Timestamp getTimestamp()
int getType()
int getType()
int hashCode()
int hashCode()
void set(PreparedStatement prep, int parameterIndex)
void set(PreparedStatement prep, int parameterIndex) throws SQLException
Value subtract(Value v)
Value subtract(Value v)

Fields
static int DEFAULT_PRECISION = 32
static int DEFAULT_SCALE = 6
static int MAXIMUM_PRECISION = 35
static int MAXIMUM_SCALE = 9

DEFAULT_PRECISION = 32

The default precision and display size of the textual representation of a timestamp. Example: 2001-01-01 23:59:59.123456+10:00

MAXIMUM_PRECISION = 35

The maximum precision and display size of the textual representation of a timestamp. Example: 2001-01-01 23:59:59.123456789+10:00

DEFAULT_SCALE = 6

The default scale for timestamps.

MAXIMUM_SCALE = 9

The default scale for timestamps.