org.apache.derby.iapi.types
Interface ConcatableDataValue

All Superinterfaces:
DataValueDescriptor, java.io.Externalizable, Formatable, Orderable, java.io.Serializable, Storable, TypedFormat, VariableSizeDataValue
All Known Subinterfaces:
BitDataValue, StringDataValue
All Known Implementing Classes:
SQLBinary, SQLChar

public interface ConcatableDataValue
extends DataValueDescriptor, VariableSizeDataValue

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()

Author:
jamie

Field Summary
 
Fields inherited from interface org.apache.derby.iapi.types.Orderable
ORDER_OP_EQUALS, ORDER_OP_GREATEROREQUALS, ORDER_OP_GREATERTHAN, ORDER_OP_LESSOREQUALS, ORDER_OP_LESSTHAN
 
Fields inherited from interface org.apache.derby.iapi.types.VariableSizeDataValue
IGNORE_PRECISION
 
Method Summary
 NumberDataValue charLength(NumberDataValue result)
          The SQL char_length() function.
 ConcatableDataValue substring(NumberDataValue start, NumberDataValue length, ConcatableDataValue result, int maxLen)
          substr() function matchs DB2 syntax and behaviour.
 
Methods inherited from interface org.apache.derby.iapi.types.DataValueDescriptor
checkHostVariable, coalesce, compare, compare, equals, estimateMemoryUsage, getBigDecimal, getBoolean, getByte, getBytes, getClone, getDate, getDouble, getFloat, getInt, getLength, getLong, getNewNull, getObject, getShort, getStream, getString, getTime, getTimestamp, getTypeName, greaterOrEquals, greaterThan, in, isNotNull, isNullOp, lessOrEquals, lessThan, normalize, notEquals, readExternalFromArray, setInto, setInto, setObjectForCast, setToNull, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueFromResultSet, typePrecedence
 
Methods inherited from interface org.apache.derby.iapi.services.io.Storable
isNull, restoreToNull
 
Methods inherited from interface java.io.Externalizable
readExternal, writeExternal
 
Methods inherited from interface org.apache.derby.iapi.services.io.TypedFormat
getTypeFormatId
 
Methods inherited from interface org.apache.derby.iapi.types.VariableSizeDataValue
setWidth
 

Method Detail

charLength

public NumberDataValue charLength(NumberDataValue result)
                           throws StandardException
The SQL char_length() function.

Parameters:
result - The result of a previous call to this method, null if not called yet.
Returns:
A NumberDataValue containing the result of the char_length
Throws:
StandardException - Thrown on error

substring

public ConcatableDataValue substring(NumberDataValue start,
                                     NumberDataValue length,
                                     ConcatableDataValue result,
                                     int maxLen)
                              throws StandardException
substr() function matchs DB2 syntax and behaviour.

Parameters:
start - Start of substr
length - Length of substr
result - The result of a previous call to this method, null if not called yet.
maxLen - Maximum length of the result string
Returns:
A ConcatableDataValue containing the result of the substr()
Throws:
StandardException - Thrown on error


Apache Derby V10.0 Engine Documentation - Copyright © 1997,2004 The Apache Software Foundation or its licensors, as applicable.