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

public Class SQLLongVarbit

extends SQLVarbit
Class Inheritance
Imports
org.apache.derby.shared.common.error.StandardException, org.apache.derby.shared.common.reference.Limits, org.apache.derby.iapi.services.io.StoredFormatIds

SQLLongVarbit represents the SQL type LONG VARCHAR FOR BIT DATA It is an extension of SQLVarbit and is virtually indistinguishable other than normalization.

Constructor Summary

AccessConstructor and Description
public
public
SQLLongVarbit(byte[] val)

Method Summary

Modifier and TypeMethod and Description
pack-priv int
getMaxMemoryUsage()

Overrides org.apache.derby.iapi.types.SQLVarbit.getMaxMemoryUsage.

Return max memory usage for a SQL LongVarbit

public DataValueDescriptor
getNewNull()

Overrides org.apache.derby.iapi.types.SQLVarbit.getNewNull.

Implements org.apache.derby.iapi.types.DataValueDescriptor.getNewNull.

Get a new null value of the same type as this data value.

public int
public String
public void
normalize(DataTypeDescriptor
The type to normalize the source column to
desiredType
,
DataValueDescriptor
The value to normalize
source
)

Overrides org.apache.derby.iapi.types.SQLVarbit.normalize.

Implements org.apache.derby.iapi.types.DataValueDescriptor.normalize.

Normalization method - this method may be called when putting a value into a SQLVarbit, for example, when inserting into a SQLVarbit column.

public int
Inherited from org.apache.derby.iapi.types.SQLVarbit:
setWidth

Constructor Detail

SQLLongVarbitback to summary
public SQLLongVarbit()
SQLLongVarbitback to summary
public SQLLongVarbit(byte[] val)

Method Detail

getMaxMemoryUsageback to summary
pack-priv int getMaxMemoryUsage()

Overrides org.apache.derby.iapi.types.SQLVarbit.getMaxMemoryUsage.

Return max memory usage for a SQL LongVarbit

getNewNullback to summary
public DataValueDescriptor getNewNull()

Overrides org.apache.derby.iapi.types.SQLVarbit.getNewNull.

Implements org.apache.derby.iapi.types.DataValueDescriptor.getNewNull.

Doc from org.apache.derby.iapi.types.DataValueDescriptor.getNewNull.

Get a new null value of the same type as this data value.

See Also
DataValueDescriptor#getNewNull
getTypeFormatIdback to summary
public int getTypeFormatId()

Overrides org.apache.derby.iapi.types.SQLVarbit.getTypeFormatId.

Implements org.apache.derby.iapi.services.io.TypedFormat.getTypeFormatId.

Return my format identifier.

Returns:int

Doc from org.apache.derby.iapi.services.io.TypedFormat.getTypeFormatId.

The identifier. (A UUID stuffed in an array of 16 bytes).

See Also
org.apache.derby.iapi.services.io.TypedFormat#getTypeFormatId
getTypeNameback to summary
public String getTypeName()

Overrides org.apache.derby.iapi.types.SQLVarbit.getTypeName.

Implements org.apache.derby.iapi.types.DataValueDescriptor.getTypeName.

Doc from org.apache.derby.iapi.types.DataValueDescriptor.getTypeName.

Get the SQL name of the datatype

Returns:String

The SQL name of the datatype

normalizeback to summary
public void normalize(DataTypeDescriptor desiredType, DataValueDescriptor source) throws StandardException

Overrides org.apache.derby.iapi.types.SQLVarbit.normalize.

Implements org.apache.derby.iapi.types.DataValueDescriptor.normalize.

Normalization method - this method may be called when putting a value into a SQLVarbit, for example, when inserting into a SQLVarbit column. See NormalizeResultSet in execution. This overrides SQLBit -- the difference is that we don't expand SQLVarbits to fit the target.

Parameters
desiredType:DataTypeDescriptor

The type to normalize the source column to

source:DataValueDescriptor

The value to normalize

Exceptions
StandardException:
Thrown for null into non-nullable column, and for truncation error
typePrecedenceback to summary
public int typePrecedence()

Overrides org.apache.derby.iapi.types.SQLVarbit.typePrecedence.

Implements org.apache.derby.iapi.types.DataValueDescriptor.typePrecedence.

Doc from org.apache.derby.iapi.types.DataValueDescriptor.typePrecedence.

Each built-in type in JSQL has a precedence. This precedence determines how to do type promotion when using binary operators. For example, float has a higher precedence than int, so when adding an int to a float, the result type is float. The precedence for some types is arbitrary. For example, it doesn't matter what the precedence of the boolean type is, since it can't be mixed with other types. But the precedence for the number types is critical. The SQL standard requires that exact numeric types be promoted to approximate numeric when one operator uses both. Also, the precedence is arranged so that one will not lose precision when promoting a type.

Returns:int

The precedence of this type.

See Also
DataValueDescriptor#typePrecedence