Fractional second component. Constructs a NULLIntervalDS object. A NULLintervalDS can be initialized by assignment or calling fromText method. Methods that can be called on NULLintervalDS objects are setName() and isNull().

The following code example demonstrates that the default constructor creates a NULL value, and how you can assign a non NULL value to a day-second interval and then perform operations on it:

The following code example demonstrates how to create a NULL day-second interval, initialize the day-second interval by using the fromText() method, add to the day-second interval by using the += operator, multiply by using the * operator, compare 2 day-second intervals, and convert a day-second interval to a string by using the toText method:

IntervalDS()

Constructs a NULLIntervalDS object. A NULLIntervalDS can be initialized by assignment or calling fromText() method. Methods that can be called on NULLIntervalDS objects are setName() and isNull().

IntervalDS(
const IntervalDS &src);

Constructs an IntervalYM object from src.

Parameter

Description

scp

The source that the IntervalDS object will be copied from.

fromText()

Creates the interval from the string specified. The string is converted using the nls parameters associated with the relevant environment. The nls parameters are picked up from env. If env is NULL, the nls parameters are picked up from the environment associated with the instance, if any.

operator/=()

operator>()

Compares the intervals specified. If the first interval is greater than the second interval then TRUE is returned; otherwise, FALSE is returned. If either interval is NULL then SQLException is thrown.

Syntax

bool operator>(
const IntervalDS &first,
const IntervalDS &second);

Parameter

Description

first

The first interval to be compared.

second

The second interval to be compared.

operator>=()

Compares the intervals specified. If the first interval is greater than or equal to the second interval then TRUE is returned; otherwise, FALSE is returned. If either interval is NULL then SQLException is thrown.

Syntax

bool operator>=(
const IntervalDS &first,
const IntervalDS &first);

Parameter

Description

first

The first interval to be compared.

second

The second interval to be compared.

operator<()

Compares the intervals specified. If the first interval is less than the second interval then TRUE is returned; otherwise, FALSE is returned. If either interval is NULL then SQLException is thrown.

Syntax

bool operator<(
const IntervalDS &first,
const IntervalDS &second);

Parameter

Description

first

The first interval to be compared.

second

The second interval to be compared.

operator<=()

Compares the intervals specified. If the first interval is less than or equal to the second interval then TRUE is returned; otherwise, FALSE is returned. If either interval is NULL then SQLException is thrown.