Examples of hKey()


Examples of com.foundationdb.ais.model.Table.hKey()

        IndexToHKey indexToHKey = null;
        SDType parentStoreData = null;
        IndexRow parentPKIndexRow = null;

        // All columns of all segments of the HKey
        for(HKeySegment hKeySegment : table.hKey().segments()) {
            // Ordinal for this segment
            RowDef segmentRowDef = hKeySegment.table().rowDef();
            hKeyAppender.append(segmentRowDef.table().getOrdinal());
            // Segment's columns
            for(HKeyColumn hKeyColumn : hKeySegment.columns()) {
View Full Code Here

Examples of com.foundationdb.ais.model.Table.hKey()

                            break;
                        }
                    }
                }
                if (found) {
                    int[] keyDepth = table.hKey().keyDepth();
                    nextOrdinalIndex = keyDepth[keyDepth.length - 1];
                    seg = ordinal;
                }
            }
            key.append(seg);
View Full Code Here

Examples of com.foundationdb.ais.model.Table.hKey()

        int ordinal = hkey.decodeInt();
        assert (root.getOrdinal() == ordinal) : hkey;
        Table table = root;
        int index = 0;
        while (true) {
            int[] keyDepth = table.hKey().keyDepth();
            index = keyDepth[keyDepth.length - 1];
            if (index >= hkey.getDepth()) {
                return table.rowDef();
            }
            hkey.indexTo(index);
View Full Code Here

Examples of com.foundationdb.ais.model.Table.hKey()

             */
            hKey.clear();
            Table table = rowDef.table();
            PersistitKeyAppender hKeyAppender = PersistitKeyAppender.create(hKey, table.getName());
            List<Column> pkColumns = table.getPrimaryKeyIncludingInternal().getColumns();
            for(HKeySegment segment : table.hKey().segments()) {
                RowDef segmentRowDef = segment.table().rowDef();
                hKey.append(segmentRowDef.table().getOrdinal());
                for(HKeyColumn hKeyColumn : segment.columns()) {
                    Column column = hKeyColumn.column();
                    if(pkColumns.contains(column)) {
View Full Code Here

Examples of com.foundationdb.ais.model.Table.hKey()

            ret.printStackTrace();
            throw ret;
        }
        schema = SchemaCache.globalSchema(ais);
        indexedRowType = schema.tableRowType(table);
        hKeyRowType = schema.newHKeyRowType(table.hKey());
        fieldsByColumn = new HashMap<>(index.getKeyColumns().size());
        for (IndexColumn indexColumn : index.getKeyColumns()) {
            Column column = indexColumn.getColumn();
            IndexedField indexedField = new IndexedField(column);
            fieldsByColumn.put(column, indexedField);
View Full Code Here

Examples of com.foundationdb.ais.model.Table.hKey()

    }
   
    @Test
    public void testSegmentsTop() {
        Table customer = schema.ais().getTable("schema", "customer");
        ValuesHKey key = new ValuesHKey(schema.newHKeyRowType(customer.hKey()), registry);
        assertEquals(key.segments(), 1);
        assertEquals(key.rowType().nFields(), 1);
    }
   
    @Test
View Full Code Here

Examples of com.foundationdb.ais.model.Table.hKey()

    }
   
    @Test
    public void testSegmentsBottom() {
        Table item = schema.ais().getTable("schema", "item");
        ValuesHKey key = new ValuesHKey(schema.newHKeyRowType(item.hKey()), registry);
        assertEquals(key.segments(), 3);
        assertEquals(key.rowType().nFields(), 3);
    }
   
    @Test
View Full Code Here

Examples of com.foundationdb.ais.model.Table.hKey()

    }
   
    private ValuesHKey createHKey(String tableName) {
       
        Table table = schema.ais().getTable("schema", tableName);
        ValuesHKey key = new ValuesHKey(schema.newHKeyRowType(table.hKey()), registry);
        return key;
    }
   
    private int ordinal (String tableName) {
        return schema.ais().getTable("schema", tableName).getOrdinal().intValue();
View Full Code Here

Examples of com.foundationdb.qp.row.Row.hKey()

                lookupCursor.open();
                Row retrievedRow = lookupCursor.next();
                if (retrievedRow != null) {
                    // Retrieved row might not actually be what we were looking for -- not all ancestors are present,
                    // (there are orphan rows).
                    retrievedRow = hKey.equals(retrievedRow.hKey()) ? retrievedRow : null;
                }
                return retrievedRow;
            } finally {
                lookupCursor.close();
            }
View Full Code Here

Examples of com.foundationdb.qp.row.Row.hKey()

                            inputState.queryBindings = nextBindings;
                            for (int i = 0; i < ncursors; i++) {
                                if (i == keepInputCursorIndex) continue;
                                boolean deep = false;
                                if (i == branchCursorIndex) {
                                    row.hKey().copyTo(inputState.lookupHKeys[i]);
                                    if (branchRootOrdinal != -1) {
                                        inputState.lookupHKeys[i].extendWithOrdinal(branchRootOrdinal);
                                    }
                                    deep = true;
                                }
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.