Package com.foundationdb.server.rowdata

Examples of com.foundationdb.server.rowdata.RowDef


    @Test
    public void dateAndTimeTypes() throws InvalidOperationException {
        final int tid = createTableFromTypes(SCHEMA, TABLE, IS_PK, INDEXES,
                                             "MCOMPAT_ date", "MCOMPAT_ time", "MCOMPAT_ datetime", "MCOMPAT_ timestamp", "MCOMPAT_ year");
        final RowDef def = getRowDef(tid);
        testRow(def, 1, "0000-00-00", "00:00:00", "0000-00-00 00:00:00", 0L, "0000");           // zero
        testRow(def, 2, "1000-01-01", "-838:59:59", "1000-01-01 00:00:00", 0L, "1901");         // min
        testRow(def, 3, "9999-12-31", "838:59:59", "9999-12-31 23:59:59", 2147483647L, "2155"); // max
        testRow(def, 4, "2011-05-20", "17:34:20", "2011-05-20 17:35:01", 1305927301L, "2011")// other
    }
View Full Code Here


    @Override
    protected HKey hKey(KeyUpdateRow row)
    {
        HKey hKey = null;
        RowDef rowDef = row.getRowDef();
        if (rowDef == vendorRD) {
            hKey = new HKey(vendorRD, row.get(v_vid1), row.get(v_vid2));
        } else if (rowDef == customerRD) {
            hKey = new HKey(vendorRD, row.get(c_vid1), row.get(c_vid2),
                            customerRD, row.get(c_cid1), row.get(c_cid2));
View Full Code Here

        return hKey(row);
    }

    protected void checkInitialState(NewRow row)
    {
        RowDef rowDef = row.getRowDef();
        if (rowDef == vendorRD) {
            assertEquals(row.get(v_vx), ((Long)row.get(v_vid1)) * 100);
            assertEquals(row.get(v_vx), ((Long)row.get(v_vid2)) * 100);
        } else if (rowDef == customerRD) {
            assertEquals(row.get(c_vid1), ((Long) row.get(c_cid1)) / 10);
View Full Code Here

    @Override
    protected HKey hKey(KeyUpdateRow row)
    {
        HKey hKey = null;
        RowDef rowDef = row.getRowDef();
        if (rowDef == vendorRD) {
            hKey = new HKey(vendorRD, row.get(v_vid));
        } else if (rowDef == customerRD) {
            hKey = new HKey(vendorRD, row.get(c_vid),
                            customerRD, row.get(c_cid));
View Full Code Here

    @Override
    protected HKey hKey(KeyUpdateRow row, KeyUpdateRow parent, KeyUpdateRow grandparent)
    {
        HKey hKey = null;
        RowDef rowDef = row.getRowDef();
        if (rowDef == vendorRD) {
            hKey = new HKey(vendorRD, row.get(v_vid));
        } else if (rowDef == customerRD) {
            hKey = new HKey(vendorRD, row.get(c_vid),
                            customerRD, row.get(c_cid));
View Full Code Here

    @Override
    protected HKey hKey(KeyUpdateRow row)
    {
        HKey hKey = null;
        RowDef rowDef = row.getRowDef();
        if (rowDef == vendorRD) {
            hKey = new HKey(vendorRD, row.get(v_vid1), row.get(v_vid2));
        } else if (rowDef == customerRD) {
            hKey = new HKey(vendorRD, row.get(c_vid1), row.get(c_vid2),
                            customerRD, row.get(c_cid1), row.get(c_cid2));
View Full Code Here

    @Override
    protected HKey hKey(KeyUpdateRow row, KeyUpdateRow parent, KeyUpdateRow grandparent)
    {
        HKey hKey = null;
        RowDef rowDef = row.getRowDef();
        if (rowDef == vendorRD) {
            hKey = new HKey(vendorRD, row.get(v_vid1), row.get(v_vid2));
        } else if (rowDef == customerRD) {
            hKey = new HKey(vendorRD, row.get(c_vid1), row.get(c_vid2),
                            customerRD, row.get(c_cid1), row.get(c_cid2));
View Full Code Here

        return hKey;
    }

    protected void checkInitialState(NewRow row)
    {
        RowDef rowDef = row.getRowDef();
        if (rowDef == vendorRD) {
            assertEquals(row.get(v_vx), ((Long)row.get(v_vid1)) * 100);
            assertEquals(row.get(v_vx), ((Long)row.get(v_vid2)) * 100);
        } else if (rowDef == customerRD) {
            assertEquals(row.get(c_cx), ((Long)row.get(c_cid1)) * 100);
 
View Full Code Here

        int cB = 2;
        // Insert longs, not integers, because Persistit stores all ints as 8-byte.
        original.put(cId, 100);
        original.put(cA, 200);
        original.put(cB, 300);
        RowDef rowDef = getRowDef(t);
        RowData rowData = original.toRowData();
        NiceRow reconstituted = (NiceRow) NiceRow.fromRowData(rowData, rowDef);
        assertEquals(original, reconstituted);
    }
View Full Code Here

        int cB = 2;
        // Insert longs, not integers, because Persistit stores all ints as 8-byte.
        original.put(cId, 100);
        original.put(cA, 200);
        original.put(cB, null);
        RowDef rowDef = getRowDef(t);
        RowData rowData = original.toRowData();
        NiceRow reconstituted = (NiceRow) NiceRow.fromRowData(rowData, rowDef);
        assertEquals(original, reconstituted);
    }
View Full Code Here

TOP

Related Classes of com.foundationdb.server.rowdata.RowDef

Copyright © 2018 www.massapicom. 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.