Package com.foundationdb.server.types.texpressions

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


        OverlayingRow result = new OverlayingRow(original);
        int nfields = rowType.nFields();
        for (int i = 0; i < nfields; i++) {
            TPreparedExpression expression = pExpressions.get(i);
            if (expression != null) {
                TEvaluatableExpression evaluation = expression.build();
                evaluation.with(original);
                evaluation.with(context);
                evaluation.with(bindings);
                evaluation.evaluate();
                result.overlay(i, evaluation.resultValue());
            }
        }
        return result;
    }
View Full Code Here


        Execution(QueryContext context, QueryBindingsCursor bindingsCursor)
        {
            super(context, inputOperator.cursor(context, bindingsCursor));
            this.pEvaluations = new ArrayList<>(pExpressions.size());
            for (TPreparedExpression outerJoinRowExpressions : pExpressions) {
                TEvaluatableExpression eval = outerJoinRowExpressions.build();
                pEvaluations.add(eval);
            }
        }
View Full Code Here

        private Row emptySubstitute()
        {
            ValuesHolderRow valuesHolderRow = new ValuesHolderRow(rowType);
            int nFields = rowType.nFields();
            for (int i = 0; i < nFields; i++) {
                TEvaluatableExpression outerJoinRowColumnEvaluation = pEvaluations.get(i);
                outerJoinRowColumnEvaluation.with(context);
                outerJoinRowColumnEvaluation.with(bindings);
                outerJoinRowColumnEvaluation.evaluate();
                ValueTargets.copyFrom(
                        outerJoinRowColumnEvaluation.resultValue(),
                        valuesHolderRow.valueAt(i));
            }
            return valuesHolderRow;
        }
View Full Code Here

        OverlayingRow result = new OverlayingRow(original);
        int nfields = rowType.nFields();
        for (int i = 0; i < nfields; i++) {
            TPreparedExpression expression = pExpressions.get(i);
            if (expression != null) {
                TEvaluatableExpression evaluation = expression.build();
                evaluation.with(original);
                evaluation.with(context);
                evaluation.with(bindings);
                evaluation.evaluate();
                result.overlay(i, evaluation.resultValue());
            }
        }
        return result;
    }
View Full Code Here

        tInstances[i] = ordering.type(i);
    }

    @Override
    protected TEvaluatableExpression evaluation(API.Ordering ordering, QueryContext context, QueryBindings bindings, int i) {
        TEvaluatableExpression evaluation = ordering.expression(i).build();
        evaluation.with(context);
        evaluation.with(bindings);
        return evaluation;
    }
View Full Code Here

                    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

        return new TComparisonExpression(arg1, comparison, arg2);
    }

    @Override
    public boolean evaluateComparison(TPreparedExpression comparison, QueryContext queryContext) {
        TEvaluatableExpression eval = comparison.build();
        eval.evaluate();
        return eval.resultValue().getBoolean();
    }
View Full Code Here

        this.rowType = rowType;
        this.pExpressions = pExpressions;
        assert pExpressions != null : "pExpressions can not be null";
        this.pEvaluations = new ArrayList<>(pExpressions.size());
        for (TPreparedExpression expression : pExpressions) {
            TEvaluatableExpression evaluation = expression.build();
            evaluation.with(context);
            evaluation.with(bindings);
            this.pEvaluations.add(evaluation);
        }
    }
View Full Code Here

        return rowType;
    }

    @Override
    public ValueSource uncheckedValue(int i) {
        TEvaluatableExpression eval = pEvaluations.get(i);
        eval.evaluate();
        return eval.resultValue();
    }
View Full Code Here

                                    List<? extends TPreparedExpression> expressions, ExpressionAdapter<TPreparedExpression, TEvaluatableExpression> expressionAdapter) {
            super(input, bindingPosition, depth);
            this.storeAdapter = context.getStore();
            this.expressionAdapter = expressionAdapter;
            for (TPreparedExpression field : expressions) {
                TEvaluatableExpression eval = expressionAdapter.evaluate(field, context);
                fieldEvals.add(eval);
            }
        }
View Full Code Here

TOP

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

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.