Examples of TPreparedLiteral


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

        return result;
    }

    private TPreparedExpression literal(ConstantExpression expression) {
        TPreptimeValue ptval = expression.getPreptimeValue();
        return new TPreparedLiteral(ptval.type(), ptval.value());
    }
View Full Code Here

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

        TInstance intType = MNumeric.INT.instance(false);
        RowType xyValueRowType = schema.newValuesType(intType);
        List<BindableRow> keyRows = new ArrayList<>(keys.length);
        for (int key : keys) {
            List<TPreparedExpression> pExpressions =
                Arrays.<TPreparedExpression>asList(new TPreparedLiteral(intType, new Value(intType, key)));
            Row row = new ExpressionRow(xyValueRowType, queryContext, queryBindings, pExpressions);
            keyRows.add(BindableRow.of(row));
        }
        List<ExpressionGenerator> expressions = Arrays.asList(boundField(xyValueRowType, 0, 0));
        IndexBound xBound =
View Full Code Here

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

            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

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

    @Override
    public TPreparedExpression createComparison(TInstance type,
                                                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

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

        List<TPreparedExpression> pExpressions = new ArrayList<>(1);
      
        Value value = new Value(rowType.typeAt(columnNum));
        value.putNull();
        TPreptimeValue ptval = new TPreptimeValue (value.getType(), value);
        pExpressions.add(new TPreparedLiteral(ptval.type(), ptval.value()));
       
        ValuesRowType expectedType = schema.newValuesType(rowType.typeAt(columnNum));
       
        Row[] rows = objectToRows(expected, expectedType);
       
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.