Search in sources :

Example 1 with RowMultiSetImpl

use of org.apache.derby.catalog.types.RowMultiSetImpl in project derby by apache.

the class QueryTreeNode method bindRowMultiSet.

/**
 * Bind the UDTs in a table type.
 *
 * @param originalDTD A datatype: might be an unbound UDT and might not be
 *
 * @return The bound table type if originalDTD was an unbound table type; otherwise returns originalDTD.
 */
public DataTypeDescriptor bindRowMultiSet(DataTypeDescriptor originalDTD) throws StandardException {
    if (!originalDTD.getCatalogType().isRowMultiSet()) {
        return originalDTD;
    }
    RowMultiSetImpl originalMultiSet = (RowMultiSetImpl) originalDTD.getTypeId().getBaseTypeId();
    TypeDescriptor[] columnTypes = originalMultiSet.getTypes();
    int columnCount = columnTypes.length;
    for (int i = 0; i < columnCount; i++) {
        columnTypes[i] = bindUserCatalogType(columnTypes[i]);
    }
    originalMultiSet.setTypes(columnTypes);
    return originalDTD;
}
Also used : DataTypeDescriptor(org.apache.derby.iapi.types.DataTypeDescriptor) TypeDescriptor(org.apache.derby.catalog.TypeDescriptor) RowMultiSetImpl(org.apache.derby.catalog.types.RowMultiSetImpl)

Aggregations

TypeDescriptor (org.apache.derby.catalog.TypeDescriptor)1 RowMultiSetImpl (org.apache.derby.catalog.types.RowMultiSetImpl)1 DataTypeDescriptor (org.apache.derby.iapi.types.DataTypeDescriptor)1