Examples of TClass


Examples of com.db4o.config.TClass

        if (!Deploy.csharp) {
           
            // link standard translators, so they won't get deleted
            // by deployment
           
            new TClass();
            new TVector();
            new THashtable();
            new TNull();
        }
    }
View Full Code Here

Examples of com.foundationdb.server.types.TClass

    private static boolean isFixedDecimal(Column column) {
        return column.getType().typeClass() instanceof TBigDecimal;
    }

    private static boolean isTextOrBinary(Column column) {
        TClass columnType = column.getType().typeClass();
        // TBD: Is this right? What types can store serialized spatial objects?
        return
            columnType instanceof TBinary ||
            columnType instanceof TString;
    }
View Full Code Here

Examples of com.foundationdb.server.types.TClass

                rightExpr = castTo(rightExpr, common, castResolver);
                return new TComparisonExpression(leftExpr, comparison, rightExpr);
            }

            private TPreparedExpression castTo(TPreparedExpression expression, TInstance target, TCastResolver casts) {
                TClass inputTClass = expression.resultType().typeClass();
                TClass targetTClass = target.typeClass();
                if (targetTClass.equals(inputTClass))
                    return expression;
                TCast cast = casts.cast(inputTClass, targetTClass);
                return new TCastExpression(expression, cast, target);
            }
        };
View Full Code Here

Examples of com.foundationdb.server.types.TClass

                super (rowType);
                typesList = getTypesRegistry().getTypeClasses().iterator();
            }
           
            private TClass nextType() {
                TClass type = null;
                do {
                    if (!typesList.hasNext())
                        return null;
                    type = typesList.next();
                } while (!TypeValidator.isSupportedForColumn(type));
View Full Code Here

Examples of com.foundationdb.server.types.TClass

            }
           
            @Override
            public Row next() {
                // Skip the unsupported types
                TClass tClass = null;
                do {
                    if (!typesList.hasNext())
                        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();
               
                String attribute1 = null;
                String attribute2 = null;
                String attribute3 = null;
                Iterator<? extends Attribute> attrs = tClass.attributes().iterator();
                if (attrs.hasNext()) {
                    attribute1 = attrs.next().name();
                }
                if (attrs.hasNext()) {
                    attribute2 = attrs.next().name();
                }
                if (attrs.hasNext()) {
                    attribute3 = attrs.next().name();
                }
                Long size = tClass.hasFixedSerializationSize() ? (long)tClass.fixedSerializationSize() : null;
               
                Integer jdbcTypeID = tClass.jdbcType();
               
                return new ValuesRow (rowType,
                        name,
                        category,
                        bundle,
View Full Code Here

Examples of com.foundationdb.server.types.TClass

        }

        @Override
        protected ValueSource getValue(int index) {
            TInstance type = getType(index);
            TClass tclass = type.typeClass();
            ValueSource source;
            if (parameterArgs[index] < 0) {
                source = ValueSources.valuefromObject(constantArgs[index], type);
                if (source.getType().typeClass().equals(tclass))
                    return source; // Literal value matches.
            }
            else {
                source = bindings.getValue(parameterArgs[index]);
            }
            // Constants passed or parameters bound may not be of the
            // type specified in the signature.
            Value value = new Value(type);
            TExecutionContext executionContext =
                new TExecutionContext(null, null, type,
                                      context, null, null, null);
            tclass.fromObject(executionContext, source, value);
            return value;
        }
View Full Code Here

Examples of com.foundationdb.server.types.TClass

    public int getDecimalScale() {
        return -1;
    }

    public static ProtobufRowConversion forTInstance(TInstance type) {
        TClass tclass = TInstance.tClass(type);
        if (tclass instanceof TBigDecimal) {
            int precision = type.attribute(DecimalAttribute.PRECISION);
            if (precision < 19) { // log10(Long.MAX_VALUE) = 18.965
                return new DecimalAsLong(type);
            }
View Full Code Here

Examples of com.foundationdb.server.types.TClass

            return;
        if (!state.hasAnyValue()) {
            ValueTargets.copyFrom(source, state);
            return;
        }
        TClass tClass = type.typeClass();
        assert stateType.typeClass().equals(tClass) : "incompatible types " + type + " and " + stateType;
        int comparison = TClass.compare(type, source, stateType, state);
        if (mType.condition(comparison))
            ValueTargets.copyFrom(source, state);
    }
View Full Code Here

Examples of com.foundationdb.server.types.TClass

                                           {"divide", "/"},
                                           {"div", "div"}};
       
        boolean assos[] = new boolean []{true, false, false};
        assert assos.length == names.length : "names and assos differ in length!";
        TClass types[][] = new TClass [][] {{ MDateAndTime.DATE, AkInterval.MONTHS},
                                            { MDateAndTime.DATETIME, AkInterval.MONTHS},
                                            { MDateAndTime.TIME, AkInterval.MONTHS},
                                            { MDateAndTime.TIMESTAMP, AkInterval.MONTHS},
                                            { MDateAndTime.YEAR, AkInterval.MONTHS},
View Full Code Here

Examples of com.foundationdb.server.types.TClass

                schemaName, tableName, columnName);
    }
   
    @Override
    public Class<?> jdbcClass(TInstance type) {
        TClass tclass = TInstance.tClass(type);
        if (tclass == MDateAndTime.DATE)
            return java.sql.Date.class;
        if ((tclass == MDateAndTime.TIMESTAMP) ||
            (tclass == MDateAndTime.DATETIME))
            return java.sql.Timestamp.class;
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.