Package com.foundationdb.server.rowdata

Examples of com.foundationdb.server.rowdata.RowDataValueSource.bind()


            // Copy the values into the array bindings
            RowDataValueSource pSource = new RowDataValueSource();
            for (int i=0; i < lookupCols.size(); ++i) {
                int bindingsIndex = i+1;
                Column col = lookupCols.get(i);
                pSource.bind(col.getFieldDef(), forRow);
                bindings.setValue(bindingsIndex, pSource);
            }
            cursor = API.cursor(planOperator, context, bindings);
            RUN_TAP.in();
            runTapEntered = true;
View Full Code Here


        RowDataValueSource valueSource = new RowDataValueSource();
        int nfields = rowDef.getFieldCount();
        Map<String,Object> value = new HashMap<>(nfields); // Intermediate form of value.
        for (int i = 0; i < nfields; i++) {
            FieldDef fieldDef = rowDef.getFieldDef(i);
            valueSource.bind(fieldDef, rowData);
            value.put(fieldDef.getName(), ValueSources.toObject(valueSource));
        }
        storeData.otherValue = value;
    }
View Full Code Here

                }
            } else {
                if (indexRowComp.isInRowData(indexField)) {
                    FieldDef fieldDef = fieldDefs[indexRowComp.getFieldPosition(indexField)];
                    Column column = fieldDef.column();
                    rowDataValueSource.bind(fieldDef, rowData);
                    pKeyTarget().append(rowDataValueSource,
                                        column.getType());
                } else if (indexRowComp.isInHKey(indexField)) {
                    PersistitKey.appendFieldFromKey(pKey(), hKey, indexRowComp.getHKeyPosition(indexField), index
                        .getIndexName());
View Full Code Here

    public static Tuple2 tupleFromRowData(RowDef rowDef, RowData rowData) {
        RowDataValueSource valueSource = new RowDataValueSource();
        int nfields = rowDef.getFieldCount();
        Object[] objects = new Object[nfields];
        for (int i = 0; i < nfields; i++) {
            valueSource.bind(rowDef.getFieldDef(i), rowData);
            objects[i] = ValueSources.toObject(valueSource);
        }
        return Tuple2.from(objects);
    }
View Full Code Here

        @Override
        public DynamicMessage encode(RowData rowData) {
            RowDataValueSource value = new RowDataValueSource();
            DynamicMessage.Builder builder = DynamicMessage.newBuilder(messageType);
            for (int i = 0; i < fields.length; i++) {
                value.bind(rowDef.getFieldDef(i), rowData);
                if (value.isNull()) {
                    if (nullFields != null) {
                        FieldDescriptor nullField = nullFields[i];
                        if (nullField != null) {
                            builder.setField(nullField, Boolean.TRUE);
View Full Code Here

    @Override
    public ValueSource uncheckedValue(int i) {
        FieldDef fieldDef = rowType.table().rowDef().getFieldDef(i);
        RowDataValueSource valueSource = valueSource(i);
        valueSource.bind(fieldDef, rowData);
        return valueSource;
    }

    @Override
    public RowData rowData() {
View Full Code Here

    @Override
    public ValueSource uncheckedValue(int i) {
        FieldDef fieldDef = rowDef().getFieldDef(i);
        RowData rowData = rowData();
        RowDataValueSource valueSource = ValueSource(i);
        valueSource.bind(fieldDef, rowData);
        return valueSource;
    }

    @Override
    public HKey hKey()
View Full Code Here

            RowDataValueSource parent = new RowDataValueSource();
            RowDataValueSource child = new RowDataValueSource();

            for (JoinColumn join : foreignKey.getJoinColumns()) {
                parent.bind(join.getParent().getFieldDef(), row);
                child.bind(join.getChild().getFieldDef(), row);
                TInstance pInst = parent.getType();
                TInstance cInst = child.getType();
                TKeyComparable comparable = typesRegistryService.getKeyComparable(pInst.typeClass(), cInst.typeClass());
                int c = (comparable != null) ?
                    comparable.getComparison().compare(pInst, parent, cInst, child) :
View Full Code Here

        RowDataValueSource source = new RowDataValueSource();
        PersistitKeyValueTarget target = new PersistitKeyValueTarget(ConstraintHandler.class.getSimpleName());
        target.attach(key);
        boolean anyNull = false;
        for (Column column : columns) {
            source.bind(column.getFieldDef(), row);
            if (source.isNull()) {
                target.putNull();
                anyNull = true;
            }
            else {
View Full Code Here

            if (i > 0) {
                str.append(" and ");
            }
            Column column = columns.get(i);
            str.append(column.getName()).append(" = ");
            source.bind(column.getFieldDef(), row);
            source.getType().format(source, appender);
        }
        return str.toString();
    }
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.