Package com.foundationdb.qp.row

Examples of com.foundationdb.qp.row.HKey.copyFrom()


        HKey hkey = context.getStore().newHKey(rowType.hKey());
        Key key = context.getStore().createKey();
        byte decodedBytes[] = RowIndexer.decodeString(encoded);
        key.setEncodedSize(decodedBytes.length);
        System.arraycopy(decodedBytes, 0, key.getEncodedBytes(), 0, decodedBytes.length);
        hkey.copyFrom(key);
        return (Row)(ValuesHKey)hkey;
    }

}
View Full Code Here


        Key key = store.createKey();
       
        key.setEncodedSize(rowBytes.length);
        System.arraycopy(rowBytes, 0, key.getEncodedBytes(), 0, rowBytes.length);
       
        hkey.copyFrom(key);
       
        if (hkey instanceof ValuesHKey) {
            return ((Row)(ValuesHKey)hkey);
        } else {
            throw new UnsupportedOperationException("HKey type is not ValuesHKey");
View Full Code Here

            Key hKey = getKey(session, storeData);
            constructHKey(session, table.rowDef(), rowData, hKey);

            StoreAdapter adapter = createAdapter(session, SchemaCache.globalSchema(table.getAIS()));
            HKey persistitHKey = adapter.newHKey(table.hKey());
            persistitHKey.copyFrom(hKey);

            for(GroupIndex groupIndex : groupIndexes) {
                if(columnDifferences == null || groupIndex.columnsOverlap(table, columnDifferences)) {
                    StoreGIMaintenance plan = StoreGIMaintenancePlans
                            .forAis(table.getAIS())
View Full Code Here

                                                                  keySource, indexField));
                }
                PersistitKey.appendFieldFromKey(hKey, keySource, indexField, index.getIndexName());
            }
        }
        ancestorHKey.copyFrom(hKey);
        if (index.isTableIndex() && index.leafMostTable() != table) {
            this.leafTableHKey = ancestorHKey;
            ancestorHKey = keyCreator.newHKey(table.hKey());
            this.leafTableHKey.copyTo(ancestorHKey);
            ancestorHKey.useSegments(table.getDepth() + 1);
View Full Code Here

    public HKey ancestorHKey(Table table)
    {
        HKey ancestorHKey = hKeyCache.hKey(table);
        Key hKey = keyCreator.createKey();
        constructHKeyFromIndexKey(hKey, index.indexToHKey(table.getDepth()));
        ancestorHKey.copyFrom(hKey);
        return ancestorHKey;
    }

    // PersistitIndexRow interface
View Full Code Here

                adapter.persistit().expandRowData(adapter.getSession(), exchange, rowData);
                RowDef rowDef = adapter.schema().ais().getTable(rowData.getRowDefId()).rowDef();
                row.setRowDef(rowDef);
                row.setRowData(rowData);
                HKey persistitHKey = persistitHKey();
                persistitHKey.copyFrom(exchange.getKey());
            } catch (ArrayIndexOutOfBoundsException e) {
                exception = e;
            } catch (EncodingException e) {
                if (e.getCause() instanceof ArrayIndexOutOfBoundsException) {
                    exception = e;
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.