Examples of TClass


Examples of com.foundationdb.server.types.TClass

    }

    private static void putCast(Map<TClass, Map<TClass, TCast>> toMap, TCast cast, Set<TCastIdentifier> duplicates) {
        if (cast == null)
            return;
        TClass source = cast.sourceClass();
        TClass target = cast.targetClass();
        Map<TClass,TCast> castsByTarget = toMap.get(source);
        TCast old = castsByTarget.put(target, cast);
        if (old != null) {
            logger.error("CAST({} AS {}): {} replaced by {} ", new Object[]{
                    source, target,  old.getClass(), cast.getClass()
View Full Code Here

Examples of com.foundationdb.server.types.TClass

    }

    public TInstance typeForString(int length, String charset, String collation,
                                   int defaultCharsetId, int defaultCollationId,
                                   boolean nullable) {
        TClass tclass = typeClassForString();
        assert tclass.hasAttributes(StringAttribute.class) : tclass;
        int charsetId = defaultCharsetId, collationId = defaultCollationId;
        if (charset != null) {
            charsetId = StringFactory.charsetNameToId(charset);
        }
        if (collation != null) {
            collationId = StringFactory.collationNameToId(collation);
        }
        return tclass.instance(length, charsetId, collationId, nullable);
    }
View Full Code Here

Examples of com.foundationdb.server.types.TClass

    public TClass typeClassForSystemTimestamp() {
        return typeClassForJDBCType(Types.TIMESTAMP);
    }

    public int jdbcType(TInstance type) {
        TClass tclass = TInstance.tClass(type);
        if (tclass == null)
            return Types.OTHER;
        else
            return tclass.jdbcType();
    }
View Full Code Here

Examples of com.foundationdb.server.types.TClass

        else
            return tclass.jdbcType();
    }

    public Class<?> jdbcClass(TInstance type) {
        TClass tclass = TInstance.tClass(type);
        if (tclass == null)
            return Object.class;
        int jdbcType = tclass.jdbcType();
        switch (jdbcType) {
        case Types.DECIMAL:
        case Types.NUMERIC:
            return BigDecimal.class;
        case Types.BOOLEAN:
View Full Code Here

Examples of com.foundationdb.server.types.TClass

        return Object.class;
    }

    /** Does this type represent a signed numeric type? */
    public boolean isTypeSigned(TInstance type) {
        TClass tclass = TInstance.tClass(type);
        if (tclass == null)
            return false;
        switch (tclass.jdbcType()) {
        case Types.BIGINT:
        case Types.DECIMAL:
        case Types.DOUBLE:
        case Types.FLOAT:
        case Types.INTEGER:
View Full Code Here

Examples of com.foundationdb.server.types.TClass

            return false;
        }
    }

    public boolean isTypeUnsigned(TInstance type) {
        TClass tclass = TInstance.tClass(type);
        if (tclass == null)
            return false;
        else
            return tclass.isUnsigned();
    }
View Full Code Here

Examples of com.foundationdb.server.types.TClass

        case TypeId.FormatIds.GUID_TYPE_ID:
            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

Examples of com.foundationdb.server.types.TClass

        throw new UnknownDataTypeException(name);
    }

    public TInstance typeForJDBCType(int jdbcType, boolean nullable,
                                     String schemaName, String tableName, String columnName) {
        TClass tclass = typeClassForJDBCType(jdbcType, schemaName, tableName, columnName);
        if (tclass == null)
            return null;
        else
            return tclass.instance(nullable);
    }
View Full Code Here

Examples of com.foundationdb.server.types.TClass

            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);
        if (tclass == null)
            return null;
        else
            return tclass.instance(att, nullable);
    }
View Full Code Here

Examples of com.foundationdb.server.types.TClass

            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);
        if (tclass == null)
            return null;
        else
            return tclass.instance(att1, att2, nullable);
    }
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.