Package com.foundationdb.server.types.texpressions

Examples of com.foundationdb.server.types.texpressions.TComparisonExpression


                TInstance common = TypeResolver.commonInstance(
                        castResolver, leftExpr.resultType(), rightExpr.resultType());
                leftExpr = castTo(leftExpr, common, castResolver);
                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();
View Full Code Here


        TKeyComparable keyComparable = comparison.getKeyComparable();
        if (keyComparable != null) {
            return new TKeyComparisonPreparation(left, comparison.getOperation(), right, comparison.getKeyComparable());
        }
        else {
            return new TComparisonExpression(left, comparison.getOperation(), right);
        }
    }
View Full Code Here

            return new TComparisonExpression(left, comparison.getOperation(), right);
        }
    }

    private TPreparedExpression collate(TPreparedExpression left, Comparison comparison, TPreparedExpression right, AkCollator collator) {
        return new TComparisonExpression(left,  comparison, right, collator);
    }
View Full Code Here

        } else if (loValueSource.isNull() || hiValueSource.isNull()) {
            throw new IllegalArgumentException(String.format("lo: %s, hi: %s", loValueSource, hiValueSource));
        } else {
            TInstance type = types[f];
            TPreparedExpression loEQHi =
                    new TComparisonExpression(
                            new TPreparedLiteral(type, loValueSource),
                            Comparison.EQ,
                            new TPreparedLiteral(type, hiValueSource)
                    );
            TEvaluatableExpression eval = loEQHi.build();
            eval.evaluate();
            if (!eval.resultValue().getBoolean()) {
                throw new IllegalArgumentException();
            }
        }
View Full Code Here

                                                ValueSource one,
                                                Comparison comparison,
                                                ValueSource two) {
        TPreparedExpression arg1 = new TPreparedLiteral(type, one);
        TPreparedExpression arg2 = new TPreparedLiteral(type, two);
        return new TComparisonExpression(arg1, comparison, arg2);
    }
View Full Code Here

TOP

Related Classes of com.foundationdb.server.types.texpressions.TComparisonExpression

Copyright © 2018 www.massapicom. 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.