Package com.foundationdb.server.types

Examples of com.foundationdb.server.types.TClass.instance()


                        return null;
                    tClass = typesList.next();
                } while (!TypeValidator.isSupportedForColumn(tClass));
               
                boolean indexable = TypeValidator.isSupportedForIndex(tClass);
                TInstance type = tClass.instance(true);
                PostgresType pgType = PostgresType.fromTInstance(type);
               
                String bundle = tClass.name().bundleId().name();
                String category = tClass.name().categoryName();
                String name = tClass.name().unqualifiedName();
View Full Code Here


            throw error("couldn't determine a type for CASE expression");
        if (commonClass == leftTClass)
            return left;
        if (commonClass == rightTClass)
            return right;
        return commonClass.instance(left.nullability() || right.nullability());
    }

    private static RuntimeException error(String message) {
        throw new RuntimeException(message); // TODO what actual error type?
    }
View Full Code Here

                    }
                    else if (botIsCommon) {
                        instances[field] = botInstance;
                    }
                    else if (!topIsCommon) { // this of this as "else if (topIsBottom) { <noop> } else { ..."
                        instances[field] = commonTClass.instance(eitherIsNullable);
                    }

                    // See if the top instance is not nullable but should be
                    if (instances[field] != null) {
                        instances[field] = instances[field].withNullable(eitherIsNullable);
View Full Code Here

            charsetId = StringFactory.charsetNameToId(charset);
        }
        if (collation != null) {
            collationId = StringFactory.collationNameToId(collation);
        }
        return tclass.instance(length, charsetId, collationId, nullable);
    }

    public TClass typeClassForBinary() {
        return typeClassForJDBCType(Types.VARBINARY);
    }
View Full Code Here

            return AkGUID.INSTANCE.instance(sqlType.isNullable());
        case TypeId.FormatIds.USERDEFINED_TYPE_ID:
            {
                String name = typeId.getSQLTypeName();
                TClass tclass = typeClassForUserDefined(name);
                return tclass.instance(sqlType.isNullable());
            }
        default:
            if (columnName != null) {
                throw new UnsupportedColumnDataTypeException(schemaName, tableName, columnName,
                                                             sqlType.toString());
View Full Code Here

                                     String schemaName, String tableName, String columnName) {
        TClass tclass = typeClassForJDBCType(jdbcType, schemaName, tableName, columnName);
        if (tclass == null)
            return null;
        else
            return tclass.instance(nullable);
    }

    public TInstance typeForJDBCType(int jdbcType, int att, boolean nullable,
                                     String schemaName, String tableName, String columnName) {
        TClass tclass = typeClassForJDBCType(jdbcType, schemaName, tableName, columnName);
View Full Code Here

                                     String schemaName, String tableName, String columnName) {
        TClass tclass = typeClassForJDBCType(jdbcType, schemaName, tableName, columnName);
        if (tclass == null)
            return null;
        else
            return tclass.instance(att, nullable);
    }

    public TInstance typeForJDBCType(int jdbcType, int att1, int att2, boolean nullable,
                                     String schemaName, String tableName, String columnName) {
        TClass tclass = typeClassForJDBCType(jdbcType, schemaName, tableName, columnName);
View Full Code Here

                                     String schemaName, String tableName, String columnName) {
        TClass tclass = typeClassForJDBCType(jdbcType, schemaName, tableName, columnName);
        if (tclass == null)
            return null;
        else
            return tclass.instance(att1, att2, nullable);
    }

    protected TInstance typeForStringType(int jdbcType, DataTypeDescriptor type,
                                          int defaultCharsetId, int defaultCollationId,
                                          String schemaName, String tableName, String columnName) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.