Examples of TPreparedLiteral


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

            public TPreparedExpression getTPreparedExpression() {
                TPreptimeValue tpv = ValueSources.fromObject(value, (TInstance) null);
               
                //FromObjectValueSource valueSource = new FromObjectValueSource().setReflectively(value);
                //TPreptimeValue tpv = ValueSources.fromObject(value, valueSource.getConversionType());
                return new TPreparedLiteral(tpv.type(), tpv.value());
            }
        };
    }
View Full Code Here

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

    {
        return new ExpressionGenerator() {
            @Override
            public TPreparedExpression getTPreparedExpression() {
                TPreptimeValue tpv = ValueSources.fromObject(value, type);
                return new TPreparedLiteral(tpv.type(), tpv.value());
            }
        };
    }
View Full Code Here

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

            QueryContext context = new SimpleQueryContext(newStoreAdapter(rowType.schema()));
            List<TPreparedExpression> expressions = new ArrayList<>();
            for(int i = 0; i < fields.length; ++i) {
                TInstance type = rowType.typeAt(i);
                TPreptimeValue val = ValueSources.fromObject(fields[i], type);
                expressions.add(new TPreparedLiteral(type, val.value()));
            }
            for(int i = fields.length; i < rowType.nFields(); ++i) {
                Column col = getColumn(rowType, i);
                if(col == null) {
                    throw new IllegalArgumentException("Column " + i + "not specified and no default: " + rowType);
View Full Code Here

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

                input = new ArrayList<>(2);
                input.add(ValueSources.fromObject(sequenceName.getSchemaName(), typesTranslator.typeForString(sequenceName.getSchemaName())));
                input.add(ValueSources.fromObject(sequenceName.getTableName(), typesTranslator.typeForString(sequenceName.getTableName())));
                arguments = new ArrayList<>(input.size());
                for (TPreptimeValue tpv : input) {
                    arguments.add(new TPreparedLiteral(tpv.type(), tpv.value()));
                }
            }
            else {
                functionName = column.getDefaultFunction();
                assert (functionName != null) : column;
View Full Code Here

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

    // For use by this class

    private Row intRow(RowType rowType, int x)
    {
        List<TPreparedExpression> pExpressions = Arrays.<TPreparedExpression>asList(new TPreparedLiteral(MNumeric.INT.instance(false), new Value(MNumeric.INT.instance(false), x)));
        return new ExpressionRow(rowType, queryContext, queryBindings, pExpressions);
    }
View Full Code Here

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

        TInstance[] insts = new TInstance[inputValues.size()];
        List<TPreparedExpression> exprs = new ArrayList<>(inputValues.size());
        int i = 0;
        for(String v : inputValues) {
            insts[i] = getTypesTranslator().typeForString(v);
            exprs.add(new TPreparedLiteral(insts[i], ValueSources.valuefromObject(v, insts[i])));
            ++i;
        }
        stream.rowType = schema().newValuesType(insts);
        List<BindableRow> bindableRows = Arrays.asList(BindableRow.of(stream.rowType, exprs, queryContext()));
        stream.operator = API.valuesScan_Default(bindableRows, stream.rowType);
View Full Code Here

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

        return new IndexBound(row(itemIidIndexRowType, iid, null, null), new SetColumnSelector(0));
    }

    private Row intRow(RowType rowType, int x)
    {
        List<TPreparedExpression> pExpressions = Arrays.<TPreparedExpression>asList(new TPreparedLiteral(MNumeric.INT.instance(false), new Value(MNumeric.INT.instance(false), x)));
        return new ExpressionRow(rowType, queryContext, queryBindings, pExpressions);
    }
View Full Code Here

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

    }

    private Row intRow(RowType rowType, int x)
    {
        List<TPreparedExpression> pExpressions;
        pExpressions = Arrays.asList((TPreparedExpression) new TPreparedLiteral(
                MNumeric.INT.instance(false), new Value(MNumeric.INT.instance(false), x)));
        return new ExpressionRow(rowType, queryContext, queryBindings, pExpressions);
    }
View Full Code Here

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

                                      defaultValueSource);
                    } else {
                        defaultValueSource = new Value(type, defaultValue);
                    }
                }
                expression = new TPreparedLiteral(type, defaultValueSource);
            }
        }
        return expression;
    }
View Full Code Here

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

        TPreptimeValue tpv = node.getPreptimeValue();
        if (tpv != null) {
            TInstance type = tpv.type();
            ValueSource value = tpv.value();
            if (type != null && value != null)
                result = new TPreparedLiteral(type, value);
        }
        return result;
    }
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.