Package com.foundationdb.server.types.value

Examples of com.foundationdb.server.types.value.Value


                Row row = null;
                while ((row == null) && this.isActive()) {
                    row = input.next();
                    if (row == null) {
                        setIdle();
                        row = new ValuesRow(resultType, new Value(MNumeric.BIGINT.instance(false), count));
                    } else if (row.rowType() == countType) {
                        row = null;
                        count++;
                    }
                }
View Full Code Here


        if (context == null)
            throw new IllegalStateException("no context given");
        if (readyValue == null) {
            if (unreadyValue == null) {
                // first evaluation of this expression
                readyValue = new Value(underlyingType);
            }
            else {
                // readyValue is null, unreadyValue is not null. Means we've seen a QueryContext but have
                // not evaluated it. Set the readyValue to unreadyValue, as we've about to evaluate it.
                readyValue = unreadyValue;
View Full Code Here

    {
        this.subquery = subquery;
        this.outerRowType = outerRowType;
        this.innerRowType = innerRowType;
        this.bindingPosition = bindingPosition;
        this.value = new Value(underlying);
    }
View Full Code Here

        public TInstance preferredTarget(TPreptimeValue source) {
            TInstance intermediateTInstance = first.preferredTarget(source);
            ValueSource firstValue = source.value();
            TInstance result;
            if (firstValue != null) {
                Value intermediateValue = new Value(first.targetClass().instance(true));
                TExecutionContext context = new TExecutionContext(
                        Collections.singletonList(source.type()),
                        intermediateTInstance,
                        null // TODO is this null a problem?
                );
View Full Code Here

        public void evaluate(TExecutionContext context, ValueSource source, ValueTarget target) {
            if (source.isNull()) {
                target.putNull();
                return;
            }
            Value tmp = (Value) context.exectimeObjectAt(TMP_PVALUE);
            if (tmp == null) {
                tmp = new Value(first.targetClass().instance(true));
                context.putExectimeObject(TMP_PVALUE, tmp);
            }
            // TODO cache
            TExecutionContext firstContext = context.deriveContext(
                    Collections.singletonList(context.inputTypeAt(0)),
View Full Code Here

        context.set(CACHE_INDEX, p);
        ValueSource inputValue = inputs.get(0).value();
        if(inputValue != null) {
            // Constant input
            boolean matches = p.matcher(inputValue.getString()).find();
            Value value = new Value(context.getOutputType(), matches);
            return new TPreptimeValue(value);
        }

        return null;
    }
View Full Code Here

public final class TCastExpression implements TPreparedExpression {

    @Override
    public TPreptimeValue evaluateConstant(QueryContext queryContext) {
        TPreptimeValue inputValue = input.evaluateConstant(queryContext);
        Value value;
        if (inputValue == null || inputValue.value() == null) {
            value = null;
        }
        else {
            value = new Value(targetInstance);

            TExecutionContext context = new TExecutionContext(
                    new SparseArray<>(),
                    Collections.singletonList(input.resultType()),
                    targetInstance,
View Full Code Here

        private CastEvaluation(TEvaluatableExpression inputEval, TCast cast,
                               TInstance sourceInstance, TInstance targetInstance)
        {
            this.inputEval = inputEval;
            this.cast = cast;
            this.value = new Value(targetInstance);
            this.executionContext = new TExecutionContext(
                    Collections.singletonList(sourceInstance),
                    targetInstance,
                    null);
        }
View Full Code Here

        }

        private InnerEvaluation(int position, TInstance type) {
            this.position = position;
            this.type = type;
            this.value = new Value(type);
        }
View Full Code Here

        }

        @Override
        public void evaluate() {
            long next = context.getStore().sequenceNextValue(sequence);
            value = new Value(resultType);
            ValueSources.valueFromLong(next, value);
        }
View Full Code Here

TOP

Related Classes of com.foundationdb.server.types.value.Value

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.