Top Description Fields Methods
org.apache.derby.iapi.types

public Interface ConcatableDataValue

extends DataValueDescriptor, VariableSizeDataValue
Known Direct Subinterfaces
org.apache.derby.iapi.types.StringDataValue, org.apache.derby.iapi.types.BitDataValue
Imports
org.apache.derby.shared.common.error.StandardException

The ConcatableDataValue interface corresponds to the SQL 92 string value data type. It is implemented by datatypes that have a length, and can be concatenated. It is implemented by the character datatypes and the bit datatypes. The following methods are defined herein: charLength() The following is defined by the sub classes (bit and char) concatenate()

Field Summary

Inherited from org.apache.derby.iapi.types.DataValueDescriptor:
UNKNOWN_LOGICAL_LENGTH
Inherited from org.apache.derby.iapi.types.VariableSizeDataValue:
IGNORE_PRECISION

Method Summary

Modifier and TypeMethod and Description
public NumberDataValue

Returns:

A NumberDataValue containing the result of the char_length
charLength
(NumberDataValue
The result of a previous call to this method, null if not called yet.
result
)

The SQL char_length() function.

public ConcatableDataValue

Returns:

A ConcatableDataValue containing the result of the substr()
substring
(NumberDataValue
Start of substr
start
,
NumberDataValue
Length of substr
length
,
ConcatableDataValue
The result of a previous call to this method, null if not called yet.
result
,
int
Maximum length of the result string
maxLen
)

substr() function matchs DB2 syntax and behaviour.

Inherited from org.apache.derby.iapi.types.DataValueDescriptor:
checkHostVariablecloneHoldercloneValuecoalescecomparecomparecomparecompareequalsestimateMemoryUsagegetBooleangetBytegetBytesgetDategetDoublegetFloatgetIntgetLengthgetLonggetNewNullgetObjectgetShortgetStreamgetStringgetTimegetTimestampgetTraceStringgetTypeNamegreaterOrEqualsgreaterThanhasStreaminisNotNullisNullOplessOrEqualslessThannormalizenotEqualsreadExternalFromArrayrecyclesetBigDecimalsetIntosetIntosetObjectForCastsetToNullsetValuesetValuesetValuesetValuesetValuesetValuesetValuesetValuesetValuesetValuesetValuesetValuesetValuesetValuesetValuesetValuesetValuesetValuesetValuesetValuesetValueFromResultSettypePrecedencetypeToBigDecimal
Inherited from org.apache.derby.iapi.types.VariableSizeDataValue:
setWidth

Method Detail

charLengthback to summary
public NumberDataValue charLength(NumberDataValue result) throws StandardException

The SQL char_length() function.

Parameters
result:NumberDataValue

The result of a previous call to this method, null if not called yet.

Returns:NumberDataValue

A NumberDataValue containing the result of the char_length

Exceptions
StandardException:
Thrown on error
substringback to summary
public ConcatableDataValue substring(NumberDataValue start, NumberDataValue length, ConcatableDataValue result, int maxLen) throws StandardException

substr() function matchs DB2 syntax and behaviour.

Parameters
start:NumberDataValue

Start of substr

length:NumberDataValue

Length of substr

result:ConcatableDataValue

The result of a previous call to this method, null if not called yet.

maxLen:int

Maximum length of the result string

Returns:ConcatableDataValue

A ConcatableDataValue containing the result of the substr()

Exceptions
StandardException:
Thrown on error